28 lines
735 B
Go
28 lines
735 B
Go
package ports
|
|
|
|
import (
|
|
"git.cin.su/m/Assistant/contracts/authority"
|
|
"git.cin.su/m/Assistant/contracts/commit"
|
|
)
|
|
|
|
// Executor is the only commit-owned port permitted to reach an external world.
|
|
// Its implementation belongs in an isolated adapter/runtime, never in domain.
|
|
type Executor interface {
|
|
Execute(commit.AuthorizedAction) ExecutionResult
|
|
}
|
|
|
|
// Reconciler verifies an ambiguous effect without applying it again.
|
|
type Reconciler interface {
|
|
Reconcile(commit.AuthorizedAction) ExecutionResult
|
|
}
|
|
|
|
type ExecutionResult struct {
|
|
Succeeded bool
|
|
Known bool
|
|
}
|
|
|
|
// AuthorityValidator is the remote-capable boundary to the Authority owner.
|
|
type AuthorityValidator interface {
|
|
Validate(authority.AuthorizationContext) error
|
|
}
|