Documentation
¶
Index ¶
- Variables
- type FindAdminActionLogsHandler
- type FindAdminActionLogsQuery
- type FindAdminBusinessProjectionsHandler
- type FindAdminBusinessProjectionsQuery
- type FindAdminInstancesHandler
- type FindAdminInstancesQuery
- type FindAdminTasksHandler
- type FindAdminTasksQuery
- type FindAvailableFlowsHandler
- type FindAvailableFlowsQuery
- type FindFlowInitiatorsHandler
- type FindFlowInitiatorsQuery
- type FindFlowVersionsHandler
- type FindFlowVersionsQuery
- type FindFlowsHandler
- type FindFlowsQuery
- type FindMyCCRecordsHandler
- type FindMyCCRecordsQuery
- type FindMyCompletedTasksHandler
- type FindMyCompletedTasksQuery
- type FindMyInitiatedHandler
- type FindMyInitiatedQuery
- type FindMyPendingTasksHandler
- type FindMyPendingTasksQuery
- type GetAdminInstanceDetailHandler
- type GetAdminInstanceDetailQuery
- type GetFlowGraphHandler
- type GetFlowGraphQuery
- type GetMetricsHandler
- type GetMetricsQuery
- type GetMyInstanceDetailHandler
- type GetMyInstanceDetailQuery
- type GetMyPendingCountsHandler
- type GetMyPendingCountsQuery
- type GetStartFormHandler
- type GetStartFormQuery
- type ListKindOptionsHandler
- type ListKindOptionsQuery
Constants ¶
This section is empty.
Variables ¶
var Module = fx.Module( "vef:approval:query", fx.Provide( fx.Private, NewGetFlowGraphHandler, NewFindMyInitiatedHandler, NewFindMyPendingTasksHandler, NewFindMyCompletedTasksHandler, NewFindMyCCRecordsHandler, NewGetMyPendingCountsHandler, NewGetMyInstanceDetailHandler, NewFindAvailableFlowsHandler, NewGetStartFormHandler, NewFindAdminInstancesHandler, NewFindAdminTasksHandler, NewGetAdminInstanceDetailHandler, NewFindAdminActionLogsHandler, NewFindAdminBusinessProjectionsHandler, NewFindFlowsHandler, NewFindFlowVersionsHandler, NewFindFlowInitiatorsHandler, NewListKindOptionsHandler, NewGetMetricsHandler, ), fx.Invoke(registerHandlers), )
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.
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
func (h *FindAdminBusinessProjectionsHandler) Handle( ctx context.Context, query FindAdminBusinessProjectionsQuery, ) (*page.Page[admin.BusinessProjection], error)
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.
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.
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 ¶
func (h *FindAvailableFlowsHandler) Handle(ctx context.Context, query FindAvailableFlowsQuery) (*page.Page[my.AvailableFlow], error)
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
func (h *FindFlowInitiatorsHandler) Handle(ctx context.Context, query FindFlowInitiatorsQuery) ([]approval.FlowInitiator, error)
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 ¶
func (h *FindFlowVersionsHandler) Handle(ctx context.Context, query FindFlowVersionsQuery) ([]shared.FlowVersionSummary, error)
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.
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.
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 ¶
func (h *FindMyCompletedTasksHandler) Handle(ctx context.Context, query FindMyCompletedTasksQuery) (*page.Page[my.CompletedTask], error)
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 ¶
func (h *FindMyInitiatedHandler) Handle(ctx context.Context, query FindMyInitiatedQuery) (*page.Page[my.InitiatedInstance], error)
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 ¶
func (h *FindMyPendingTasksHandler) Handle(ctx context.Context, query FindMyPendingTasksQuery) (*page.Page[my.PendingTask], error)
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 ¶
func (h *GetAdminInstanceDetailHandler) Handle(ctx context.Context, query GetAdminInstanceDetailQuery) (*admin.InstanceDetail, error)
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 ¶
func (h *GetFlowGraphHandler) Handle(ctx context.Context, query GetFlowGraphQuery) (*shared.FlowGraph, error)
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
func (h *GetMetricsHandler) Handle(ctx context.Context, query GetMetricsQuery) (*admin.Metrics, error)
type GetMetricsQuery ¶ added in v0.24.0
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 ¶
func (h *GetMyInstanceDetailHandler) Handle(ctx context.Context, query GetMyInstanceDetailQuery) (*my.InstanceDetail, error)
type GetMyInstanceDetailQuery ¶
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 ¶
func (h *GetMyPendingCountsHandler) Handle(ctx context.Context, query GetMyPendingCountsQuery) (*my.PendingCounts, error)
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
func (h *GetStartFormHandler) Handle(ctx context.Context, query GetStartFormQuery) (*my.StartForm, error)
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
func (h *ListKindOptionsHandler) Handle(context.Context, ListKindOptionsQuery) (*approval.KindOptions, error)
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
ListKindOptionsQuery asks for the assignee / CC / initiator kinds this application accepts — what the flow designer offers in its rule editors.
Source Files
¶
- field_permissions.go
- find_admin_action_logs.go
- find_admin_business_projections.go
- find_admin_instances.go
- find_admin_tasks.go
- find_available_flows.go
- find_flow_initiators.go
- find_flow_versions.go
- find_flows.go
- find_my_cc_records.go
- find_my_completed_tasks.go
- find_my_initiated.go
- find_my_pending_tasks.go
- flow_disclosure.go
- flow_graph.go
- get_admin_instance_detail.go
- get_flow_graph.go
- get_metrics.go
- get_my_instance_detail.go
- get_my_pending_counts.go
- get_start_form.go
- helpers.go
- list_kind_options.go
- module.go
- timeline.go
- visit_index.go