queries

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyVirtualServerExists

type AnyVirtualServerExists struct{}

type AnyVirtualServerExistsResult

type AnyVirtualServerExistsResult struct {
	Found bool
}

type GetApplication

type GetApplication struct {
	VirtualServerName string
	ProjectSlug       string
	ApplicationId     uuid.UUID
}

func (GetApplication) GetRequestName

func (a GetApplication) GetRequestName() string

func (GetApplication) IsAllowed

func (GetApplication) LogRequest

func (a GetApplication) LogRequest() bool

func (GetApplication) LogResponse

func (a GetApplication) LogResponse() bool

type GetApplicationResult

type GetApplicationResult struct {
	Id                  uuid.UUID
	Name                string
	DisplayName         string
	Type                repositories.ApplicationType
	RedirectUris        []string
	PostLogoutUris      []string
	SystemApplication   bool
	ClaimsMappingScript *string
	DeviceFlowEnabled   bool
	CreatedAt           time.Time
	UpdatedAt           time.Time
}

func HandleGetApplication

func HandleGetApplication(ctx context.Context, query GetApplication) (*GetApplicationResult, error)

type GetProject

type GetProject struct {
	VirtualServerName string
	ProjectSlug       string
}

func (GetProject) GetRequestName

func (a GetProject) GetRequestName() string

func (GetProject) IsAllowed

func (a GetProject) IsAllowed(ctx context.Context) (behaviours.PolicyResult, error)

func (GetProject) LogRequest

func (a GetProject) LogRequest() bool

func (GetProject) LogResponse

func (a GetProject) LogResponse() bool

type GetProjectResponse

