usecases

package
v1.40.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountsUseCase

type AccountsUseCase struct {
	// contains filtered or unexported fields
}

func NewAccountsUseCase

func NewAccountsUseCase(service *services.AccountsService, authorizer rootservices.Authorizer) AccountsUseCase

func (AccountsUseCase) Create

func (u AccountsUseCase) Create(ctx context.Context, actor *models.Actor, userID string, request types.CreateAccountRequest) (*models.Account, error)

func (AccountsUseCase) Delete

func (u AccountsUseCase) Delete(ctx context.Context, actor *models.Actor, accountID string) error

func (AccountsUseCase) GetByID

func (u AccountsUseCase) GetByID(ctx context.Context, actor *models.Actor, accountID string) (*models.Account, error)

func (AccountsUseCase) GetByUserID

func (u AccountsUseCase) GetByUserID(ctx context.Context, actor *models.Actor, userID string) ([]models.Account, error)

func (AccountsUseCase) Update

func (u AccountsUseCase) Update(ctx context.Context, actor *models.Actor, accountID string, request types.UpdateAccountRequest) (*models.Account, error)

type AdminUseCases

type AdminUseCases struct {
	// contains filtered or unexported fields
}

func NewAdminUseCases

func NewAdminUseCases(
	usersService *services.UsersService,
	accountsService *services.AccountsService,
	stateService *services.StateService,
	impersonationService *services.ImpersonationService,
	authorizer rootservices.Authorizer,
) *AdminUseCases

func (*AdminUseCases) AccountsUseCase

func (u *AdminUseCases) AccountsUseCase() AccountsUseCase

func (*AdminUseCases) ImpersonationUseCase

func (u *AdminUseCases) ImpersonationUseCase() ImpersonationUseCase

func (*AdminUseCases) StateUseCase

func (u *AdminUseCases) StateUseCase() StateUseCase

func (*AdminUseCases) UsersUseCase

func (u *AdminUseCases) UsersUseCase() UsersUseCase

type ImpersonationUseCase

type ImpersonationUseCase struct {
	// contains filtered or unexported fields
}

func NewImpersonationUseCase

func NewImpersonationUseCase(
	stateService *services.StateService,
	impersonationService *services.ImpersonationService,
	authorizer rootservices.Authorizer,
) ImpersonationUseCase

func (ImpersonationUseCase) GetAllImpersonations

func (u ImpersonationUseCase) GetAllImpersonations(ctx context.Context, actor *models.Actor) ([]types.Impersonation, error)

func (ImpersonationUseCase) GetImpersonationByID

func (u ImpersonationUseCase) GetImpersonationByID(ctx context.Context, actor *models.Actor, impersonationID string) (*types.Impersonation, error)

func (ImpersonationUseCase) StartImpersonation

func (u ImpersonationUseCase) StartImpersonation(ctx context.Context, actor *models.Actor, actorSessionID *string, ipAddress *string, userAgent *string, req types.StartImpersonationRequest, impersonatorScopes []string, originalCookieValue string, originalCookieMaxAge int) (*types.StartImpersonationResult, error)

func (ImpersonationUseCase) StopImpersonation

func (u ImpersonationUseCase) StopImpersonation(ctx context.Context, actor *models.Actor, impersonatedUserID string, impersonatedSessionID string, originalCookieValue string, request types.StopImpersonationRequest) (*types.StopImpersonationResult, error)

type StateUseCase

type StateUseCase struct {
	// contains filtered or unexported fields
}

func NewStateUseCase

func NewStateUseCase(service *services.StateService, authorizer rootservices.Authorizer) StateUseCase

func (StateUseCase) BanUser

func (u StateUseCase) BanUser(ctx context.Context, actor *models.Actor, userID string, request types.BanUserRequest, actorUserID *string) (*types.AdminUserState, error)

func (StateUseCase) CreateSessionState

func (u StateUseCase) CreateSessionState(ctx context.Context, actor *models.Actor, sessionID string, request types.CreateSessionStateRequest, actorUserID *string) (*types.AdminSessionState, error)

