Documentation
¶
Overview ¶
Package dsclient defines the unified Data Storage client interface, composing the per-concern interfaces currently scattered across pkg/audit and pkg/authwebhook.
RF-3 (v1.1): This package is the target for consolidation. Today it serves as documentation of the intended unified interface. In v1.1, both pkg/audit.OpenAPIClientAdapter and pkg/authwebhook.DSClientAdapter will be replaced by a single adapter implementing this interface.
Current adapters wrapping *ogenclient.Client:
- pkg/audit.OpenAPIClientAdapter (implements AuditBatchWriter)
- pkg/authwebhook.DSClientAdapter (implements WorkflowCatalog + ActionTypeCatalog + WorkflowCounter)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionTypeCatalog ¶
type ActionTypeCatalog interface {
CreateActionType(ctx context.Context, name string, description ogenclient.ActionTypeDescription, registeredBy string) (ActionTypeResult, error)
UpdateActionType(ctx context.Context, name string, description ogenclient.ActionTypeDescription, updatedBy string) (ActionTypeUpdateResult, error)
DisableActionType(ctx context.Context, name string, disabledBy string) (ActionTypeDisableResult, error)
}
ActionTypeCatalog manages action type taxonomy CRUD in DS. Currently: pkg/authwebhook.ActionTypeCatalogClient (via DSClientAdapter)
type ActionTypeDisableResult ¶
type ActionTypeDisableResult struct {
Disabled bool
DependentWorkflowCount int
DependentWorkflows []string
}
ActionTypeDisableResult holds the DS response when disabling an action type.
type ActionTypeResult ¶
ActionTypeResult holds the DS response after registering or re-enabling an action type.
type ActionTypeUpdateResult ¶
ActionTypeUpdateResult holds the DS response after updating an action type description.
type AuditBatchWriter ¶
type AuditBatchWriter interface {
StoreBatch(ctx context.Context, events []*ogenclient.AuditEventRequest) error
}
AuditBatchWriter writes audit event batches to DS. Currently: pkg/audit.DataStorageClient
type Client ¶
type Client interface {
AuditBatchWriter
WorkflowCatalog
ActionTypeCatalog
WorkflowCounter
}
Client is the unified DS client interface composing all per-concern interfaces. v1.1: A single adapter implementing this interface will replace the current two adapters (OpenAPIClientAdapter + DSClientAdapter).
type WorkflowCatalog ¶
type WorkflowCatalog interface {
CreateWorkflowInline(ctx context.Context, content, source, registeredBy string) (WorkflowResult, error)
DisableWorkflow(ctx context.Context, workflowID, reason, updatedBy string) error
}
WorkflowCatalog manages workflow registration and lifecycle in DS. Currently: pkg/authwebhook.WorkflowCatalogClient (via DSClientAdapter)