This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
package commit
|
||||
|
||||
// Package commit contains stable boundary contract types for the commit semantic owner.
|
||||
@@ -0,0 +1,51 @@
|
||||
package commit
|
||||
|
||||
import (
|
||||
"git.cin.su/m/Assistant/contracts/authority"
|
||||
"git.cin.su/m/Assistant/contracts/capability"
|
||||
"git.cin.su/m/Assistant/contracts/identity"
|
||||
"git.cin.su/m/Assistant/contracts/work"
|
||||
"git.cin.su/m/Assistant/platform/ids"
|
||||
)
|
||||
|
||||
type ActionIntentID ids.ID
|
||||
type ActionAttemptID ids.ID
|
||||
type AttemptID = ActionAttemptID
|
||||
type AuthorizedActionID ids.ID
|
||||
|
||||
type ActionState string
|
||||
|
||||
const (
|
||||
ActionProposed ActionState = "PROPOSED"
|
||||
ActionAuthorized ActionState = "AUTHORIZED"
|
||||
ActionExecuting ActionState = "EXECUTING"
|
||||
ActionSucceeded ActionState = "SUCCEEDED"
|
||||
ActionFailed ActionState = "FAILED"
|
||||
ActionUnknownOutcome ActionState = "UNKNOWN_OUTCOME"
|
||||
)
|
||||
|
||||
type ExternalOperation string
|
||||
|
||||
type ActionProposal struct {
|
||||
IntentID ActionIntentID
|
||||
ActorID identity.ActorID
|
||||
CapabilityID capability.CapabilityID
|
||||
Target work.TaskTarget
|
||||
Operation ExternalOperation
|
||||
State ActionState
|
||||
}
|
||||
|
||||
type AuthorizedAction struct {
|
||||
ID AuthorizedActionID
|
||||
Proposal ActionProposal
|
||||
GrantID authority.GrantID
|
||||
ScopeID authority.ScopeID
|
||||
State ActionState
|
||||
}
|
||||
|
||||
type ActionAttempt struct {
|
||||
ID ActionAttemptID
|
||||
AuthorizedID AuthorizedActionID
|
||||
IntentID ActionIntentID
|
||||
State ActionState
|
||||
}
|
||||
Reference in New Issue
Block a user