query

package
v0.50.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

Module provides all query handlers and registers them with the Bus.

Functions

This section is empty.

Types

type FindAdminActionLogsHandler

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

FindAdminActionLogsHandler handles the FindAdminActionLogsQuery.

func NewFindAdminActionLogsHandler

func NewFindAdminActionLogsHandler(db orm.DB) *FindAdminActionLogsHandler

NewFindAdminActionLogsHandler creates a new FindAdminActionLogsHandler.

func (*FindAdminActionLogsHandler) Handle

type FindAdminActionLogsQuery

type FindAdminActionLogsQuery struct {
	cqrs.BaseQuery
	page.Pageable

	InstanceID string
	TenantID   *string
}

FindAdminActionLogsQuery queries action logs for an instance with pagination.

type FindAdminBusinessProjectionsHandler added in v0.38.0

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

FindAdminBusinessProjectionsHandler handles projection administration queries.

func NewFindAdminBusinessProjectionsHandler added in v0.38.0

func NewFindAdminBusinessProjectionsHandler(db orm.DB) *FindAdminBusinessProjectionsHandler

NewFindAdminBusinessProjectionsHandler creates a projection query handler.

func (*FindAdminBusinessProjectionsHandler) Handle added in v0.38.0

type FindAdminBusinessProjectionsQuery added in v0.38.0

type FindAdminBusinessProjectionsQuery struct {
	cqrs.BaseQuery
	page.Pageable

	TenantID *string
	Status   *approval.BindingProjectionStatus
}

FindAdminBusinessProjectionsQuery lists durable business projection state.

type FindAdminInstancesHandler

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

FindAdminInstancesHandler handles the FindAdminInstancesQuery.

func NewFindAdminInstancesHandler

func NewFindAdminInstancesHandler(db orm.DB) *FindAdminInstancesHandler

NewFindAdminInstancesHandler creates a new FindAdminInstancesHandler.

func (*FindAdminInstancesHandler) Handle

type FindAdminInstancesQuery

type FindAdminInstancesQuery struct {
	cqrs.BaseQuery
	page.Pageable

	TenantID    *string
	ApplicantID *string
	Status      *approval.InstanceStatus
	FlowID      *string
	Keyword     *string
}

FindAdminInstancesQuery queries instances for admin management.

type FindAdminTasksHandler

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

FindAdminTasksHandler handles the FindAdminTasksQuery.

func NewFindAdminTasksHandler

func NewFindAdminTasksHandler(db orm.DB) *FindAdminTasksHandler

NewFindAdminTasksHandler creates a new FindAdminTasksHandler.

func (*FindAdminTasksHandler) Handle

type FindAdminTasksQuery

type FindAdminTasksQuery struct {
	cqrs.BaseQuery
	page.Pageable

	TenantID   *string
	AssigneeID *string
	InstanceID *string
	Status     *approval.TaskStatus
}

FindAdminTasksQuery queries tasks for admin management.

type FindAvailableFlowsHandler

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

FindAvailableFlowsHandler handles the FindAvailableFlowsQuery.

func NewFindAvailableFlowsHandler

func NewFindAvailableFlowsHandler(db orm.DB, assigneeService approval.AssigneeService) *FindAvailableFlowsHandler

NewFindAvailableFlowsHandler creates a new FindAvailableFlowsHandler.

func (*FindAvailableFlowsHandler) Handle

type FindAvailableFlowsQuery

type FindAvailableFlowsQuery struct {
	cqrs.BaseQuery
	page.Pageable

	UserID                string
	TenantID              *string
	ApplicantDepartmentID *string
	Keyword               *string
	Labels                map[string]string
}

FindAvailableFlowsQuery queries flows the current user is allowed to initiate.

type FindFlowInitiatorsHandler added in v0.32.0

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

FindFlowInitiatorsHandler handles the FindFlowInitiatorsQuery.

func NewFindFlowInitiatorsHandler added in v0.32.0

func NewFindFlowInitiatorsHandler(db orm.DB) *FindFlowInitiatorsHandler

NewFindFlowInitiatorsHandler creates a new FindFlowInitiatorsHandler.

func (*FindFlowInitiatorsHandler) Handle added in v0.32.0

type FindFlowInitiatorsQuery added in v0.32.0

type FindFlowInitiatorsQuery struct {
	cqrs.BaseQuery

	FlowID   string
	TenantID *string
	Caller   approval.CallerContext
}

FindFlowInitiatorsQuery queries the initiator configurations of a flow.

type FindFlowVersionsHandler

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

FindFlowVersionsHandler handles the FindFlowVersionsQuery.

func NewFindFlowVersionsHandler

func NewFindFlowVersionsHandler(db orm.DB) *FindFlowVersionsHandler

NewFindFlowVersionsHandler creates a new FindFlowVersionsHandler.

func (*FindFlowVersionsHandler) Handle

type FindFlowVersionsQuery

type FindFlowVersionsQuery struct {
	cqrs.BaseQuery

	FlowID   string
	TenantID *string
	Caller   approval.CallerContext
}

