This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
package ports
|
||||
|
||||
// Package ports declares commit-owned external dependencies. Ports must be narrow and semantic.
|
||||
@@ -0,0 +1,27 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user