Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrAmbiguousSchema occurs when more than one schema is found for a given // set of filter criteria. ErrAmbiguousSchema = errors.New("multiple schemas found") // ErrAmbiguousTablet occurs when more than one tablet is found for a given // set of filter criteria. ErrAmbiguousTablet = errors.New("multiple tablets found") // ErrAmbiguousWorkflow occurs when more than one workflow is found for a // set of filter criteria that should ordinarily never return more than one // workflow. ErrAmbiguousWorkflow = errors.New("multiple workflows found") // ErrInvalidRequest occurs when a request is invalid for any reason. // For example, if mandatory parameters are undefined. ErrInvalidRequest = errors.New("Invalid request") // ErrNoServingTablet occurs when a tablet with state SERVING cannot be // found for a given set of filter criteria. It is a more specific form of // ErrNoTablet ErrNoServingTablet = fmt.Errorf("%w with state=SERVING", ErrNoTablet) // ErrNoSrvVSchema occurs when no SrvVSchema is found for a given keyspace. ErrNoSrvVSchema = errors.New("SrvVSchema not found") // ErrNoTablet occurs when a tablet cannot be found for a given set of // filter criteria. ErrNoTablet = errors.New("no such tablet") // ErrNoWorkflow occurs when a workflow cannot be found for a given set of // filter criteria. ErrNoWorkflow = errors.New("no such workflow") // in a cluster that the rbac configuration does not allow. ErrUnauthorized = errors.New("unauthorized") // ErrUnsupportedCluster occurs when a cluster parameter is invalid. ErrUnsupportedCluster = errors.New("unsupported cluster(s)") )
Errors returned by API endpoints.
var ( // ErrNoFlag occurs when cluster config parsing encounters a flag specified // in the DSN that is not defined. ErrNoFlag = errors.New("flag provided but not defined") )
Errors returned by cluster setup and flag parsing.
Functions ¶
This section is empty.
Types ¶
type BadRequest ¶ added in v0.10.0
type BadRequest struct { Err error ErrDetails interface{} }
BadRequest is returned when some request parameter is invalid.
func (*BadRequest) Code ¶ added in v0.10.0
func (e *BadRequest) Code() string
func (*BadRequest) Details ¶ added in v0.10.0
func (e *BadRequest) Details() interface{}
func (*BadRequest) Error ¶ added in v0.10.0
func (e *BadRequest) Error() string
func (*BadRequest) HTTPStatus ¶ added in v0.10.0
func (e *BadRequest) HTTPStatus() int
type ErrInvalidCluster ¶
type ErrInvalidCluster struct {
Err error
}
ErrInvalidCluster is returned when a cluster parameter, either in a route or as a query param, is invalid.
func (*ErrInvalidCluster) Code ¶
func (e *ErrInvalidCluster) Code() string
func (*ErrInvalidCluster) Details ¶
func (e *ErrInvalidCluster) Details() interface{}
func (*ErrInvalidCluster) Error ¶
func (e *ErrInvalidCluster) Error() string
func (*ErrInvalidCluster) HTTPStatus ¶
func (e *ErrInvalidCluster) HTTPStatus() int
type MissingParams ¶
type MissingParams struct {
Params []string
}
MissingParams is returned when an HTTP handler requires parameters that were not provided.
func (*MissingParams) Code ¶
func (e *MissingParams) Code() string
func (*MissingParams) Details ¶
func (e *MissingParams) Details() interface{}
func (*MissingParams) Error ¶
func (e *MissingParams) Error() string
func (*MissingParams) HTTPStatus ¶
func (e *MissingParams) HTTPStatus() int
type NoSuchSchema ¶ added in v0.11.0
NoSuchSchema is returned when a schema definition cannot be found for a given set of filter criteria. Both GetSchema and FindSchema can return this error.
func (*NoSuchSchema) Code ¶ added in v0.11.0
func (e *NoSuchSchema) Code() string
func (*NoSuchSchema) Details ¶ added in v0.11.0
func (e *NoSuchSchema) Details() interface{}
func (*NoSuchSchema) Error ¶ added in v0.11.0
func (e *NoSuchSchema) Error() string
func (*NoSuchSchema) HTTPStatus ¶ added in v0.11.0
func (e *NoSuchSchema) HTTPStatus() int
type TypedError ¶
TypedError defines the behavior needed to strongly-type an error into an http response.
type Unknown ¶
type Unknown struct { Err error ErrDetails interface{} }
Unknown is the generic error, used when a more specific error is either unspecified or inappropriate.