]>
Commit | Line | Data |
---|---|---|
1 | package corehandlers | |
2 | ||
3 | import "github.com/aws/aws-sdk-go/aws/request" | |
4 | ||
5 | // ValidateParametersHandler is a request handler to validate the input parameters. | |
6 | // Validating parameters only has meaning if done prior to the request being sent. | |
7 | var ValidateParametersHandler = request.NamedHandler{Name: "core.ValidateParametersHandler", Fn: func(r *request.Request) { | |
8 | if !r.ParamsFilled() { | |
9 | return | |
10 | } | |
11 | ||
12 | if v, ok := r.Params.(request.Validator); ok { | |
13 | if err := v.Validate(); err != nil { | |
14 | r.Error = err | |
15 | } | |
16 | } | |
17 | }} |