auth

Paddy 2014-12-14 Parent:5bccbed6631b Child:bc77a315f823

102:267483f168b5 Go to Latest

auth/request.go

Require config.Init in Context, add comment. Add comment to config.Init explaining what it is, to make golint happy. Create an ErrConfigNotInitialized error to use when a Config object is used to create a Context before it is initialized. Check for Config initialization in NewContext and throw ErrConfigNotInitialized if the Config hasn't been initialized.

History
1 package auth
3 const (
4 requestErrAccessDenied = "access_denied"
5 requestErrInsufficient = "insufficient"
6 requestErrOverflow = "overflow"
7 requestErrInvalidValue = "invalid_value"
8 requestErrInvalidFormat = "invalid_format"
9 requestErrMissing = "missing"
10 requestErrNotFound = "not_found"
11 requestErrConflig = "conflict"
12 requestErrActOfGod = "act_of_god"
13 )
15 type requestError struct {
16 Slug string `json:"error,omitempty"`
17 Field string `json:"field,omitempty"`
18 Param string `json:"param,omitempty"`
19 Header string `json:"header,omitempty"`
20 }