type GetProjectResponse struct {
	Id            uuid.UUID
	Slug          string
	Name          string
	Description   string
	SystemProject bool
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

func HandleGetProject

func HandleGetProject(ctx context.Context, query GetProject) (*GetProjectResponse, error)

type GetResourceServer

type GetResourceServer struct {
	VirtualServerName string
	ProjectSlug       string
	ResourceServerId  uuid.UUID
}

func (GetResourceServer) GetRequestName

func (a GetResourceServer) GetRequestName() string

func (GetResourceServer) IsAllowed

func (GetResourceServer) LogRequest

func (a GetResourceServer) LogRequest() bool

func (GetResourceServer) LogResponse

func (a GetResourceServer) LogResponse() bool

type GetResourceServerResponse

type GetResourceServerResponse struct {
	Id          uuid.UUID
	Slug        string
	Name        string
	Description string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

func HandleGetResourceServer

func HandleGetResourceServer(ctx context.Context, query GetResourceServer) (*GetResourceServerResponse, error)

type GetResourceServerScope

type GetResourceServerScope struct {
	VirtualServerName string
	ProjectSlug       string
	ResourceServerId  uuid.UUID
	ScopeId           uuid.UUID
}

func (GetResourceServerScope) GetRequestName

func (a GetResourceServerScope) GetRequestName() string

func (GetResourceServerScope) IsAllowed

func (GetResourceServerScope) LogRequest

func (a GetResourceServerScope) LogRequest() bool

func (GetResourceServerScope) LogResponse

func (a GetResourceServerScope) LogResponse() bool

type GetResourceServerScopeResponse

type GetResourceServerScopeResponse struct {
	Id          uuid.UUID
	Scope       string
	Name        string
	Description string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type GetRoleQuery

type GetRoleQuery struct {
	VirtualServerName string
	ProjectSlug       string
	RoleId            uuid.UUID
}

func (GetRoleQuery) GetRequestName

func (a GetRoleQuery) GetRequestName() string

func (GetRoleQuery) IsAllowed

func (GetRoleQuery) LogRequest

func (a GetRoleQuery) LogRequest() bool

func (GetRoleQuery) LogResponse

func (a GetRoleQuery) LogResponse() bool

type GetRoleQueryResult

type GetRoleQueryResult struct {
	Id          uuid.UUID
	Name        string
	Description string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

func HandleGetRole

func HandleGetRole(ctx context.Context, query GetRoleQuery) (*GetRoleQueryResult, error)

type GetTemplate

type GetTemplate struct {
	VirtualServerName string
	Type              repositories.TemplateType
}

func (GetTemplate) GetRequestName

func (a GetTemplate) GetRequestName() string

func (GetTemplate) IsAllowed

func (GetTemplate) LogRequest

func (a GetTemplate) LogRequest() bool

func (GetTemplate) LogResponse

func (a GetTemplate) LogResponse() bool

type GetTemplateResult

type GetTemplateResult struct {
	Id        uuid.UUID
	Text      string
	CreatedAt time.Time
	UpdatedAt time.Time
}

func HandleGetTemplate

func HandleGetTemplate(ctx context.Context, query GetTemplate) (*GetTemplateResult, error)

type GetUserMetadata

type GetUserMetadata struct {
	VirtualServerName             string
	UserId                        uuid.UUID
	IncludeGlobalMetadata         bool
	IncludeAllApplicationMetadata bool
	ApplicationIds                *[]uuid.UUID
}

func (GetUserMetadata) GetRequestName

func (a GetUserMetadata) GetRequestName() string

func (GetUserMetadata) IsAllowed

func (GetUserMetadata) LogRequest

func (a GetUserMetadata) LogRequest() bool

func (GetUserMetadata) LogResponse

func (a GetUserMetadata) LogResponse() bool

type GetUserMetadataResult

type GetUserMetadataResult struct {
	Metadata            string
	ApplicationMetadata map[string]string
}

func HandleGetUserMetadata

func HandleGetUserMetadata(ctx context.Context, query GetUserMetadata) (*GetUserMetadataResult, error)

type GetUserQuery

type GetUserQuery struct {
	UserId            uuid.UUID
	VirtualServerName string
}

func (GetUserQuery) GetRequestName

func (a GetUserQuery) GetRequestName() string

func (GetUserQuery) IsAllowed

func (GetUserQuery) LogRequest

func (a GetUserQuery) LogRequest() bool

func (GetUserQuery) LogResponse

func (a GetUserQuery) LogResponse() bool

type GetUserQueryResult

type GetUserQueryResult struct {
	Id            uuid.UUID
	Username      string
	DisplayName   string
	PrimaryEmail  string
	EmailVerified bool
	IsServiceUser bool
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

func HandleGetUserQuery

func HandleGetUserQuery(ctx context.Context, query GetUserQuery) (*GetUserQueryResult, error)

type GetVirtualServerPublicInfo

type GetVirtualServerPublicInfo struct {
	VirtualServerName string
}

type GetVirtualServerPublicInfoResponse

type GetVirtualServerPublicInfoResponse struct {
	Name                string
	DisplayName         string
	RegistrationEnabled bool
}

type GetVirtualServerQuery

type GetVirtualServerQuery struct {
	VirtualServerName string
}

func (GetVirtualServerQuery) GetRequestName

func (a GetVirtualServerQuery) GetRequestName() string

func (GetVirtualServerQuery) IsAllowed

func (GetVirtualServerQuery) LogRequest

func (a GetVirtualServerQuery) LogRequest() bool

func (GetVirtualServerQuery) LogResponse

func (a GetVirtualServerQuery) LogResponse() bool

type GetVirtualServerResponse

type GetVirtualServerResponse struct {
	Id                       uuid.UUID
	Name                     string
	DisplayName              string
	RegistrationEnabled      bool
	Require2fa               bool
	RequireEmailVerification bool
	SigningAlgorithm         config.SigningAlgorithm
	CreatedAt                time.Time
	UpdatedAt                time.Time
}

func HandleGetVirtualServerQuery

func HandleGetVirtualServerQuery(ctx context.Context, command GetVirtualServerQuery) (*GetVirtualServerResponse, error)

type ListApplications

type ListApplications struct {
	PagedQuery
	OrderedQuery
	VirtualServerName string
	ProjectSlug       string
	SearchText        string
}

func (ListApplications) GetRequestName

func (a ListApplications) GetRequestName() string

func (ListApplications) IsAllowed

func (ListApplications) LogRequest

func (a ListApplications) LogRequest() bool

func (ListApplications) LogResponse

func (a ListApplications) LogResponse() bool

type ListApplicationsResponse

type ListApplicationsResponse struct {
	PagedResponse[ListApplicationsResponseItem]
}

func HandleListApplications

func HandleListApplications(ctx context.Context, query ListApplications) (*ListApplicationsResponse, error)

type ListApplicationsResponseItem

type ListApplicationsResponseItem struct {
	Id                uuid.UUID
	Name              string
	DisplayName       string
	Type              repositories.ApplicationType
	SystemApplication bool
}

type ListAuditEntries

type ListAuditEntries struct {
	PagedQuery
	OrderedQuery
	VirtualServerName string
}

func (ListAuditEntries) GetRequestName

func (a ListAuditEntries) GetRequestName() string

func (ListAuditEntries) IsAllowed

func (ListAuditEntries) LogRequest

func (a ListAuditEntries) LogRequest() bool

func (ListAuditEntries) LogResponse

func (a ListAuditEntries) LogResponse() bool

type ListAuditEntriesResponse

type ListAuditEntriesResponse struct {
	PagedResponse[ListAuditEntriesResponseItem]
}

func HandleListAuditEntries

func HandleListAuditEntries(ctx context.Context, query ListAuditEntries) (*ListAuditEntriesResponse, error)

type ListAuditEntriesResponseItem

type ListAuditEntriesResponseItem struct {
	Id uuid.UUID

	UserId *uuid.UUID

	RequestType string
	Request     map[string]any
	Response    *map[string]any

	Allowed         bool
	AllowReasonType *string
	AllowReason     *map[string]any

	CreatedAt time.Time
}

type ListGroups

type ListGroups struct {
	PagedQuery
	OrderedQuery
	VirtualServerName string
	SearchText        string
}

func (ListGroups) GetRequestName

func (a ListGroups) GetRequestName() string

func (ListGroups) IsAllowed

func (a ListGroups) IsAllowed(ctx context.Context) (behaviours.PolicyResult, error)

func (ListGroups) LogRequest

func (a ListGroups) LogRequest() bool

func (ListGroups) LogResponse

func (a ListGroups) LogResponse() bool

type ListGroupsResponse

type ListGroupsResponse struct {
	PagedResponse[ListGroupsResponseItem]
}

func HandleListGroups

func HandleListGroups(ctx context.Context, query ListGroups) (*ListGroupsResponse, error)

type ListGroupsResponseItem

type ListGroupsResponseItem struct {
	Id          uuid.UUID
	Name        string
	Description string
}

type ListPasskeys

type ListPasskeys struct {
	VirtualServerName string
	UserId            uuid.UUID
}

func (ListPasskeys) GetRequestName

func (a ListPasskeys) GetRequestName() string

func (ListPasskeys) IsAllowed

func (ListPasskeys) LogRequest

func (a ListPasskeys) LogRequest() bool

func (ListPasskeys) LogResponse

func (a ListPasskeys) LogResponse() bool

type ListPasskeysResponse

type ListPasskeysResponse struct {
	PagedResponse[ListPasskeysResponseItem]
}

func HandleListPasskeys

func HandleListPasskeys(ctx context.Context, query ListPasskeys) (*ListPasskeysResponse, error)

type ListPasskeysResponseItem

type ListPasskeysResponseItem struct {
	Id uuid.UUID
}

type ListPasswordRules

type ListPasswordRules struct {
	VirtualServerName string
}

func (ListPasswordRules) GetRequestName

func (a ListPasswordRules) GetRequestName() string

func (ListPasswordRules) IsAllowed

func (ListPasswordRules) LogRequest

func (a ListPasswordRules) LogRequest() bool

func (ListPasswordRules) LogResponse

func (a ListPasswordRules) LogResponse() bool

type ListPasswordRulesResponse

type ListPasswordRulesResponse struct {
	Items []ListPasswordRulesResponseItem
}

func HandleListPasswordRules

func HandleListPasswordRules(ctx context.Context, query ListPasswordRules) (*ListPasswordRulesResponse, error)

type ListPasswordRulesResponseItem

type ListPasswordRulesResponseItem struct {
	Id      uuid.UUID
	Type    repositories.PasswordRuleType
	Details []byte
}

type ListProjects

type ListProjects struct {
	PagedQuery
	OrderedQuery
	VirtualServerName string
	SearchText        string
}

func (ListProjects) GetRequestName

func (a ListProjects) GetRequestName() string

func (ListProjects) IsAllowed

func (ListProjects) LogRequest

func (a ListProjects) LogRequest() bool

func (ListProjects) LogResponse

func (a ListProjects) LogResponse() bool

type ListProjectsResponse

type ListProjectsResponse struct {
	PagedResponse[ListProjectsResponseItem]
}

func HandleListProjects

func HandleListProjects(ctx context.Context, query ListProjects) (*ListProjectsResponse, error)

type ListProjectsResponseItem

type ListProjectsResponseItem struct {
	Id            uuid.UUID
	Slug          string
	Name          string
	SystemProject bool
}

type ListResourceServerScopesResponseItem

type ListResourceServerScopesResponseItem struct {
	Id    uuid.UUID
	Name  string
	Scope string
}

type ListResourceServers

type ListResourceServers struct {
	PagedQuery
	VirtualServerName string
	ProjectSlug       string
	SearchText        string
}

func (ListResourceServers) GetRequestName

func (a ListResourceServers) GetRequestName() string

func (ListResourceServers) IsAllowed

func (ListResourceServers) LogRequest

func (a ListResourceServers) LogRequest() bool

func (ListResourceServers) LogResponse

func (a ListResourceServers) LogResponse() bool

type ListResourceServersResponse

type ListResourceServersResponse struct {
	PagedResponse[ListResourceServersResponseItem]
}

type ListResourceServersResponseItem

type ListResourceServersResponseItem struct {
	Id   uuid.UUID
	Slug string
	Name string
}

type ListRessouceServerScopes

type ListRessouceServerScopes struct {
	PagedQuery
	OrderedQuery
	VirtualServerName string
	ProjectSlug       string
	ResourceServerId  uuid.UUID
	SearchText        string
}

func (ListRessouceServerScopes) GetRequestName

func (a ListRessouceServerScopes) GetRequestName() string

func (ListRessouceServerScopes) IsAllowed

func (ListRessouceServerScopes) LogRequest

func (a ListRessouceServerScopes) LogRequest() bool

func (ListRessouceServerScopes) LogResponse

func (a ListRessouceServerScopes) LogResponse() bool

type ListRoles

type ListRoles struct {
	PagedQuery
	OrderedQuery
	VirtualServerName string
	ProjectSlug       string
	SearchText        string
}

func (ListRoles) GetRequestName

func (a ListRoles) GetRequestName() string

func (ListRoles) IsAllowed

func (a ListRoles) IsAllowed(ctx context.Context) (behaviours.PolicyResult, error)

func (ListRoles) LogRequest

func (a ListRoles) LogRequest() bool

func (ListRoles) LogResponse

func (a ListRoles) LogResponse() bool

type ListRolesResponse

type ListRolesResponse struct {
	PagedResponse[ListRolesResponseItem]
}

func HandleListRoles

func HandleListRoles(ctx context.Context, query ListRoles) (*ListRolesResponse, error)

type ListRolesResponseItem

type ListRolesResponseItem struct {
	Id          uuid.UUID
	Name        string
	DisplayName string
}

type ListTemplates

type ListTemplates struct {
	PagedQuery
	OrderedQuery
	VirtualServerName string
	SearchText        string
}

func (ListTemplates) GetRequestName

func (a ListTemplates) GetRequestName() string

func (ListTemplates) IsAllowed

func (ListTemplates) LogRequest

func (a ListTemplates) LogRequest() bool

func (ListTemplates) LogResponse

func (a ListTemplates) LogResponse() bool

type ListTemplatesResponse

type ListTemplatesResponse struct {
	PagedResponse[ListTemplatesResponseItem]
}

func HandleListTemplates

func HandleListTemplates(ctx context.Context, query ListTemplates) (*ListTemplatesResponse, error)

type ListTemplatesResponseItem

type ListTemplatesResponseItem struct {
	Id   uuid.UUID
	Type repositories.TemplateType
}

type ListUsers

type ListUsers struct {
	PagedQuery
	OrderedQuery
	VirtualServerName string
	SearchText        string
}

func (ListUsers) GetRequestName

func (a ListUsers) GetRequestName() string

func (ListUsers) IsAllowed

func (a ListUsers) IsAllowed(ctx context.Context) (behaviours.PolicyResult, error)

func (ListUsers) LogRequest

func (a ListUsers) LogRequest() bool

func (ListUsers) LogResponse

func (a ListUsers) LogResponse() bool

type ListUsersInRole

type ListUsersInRole struct {
	PagedQuery
	OrderedQuery
	VirtualServerName string
	ProjectSlug       string
	RoleId            uuid.UUID
}

func (ListUsersInRole) GetRequestName

func (a ListUsersInRole) GetRequestName() string

func (ListUsersInRole) IsAllowed

func (ListUsersInRole) LogRequest

func (a ListUsersInRole) LogRequest() bool

func (ListUsersInRole) LogResponse

func (a ListUsersInRole) LogResponse() bool

type ListUsersInRoleResponse

type ListUsersInRoleResponse struct {
	PagedResponse[ListUsersInRoleResponseItem]
}

func HandleListUsersInRole

func HandleListUsersInRole(ctx context.Context, query ListUsersInRole) (*ListUsersInRoleResponse, error)

type ListUsersInRoleResponseItem

type ListUsersInRoleResponseItem struct {
	Id          uuid.UUID
	Username    string
	DisplayName string
}

type ListUsersResponse

type ListUsersResponse struct {
	PagedResponse[ListUsersResponseItem]
}

func HandleListUsers

func HandleListUsers(ctx context.Context, query ListUsers) (*ListUsersResponse, error)

type ListUsersResponseItem

type ListUsersResponseItem struct {
	Id            uuid.UUID
	Username      string
	DisplayName   string
	Email         string
	IsServiceUser bool
}

type OrderedQuery

type OrderedQuery struct {
	OrderBy  string
	OrderDir string
}

type PagedQuery

type PagedQuery struct {
	PageSize int
	Page     int
}

type PagedResponse

type PagedResponse[T any] struct {
	Items      []T
	TotalCount int
}

func NewPagedResponse

func NewPagedResponse[T any](items []T, totalCount int) PagedResponse[T]

Jump to

Keyboard shortcuts

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