mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +00:00
feat: actions v2 execution targets command side (#7384)
Adds the API to create, update, delete targets for execution in a new ExecutionService (v3alpha)
This commit is contained in:
25
internal/repository/target/constraints.go
Normal file
25
internal/repository/target/constraints.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package target
|
||||
|
||||
import (
|
||||
"github.com/zitadel/zitadel/internal/eventstore"
|
||||
)
|
||||
|
||||
const (
|
||||
UniqueTarget = "target"
|
||||
DuplicateTarget = "Errors.Target.AlreadyExists"
|
||||
)
|
||||
|
||||
func NewAddUniqueConstraint(name string) *eventstore.UniqueConstraint {
|
||||
return eventstore.NewAddEventUniqueConstraint(
|
||||
UniqueTarget,
|
||||
name,
|
||||
DuplicateTarget,
|
||||
)
|
||||
}
|
||||
|
||||
func NewRemoveUniqueConstraint(name string) *eventstore.UniqueConstraint {
|
||||
return eventstore.NewRemoveUniqueConstraint(
|
||||
UniqueTarget,
|
||||
name,
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user