Documentation
¶
Index ¶
- type AdminPluginConfig
- type AdminSessionState
- type AdminUserSession
- type AdminUserState
- type BanUserRequest
- type BanUserResponse
- type CreateAccountRequest
- type CreateAccountResponse
- type CreateSessionStateRequest
- type CreateUserRequest
- type CreateUserResponse
- type CreateUserStateRequest
- type DeleteAccountResponse
- type DeleteSessionStateResponse
- type DeleteUserResponse
- type DeleteUserStateResponse
- type GetAccountByIDResponse
- type GetImpersonationByIDResponse
- type GetSessionStateResponse
- type GetUserByIDResponse
- type GetUserStateResponse
- type Impersonation
- type RevokeSessionRequest
- type RevokeSessionResponse
- type StartImpersonationRequest
- type StartImpersonationResponse
- type StartImpersonationResult
- type StopImpersonationRequest
- type StopImpersonationResponse
- type UnbanUserResponse
- type UpdateAccountRequest
- type UpdateAccountResponse
- type UpdateUserRequest
- type UpdateUserResponse
- type UpsertSessionStateRequest
- type UpsertSessionStateResponse
- type UpsertUserStateRequest
- type UpsertUserStateResponse
- type UserAccountsResponse
- type UsersPage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminPluginConfig ¶
type AdminPluginConfig struct {
Enabled bool `json:"enabled" toml:"enabled"`
ImpersonationMaxExpiresIn time.Duration `json:"impersonation_max_expires_in" toml:"impersonation_max_expires_in"`
}
func (*AdminPluginConfig) ApplyDefaults ¶
func (config *AdminPluginConfig) ApplyDefaults()
type AdminSessionState ¶
type AdminSessionState struct {
bun.BaseModel `bun:"table:admin_session_states"`
SessionID string `json:"session_id" bun:"column:session_id,pk"`
RevokedAt *time.Time `json:"revoked_at" bun:"column:revoked_at"`
RevokedReason *string `json:"revoked_reason" bun:"column:revoked_reason"`
RevokedByUserID *string `json:"revoked_by_user_id" bun:"column:revoked_by_user_id"`
ImpersonatorUserID *string `json:"impersonator_user_id" bun:"column:impersonator_user_id"`
ImpersonationReason *string `json:"impersonation_reason" bun:"column:impersonation_reason"`
ImpersonationExpiresAt *time.Time `json:"impersonation_expires_at" bun:"column:impersonation_expires_at"`
CreatedAt time.Time `json:"created_at" bun:"column:created_at,default:current_timestamp"`
UpdatedAt time.Time `json:"updated_at" bun:"column:updated_at,default:current_timestamp"`
}
type AdminUserSession ¶
type AdminUserSession struct {
Session models.Session `json:"session"`
State *AdminSessionState `json:"state,omitempty"`
}
type AdminUserState ¶
type AdminUserState struct {
bun.BaseModel `bun:"table:admin_user_states"`
UserID string `json:"user_id" bun:"column:user_id,pk"`
Banned bool `json:"banned" bun:"column:banned"`
BannedAt *time.Time `json:"banned_at" bun:"column:banned_at"`
BannedUntil *time.Time `json:"banned_until" bun:"column:banned_until"`
BannedReason *string `json:"banned_reason" bun:"column:banned_reason"`
BannedByUserID *string `json:"banned_by_user_id" bun:"column:banned_by_user_id"`
CreatedAt time.Time `json:"created_at" bun:"column:created_at,default:current_timestamp"`
UpdatedAt time.Time `json:"updated_at" bun:"column:updated_at,default:current_timestamp"`
}
type BanUserRequest ¶
type BanUserResponse ¶
type BanUserResponse struct {
State *AdminUserState `json:"state"`
}
type CreateAccountRequest ¶
type CreateAccountRequest struct {
ProviderID string `json:"provider_id"`
AccountID string `json:"account_id"`
AccessToken *string `json:"access_token,omitempty"`
RefreshToken *string `json:"refresh_token,omitempty"`
IDToken *string `json:"id_token,omitempty"`
AccessTokenExpiresAt *time.Time `json:"access_token_expires_at,omitempty"`
RefreshTokenExpiresAt *time.Time `json:"refresh_token_expires_at,omitempty"`
Scope *string `json:"scope,omitempty"`
Password *string `json:"password,omitempty"`
}
type CreateAccountResponse ¶
type CreateSessionStateRequest ¶
type CreateSessionStateRequest struct {
Revoke bool `json:"revoke"`
RevokedReason *string `json:"revoked_reason,omitempty"`
ImpersonatorUserID *string `json:"impersonator_user_id,omitempty"`
ImpersonationReason *string `json:"impersonation_reason,omitempty"`
ImpersonationExpiresAt *time.Time `json:"impersonation_expires_at,omitempty"`
}
type CreateUserRequest ¶
type CreateUserResponse ¶
type CreateUserStateRequest ¶
type DeleteAccountResponse ¶
type DeleteAccountResponse struct {
Message string `json:"message"`
}
type DeleteSessionStateResponse ¶
type DeleteSessionStateResponse struct {
Message string `json:"message"`
}
type DeleteUserResponse ¶
type DeleteUserResponse struct {
Message string `json:"message"`
}
type DeleteUserStateResponse ¶
type DeleteUserStateResponse struct {
Message string `json:"message"`
}
type GetAccountByIDResponse ¶
type GetImpersonationByIDResponse ¶
type GetImpersonationByIDResponse struct {
Impersonation *Impersonation `json:"impersonation"`
}
type GetSessionStateResponse ¶
type GetSessionStateResponse struct {
State *AdminSessionState `json:"state"`
}
type GetUserByIDResponse ¶
type GetUserStateResponse ¶
type GetUserStateResponse struct {
State *AdminUserState `json:"state"`
}
type Impersonation ¶
type Impersonation struct {
bun.BaseModel `bun:"table:admin_impersonations"`
ID string `json:"id" bun:"column:id,pk"`
ActorUserID string `json:"actor_user_id" bun:"column:actor_user_id"`
TargetUserID string `json:"target_user_id" bun:"column:target_user_id"`
ActorSessionID *string `json:"actor_session_id" bun:"column:actor_session_id"`
ImpersonationSessionID *string `json:"impersonation_session_id" bun:"column:impersonation_session_id"`
Reason string `json:"reason" bun:"column:reason"`
StartedAt time.Time `json:"started_at" bun:"column:started_at"`
ExpiresAt time.Time `json:"expires_at" bun:"column:expires_at"`
EndedAt *time.Time `json:"ended_at" bun:"column:ended_at"`
EndedByUserID *string `json:"ended_by_user_id" bun:"column:ended_by_user_id"`
CreatedAt time.Time `json:"created_at" bun:"column:created_at,default:current_timestamp"`
UpdatedAt time.Time `json:"updated_at" bun:"column:updated_at,default:current_timestamp"`
}
type RevokeSessionRequest ¶
type RevokeSessionRequest struct {
Reason *string `json:"reason,omitempty"`
}
type RevokeSessionResponse ¶
type RevokeSessionResponse struct {
State *AdminSessionState `json:"state"`
}
type StartImpersonationResponse ¶
type StartImpersonationResponse struct {
Impersonation *Impersonation `json:"impersonation"`
}
type StartImpersonationResult ¶
type StartImpersonationResult struct {
Impersonation *Impersonation `json:"impersonation"`
SessionID *string `json:"session_id,omitempty"`
SessionToken *string `json:"session_token,omitempty"`
}
type StopImpersonationRequest ¶
type StopImpersonationRequest struct {
ImpersonationID *string `json:"impersonation_id,omitempty"`
}
type StopImpersonationResponse ¶
type StopImpersonationResponse struct {
Message string `json:"message"`
}
type UnbanUserResponse ¶
type UnbanUserResponse struct {
State *AdminUserState `json:"state"`
}
type UpdateAccountRequest ¶
type UpdateAccountRequest struct {
ProviderID *string `json:"provider_id,omitempty"`
AccountID *string `json:"account_id,omitempty"`
AccessToken *string `json:"access_token,omitempty"`
RefreshToken *string `json:"refresh_token,omitempty"`
IDToken *string `json:"id_token,omitempty"`
AccessTokenExpiresAt *time.Time `json:"access_token_expires_at,omitempty"`
RefreshTokenExpiresAt *time.Time `json:"refresh_token_expires_at,omitempty"`
Scope *string `json:"scope,omitempty"`
Password *string `json:"password,omitempty"`
}
type UpdateAccountResponse ¶
type UpdateUserRequest ¶
type UpdateUserResponse ¶
type UpsertSessionStateRequest ¶
type UpsertSessionStateRequest struct {
Revoke bool `json:"revoke"`
RevokedReason *string `json:"revoked_reason,omitempty"`
ImpersonatorUserID *string `json:"impersonator_user_id,omitempty"`
ImpersonationReason *string `json:"impersonation_reason,omitempty"`
ImpersonationExpiresAt *time.Time `json:"impersonation_expires_at,omitempty"`
}
type UpsertSessionStateResponse ¶
type UpsertSessionStateResponse struct {
State *AdminSessionState `json:"state"`
}
type UpsertUserStateRequest ¶
type UpsertUserStateResponse ¶
type UpsertUserStateResponse struct {
State *AdminUserState `json:"state"`
}
type UserAccountsResponse ¶
Click to show internal directories.
Click to hide internal directories.