mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 19:44:21 +00:00
61 lines
1.0 KiB
Go
61 lines
1.0 KiB
Go
package idp
|
|
|
|
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
|
|
)
|