Documentation
¶
Index ¶
Constants ¶
View Source
const ( TopicRequestCreated = "request.created" TopicRequestUpdated = "request.updated" TopicRequestExpired = "request.expired" TopicDecisionCreated = "decision.created" LegacyTopicRequestNew = "request.new" LegacyTopicDecisionNew = "decision.new" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct {
ID string `json:"id"`
ProcessID string `json:"processId"`
ExecutionID string `json:"executionId"`
Action string `json:"action"`
Args json.RawMessage `json:"args,omitempty"`
CreatedAt time.Time `json:"createdAt"`
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
Meta map[string]interface{} `json:"meta,omitempty"`
}
type Service ¶
type Service interface {
RequestApproval(ctx context.Context, r *Request) error
ListPending(ctx context.Context) ([]*Request, error)
Decide(ctx context.Context, id string, approved bool, reason string) (*Decision, error)
Queue() Queue[Event]
}
Service defines the approval service interface (minimal subset used by agently).
Click to show internal directories.
Click to hide internal directories.