Documentation
¶
Index ¶
- Variables
- type ActivityStore
- func (s *ActivityStore) ActivityStats(_ context.Context, filter types.ActivityStatsFilter) (types.ActivityStats, error)
- func (s *ActivityStore) ListActivity(_ context.Context, filter types.ActivityFilter) (types.ActivityPage, error)
- func (s *ActivityStore) Log(_ context.Context, record types.ActivityRecord) error
- type AuthRepository
- func (r *AuthRepository) AllowedTransitions(context.Context, uuid.UUID) ([]types.LifecycleTransition, error)
- func (r *AuthRepository) Create(_ context.Context, input *types.AuthUser) (*types.AuthUser, error)
- func (r *AuthRepository) GetByID(_ context.Context, id uuid.UUID) (*types.AuthUser, error)
- func (r *AuthRepository) GetByIdentifier(_ context.Context, identifier string) (*types.AuthUser, error)
- func (r *AuthRepository) ListUsers(_ context.Context, filter types.UserInventoryFilter) (types.UserInventoryPage, error)
- func (r *AuthRepository) ResetPassword(context.Context, uuid.UUID, string) error
- func (r *AuthRepository) Update(_ context.Context, input *types.AuthUser) (*types.AuthUser, error)
- func (r *AuthRepository) UpdateStatus(ctx context.Context, actor types.ActorRef, id uuid.UUID, ...) (*types.AuthUser, error)
- type PreferenceRepository
- func (r *PreferenceRepository) DeletePreference(_ context.Context, userID uuid.UUID, scope types.ScopeFilter, ...) error
- func (r *PreferenceRepository) ListPreferences(_ context.Context, filter types.PreferenceFilter) ([]types.PreferenceRecord, error)
- func (r *PreferenceRepository) UpsertPreference(_ context.Context, record types.PreferenceRecord) (*types.PreferenceRecord, error)
- type ProfileRepository
- type RoleRegistry
- func (r *RoleRegistry) AssignRole(_ context.Context, userID, roleID uuid.UUID, scope types.ScopeFilter, ...) error
- func (r *RoleRegistry) CreateRole(_ context.Context, input types.RoleMutation) (*types.RoleDefinition, error)
- func (r *RoleRegistry) DeleteRole(_ context.Context, id uuid.UUID, _ types.ScopeFilter, _ uuid.UUID) error
- func (r *RoleRegistry) GetRole(_ context.Context, id uuid.UUID, _ types.ScopeFilter) (*types.RoleDefinition, error)
- func (r *RoleRegistry) ListAssignments(_ context.Context, filter types.RoleAssignmentFilter) ([]types.RoleAssignment, error)
- func (r *RoleRegistry) ListRoles(_ context.Context, filter types.RoleFilter) (types.RolePage, error)
- func (r *RoleRegistry) UnassignRole(_ context.Context, userID, roleID uuid.UUID, scope types.ScopeFilter, ...) error
- func (r *RoleRegistry) UpdateRole(_ context.Context, id uuid.UUID, input types.RoleMutation) (*types.RoleDefinition, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ActivityStore ¶
type ActivityStore struct {
// contains filtered or unexported fields
}
ActivityStore logs activity entries in memory and exposes query helpers.
func NewActivityStore ¶
func NewActivityStore() *ActivityStore
NewActivityStore provisions the store.
func (*ActivityStore) ActivityStats ¶
func (s *ActivityStore) ActivityStats(_ context.Context, filter types.ActivityStatsFilter) (types.ActivityStats, error)
func (*ActivityStore) ListActivity ¶
func (s *ActivityStore) ListActivity(_ context.Context, filter types.ActivityFilter) (types.ActivityPage, error)
func (*ActivityStore) Log ¶
func (s *ActivityStore) Log(_ context.Context, record types.ActivityRecord) error
type AuthRepository ¶
type AuthRepository struct {
// contains filtered or unexported fields
}
AuthRepository is an in-memory implementation of both the auth repository and the user inventory repository contracts. It is only intended for examples.
func NewAuthRepository ¶
func NewAuthRepository() *AuthRepository
NewAuthRepository provisions an in-memory auth repository.
func (*AuthRepository) AllowedTransitions ¶
func (r *AuthRepository) AllowedTransitions(context.Context, uuid.UUID) ([]types.LifecycleTransition, error)
func (*AuthRepository) GetByIdentifier ¶
func (*AuthRepository) ListUsers ¶
func (r *AuthRepository) ListUsers(_ context.Context, filter types.UserInventoryFilter) (types.UserInventoryPage, error)
func (*AuthRepository) ResetPassword ¶
func (*AuthRepository) UpdateStatus ¶
func (r *AuthRepository) UpdateStatus(ctx context.Context, actor types.ActorRef, id uuid.UUID, next types.LifecycleState, opts ...types.TransitionOption) (*types.AuthUser, error)
type PreferenceRepository ¶
type PreferenceRepository struct {
// contains filtered or unexported fields
}
PreferenceRepository persists preference records in memory.
func NewPreferenceRepository ¶
func NewPreferenceRepository() *PreferenceRepository
NewPreferenceRepository provisions the repo.
func (*PreferenceRepository) DeletePreference ¶
func (r *PreferenceRepository) DeletePreference(_ context.Context, userID uuid.UUID, scope types.ScopeFilter, level types.PreferenceLevel, key string) error
func (*PreferenceRepository) ListPreferences ¶
func (r *PreferenceRepository) ListPreferences(_ context.Context, filter types.PreferenceFilter) ([]types.PreferenceRecord, error)
func (*PreferenceRepository) UpsertPreference ¶
func (r *PreferenceRepository) UpsertPreference(_ context.Context, record types.PreferenceRecord) (*types.PreferenceRecord, error)
type ProfileRepository ¶
type ProfileRepository struct {
// contains filtered or unexported fields
}
ProfileRepository stores profile rows in memory.
func NewProfileRepository ¶
func NewProfileRepository() *ProfileRepository
NewProfileRepository provisions the repo.
func (*ProfileRepository) GetProfile ¶
func (r *ProfileRepository) GetProfile(_ context.Context, userID uuid.UUID, scope types.ScopeFilter) (*types.UserProfile, error)
func (*ProfileRepository) UpsertProfile ¶
func (r *ProfileRepository) UpsertProfile(_ context.Context, profile types.UserProfile) (*types.UserProfile, error)
type RoleRegistry ¶
type RoleRegistry struct {
// contains filtered or unexported fields
}
RoleRegistry is an in-memory registry used by examples.
func NewRoleRegistry ¶
func NewRoleRegistry() *RoleRegistry
NewRoleRegistry provisions the registry.
func (*RoleRegistry) AssignRole ¶
func (r *RoleRegistry) AssignRole(_ context.Context, userID, roleID uuid.UUID, scope types.ScopeFilter, actor uuid.UUID) error
func (*RoleRegistry) CreateRole ¶
func (r *RoleRegistry) CreateRole(_ context.Context, input types.RoleMutation) (*types.RoleDefinition, error)
func (*RoleRegistry) DeleteRole ¶
func (r *RoleRegistry) DeleteRole(_ context.Context, id uuid.UUID, _ types.ScopeFilter, _ uuid.UUID) error
func (*RoleRegistry) GetRole ¶
func (r *RoleRegistry) GetRole(_ context.Context, id uuid.UUID, _ types.ScopeFilter) (*types.RoleDefinition, error)
func (*RoleRegistry) ListAssignments ¶
func (r *RoleRegistry) ListAssignments(_ context.Context, filter types.RoleAssignmentFilter) ([]types.RoleAssignment, error)
func (*RoleRegistry) ListRoles ¶
func (r *RoleRegistry) ListRoles(_ context.Context, filter types.RoleFilter) (types.RolePage, error)
func (*RoleRegistry) UnassignRole ¶
func (r *RoleRegistry) UnassignRole(_ context.Context, userID, roleID uuid.UUID, scope types.ScopeFilter, _ uuid.UUID) error
func (*RoleRegistry) UpdateRole ¶
func (r *RoleRegistry) UpdateRole(_ context.Context, id uuid.UUID, input types.RoleMutation) (*types.RoleDefinition, error)
Click to show internal directories.
Click to hide internal directories.