Versions in this module Expand all Collapse all v0 v0.1.0 Sep 22, 2023 Changes in this version + const AccessCookie + const ModuleName + const OrchestratorName + const RefreshCookie + const TokenRegExpStr + type GenerateTokens struct + AccessLife int64 + PermissionsString string + RefreshLife int64 + Secret string + User User + type JwtClaims struct + CreatedAtNano int64 + Email string + ExpiresAt int64 + ModulePermission string + OwnerId int64 + type Module struct + Id int64 + Name string + type ModulePayload struct + Action string + ModuleName string + ModulePermissions ModulePermissions + RequestId string + type ModulePermission struct + Id int64 + ModuleId int64 + ModuleName string + PermissionName string + type ModulePermissions map[string]StatusPermission + type Modules interface + Delete func() error + FilterByNames func(names ...string) Modules + Get func() (*Module, error) + Insert func(module Module) error + New func() Modules + Select func() ([]Module, error) + type Permission struct + Id int64 + ModuleId int64 + Name string + Status UserStatus + type Permissions interface + Delete func() error + FilterByStatus func(status UserStatus) Permissions + Get func() (*ModulePermission, error) + IncludeModules func() Permissions + Insert func(permission Permission) error + New func() Permissions + Select func() ([]ModulePermission, error) + type RefreshToken struct + OwnerId int64 + Token string + ValidTill int64 + type RefreshTokens interface + Create func(token RefreshToken) error + Delete func() error + FilterByLowerValidTill func(expiresAtUnix int64) RefreshTokens + FilterByTokens func(tokens ...string) RefreshTokens + Get func() (*RefreshToken, error) + New func() RefreshTokens + Select func() ([]RefreshToken, error) + type StatusPermission map[string]string + type User struct + Email string + Id int64 + Password string + Status UserStatus + type UserStatus string + const ADMIN + const SUPER_ADMIN + const USER + type Users interface + FilterByEmails func(emails ...string) Users + FilterByIds func(id ...int64) Users + Get func() (*User, error) + New func() Users