Documentation
¶
Index ¶
- type AccountsService
- func (s *AccountsService) Create(ctx context.Context, userID string, request types.CreateAccountRequest) (*models.Account, error)
- func (s *AccountsService) Delete(ctx context.Context, accountID string) error
- func (s *AccountsService) GetByID(ctx context.Context, accountID string) (*models.Account, error)
- func (s *AccountsService) GetByUserID(ctx context.Context, userID string) ([]models.Account, error)
- func (s *AccountsService) Update(ctx context.Context, accountID string, request types.UpdateAccountRequest) (*models.Account, error)
- type ImpersonationService
- func (s *ImpersonationService) GetAllImpersonations(ctx context.Context) ([]types.Impersonation, error)
- func (s *ImpersonationService) GetImpersonationByID(ctx context.Context, impersonationID string) (*types.Impersonation, error)
- func (s *ImpersonationService) StartImpersonation(ctx context.Context, actorUserID string, actorSessionID *string, ...) (*types.StartImpersonationResult, error)
- func (s *ImpersonationService) StopImpersonation(ctx context.Context, actorUserID string, ...) error
- type StateService
- func (s *StateService) BanUser(ctx context.Context, userID string, request types.BanUserRequest, ...) (*types.AdminUserState, error)
- func (s *StateService) CreateSessionState(ctx context.Context, sessionID string, request types.CreateSessionStateRequest, ...) (*types.AdminSessionState, error)
- func (s *StateService) CreateUserState(ctx context.Context, userID string, request types.CreateUserStateRequest, ...) (*types.AdminUserState, error)
- func (s *StateService) DeleteSessionState(ctx context.Context, sessionID string) error
- func (s *StateService) DeleteUserState(ctx context.Context, userID string) error
- func (s *StateService) GetBannedUserStates(ctx context.Context) ([]types.AdminUserState, error)
- func (s *StateService) GetRevokedSessionStates(ctx context.Context) ([]types.AdminSessionState, error)
- func (s *StateService) GetSessionState(ctx context.Context, sessionID string) (*types.AdminSessionState, error)
- func (s *StateService) GetUserAdminSessions(ctx context.Context, userID string) ([]types.AdminUserSession, error)
- func (s *StateService) GetUserState(ctx context.Context, userID string) (*types.AdminUserState, error)
- func (s *StateService) RevokeSession(ctx context.Context, sessionID string, reason *string, actorUserID *string) (*types.AdminSessionState, error)
- func (s *StateService) UnbanUser(ctx context.Context, userID string) (*types.AdminUserState, error)
- func (s *StateService) UpdateSessionState(ctx context.Context, sessionID string, request types.UpsertSessionStateRequest, ...) (*types.AdminSessionState, error)
- func (s *StateService) UpdateUserState(ctx context.Context, userID string, request types.UpsertUserStateRequest, ...) (*types.AdminUserState, error)
- func (s *StateService) UpsertSessionState(ctx context.Context, sessionID string, request types.UpsertSessionStateRequest, ...) (*types.AdminSessionState, error)
- func (s *StateService) UpsertUserState(ctx context.Context, userID string, request types.UpsertUserStateRequest, ...) (*types.AdminUserState, error)
- type UsersService
- func (s *UsersService) Create(ctx context.Context, request types.CreateUserRequest) (*models.User, error)
- func (s *UsersService) Delete(ctx context.Context, userID string) error
- func (s *UsersService) GetAll(ctx context.Context, cursor *string, limit int) (*types.UsersPage, error)
- func (s *UsersService) GetByID(ctx context.Context, userID string) (*models.User, error)
- func (s *UsersService) Update(ctx context.Context, userID string, request types.UpdateUserRequest) (*models.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountsService ¶
type AccountsService struct {
// contains filtered or unexported fields
}
func NewAccountsService ¶
func NewAccountsService( accountRepo corerepositories.AccountRepository, userRepo corerepositories.UserRepository, passwordService rootservices.PasswordService, ) *AccountsService
func (*AccountsService) Create ¶
func (s *AccountsService) Create(ctx context.Context, userID string, request types.CreateAccountRequest) (*models.Account, error)
func (*AccountsService) Delete ¶
func (s *AccountsService) Delete(ctx context.Context, accountID string) error
func (*AccountsService) GetByUserID ¶
type ImpersonationService ¶
type ImpersonationService struct {
// contains filtered or unexported fields
}
func NewImpersonationService ¶
func NewImpersonationService( impersonationRepo repositories.ImpersonationRepository, sessionStateRepo repositories.SessionStateRepository, sessionService rootservices.SessionService, tokenService rootservices.TokenService, sessionExpiresIn time.Duration, maxExpiresIn time.Duration, ) *ImpersonationService
func (*ImpersonationService) GetAllImpersonations ¶
func (s *ImpersonationService) GetAllImpersonations(ctx context.Context) ([]types.Impersonation, error)
func (*ImpersonationService) GetImpersonationByID ¶
func (s *ImpersonationService) GetImpersonationByID(ctx context.Context, impersonationID string) (*types.Impersonation, error)
func (*ImpersonationService) StartImpersonation ¶
func (s *ImpersonationService) StartImpersonation( ctx context.Context, actorUserID string, actorSessionID *string, ipAddress *string, userAgent *string, req types.StartImpersonationRequest, ) (*types.StartImpersonationResult, error)
func (*ImpersonationService) StopImpersonation ¶
func (s *ImpersonationService) StopImpersonation(ctx context.Context, actorUserID string, request types.StopImpersonationRequest) error
type StateService ¶
type StateService struct {
// contains filtered or unexported fields
}
func NewStateService ¶
func NewStateService(userStateRepo repositories.UserStateRepository, sessionStateRepo repositories.SessionStateRepository, impersonationRepo repositories.ImpersonationRepository) *StateService
func (*StateService) BanUser ¶
func (s *StateService) BanUser(ctx context.Context, userID string, request types.BanUserRequest, actorUserID *string) (*types.AdminUserState, error)
func (*StateService) CreateSessionState ¶
func (s *StateService) CreateSessionState(ctx context.Context, sessionID string, request types.CreateSessionStateRequest, actorUserID *string) (*types.AdminSessionState, error)
func (*StateService) CreateUserState ¶
func (s *StateService) CreateUserState(ctx context.Context, userID string, request types.CreateUserStateRequest, actorUserID *string) (*types.AdminUserState, error)
func (*StateService) DeleteSessionState ¶
func (s *StateService) DeleteSessionState(ctx context.Context, sessionID string) error
func (*StateService) DeleteUserState ¶
func (s *StateService) DeleteUserState(ctx context.Context, userID string) error
func (*StateService) GetBannedUserStates ¶
func (s *StateService) GetBannedUserStates(ctx context.Context) ([]types.AdminUserState, error)
func (*StateService) GetRevokedSessionStates ¶
func (s *StateService) GetRevokedSessionStates(ctx context.Context) ([]types.AdminSessionState, error)
func (*StateService) GetSessionState ¶
func (s *StateService) GetSessionState(ctx context.Context, sessionID string) (*types.AdminSessionState, error)
func (*StateService) GetUserAdminSessions ¶
func (s *StateService) GetUserAdminSessions(ctx context.Context, userID string) ([]types.AdminUserSession, error)
func (*StateService) GetUserState ¶
func (s *StateService) GetUserState(ctx context.Context, userID string) (*types.AdminUserState, error)
func (*StateService) RevokeSession ¶
func (s *StateService) RevokeSession(ctx context.Context, sessionID string, reason *string, actorUserID *string) (*types.AdminSessionState, error)
func (*StateService) UnbanUser ¶
func (s *StateService) UnbanUser(ctx context.Context, userID string) (*types.AdminUserState, error)
func (*StateService) UpdateSessionState ¶
func (s *StateService) UpdateSessionState(ctx context.Context, sessionID string, request types.UpsertSessionStateRequest, actorUserID *string) (*types.AdminSessionState, error)
func (*StateService) UpdateUserState ¶
func (s *StateService) UpdateUserState(ctx context.Context, userID string, request types.UpsertUserStateRequest, actorUserID *string) (*types.AdminUserState, error)
func (*StateService) UpsertSessionState ¶
func (s *StateService) UpsertSessionState(ctx context.Context, sessionID string, request types.UpsertSessionStateRequest, actorUserID *string) (*types.AdminSessionState, error)
func (*StateService) UpsertUserState ¶
func (s *StateService) UpsertUserState(ctx context.Context, userID string, request types.UpsertUserStateRequest, actorUserID *string) (*types.AdminUserState, error)
type UsersService ¶
type UsersService struct {
// contains filtered or unexported fields
}
func NewUsersService ¶
func NewUsersService(userRepo repositories.UserRepository) *UsersService
func (*UsersService) Create ¶
func (s *UsersService) Create(ctx context.Context, request types.CreateUserRequest) (*models.User, error)
func (*UsersService) Delete ¶
func (s *UsersService) Delete(ctx context.Context, userID string) error
Click to show internal directories.
Click to hide internal directories.