zitadel/internal/v2/repository/idp/config.go

61 lines
1.0 KiB
Go
Raw Normal View History

2020-11-12 22:15:01 +00:00
package idp
2020-11-17 12:44:37 +00:00
import (
"github.com/caos/zitadel/internal/eventstore/v2"
"github.com/caos/zitadel/internal/v2/repository/idp/oidc"
)
type ConfigAggregate struct {
eventstore.Aggregate
ConfigID string
Type ConfigType
Name string
StylingType StylingType
State ConfigState
OIDCConfig *oidc.ConfigReadModel
}
type ConfigReadModel struct {
eventstore.ReadModel
ConfigID string
Type ConfigType
Name string
StylingType StylingType
State ConfigState
OIDCConfig *oidc.ConfigReadModel
}
func (rm *ConfigReadModel) AppendEvents(events ...eventstore.EventReader) error {
rm.ReadModel.AppendEvents(events...)
return nil
}
func (rm *ConfigReadModel) Reduce() error {
return nil
}
type ConfigType int32
const (
ConfigTypeOIDC ConfigType = iota
ConfigTypeSAML
)
type ConfigState int32
const (
ConfigStateActive ConfigState = iota
ConfigStateInactive
ConfigStateRemoved
)
type StylingType int32
const (
StylingTypeUnspecified StylingType = iota
StylingTypeGoogle
)