Documentation ¶
Index ¶
Constants ¶
const ( None = iota NotImplemented KeyNotFound CommonStateFieldsMissing InvalidCall ReadingFromStore IllegalArguments UnsupportedType ParsingToken Internal ParsingRequest UnmarshalingBody UpdateAuthorization PartialFailureToAddAuthz PartialFailureToUpdateAuthz StateDriverNotCreated KeyExists IllegalOperation AccessDenied UserNotFound LDAPConfigurationNotFound LDAPConnectionFailed LDAPAccessDenied LDAPGroupsNotFound LDAPMultipleEntries LocalAuthenticationFailed // N.B. Add all new error codes above this line. All error codes >= // LastError are invalid. LastError )
Error codes
Variables ¶
var ErrAccessDenied = NewError(AccessDenied, "Access Denied")
ErrAccessDenied is used when the user access is denied
var ErrCommonStateFieldsMissing = NewError(CommonStateFieldsMissing, "expected fields missing")
ErrCommonStateFieldsMissing indicates an error condition when the expected fields defined by the struct core.CommonState were not found as expected
var ErrIllegalArguments = NewError(IllegalArguments, "illegal arguments")
ErrIllegalArguments indicates that illegal arguments were received for an API call
var ErrIllegalOperation = NewError(IllegalOperation, "illegal operation")
ErrIllegalOperation is used when the user performs an operation which is not permitted in our system e.g. updating/deleting built-in users
var ErrInternal = NewError(Internal, "an internal error has occurred")
ErrInternal is returned from functions where internal logic runs into inconsistency issues.
var ErrInvalidCall = NewError(InvalidCall, "invalid method or function call")
ErrInvalidCall indicates an error condition when an invalid call to a method or function is being made
var ErrKeyExists = NewError(KeyExists, "key exists already in data store")
ErrKeyExists is used when the key already exists in the data store during insertion
var ErrKeyNotFound = NewError(KeyNotFound, "key not found")
ErrKeyNotFound indicates the error condition when a key is not found in the state store (which could be etcd or consul)
var ErrLDAPAccessDenied = NewError(LDAPAccessDenied, "LDAP/AD access denied")
ErrLDAPAccessDenied used when LDAP/AD access is denied
var ErrLDAPConfigurationNotFound = NewError(LDAPConfigurationNotFound, "LDAP/AD settings not found")
ErrLDAPConfigurationNotFound used when LDAP/AD configuration is not found from the data store
var ErrLDAPConnectionFailed = NewError(LDAPConnectionFailed, "LDAP/AD connection failed")
ErrLDAPConnectionFailed used when connection couldn't be established with `LDAP/Active Directory`
var ErrLDAPGroupsNotFound = NewError(LDAPGroupsNotFound, "No groups found, cannot process")
ErrLDAPGroupsNotFound used when LDAP/AD user is associated with just primary group
var ErrLDAPMultipleEntries = NewError(LDAPMultipleEntries, "Expected single entry; found multiple entries in AD")
ErrLDAPMultipleEntries used when LDAP/AD search returns multiple results when 1 is expected
var ErrLocalAuthenticationFailed = NewError(LocalAuthenticationFailed, "Local authentication failed")
ErrLocalAuthenticationFailed used when local authentication fails
var ErrNotImplemented = NewError(NotImplemented, "not implemented")
ErrNotImplemented indicates that the function desired is not implemented
var ErrParsingRequest = NewError(ParsingRequest, "failed to parse HTTP request body")
ErrParsingRequest indicates an error parsing the incoming HTTP request
var ErrParsingToken = NewError(ParsingToken, "failed to parse authz token")
ErrParsingToken indicates an error when trying to parse an authorization token
var ErrPartialFailureToAddAuthz = NewError(PartialFailureToAddAuthz, "failed to add authorization")
ErrPartialFailureToAddAuthz indicates an error when a new authorization is being added
var ErrPartialFailureToUpdateAuthz = NewError(PartialFailureToUpdateAuthz, "failed to update authorization")
ErrPartialFailureToUpdateAuthz indicates an error when an authorization is being updated
var ErrReadingFromStore = NewError(ReadingFromStore, "error reading from KV store")
ErrReadingFromStore indicates an error condition while reading from the KV store
var ErrStateDriverNotCreated = NewError(StateDriverNotCreated, "state driver not created")
ErrStateDriverNotCreated is used when the state driver is not initialized
ErrUnauthorized indicates that an authorization doesn't have a claim
var ErrUnmarshalingBody = NewError(UnmarshalingBody, "failed to unmarshall request body")
ErrUnmarshalingBody indicates an error unmarshalling request body
var ErrUnsupportedType = NewError(UnsupportedType, "Unsupported object type")
ErrUnsupportedType indicates that an unsupported object type was used in a function or method call, e.g. checkAccessClaim
var ErrUpdateAuthorization = NewError(UpdateAuthorization, "failed to update authorization")
ErrUpdateAuthorization indicates an error when updating an authorization
var ErrUserNotFound = NewError(UserNotFound, "User not found")
ErrUserNotFound used when the user is found