Documentation
¶
Index ¶
Constants ¶
View Source
const ( MetaKeyResource = "__resource" MetaKeyRESTHttpMethod = "__http_method" MetaKeyRESTHttpPath = "__http_path" )
View Source
const (
AuthOptionPermToken = "__perm_token"
)
Variables ¶
View Source
var ( ErrResourceNil = errors.New("resource cannot be nil") ErrResourceNameEmpty = errors.New("resource name cannot be empty") ErrOperationNotFound = errors.New("operation not found") ErrOperationActionEmpty = errors.New("operation action cannot be empty") ErrNoRouterForKind = errors.New("no router can handle operation type") ErrNoRouterFound = errors.New("no router found") ErrNoHandlerResolverFound = errors.New("no handler resolver found") ErrHandlerRequired = errors.New("handler is required for REST operations") ErrMethodNotFound = errors.New("api action method not found") ErrMethodAmbiguous = errors.New("api action method matches multiple methods") ErrHandlerInvalidReturnType = errors.New("handler method has invalid return type, must be 'error'") ErrHandlerTooManyReturns = errors.New("handler method has too many return values") ErrHandlerMustBeFunc = errors.New("provided handler must be a function") ErrHandlerNil = errors.New("provided handler function cannot be nil") )
Sentinel errors for API engine operations.
Functions ¶
Types ¶
type BaseError ¶
type BaseError struct {
Identifier *api.Identifier
Err error
}
type DuplicateError ¶
func (*DuplicateError) Error ¶
func (e *DuplicateError) Error() string
type NotFoundError ¶
type NotFoundError struct {
BaseError
Suggestion *api.Identifier
}
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.