mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
34 lines
616 B
Go
34 lines
616 B
Go
|
package domain
|
||
|
|
||
|
type ExecutionType uint
|
||
|
|
||
|
func (s ExecutionType) Valid() bool {
|
||
|
return s < executionTypeStateCount
|
||
|
}
|
||
|
|
||
|
const (
|
||
|
ExecutionTypeUnspecified ExecutionType = iota
|
||
|
ExecutionTypeRequest
|
||
|
ExecutionTypeResponse
|
||
|
ExecutionTypeFunction
|
||
|
ExecutionTypeEvent
|
||
|
|
||
|
executionTypeStateCount
|
||
|
)
|
||
|
|
||
|
func (e ExecutionType) String() string {
|
||
|
switch e {
|
||
|
case ExecutionTypeUnspecified, executionTypeStateCount:
|
||
|
return ""
|
||
|
case ExecutionTypeRequest:
|
||
|
return "request"
|
||
|
case ExecutionTypeResponse:
|
||
|
return "response"
|
||
|
case ExecutionTypeFunction:
|
||
|
return "function"
|
||
|
case ExecutionTypeEvent:
|
||
|
return "event"
|
||
|
}
|
||
|
return ""
|
||
|
}
|