Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is returned when an aggregate is not known to the system. ErrNotFound = errors.New("aggregate not found") // ErrDeleted is returned when an aggregate has been deleted. ErrDeleted = errors.New("aggregate is deleted") // ErrUnknownAggregateType is returned returned when an unknown or invalid aggregate type is used. ErrUnknownAggregateType = errors.New("aggregate type unknown") ErrUnauthorized = errors.New("unauthorized") // ErrUserNotFound is returned when a user is not known to the system. ErrUserNotFound = errors.New("user not found") // ErrUserAlreadyExists is returned when a user does already exist. ErrUserAlreadyExists = errors.New("user already exists") // ErrUserRoleBindingAlreadyExists is returned when a userrolebinding does already exist. ErrUserRoleBindingAlreadyExists = errors.New("userrolebinding already exists") // ErrUserRoleBindingNotFound is returned when a binding by that name or id cannot be found. ErrUserRoleBindingNotFound = errors.New("userrolebinding not found") // ErrTenantNotFound is returned when a tenant is not known to the system. ErrTenantNotFound = errors.New("tenant not found") // ErrTenantAlreadyExists is returned when a tenant does already exist. ErrTenantAlreadyExists = errors.New("tenant already exists") // ErrClusterRegistrationNotFound is returned when a cluster registration is not known to the system. ErrClusterRegistrationNotFound = errors.New("cluster registration not found") // ErrClusterRegistrationAlreadyExists is returned when an aggregate does already exist. ErrClusterRegistrationAlreadyExists = errors.New("cluster registration already exists") // ErrClusterNotFound is returned when a cluster is not known to the system. ErrClusterNotFound = errors.New("cluster not found") // ErrClusterAlreadyExists is returned when a cluster does already exist. ErrClusterAlreadyExists = errors.New("cluster already exists") // ErrCertificateAlreadyExists is returned when a cert does already exist. ErrCertificateAlreadyExists = errors.New("certificate already exists") // ErrTenantClusterBindingAlreadyExists is returned when a tenant-cluster-binding does already exist. ErrTenantClusterBindingAlreadyExists = errors.New("tenant already has access to that cluster") )
Functions ¶
func ErrFailedPrecondition ¶
Returns a gRPC status error with FailedPrecondition code
func ErrInvalidArgument ¶
Returns a gRPC status error with InvalidArgument code
func TranslateFromGrpcError ¶
TranslateFromGrpcError takes an error that could be an error received via gRPC and converts it to a specific domain error to make it easily comparable.
func TranslateToGrpcError ¶
TranslateToGrpcError converts an error to a gRPC status error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.