Documentation
¶
Index ¶
- Constants
- func CreateDeviceParamsFromStorage(src *storage.CreateDeviceParams) *pg.CreateDeviceParams
- func CreatePermissionParamsFromStorage(src *storage.CreatePermissionParams) *pg.CreatePermissionParams
- func CreateSessionParamsFromStorage(src *storage.CreateSessionParams) *pg.CreateSessionParams
- func CreateUserActionParamsFromStorage(src *storage.CreateUserActionParams) *pg.CreateUserActionParams
- func CreateUserParamsFromStorage(src *storage.CreateUserParams) *pg.CreateUserParams
- func CreateUserPermissionParamsFromStorage(src *storage.CreateUserPermissionParams) *pg.CreateUserPermissionParams
- func CreateUserPreferencesParamsFromStorage(src *storage.CreateUserPreferencesParams) *pg.CreateUserPreferencesParams
- func CreateUserProfileParamsFromStorage(src *storage.CreateUserProfileParams) *pg.CreateUserProfileParams
- func CreateUserStateParamsFromStorage(src *storage.CreateUserStateParams) *pg.CreateUserStateParams
- func CreateUserVerificationParamsFromStorage(src *storage.CreateUserVerificationParams) *pg.CreateUserVerificationParams
- func DeleteUserPermissionParamsFromStorage(src *storage.DeleteUserPermissionParams) *pg.DeleteUserPermissionParams
- func DivaActionToStorage(src *pg.DivaAction) *storage.DivaAction
- func DivaActionVerificationToStorage(src *pg.GetUserVerificationRow) *storage.DivaActionVerification
- func DivaDeviceToStorage(src *pg.DivaDevice) *storage.DivaDevice
- func DivaPermissionToStorage(src *pg.DivaPermission) *storage.DivaPermission
- func DivaSessionToStorage(src *pg.DivaSession) *storage.DivaSession
- func DivaUserDeviceToStorage(src *pg.DivaUserDevice) *storage.DivaUserDevice
- func DivaUserPermissionToStorage(src *pg.DivaUserPermission) *storage.DivaUserPermission
- func DivaUserPreferenceToStorage(src *pg.DivaUserPreference) *storage.DivaUserPreference
- func DivaUserProfileToStorage(src *pg.DivaUserProfile) *storage.DivaUserProfile
- func DivaUserStateToStorage(src *pg.DivaUserState) *storage.DivaUserState
- func DivaUserToStorage(src *pg.DivaUser) *storage.DivaUser
- func GetUserActionByUserAndNameParamsFromStorage(src *storage.GetUserActionByUserAndNameParams) *pg.GetUserActionByUserAndNameParams
- func GetUserPermissionByNameParamsFromStorage(src *storage.GetUserPermissionByNameParams) *pg.GetUserPermissionByNameParams
- func GetUserPermissionParamsFromStorage(src *storage.GetUserPermissionParams) *pg.GetUserPermissionParams
- func ListPermissionsParamsFromStorage(src *storage.ListPermissionsParams) *pg.ListPermissionsParams
- func ListUsersParamsFromStorage(src *storage.ListUsersParams) *pg.ListUsersParams
- func New(cfg *PGConf) (storage.Storage, error)
- func NewPGConf() config.Config
- func UpdateEmailParamsFromStorage(src *storage.UpdateEmailParams) *pg.UpdateEmailParams
- func UpdatePasswordParamsFromStorage(src *storage.UpdatePasswordParams) *pg.UpdatePasswordParams
- func UpdatePermissionActionParamsFromStorage(src *storage.UpdatePermissionActionParams) *pg.UpdatePermissionActionParams
- func UpdatePermissionParamsFromStorage(src *storage.UpdatePermissionParams) *pg.UpdatePermissionParams
- func UpdatePermissionRoleLevelParamsFromStorage(src *storage.UpdatePermissionRoleLevelParams) *pg.UpdatePermissionRoleLevelParams
- func UpdatePhoneNumberParamsFromStorage(src *storage.UpdatePhoneNumberParams) *pg.UpdatePhoneNumberParams
- func UpdateRoleParamsFromStorage(src *storage.UpdateRoleParams) *pg.UpdateRoleParams
- func UpdateSessionParamsFromStorage(src *storage.UpdateSessionParams) *pg.UpdateSessionParams
- func UpdateSessionStatusParamsFromStorage(src *storage.UpdateSessionStatusParams) *pg.UpdateSessionStatusParams
- func UpdateUserPermissionParamsFromStorage(src *storage.UpdateUserPermissionParams) *pg.UpdateUserPermissionParams
- func UpdateUserPreferencesParamsFromStorage(src *storage.UpdateUserPreferencesParams) *pg.UpdateUserPreferencesParams
- func UpdateUserProfileAvatarParamsFromStorage(src *storage.UpdateUserProfileAvatarParams) *pg.UpdateUserProfileAvatarParams
- func UpdateUserProfileParamsFromStorage(src *storage.UpdateUserProfileParams) *pg.UpdateUserProfileParams
- func UpdateUserStatusParamsFromStorage(src *storage.UpdateUserStatusParams) *pg.UpdateUserStatusParams
- func UpdateUserVerificationParamsFromStorage(src *storage.UpdateUserVerificationParams) *pg.UpdateUserVerificationParams
- func UpdateUserVerifiedParamsFromStorage(src *storage.UpdateUserVerifiedParams) *pg.UpdateUserVerifiedParams
- func UpdateUsernameParamsFromStorage(src *storage.UpdateUsernameParams) *pg.UpdateUsernameParams
- type DeviceStore
- func (s *DeviceStore) CreateDevice(ctx context.Context, arg *storage.CreateDeviceParams) error
- func (s *DeviceStore) CreateUserDevice(ctx context.Context, arg *storage.CreateUserDeviceParams) error
- func (s *DeviceStore) DeleteUserDevice(ctx context.Context, userID uuid.UUID, deviceID uuid.UUID) error
- func (s *DeviceStore) GetDeviceByID(ctx context.Context, id uuid.UUID) (*storage.DivaDevice, error)
- func (s *DeviceStore) GetDeviceByName(ctx context.Context, name string) (*storage.DivaDevice, error)
- func (s *DeviceStore) GetUserDevice(ctx context.Context, userID uuid.UUID, deviceID uuid.UUID) (*storage.DivaUserDevice, error)
- func (s *DeviceStore) ListAllDevices(ctx context.Context) ([]storage.DivaDevice, error)
- func (s *DeviceStore) ListUserDevices(ctx context.Context, userID uuid.UUID) ([]storage.DivaUserDevice, error)
- type PGConf
- type PGStorage
- func (s *PGStorage) Close() error
- func (s *PGStorage) DeviceStore() storage.DeviceStore
- func (s *PGStorage) Health(ctx context.Context) storage.HealthResult
- func (s *PGStorage) PermissionStore() storage.PermissionStore
- func (s *PGStorage) SessionStore() storage.SessionStore
- func (s *PGStorage) UserActionStore() storage.UserActionStore
- func (s *PGStorage) UserPermissionStore() storage.UserPermissionStore
- func (s *PGStorage) UserPreferenceStore() storage.UserPreferenceStore
- func (s *PGStorage) UserProfileStore() storage.UserProfileStore
- func (s *PGStorage) UserStateStore() storage.UserStateStore
- func (s *PGStorage) UserStore() storage.UserStore
- func (s *PGStorage) UserVerificationStore() storage.UserVerificationStore
- type PermissionStore
- func (s *PermissionStore) CountPermissions(ctx context.Context) (int64, error)
- func (s *PermissionStore) CreatePermission(ctx context.Context, arg *storage.CreatePermissionParams) error
- func (s *PermissionStore) DeletePermission(ctx context.Context, id uuid.UUID) error
- func (s *PermissionStore) GetPermissionByID(ctx context.Context, id uuid.UUID) (*storage.DivaPermission, error)
- func (s *PermissionStore) GetPermissionByName(ctx context.Context, action string) (*storage.DivaPermission, error)
- func (s *PermissionStore) ListPermissions(ctx context.Context, arg *storage.ListPermissionsParams) ([]storage.DivaPermission, error)
- func (s *PermissionStore) RestorePermission(ctx context.Context, id uuid.UUID) error
- func (s *PermissionStore) SoftDeletePermission(ctx context.Context, id uuid.UUID) error
- func (s *PermissionStore) UpdatePermission(ctx context.Context, arg *storage.UpdatePermissionParams) error
- func (s *PermissionStore) UpdatePermissionAction(ctx context.Context, arg *storage.UpdatePermissionActionParams) error
- func (s *PermissionStore) UpdatePermissionRoleLevel(ctx context.Context, arg *storage.UpdatePermissionRoleLevelParams) error
- type SessionStore
- func (s *SessionStore) CloseAllByUser(ctx context.Context, userID uuid.UUID) error
- func (s *SessionStore) CloseExpiredSessions(ctx context.Context) error
- func (s *SessionStore) CreateSession(ctx context.Context, arg *storage.CreateSessionParams) error
- func (s *SessionStore) DeleteSessionsForever(ctx context.Context) error
- func (s *SessionStore) GetSessionByID(ctx context.Context, id uuid.UUID) (*storage.DivaSession, error)
- func (s *SessionStore) ListSessions(ctx context.Context) ([]storage.DivaSession, error)
- func (s *SessionStore) ListSessionsByUser(ctx context.Context, userID uuid.UUID) ([]storage.DivaSession, error)
- func (s *SessionStore) SoftDeleteSession(ctx context.Context, id uuid.UUID) error
- func (s *SessionStore) UpdateSession(ctx context.Context, arg *storage.UpdateSessionParams) error
- func (s *SessionStore) UpdateSessionStatus(ctx context.Context, arg *storage.UpdateSessionStatusParams) error
- type UserActionStore
- func (s *UserActionStore) CreateUserAction(ctx context.Context, arg *storage.CreateUserActionParams) error
- func (s *UserActionStore) DeleteExpiredActions(ctx context.Context) error
- func (s *UserActionStore) DeleteUserAction(ctx context.Context, id uuid.UUID) error
- func (s *UserActionStore) DeleteUserActionByUser(ctx context.Context, userID uuid.UUID) error
- func (s *UserActionStore) GetUserActionByID(ctx context.Context, id uuid.UUID) (*storage.DivaAction, error)
- func (s *UserActionStore) GetUserActionByUserAndName(ctx context.Context, arg *storage.GetUserActionByUserAndNameParams) (*storage.DivaAction, error)
- func (s *UserActionStore) ListActionsByUser(ctx context.Context, userID uuid.UUID) ([]storage.DivaAction, error)
- type UserPermissionStore
- func (s *UserPermissionStore) CreateUserPermission(ctx context.Context, arg *storage.CreateUserPermissionParams) error
- func (s *UserPermissionStore) DeleteExpiredUserPermissions(ctx context.Context) error
- func (s *UserPermissionStore) DeleteUserPermission(ctx context.Context, arg *storage.DeleteUserPermissionParams) error
- func (s *UserPermissionStore) GetUserPermission(ctx context.Context, arg *storage.GetUserPermissionParams) (*storage.DivaUserPermission, error)
- func (s *UserPermissionStore) GetUserPermissionByName(ctx context.Context, arg *storage.GetUserPermissionByNameParams) (*storage.DivaUserPermission, error)
- func (s *UserPermissionStore) GetUserPermissions(ctx context.Context, userID uuid.UUID) ([]storage.DivaUserPermission, error)
- func (s *UserPermissionStore) UpdateUserPermission(ctx context.Context, arg *storage.UpdateUserPermissionParams) error
- type UserPreferenceStore
- func (s *UserPreferenceStore) CreateUserPreferences(ctx context.Context, arg *storage.CreateUserPreferencesParams) error
- func (s *UserPreferenceStore) GetPreferencesByID(ctx context.Context, id uuid.UUID) (*storage.DivaUserPreference, error)
- func (s *UserPreferenceStore) GetPreferencesByUser(ctx context.Context, userID uuid.UUID) ([]storage.DivaUserPreference, error)
- func (s *UserPreferenceStore) UpdateUserPreferences(ctx context.Context, arg *storage.UpdateUserPreferencesParams) error
- type UserProfileStore
- func (s *UserProfileStore) CreateUserProfile(ctx context.Context, arg *storage.CreateUserProfileParams) error
- func (s *UserProfileStore) GetUserProfileByUserID(ctx context.Context, userID uuid.UUID) (*storage.DivaUserProfile, error)
- func (s *UserProfileStore) UpdateUserProfile(ctx context.Context, arg *storage.UpdateUserProfileParams) error
- func (s *UserProfileStore) UpdateUserProfileAvatar(ctx context.Context, arg *storage.UpdateUserProfileAvatarParams) error
- type UserStateStore
- func (s *UserStateStore) CreateUserState(ctx context.Context, arg *storage.CreateUserStateParams) error
- func (s *UserStateStore) GetUserStateByUserID(ctx context.Context, userID uuid.UUID) (*storage.DivaUserState, error)
- func (s *UserStateStore) UpdateLastActiveAt(ctx context.Context, userID uuid.UUID) error
- func (s *UserStateStore) UpdateUserStatus(ctx context.Context, arg *storage.UpdateUserStatusParams) error
- func (s *UserStateStore) UpdateUserVerified(ctx context.Context, arg *storage.UpdateUserVerifiedParams) error
- type UserStore
- func (s *UserStore) CountUsers(ctx context.Context) (int64, error)
- func (s *UserStore) CreateUser(ctx context.Context, arg *storage.CreateUserParams) error
- func (s *UserStore) DeleteUser(ctx context.Context, id uuid.UUID) error
- func (s *UserStore) GetUserByEmail(ctx context.Context, email string) (*storage.DivaUser, error)
- func (s *UserStore) GetUserByID(ctx context.Context, id uuid.UUID) (*storage.DivaUser, error)
- func (s *UserStore) GetUserByUsername(ctx context.Context, username string) (*storage.DivaUser, error)
- func (s *UserStore) GetUserByUsernameOrEmail(ctx context.Context, identifier string) (*storage.DivaUser, error)
- func (s *UserStore) ListUsers(ctx context.Context, arg *storage.ListUsersParams) ([]storage.DivaUser, error)
- func (s *UserStore) RestoreUser(ctx context.Context, id uuid.UUID) error
- func (s *UserStore) SoftDeleteUser(ctx context.Context, id uuid.UUID) error
- func (s *UserStore) UpdateEmail(ctx context.Context, arg *storage.UpdateEmailParams) error
- func (s *UserStore) UpdatePassword(ctx context.Context, arg *storage.UpdatePasswordParams) error
- func (s *UserStore) UpdatePhoneNumber(ctx context.Context, arg *storage.UpdatePhoneNumberParams) error
- func (s *UserStore) UpdateRole(ctx context.Context, arg *storage.UpdateRoleParams) error
- func (s *UserStore) UpdateUsername(ctx context.Context, arg *storage.UpdateUsernameParams) error
- type UserVerificationStore
- func (s *UserVerificationStore) CreateUserVerification(ctx context.Context, arg *storage.CreateUserVerificationParams) error
- func (s *UserVerificationStore) DeleteUserVerification(ctx context.Context, actionID uuid.UUID) error
- func (s *UserVerificationStore) GetUserVerification(ctx context.Context, actionID uuid.UUID) (*storage.DivaActionVerification, error)
- func (s *UserVerificationStore) UpdateUserVerification(ctx context.Context, arg *storage.UpdateUserVerificationParams) error
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func CreateDeviceParamsFromStorage ¶
func CreateDeviceParamsFromStorage(src *storage.CreateDeviceParams) *pg.CreateDeviceParams
func CreatePermissionParamsFromStorage ¶
func CreatePermissionParamsFromStorage(src *storage.CreatePermissionParams) *pg.CreatePermissionParams
func CreateSessionParamsFromStorage ¶
func CreateSessionParamsFromStorage(src *storage.CreateSessionParams) *pg.CreateSessionParams
func CreateUserActionParamsFromStorage ¶
func CreateUserActionParamsFromStorage(src *storage.CreateUserActionParams) *pg.CreateUserActionParams
func CreateUserParamsFromStorage ¶
func CreateUserParamsFromStorage(src *storage.CreateUserParams) *pg.CreateUserParams
func CreateUserPermissionParamsFromStorage ¶
func CreateUserPermissionParamsFromStorage(src *storage.CreateUserPermissionParams) *pg.CreateUserPermissionParams
func CreateUserPreferencesParamsFromStorage ¶
func CreateUserPreferencesParamsFromStorage(src *storage.CreateUserPreferencesParams) *pg.CreateUserPreferencesParams
func CreateUserProfileParamsFromStorage ¶
func CreateUserProfileParamsFromStorage(src *storage.CreateUserProfileParams) *pg.CreateUserProfileParams
func CreateUserStateParamsFromStorage ¶
func CreateUserStateParamsFromStorage(src *storage.CreateUserStateParams) *pg.CreateUserStateParams
func CreateUserVerificationParamsFromStorage ¶
func CreateUserVerificationParamsFromStorage(src *storage.CreateUserVerificationParams) *pg.CreateUserVerificationParams
func DeleteUserPermissionParamsFromStorage ¶
func DeleteUserPermissionParamsFromStorage(src *storage.DeleteUserPermissionParams) *pg.DeleteUserPermissionParams
func DivaActionToStorage ¶
func DivaActionToStorage(src *pg.DivaAction) *storage.DivaAction
func DivaActionVerificationToStorage ¶
func DivaActionVerificationToStorage(src *pg.GetUserVerificationRow) *storage.DivaActionVerification
func DivaDeviceToStorage ¶
func DivaDeviceToStorage(src *pg.DivaDevice) *storage.DivaDevice
func DivaPermissionToStorage ¶
func DivaPermissionToStorage(src *pg.DivaPermission) *storage.DivaPermission
func DivaSessionToStorage ¶
func DivaSessionToStorage(src *pg.DivaSession) *storage.DivaSession
func DivaUserDeviceToStorage ¶
func DivaUserDeviceToStorage(src *pg.DivaUserDevice) *storage.DivaUserDevice
func DivaUserPermissionToStorage ¶
func DivaUserPermissionToStorage(src *pg.DivaUserPermission) *storage.DivaUserPermission
func DivaUserPreferenceToStorage ¶
func DivaUserPreferenceToStorage(src *pg.DivaUserPreference) *storage.DivaUserPreference
func DivaUserProfileToStorage ¶
func DivaUserProfileToStorage(src *pg.DivaUserProfile) *storage.DivaUserProfile
func DivaUserStateToStorage ¶
func DivaUserStateToStorage(src *pg.DivaUserState) *storage.DivaUserState
func GetUserActionByUserAndNameParamsFromStorage ¶
func GetUserActionByUserAndNameParamsFromStorage(src *storage.GetUserActionByUserAndNameParams) *pg.GetUserActionByUserAndNameParams
func GetUserPermissionByNameParamsFromStorage ¶
func GetUserPermissionByNameParamsFromStorage(src *storage.GetUserPermissionByNameParams) *pg.GetUserPermissionByNameParams
func GetUserPermissionParamsFromStorage ¶
func GetUserPermissionParamsFromStorage(src *storage.GetUserPermissionParams) *pg.GetUserPermissionParams
func ListPermissionsParamsFromStorage ¶
func ListPermissionsParamsFromStorage(src *storage.ListPermissionsParams) *pg.ListPermissionsParams
func ListUsersParamsFromStorage ¶
func ListUsersParamsFromStorage(src *storage.ListUsersParams) *pg.ListUsersParams
func UpdateEmailParamsFromStorage ¶
func UpdateEmailParamsFromStorage(src *storage.UpdateEmailParams) *pg.UpdateEmailParams
func UpdatePasswordParamsFromStorage ¶
func UpdatePasswordParamsFromStorage(src *storage.UpdatePasswordParams) *pg.UpdatePasswordParams
func UpdatePermissionActionParamsFromStorage ¶
func UpdatePermissionActionParamsFromStorage(src *storage.UpdatePermissionActionParams) *pg.UpdatePermissionActionParams
func UpdatePermissionParamsFromStorage ¶
func UpdatePermissionParamsFromStorage(src *storage.UpdatePermissionParams) *pg.UpdatePermissionParams
func UpdatePermissionRoleLevelParamsFromStorage ¶
func UpdatePermissionRoleLevelParamsFromStorage(src *storage.UpdatePermissionRoleLevelParams) *pg.UpdatePermissionRoleLevelParams
func UpdatePhoneNumberParamsFromStorage ¶
func UpdatePhoneNumberParamsFromStorage(src *storage.UpdatePhoneNumberParams) *pg.UpdatePhoneNumberParams
func UpdateRoleParamsFromStorage ¶
func UpdateRoleParamsFromStorage(src *storage.UpdateRoleParams) *pg.UpdateRoleParams
func UpdateSessionParamsFromStorage ¶
func UpdateSessionParamsFromStorage(src *storage.UpdateSessionParams) *pg.UpdateSessionParams
func UpdateSessionStatusParamsFromStorage ¶
func UpdateSessionStatusParamsFromStorage(src *storage.UpdateSessionStatusParams) *pg.UpdateSessionStatusParams
func UpdateUserPermissionParamsFromStorage ¶
func UpdateUserPermissionParamsFromStorage(src *storage.UpdateUserPermissionParams) *pg.UpdateUserPermissionParams
func UpdateUserPreferencesParamsFromStorage ¶
func UpdateUserPreferencesParamsFromStorage(src *storage.UpdateUserPreferencesParams) *pg.UpdateUserPreferencesParams
func UpdateUserProfileAvatarParamsFromStorage ¶
func UpdateUserProfileAvatarParamsFromStorage(src *storage.UpdateUserProfileAvatarParams) *pg.UpdateUserProfileAvatarParams
func UpdateUserProfileParamsFromStorage ¶
func UpdateUserProfileParamsFromStorage(src *storage.UpdateUserProfileParams) *pg.UpdateUserProfileParams
func UpdateUserStatusParamsFromStorage ¶
func UpdateUserStatusParamsFromStorage(src *storage.UpdateUserStatusParams) *pg.UpdateUserStatusParams
func UpdateUserVerificationParamsFromStorage ¶
func UpdateUserVerificationParamsFromStorage(src *storage.UpdateUserVerificationParams) *pg.UpdateUserVerificationParams
func UpdateUserVerifiedParamsFromStorage ¶
func UpdateUserVerifiedParamsFromStorage(src *storage.UpdateUserVerifiedParams) *pg.UpdateUserVerifiedParams
func UpdateUsernameParamsFromStorage ¶
func UpdateUsernameParamsFromStorage(src *storage.UpdateUsernameParams) *pg.UpdateUsernameParams
Types ¶
type DeviceStore ¶
type DeviceStore struct {
// contains filtered or unexported fields
}
func NewDeviceStore ¶
func NewDeviceStore(q *pg.Queries) *DeviceStore
func (*DeviceStore) CreateDevice ¶
func (s *DeviceStore) CreateDevice(ctx context.Context, arg *storage.CreateDeviceParams) error
func (*DeviceStore) CreateUserDevice ¶
func (s *DeviceStore) CreateUserDevice(ctx context.Context, arg *storage.CreateUserDeviceParams) error
func (*DeviceStore) DeleteUserDevice ¶
func (*DeviceStore) GetDeviceByID ¶
func (s *DeviceStore) GetDeviceByID(ctx context.Context, id uuid.UUID) (*storage.DivaDevice, error)
func (*DeviceStore) GetDeviceByName ¶
func (s *DeviceStore) GetDeviceByName(ctx context.Context, name string) (*storage.DivaDevice, error)
func (*DeviceStore) GetUserDevice ¶
func (s *DeviceStore) GetUserDevice(ctx context.Context, userID uuid.UUID, deviceID uuid.UUID) (*storage.DivaUserDevice, error)
func (*DeviceStore) ListAllDevices ¶
func (s *DeviceStore) ListAllDevices(ctx context.Context) ([]storage.DivaDevice, error)
func (*DeviceStore) ListUserDevices ¶
func (s *DeviceStore) ListUserDevices(ctx context.Context, userID uuid.UUID) ([]storage.DivaUserDevice, error)
type PGConf ¶
type PGConf struct {
Name string `json:"name" validate:"required"`
Host string `json:"host" validate:"required"`
Port uint16 `json:"port" validate:"required"`
Username string `json:"username" validate:"required"`
Password string `json:"password" validate:"required"`
Schema string `json:"schema"`
Options string `json:"options"`
}
func (*PGConf) LoadDefault ¶
func (c *PGConf) LoadDefault()
func (*PGConf) LoadFromEnv ¶
func (c *PGConf) LoadFromEnv()
type PGStorage ¶
type PGStorage struct {
// contains filtered or unexported fields
}
func (*PGStorage) DeviceStore ¶
func (s *PGStorage) DeviceStore() storage.DeviceStore
func (*PGStorage) PermissionStore ¶
func (s *PGStorage) PermissionStore() storage.PermissionStore
func (*PGStorage) SessionStore ¶
func (s *PGStorage) SessionStore() storage.SessionStore
func (*PGStorage) UserActionStore ¶
func (s *PGStorage) UserActionStore() storage.UserActionStore
func (*PGStorage) UserPermissionStore ¶
func (s *PGStorage) UserPermissionStore() storage.UserPermissionStore
func (*PGStorage) UserPreferenceStore ¶
func (s *PGStorage) UserPreferenceStore() storage.UserPreferenceStore
func (*PGStorage) UserProfileStore ¶
func (s *PGStorage) UserProfileStore() storage.UserProfileStore
func (*PGStorage) UserStateStore ¶
func (s *PGStorage) UserStateStore() storage.UserStateStore
func (*PGStorage) UserVerificationStore ¶
func (s *PGStorage) UserVerificationStore() storage.UserVerificationStore
type PermissionStore ¶
type PermissionStore struct {
// contains filtered or unexported fields
}
func NewPermissionStore ¶
func NewPermissionStore(q *pg.Queries) *PermissionStore
func (*PermissionStore) CountPermissions ¶
func (s *PermissionStore) CountPermissions(ctx context.Context) (int64, error)
func (*PermissionStore) CreatePermission ¶
func (s *PermissionStore) CreatePermission(ctx context.Context, arg *storage.CreatePermissionParams) error
func (*PermissionStore) DeletePermission ¶
func (*PermissionStore) GetPermissionByID ¶
func (s *PermissionStore) GetPermissionByID(ctx context.Context, id uuid.UUID) (*storage.DivaPermission, error)
func (*PermissionStore) GetPermissionByName ¶
func (s *PermissionStore) GetPermissionByName(ctx context.Context, action string) (*storage.DivaPermission, error)
func (*PermissionStore) ListPermissions ¶
func (s *PermissionStore) ListPermissions(ctx context.Context, arg *storage.ListPermissionsParams) ([]storage.DivaPermission, error)
func (*PermissionStore) RestorePermission ¶
func (*PermissionStore) SoftDeletePermission ¶
func (*PermissionStore) UpdatePermission ¶
func (s *PermissionStore) UpdatePermission(ctx context.Context, arg *storage.UpdatePermissionParams) error
func (*PermissionStore) UpdatePermissionAction ¶
func (s *PermissionStore) UpdatePermissionAction(ctx context.Context, arg *storage.UpdatePermissionActionParams) error
func (*PermissionStore) UpdatePermissionRoleLevel ¶
func (s *PermissionStore) UpdatePermissionRoleLevel(ctx context.Context, arg *storage.UpdatePermissionRoleLevelParams) error
type SessionStore ¶
type SessionStore struct {
// contains filtered or unexported fields
}
func NewSessionStore ¶
func NewSessionStore(q *pg.Queries) *SessionStore
func (*SessionStore) CloseAllByUser ¶
func (*SessionStore) CloseExpiredSessions ¶
func (s *SessionStore) CloseExpiredSessions(ctx context.Context) error
func (*SessionStore) CreateSession ¶
func (s *SessionStore) CreateSession(ctx context.Context, arg *storage.CreateSessionParams) error
func (*SessionStore) DeleteSessionsForever ¶
func (s *SessionStore) DeleteSessionsForever(ctx context.Context) error
func (*SessionStore) GetSessionByID ¶
func (s *SessionStore) GetSessionByID(ctx context.Context, id uuid.UUID) (*storage.DivaSession, error)
func (*SessionStore) ListSessions ¶
func (s *SessionStore) ListSessions(ctx context.Context) ([]storage.DivaSession, error)
func (*SessionStore) ListSessionsByUser ¶
func (s *SessionStore) ListSessionsByUser(ctx context.Context, userID uuid.UUID) ([]storage.DivaSession, error)
func (*SessionStore) SoftDeleteSession ¶
func (*SessionStore) UpdateSession ¶
func (s *SessionStore) UpdateSession(ctx context.Context, arg *storage.UpdateSessionParams) error
func (*SessionStore) UpdateSessionStatus ¶
func (s *SessionStore) UpdateSessionStatus(ctx context.Context, arg *storage.UpdateSessionStatusParams) error
type UserActionStore ¶
type UserActionStore struct {
// contains filtered or unexported fields
}
func NewUserActionStore ¶
func NewUserActionStore(q *pg.Queries) *UserActionStore
func (*UserActionStore) CreateUserAction ¶
func (s *UserActionStore) CreateUserAction(ctx context.Context, arg *storage.CreateUserActionParams) error
func (*UserActionStore) DeleteExpiredActions ¶
func (s *UserActionStore) DeleteExpiredActions(ctx context.Context) error
func (*UserActionStore) DeleteUserAction ¶
func (*UserActionStore) DeleteUserActionByUser ¶
func (*UserActionStore) GetUserActionByID ¶
func (s *UserActionStore) GetUserActionByID(ctx context.Context, id uuid.UUID) (*storage.DivaAction, error)
func (*UserActionStore) GetUserActionByUserAndName ¶
func (s *UserActionStore) GetUserActionByUserAndName(ctx context.Context, arg *storage.GetUserActionByUserAndNameParams) (*storage.DivaAction, error)
func (*UserActionStore) ListActionsByUser ¶
func (s *UserActionStore) ListActionsByUser(ctx context.Context, userID uuid.UUID) ([]storage.DivaAction, error)
type UserPermissionStore ¶
type UserPermissionStore struct {
// contains filtered or unexported fields
}
func NewUserPermissionStore ¶
func NewUserPermissionStore(q *pg.Queries) *UserPermissionStore
func (*UserPermissionStore) CreateUserPermission ¶
func (s *UserPermissionStore) CreateUserPermission(ctx context.Context, arg *storage.CreateUserPermissionParams) error
func (*UserPermissionStore) DeleteExpiredUserPermissions ¶
func (s *UserPermissionStore) DeleteExpiredUserPermissions(ctx context.Context) error
func (*UserPermissionStore) DeleteUserPermission ¶
func (s *UserPermissionStore) DeleteUserPermission(ctx context.Context, arg *storage.DeleteUserPermissionParams) error
func (*UserPermissionStore) GetUserPermission ¶
func (s *UserPermissionStore) GetUserPermission(ctx context.Context, arg *storage.GetUserPermissionParams) (*storage.DivaUserPermission, error)
func (*UserPermissionStore) GetUserPermissionByName ¶
func (s *UserPermissionStore) GetUserPermissionByName(ctx context.Context, arg *storage.GetUserPermissionByNameParams) (*storage.DivaUserPermission, error)
func (*UserPermissionStore) GetUserPermissions ¶
func (s *UserPermissionStore) GetUserPermissions(ctx context.Context, userID uuid.UUID) ([]storage.DivaUserPermission, error)
func (*UserPermissionStore) UpdateUserPermission ¶
func (s *UserPermissionStore) UpdateUserPermission(ctx context.Context, arg *storage.UpdateUserPermissionParams) error
type UserPreferenceStore ¶
type UserPreferenceStore struct {
// contains filtered or unexported fields
}
func NewUserPreferenceStore ¶
func NewUserPreferenceStore(q *pg.Queries) *UserPreferenceStore
func (*UserPreferenceStore) CreateUserPreferences ¶
func (s *UserPreferenceStore) CreateUserPreferences(ctx context.Context, arg *storage.CreateUserPreferencesParams) error
func (*UserPreferenceStore) GetPreferencesByID ¶
func (s *UserPreferenceStore) GetPreferencesByID(ctx context.Context, id uuid.UUID) (*storage.DivaUserPreference, error)
func (*UserPreferenceStore) GetPreferencesByUser ¶
func (s *UserPreferenceStore) GetPreferencesByUser(ctx context.Context, userID uuid.UUID) ([]storage.DivaUserPreference, error)
func (*UserPreferenceStore) UpdateUserPreferences ¶
func (s *UserPreferenceStore) UpdateUserPreferences(ctx context.Context, arg *storage.UpdateUserPreferencesParams) error
type UserProfileStore ¶
type UserProfileStore struct {
// contains filtered or unexported fields
}
func NewUserProfileStore ¶
func NewUserProfileStore(q *pg.Queries) *UserProfileStore
func (*UserProfileStore) CreateUserProfile ¶
func (s *UserProfileStore) CreateUserProfile(ctx context.Context, arg *storage.CreateUserProfileParams) error
func (*UserProfileStore) GetUserProfileByUserID ¶
func (s *UserProfileStore) GetUserProfileByUserID(ctx context.Context, userID uuid.UUID) (*storage.DivaUserProfile, error)
func (*UserProfileStore) UpdateUserProfile ¶
func (s *UserProfileStore) UpdateUserProfile(ctx context.Context, arg *storage.UpdateUserProfileParams) error
func (*UserProfileStore) UpdateUserProfileAvatar ¶
func (s *UserProfileStore) UpdateUserProfileAvatar(ctx context.Context, arg *storage.UpdateUserProfileAvatarParams) error
type UserStateStore ¶
type UserStateStore struct {
// contains filtered or unexported fields
}
func NewUserStateStore ¶
func NewUserStateStore(q *pg.Queries) *UserStateStore
func (*UserStateStore) CreateUserState ¶
func (s *UserStateStore) CreateUserState(ctx context.Context, arg *storage.CreateUserStateParams) error
func (*UserStateStore) GetUserStateByUserID ¶
func (s *UserStateStore) GetUserStateByUserID(ctx context.Context, userID uuid.UUID) (*storage.DivaUserState, error)
func (*UserStateStore) UpdateLastActiveAt ¶
func (*UserStateStore) UpdateUserStatus ¶
func (s *UserStateStore) UpdateUserStatus(ctx context.Context, arg *storage.UpdateUserStatusParams) error
func (*UserStateStore) UpdateUserVerified ¶
func (s *UserStateStore) UpdateUserVerified(ctx context.Context, arg *storage.UpdateUserVerifiedParams) error
type UserStore ¶
type UserStore struct {
// contains filtered or unexported fields
}
func NewUserStore ¶
func (*UserStore) CreateUser ¶
func (*UserStore) DeleteUser ¶
func (*UserStore) GetUserByEmail ¶
func (*UserStore) GetUserByID ¶
func (*UserStore) GetUserByUsername ¶
func (*UserStore) GetUserByUsernameOrEmail ¶
func (*UserStore) RestoreUser ¶
func (*UserStore) SoftDeleteUser ¶
func (*UserStore) UpdateEmail ¶
func (*UserStore) UpdatePassword ¶
func (*UserStore) UpdatePhoneNumber ¶
func (*UserStore) UpdateRole ¶
func (*UserStore) UpdateUsername ¶
type UserVerificationStore ¶
type UserVerificationStore struct {
// contains filtered or unexported fields
}
func NewUserVerificationStore ¶
func NewUserVerificationStore(q *pg.Queries) *UserVerificationStore
func (*UserVerificationStore) CreateUserVerification ¶
func (s *UserVerificationStore) CreateUserVerification(ctx context.Context, arg *storage.CreateUserVerificationParams) error
func (*UserVerificationStore) DeleteUserVerification ¶
func (*UserVerificationStore) GetUserVerification ¶
func (s *UserVerificationStore) GetUserVerification(ctx context.Context, actionID uuid.UUID) (*storage.DivaActionVerification, error)
func (*UserVerificationStore) UpdateUserVerification ¶
func (s *UserVerificationStore) UpdateUserVerification(ctx context.Context, arg *storage.UpdateUserVerificationParams) error
Click to show internal directories.
Click to hide internal directories.