func (StateUseCase) CreateUserState

func (u StateUseCase) CreateUserState(ctx context.Context, actor *models.Actor, userID string, request types.CreateUserStateRequest, actorUserID *string) (*types.AdminUserState, error)

func (StateUseCase) DeleteSessionState

func (u StateUseCase) DeleteSessionState(ctx context.Context, actor *models.Actor, sessionID string) error

func (StateUseCase) DeleteUserState

func (u StateUseCase) DeleteUserState(ctx context.Context, actor *models.Actor, userID string) error

func (StateUseCase) GetBannedUserStates

func (u StateUseCase) GetBannedUserStates(ctx context.Context, actor *models.Actor) ([]types.AdminUserState, error)

func (StateUseCase) GetRevokedSessionStates

func (u StateUseCase) GetRevokedSessionStates(ctx context.Context, actor *models.Actor) ([]types.AdminSessionState, error)

func (StateUseCase) GetSelfSessionState added in v1.13.0

func (u StateUseCase) GetSelfSessionState(ctx context.Context, sessionID string) (*types.AdminSessionState, error)

func (StateUseCase) GetSessionState

func (u StateUseCase) GetSessionState(ctx context.Context, actor *models.Actor, sessionID string) (*types.AdminSessionState, error)

func (StateUseCase) GetUserAdminSessions

func (u StateUseCase) GetUserAdminSessions(ctx context.Context, actor *models.Actor, userID string) ([]types.AdminUserSession, error)

func (StateUseCase) GetUserState

func (u StateUseCase) GetUserState(ctx context.Context, actor *models.Actor, userID string) (*types.AdminUserState, error)

func (StateUseCase) RevokeSession

func (u StateUseCase) RevokeSession(ctx context.Context, actor *models.Actor, sessionID string, reason *string, actorUserID *string) (*types.AdminSessionState, error)

func (StateUseCase) UnbanUser

func (u StateUseCase) UnbanUser(ctx context.Context, actor *models.Actor, userID string) (*types.AdminUserState, error)

func (StateUseCase) UpdateSessionState

func (u StateUseCase) UpdateSessionState(ctx context.Context, actor *models.Actor, sessionID string, request types.UpsertSessionStateRequest, actorUserID *string) (*types.AdminSessionState, error)

func (StateUseCase) UpdateUserState

func (u StateUseCase) UpdateUserState(ctx context.Context, actor *models.Actor, userID string, request types.UpsertUserStateRequest, actorUserID *string) (*types.AdminUserState, error)

func (StateUseCase) UpsertSessionState

func (u StateUseCase) UpsertSessionState(ctx context.Context, actor *models.Actor, sessionID string, request types.UpsertSessionStateRequest, actorUserID *string) (*types.AdminSessionState, error)

func (StateUseCase) UpsertUserState

func (u StateUseCase) UpsertUserState(ctx context.Context, actor *models.Actor, userID string, request types.UpsertUserStateRequest, actorUserID *string) (*types.AdminUserState, error)

type UsersUseCase

type UsersUseCase struct {
	// contains filtered or unexported fields
}

func NewUsersUseCase

func NewUsersUseCase(service *services.UsersService, authorizer rootservices.Authorizer) UsersUseCase

func (UsersUseCase) Create

func (u UsersUseCase) Create(ctx context.Context, actor *models.Actor, request types.CreateUserRequest) (*models.User, error)

func (UsersUseCase) Delete

func (u UsersUseCase) Delete(ctx context.Context, actor *models.Actor, userID string) error

func (UsersUseCase) GetAll

func (u UsersUseCase) GetAll(ctx context.Context, actor *models.Actor, cursor *string, limit int) (*types.UsersPage, error)

func (UsersUseCase) GetByID

func (u UsersUseCase) GetByID(ctx context.Context, actor *models.Actor, userID string) (*models.User, error)

func (UsersUseCase) Update

func (u UsersUseCase) Update(ctx context.Context, actor *models.Actor, userID string, request types.UpdateUserRequest) (*models.User, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL