package
0.0.0-20210213030830-2a11bd686b34
Repository: https://github.com/johncoleman83/cerebrum.git
Documentation: pkg.go.dev
# Functions
NewRoleFromRoleID contains all valid roles.
# Constants
AccountAdminRole can edit account specific things.
AdminRole has admin specific permissions.
SuperAdminRole has all permissions.
TeamAdminRole can edit team specific things.
UserRole is a standard user.
# Variables
ErrBadRequest (400) is returned for bad request (validation).
ErrGeneric is used for testing purposes and for errors handled later in the callstack.
ErrUnauthorized (401) is returned when user is not authorized.
ValidRoles contains all valid roles mapped to their ID.
# Structs
Account represents account model.
AuthToken holds authentication token details with refresh token.
AuthUser represents data stored in JWT token for user.
Base contains common fields for all tables.
ListQuery holds account/team data used for list db queries.
Pagination holds paginations data.
PaginationReq holds pagination http fields and tags.
RefreshToken holds authentication token details.
Role model.
Team represents account team model.
User represents user domain model.
# Interfaces
Logger represents logging interface.
RBACService represents role-based access control service interface.
# Type aliases
AccessRole represents access role type.