2020-11-12 23:15:01 +01:00
|
|
|
package idp
|
2020-11-17 13:44:37 +01:00
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/caos/zitadel/internal/eventstore/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ConfigAggregate struct {
|
|
|
|
eventstore.Aggregate
|
|
|
|
}
|
|
|
|
|
|
|
|
type ConfigType int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
ConfigTypeOIDC ConfigType = iota
|
|
|
|
ConfigTypeSAML
|
2020-11-25 20:04:32 +01:00
|
|
|
|
|
|
|
//count is for validation
|
|
|
|
configTypeCount
|
2020-11-17 13:44:37 +01:00
|
|
|
)
|
|
|
|
|
2020-11-25 20:04:32 +01:00
|
|
|
func (f ConfigType) Valid() bool {
|
|
|
|
return f >= 0 && f < configTypeCount
|
|
|
|
}
|
|
|
|
|
2020-11-17 13:44:37 +01:00
|
|
|
type ConfigState int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
ConfigStateActive ConfigState = iota
|
|
|
|
ConfigStateInactive
|
|
|
|
ConfigStateRemoved
|
2020-11-25 20:04:32 +01:00
|
|
|
|
|
|
|
configStateCount
|
2020-11-17 13:44:37 +01:00
|
|
|
)
|
|
|
|
|
2020-11-25 20:04:32 +01:00
|
|
|
func (f ConfigState) Valid() bool {
|
|
|
|
return f >= 0 && f < configStateCount
|
|
|
|
}
|
|
|
|
|
2020-11-17 13:44:37 +01:00
|
|
|
type StylingType int32
|
|
|
|
|
|
|
|
const (
|
2020-11-25 20:04:32 +01:00
|
|
|
StylingTypeGoogle StylingType = iota + 1
|
|
|
|
|
|
|
|
stylingTypeCount
|
|
|
|
)
|
|
|
|
|
|
|
|
func (f StylingType) Valid() bool {
|
|
|
|
return f >= 0 && f < stylingTypeCount
|
|
|
|
}
|