package
0.0.0-20250118164806-5041dba8c4b1
Repository: https://github.com/go-lumen/lumen-api.git
Documentation: pkg.go.dev
# Functions
AuthContext retrieves the authenticated context for current store user.
CreateIfNotExists is used to set the CreateIfNotExists flag.
Current allows to retrieve user from context.
EnsureGenericModel ensures that a model implement GenericModel interface.
FromContext allows to get store from context.
GetFindOptions retrieves common options from varargs.
GetUpdateOptions retrieves options from varargs.
ID is a shortcut for creating an id filter.
NewGodContext creates a god in memory context.
OnlyFields is used to set the OnlyFields flag.
ToContext allows to set a value in store.
WithCache is used to set the Cache flag.
WithLimit is used to set the Limit flag.
WithSort is used to add a SortedFields.
# Constants
AppKey for external access.
CurrentUserGroupKey for user group.
CurrentUserKey for user.
RoleAdmin have access to everything on its group.
RoleCustomer have access.
RoleGod have access to everything.
RoleUser have access to everything that was created by himself.
SortAscending for sorting in ascending order.
SortDescending for sorting in ascending order.
StoreKey for storing.
# Structs
Context is an advanced context for authenticated users.
DefaultRoles implements default role for basic models.
FindOptions represents store common optional parameters.
SortOption represents a sorted field.
UpdateOptions represents store update optional parameters.
# Interfaces
BeforeCreator add a BeforeCreate callback.
BeforeCreatorWithContext add a BeforeCreate callback with context.
GenericModel represents a generic mongo model.
Group is a generic store group.
Model represents a generic store model.
MongoFindAllOptioner represents default mongo FindOptions.
RoleChecker defines a standard interface for role checking.
Setter interface.
Store interface.
User is a generic store user.
# Type aliases
FindOption is an updater function used to update FindOptions.
SortOrder represents a sort direction.
UpdateOption is an updater function used to update UpdateOptions.
UserRole represents an user role.