mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-21 15:27:31 +00:00
fa9f581d56
* chore: move to new org * logging * fix: org rename caos -> zitadel Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
48 lines
778 B
Go
48 lines
778 B
Go
package domain
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/zitadel/zitadel/internal/eventstore/v1/models"
|
|
)
|
|
|
|
type Action struct {
|
|
models.ObjectRoot
|
|
|
|
Name string
|
|
Script string
|
|
Timeout time.Duration
|
|
AllowedToFail bool
|
|
State ActionState
|
|
}
|
|
|
|
func (a *Action) IsValid() bool {
|
|
return a.Name != ""
|
|
}
|
|
|
|
type ActionState int32
|
|
|
|
const (
|
|
ActionStateUnspecified ActionState = iota
|
|
ActionStateActive
|
|
ActionStateInactive
|
|
ActionStateRemoved
|
|
actionStateCount
|
|
)
|
|
|
|
func (s ActionState) Valid() bool {
|
|
return s >= 0 && s < actionStateCount
|
|
}
|
|
|
|
func (s ActionState) Exists() bool {
|
|
return s != ActionStateUnspecified && s != ActionStateRemoved
|
|
}
|
|
|
|
type ActionsAllowed int32
|
|
|
|
const (
|
|
ActionsNotAllowed ActionsAllowed = iota
|
|
ActionsMaxAllowed
|
|
ActionsAllowedUnlimited
|
|
)
|