mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 12:57:34 +00:00
chore: move the go code into a subfolder
This commit is contained in:
25
apps/api/internal/repository/target/constraints.go
Normal file
25
apps/api/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