FindFlowVersionsQuery queries flow versions for a specific flow.

type FindFlowsHandler

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

FindFlowsHandler handles the FindFlowsQuery.

func NewFindFlowsHandler

func NewFindFlowsHandler(db orm.DB) *FindFlowsHandler

NewFindFlowsHandler creates a new FindFlowsHandler.

func (*FindFlowsHandler) Handle

type FindFlowsQuery

type FindFlowsQuery struct {
	cqrs.BaseQuery
	page.Pageable

	TenantID    *string
	CategoryID  *string
	Keyword     *string
	IsActive    *bool
	Labels      map[string]string
	BindingMode *approval.BindingMode
	Caller      approval.CallerContext
}

FindFlowsQuery queries flows for admin management.

type FindMyCCRecordsHandler

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

FindMyCCRecordsHandler handles the FindMyCCRecordsQuery.

func NewFindMyCCRecordsHandler

func NewFindMyCCRecordsHandler(db orm.DB) *FindMyCCRecordsHandler

NewFindMyCCRecordsHandler creates a new FindMyCCRecordsHandler.

func (*FindMyCCRecordsHandler) Handle

type FindMyCCRecordsQuery

type FindMyCCRecordsQuery struct {
	cqrs.BaseQuery
	page.Pageable

	UserID string
	// TenantID is a self-scoped narrowing filter, NOT an authorization
	// boundary: rows are already pinned to UserID, so it only narrows the
	// caller's own CC records and does not gate access.
	TenantID *string
	IsRead   *bool
}

FindMyCCRecordsQuery queries CC records addressed to the current user.

type FindMyCompletedTasksHandler

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

FindMyCompletedTasksHandler handles the FindMyCompletedTasksQuery.

func NewFindMyCompletedTasksHandler

func NewFindMyCompletedTasksHandler(db orm.DB) *FindMyCompletedTasksHandler

NewFindMyCompletedTasksHandler creates a new FindMyCompletedTasksHandler.

func (*FindMyCompletedTasksHandler) Handle

type FindMyCompletedTasksQuery

type FindMyCompletedTasksQuery struct {
	cqrs.BaseQuery
	page.Pageable

	UserID string
	// TenantID is a self-scoped narrowing filter, NOT an authorization
	// boundary: rows are already pinned to UserID, so it only narrows the
	// caller's own tasks and does not gate access.
	TenantID *string
}

FindMyCompletedTasksQuery queries tasks already processed by the current user.

type FindMyInitiatedHandler

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

FindMyInitiatedHandler handles the FindMyInitiatedQuery.

func NewFindMyInitiatedHandler

func NewFindMyInitiatedHandler(db orm.DB) *FindMyInitiatedHandler

NewFindMyInitiatedHandler creates a new FindMyInitiatedHandler.

func (*FindMyInitiatedHandler) Handle

type FindMyInitiatedQuery

type FindMyInitiatedQuery struct {
	cqrs.BaseQuery
	page.Pageable

	UserID string
	// TenantID is a self-scoped narrowing filter, NOT an authorization
	// boundary: rows are already pinned to UserID, so a user can only ever
	// see their own instances regardless of the tenant value. It applies an
	// extra WHERE only; it does not gate access.
	TenantID *string
	Status   *approval.InstanceStatus
	Keyword  *string
}

FindMyInitiatedQuery queries instances initiated by the current user.

type FindMyPendingTasksHandler

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

FindMyPendingTasksHandler handles the FindMyPendingTasksQuery.

func NewFindMyPendingTasksHandler

func NewFindMyPendingTasksHandler(db orm.DB) *FindMyPendingTasksHandler

NewFindMyPendingTasksHandler creates a new FindMyPendingTasksHandler.

func (*FindMyPendingTasksHandler) Handle

type FindMyPendingTasksQuery

type FindMyPendingTasksQuery struct {
	cqrs.BaseQuery
	page.Pageable

	UserID string
	// TenantID is a self-scoped narrowing filter, NOT an authorization
	// boundary: rows are already pinned to UserID, so it only narrows the
	// caller's own tasks and does not gate access.
	TenantID *string
}

FindMyPendingTasksQuery queries pending tasks assigned to the current user.

type GetAdminInstanceDetailHandler

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

GetAdminInstanceDetailHandler handles the GetAdminInstanceDetailQuery.

func NewGetAdminInstanceDetailHandler

func NewGetAdminInstanceDetailHandler(db orm.DB) *GetAdminInstanceDetailHandler

NewGetAdminInstanceDetailHandler creates a new GetAdminInstanceDetailHandler.

func (*GetAdminInstanceDetailHandler) Handle

type GetAdminInstanceDetailQuery

type GetAdminInstanceDetailQuery struct {
	cqrs.BaseQuery

	InstanceID string
	Caller     approval.CallerContext
}

GetAdminInstanceDetailQuery retrieves the full admin detail of an instance. Tenant-scoped: handler authorizes Caller against the loaded instance's TenantID before returning data so a tenant admin cannot peek at another tenant's instance by guessing the ID.

