zitadel/internal/repository/target/constraints.go
Stefan Benz 198bc017b8
feat: actions v2 execution targets command side (#7384)
Adds the API to create, update, delete targets for execution in a new ExecutionService (v3alpha)
2024-02-15 05:39:10 +00:00

26 lines
485 B
Go

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,
)
}