Versions in this module Expand all Collapse all v0 v0.1.1 Mar 8, 2020 v0.1.0 Mar 8, 2020 Changes in this version + const CreatedAt + const SystemUserID + var SystemUserUUID = uuid.Nil + func CountOtherUsers(tx *storage.Connection, instanceID, id uuid.UUID) (int, error) + func DeleteInstance(conn *storage.Connection, instance *Instance) error + func FindUserWithRefreshToken(tx *storage.Connection, token string) (*User, *RefreshToken, error) + func IsDuplicatedEmail(tx *storage.Connection, instanceID uuid.UUID, email, aud string) (bool, error) + func IsNotFoundError(err error) bool + func Logout(tx *storage.Connection, instanceID uuid.UUID, id uuid.UUID) error + func NewAuditLogEntry(tx *storage.Connection, instanceID uuid.UUID, actor *User, action AuditAction, ...) error + func TruncateAll(conn *storage.Connection) error + type AuditAction string + const InviteAcceptedAction + const LoginAction + const LogoutAction + const TokenRefreshedAction + const TokenRevokedAction + const UserDeletedAction + const UserInvitedAction + const UserModifiedAction + const UserRecoveryRequestedAction + const UserSignedUpAction + type AuditLogEntry struct + CreatedAt time.Time + ID uuid.UUID + InstanceID uuid.UUID + Payload JSONMap + func FindAuditLogEntries(tx *storage.Connection, instanceID uuid.UUID, filterColumns []string, ...) ([]*AuditLogEntry, error) + func (AuditLogEntry) TableName() string + type Instance struct + BaseConfig *conf.Configuration + CreatedAt time.Time + ID uuid.UUID + UUID uuid.UUID + UpdatedAt time.Time + func GetInstance(tx *storage.Connection, instanceID uuid.UUID) (*Instance, error) + func GetInstanceByUUID(tx *storage.Connection, uuid uuid.UUID) (*Instance, error) + func (Instance) TableName() string + func (i *Instance) Config() (*conf.Configuration, error) + func (i *Instance) UpdateConfig(tx *storage.Connection, config *conf.Configuration) error + type InstanceNotFoundError struct + func (e InstanceNotFoundError) Error() string + type JSONMap map[string]interface + func (j JSONMap) Scan(src interface{}) error + func (j JSONMap) Value() (driver.Value, error) + type Pagination struct + Count uint64 + Page uint64 + PerPage uint64 + func (p *Pagination) Offset() uint64 + type RefreshToken struct + CreatedAt time.Time + ID int64 + InstanceID uuid.UUID + Revoked bool + Token string + UpdatedAt time.Time + UserID uuid.UUID + func GrantAuthenticatedUser(tx *storage.Connection, user *User) (*RefreshToken, error) + func GrantRefreshTokenSwap(tx *storage.Connection, user *User, token *RefreshToken) (*RefreshToken, error) + func (RefreshToken) TableName() string + type RefreshTokenNotFoundError struct + func (e RefreshTokenNotFoundError) Error() string + type SortDirection string + const Ascending + const Descending + type SortField struct + Dir SortDirection + Name string + type SortParams struct + Fields []SortField + type User struct + AppMetaData JSONMap + Aud string + ConfirmationSentAt *time.Time + ConfirmationToken string + ConfirmedAt *time.Time + CreatedAt time.Time + Email string + EmailChange string + EmailChangeSentAt *time.Time + EmailChangeToken string + EncryptedPassword string + ID uuid.UUID + InstanceID uuid.UUID + InvitedAt *time.Time + IsSuperAdmin bool + LastSignInAt *time.Time + RecoverySentAt *time.Time + RecoveryToken string + Role string + UpdatedAt time.Time + UserMetaData JSONMap + func FindUserByConfirmationToken(tx *storage.Connection, token string) (*User, error) + func FindUserByEmailAndAudience(tx *storage.Connection, instanceID uuid.UUID, email, aud string) (*User, error) + func FindUserByID(tx *storage.Connection, id uuid.UUID) (*User, error) + func FindUserByInstanceIDAndID(tx *storage.Connection, instanceID, id uuid.UUID) (*User, error) + func FindUserByRecoveryToken(tx *storage.Connection, token string) (*User, error) + func FindUsersInAudience(tx *storage.Connection, instanceID uuid.UUID, aud string, ...) ([]*User, error) + func NewSystemUser(instanceID uuid.UUID, aud string) *User + func NewUser(instanceID uuid.UUID, email, password, aud string, ...) (*User, error) + func (User) TableName() string + func (u *User) Authenticate(password string) bool + func (u *User) BeforeCreate(tx *pop.Connection) error + func (u *User) BeforeSave(tx *pop.Connection) error + func (u *User) BeforeUpdate(tx *pop.Connection) error + func (u *User) Confirm(tx *storage.Connection) error + func (u *User) ConfirmEmailChange(tx *storage.Connection) error + func (u *User) HasRole(roleName string) bool + func (u *User) IsConfirmed() bool + func (u *User) Recover(tx *storage.Connection) error + func (u *User) SetEmail(tx *storage.Connection, email string) error + func (u *User) SetRole(tx *storage.Connection, roleName string) error + func (u *User) UpdateAppMetaData(tx *storage.Connection, updates map[string]interface{}) error + func (u *User) UpdatePassword(tx *storage.Connection, password string) error + func (u *User) UpdateUserMetaData(tx *storage.Connection, updates map[string]interface{}) error + type UserNotFoundError struct + func (e UserNotFoundError) Error() string