type GetFlowGraphHandler

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

GetFlowGraphHandler handles the GetFlowGraphQuery.

func NewGetFlowGraphHandler

func NewGetFlowGraphHandler(db orm.DB) *GetFlowGraphHandler

NewGetFlowGraphHandler creates a new GetFlowGraphHandler.

func (*GetFlowGraphHandler) Handle

type GetFlowGraphQuery

type GetFlowGraphQuery struct {
	cqrs.BaseQuery

	FlowID   string
	TenantID string
	// VersionID selects an explicit version of the flow; empty resolves the
	// latest published version.
	VersionID string
	Caller    approval.CallerContext
}

GetFlowGraphQuery retrieves a flow's graph: the latest published version by default, or the version named by VersionID — the lane a designer uses to resume editing from the newest deployment, published or not.

type GetMetricsHandler added in v0.24.0

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

GetMetricsHandler handles the GetMetricsQuery.

func NewGetMetricsHandler added in v0.24.0

func NewGetMetricsHandler(db orm.DB) *GetMetricsHandler

NewGetMetricsHandler creates a new GetMetricsHandler.

func (*GetMetricsHandler) Handle added in v0.24.0

type GetMetricsQuery added in v0.24.0

type GetMetricsQuery struct {
	cqrs.BaseQuery

	TenantID string
}

GetMetricsQuery aggregates instance / task / timeout counts for the admin dashboard. TenantID scopes the result; an empty TenantID returns a cross- tenant snapshot and should be reserved for super-admin callers (the resource layer enforces this).

type GetMyInstanceDetailHandler

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

GetMyInstanceDetailHandler handles the GetMyInstanceDetailQuery.

func NewGetMyInstanceDetailHandler

func NewGetMyInstanceDetailHandler(db orm.DB, taskSvc *service.TaskService) *GetMyInstanceDetailHandler

NewGetMyInstanceDetailHandler creates a new GetMyInstanceDetailHandler.

func (*GetMyInstanceDetailHandler) Handle

type GetMyInstanceDetailQuery

type GetMyInstanceDetailQuery struct {
	cqrs.BaseQuery

	InstanceID string
	UserID     string
}

GetMyInstanceDetailQuery retrieves instance detail with access control for the current user.

type GetMyPendingCountsHandler

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

GetMyPendingCountsHandler handles the GetMyPendingCountsQuery.

func NewGetMyPendingCountsHandler

func NewGetMyPendingCountsHandler(db orm.DB) *GetMyPendingCountsHandler

NewGetMyPendingCountsHandler creates a new GetMyPendingCountsHandler.

func (*GetMyPendingCountsHandler) Handle

type GetMyPendingCountsQuery

type GetMyPendingCountsQuery struct {
	cqrs.BaseQuery

	UserID string
	// TenantID is a self-scoped narrowing filter, NOT an authorization
	// boundary: counts are already pinned to UserID, so it only narrows the
	// caller's own rows (matching FindMyPendingTasksQuery / FindMyCCRecordsQuery)
	// and does not gate access. When nil the counts span all tenants the user
	// has rows in.
	TenantID *string
}

GetMyPendingCountsQuery retrieves pending task and unread CC counts for the current user.

type GetStartFormHandler added in v0.39.0

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

GetStartFormHandler handles the GetStartFormQuery.

func NewGetStartFormHandler added in v0.39.0

func NewGetStartFormHandler(db orm.DB, validationSvc *service.ValidationService) *GetStartFormHandler

NewGetStartFormHandler creates a new GetStartFormHandler.

func (*GetStartFormHandler) Handle added in v0.39.0

Handle mirrors the start-instance gate — active flow, initiation permission, published version — so a successful load implies the caller could start this flow with the returned form.

type GetStartFormQuery added in v0.39.0

type GetStartFormQuery struct {
	cqrs.BaseQuery

	TenantID              string
	FlowCode              string
	UserID                string
	ApplicantDepartmentID *string
}

GetStartFormQuery loads the published form document of a flow the current user wants to initiate.

type ListKindOptionsHandler added in v0.50.0

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

ListKindOptionsHandler handles the ListKindOptionsQuery.

func NewListKindOptionsHandler added in v0.50.0

func NewListKindOptionsHandler(registry *strategy.StrategyRegistry) *ListKindOptionsHandler

NewListKindOptionsHandler creates a new ListKindOptionsHandler.

func (*ListKindOptionsHandler) Handle added in v0.50.0

Handle reads the catalog straight off the boot-registered resolvers, so it reflects host registrations and overrides with no second list to maintain. Labels are resolved per call rather than cached, so they follow the configured language.

type ListKindOptionsQuery added in v0.50.0

type ListKindOptionsQuery struct {
	cqrs.BaseQuery
}

ListKindOptionsQuery asks for the assignee / CC / initiator kinds this application accepts — what the flow designer offers in its rule editors.

Jump to

Keyboard shortcuts

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