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 ¶
BadRequest is returned when some request parameter is invalid.
func (*BadRequest) Code ¶
func (e *BadRequest) Code() string
func (*BadRequest) Details ¶
func (e *BadRequest) Details() any
func (*BadRequest) Error ¶
func (e *BadRequest) Error() string
func (*BadRequest) HTTPStatus ¶
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() any
func (*ErrInvalidCluster) Error ¶
func (e *ErrInvalidCluster) Error() string
func (*ErrInvalidCluster) HTTPStatus ¶
func (e *ErrInvalidCluster) HTTPStatus() int
type Internal ¶
Internal is returned when an http adapter encounters an internal error (e.g. an internal route variable name changed).
Functionally, this is the same as Unknown with a different error code.
func (*Internal) HTTPStatus ¶
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() any
func (*MissingParams) Error ¶
func (e *MissingParams) Error() string
func (*MissingParams) HTTPStatus ¶
func (e *MissingParams) HTTPStatus() int
type NoSuchSchema ¶
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 ¶
func (e *NoSuchSchema) Code() string
func (*NoSuchSchema) Details ¶
func (e *NoSuchSchema) Details() any
func (*NoSuchSchema) Error ¶
func (e *NoSuchSchema) Error() string
func (*NoSuchSchema) HTTPStatus ¶
func (e *NoSuchSchema) HTTPStatus() int
type TypedError ¶
TypedError defines the behavior needed to strongly-type an error into an http response.
type Unknown ¶
Unknown is the generic error, used when a more specific error is either unspecified or inappropriate.