project

package
v0.0.0-...-860e413 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AggregateType    = "project"
	AggregateVersion = "v1"
)
View Source
const (
	APIConfigAddedType                = applicationEventTypePrefix + "config.api.added"
	APIConfigChangedType              = applicationEventTypePrefix + "config.api.changed"
	APIConfigSecretChangedType        = applicationEventTypePrefix + "config.api.secret.changed"
	APIClientSecretCheckSucceededType = applicationEventTypePrefix + "api.secret.check.succeeded"
	APIClientSecretCheckFailedType    = applicationEventTypePrefix + "api.secret.check.failed"
)
View Source
const (
	UniqueAppNameType = "appname"

	ApplicationAddedType       = applicationEventTypePrefix + "added"
	ApplicationChangedType     = applicationEventTypePrefix + "changed"
	ApplicationDeactivatedType = applicationEventTypePrefix + "deactivated"
	ApplicationReactivatedType = applicationEventTypePrefix + "reactivated"
	ApplicationRemovedType     = applicationEventTypePrefix + "removed"
)
View Source
const (
	ApplicationKeyAddedEventType   = applicationKeyEventPrefix + "added"
	ApplicationKeyRemovedEventType = applicationKeyEventPrefix + "removed"
)
View Source
const (
	OIDCConfigAddedType                = applicationEventTypePrefix + "config.oidc.added"
	OIDCConfigChangedType              = applicationEventTypePrefix + "config.oidc.changed"
	OIDCConfigSecretChangedType        = applicationEventTypePrefix + "config.oidc.secret.changed"
	OIDCClientSecretCheckSucceededType = applicationEventTypePrefix + "oidc.secret.check.succeeded"
	OIDCClientSecretCheckFailedType    = applicationEventTypePrefix + "oidc.secret.check.failed"
)
View Source
const (
	UniqueProjectnameType = "project_names"

	ProjectAddedType       = projectEventTypePrefix + "added"
	ProjectChangedType     = projectEventTypePrefix + "changed"
	ProjectDeactivatedType = projectEventTypePrefix + "deactivated"
	ProjectReactivatedType = projectEventTypePrefix + "reactivated"
	ProjectRemovedType     = projectEventTypePrefix + "removed"
)
View Source
const (
	UniqueEntityIDType    = "entity_ids"
	SAMLConfigAddedType   = applicationEventTypePrefix + "config.saml.added"
	SAMLConfigChangedType = applicationEventTypePrefix + "config.saml.changed"
)

Variables

View Source
var (
	UniqueGrantType = "project_grant"

	GrantAddedType          = grantEventTypePrefix + "added"
	GrantChangedType        = grantEventTypePrefix + "changed"
	GrantCascadeChangedType = grantEventTypePrefix + "cascade.changed"
	GrantDeactivatedType    = grantEventTypePrefix + "deactivated"
	GrantReactivatedType    = grantEventTypePrefix + "reactivated"
	GrantRemovedType        = grantEventTypePrefix + "removed"
)
View Source
var (
	UniqueProjectGrantMemberType  = "project_grant_member"
	GrantMemberAddedType          = grantEventTypePrefix + member.AddedEventType
	GrantMemberChangedType        = grantEventTypePrefix + member.ChangedEventType
	GrantMemberRemovedType        = grantEventTypePrefix + member.RemovedEventType
	GrantMemberCascadeRemovedType = grantEventTypePrefix + member.CascadeRemovedEventType
)
View Source
var (
	MemberAddedType          = projectEventTypePrefix + member.AddedEventType
	MemberChangedType        = projectEventTypePrefix + member.ChangedEventType
	MemberRemovedType        = projectEventTypePrefix + member.RemovedEventType
	MemberCascadeRemovedType = projectEventTypePrefix + member.CascadeRemovedEventType
)
View Source
var (
	UniqueRoleType = "project_role"

	RoleAddedType   = roleEventTypePrefix + "added"
	RoleChangedType = roleEventTypePrefix + "changed"
	RoleRemovedType = roleEventTypePrefix + "removed"
)

Functions

func APIConfigAddedEventMapper

func APIConfigAddedEventMapper(event *repository.Event) (eventstore.Event, error)

func APIConfigChangedEventMapper

func APIConfigChangedEventMapper(event *repository.Event) (eventstore.Event, error)

func APIConfigSecretChangedEventMapper

func APIConfigSecretChangedEventMapper(event *repository.Event) (eventstore.Event, error)

func APIConfigSecretCheckFailedEventMapper

func APIConfigSecretCheckFailedEventMapper(event *repository.Event) (eventstore.Event, error)

func APIConfigSecretCheckSucceededEventMapper

func APIConfigSecretCheckSucceededEventMapper(event *repository.Event) (eventstore.Event, error)

func ApplicationAddedEventMapper

func ApplicationAddedEventMapper(event *repository.Event) (eventstore.Event, error)

func ApplicationChangedEventMapper

func ApplicationChangedEventMapper(event *repository.Event) (eventstore.Event, error)

func ApplicationDeactivatedEventMapper

func ApplicationDeactivatedEventMapper(event *repository.Event) (eventstore.Event, error)

func ApplicationKeyAddedEventMapper

func ApplicationKeyAddedEventMapper(event *repository.Event) (eventstore.Event, error)

func ApplicationKeyRemovedEventMapper

func ApplicationKeyRemovedEventMapper(event *repository.Event) (eventstore.Event, error)

func ApplicationReactivatedEventMapper

func ApplicationReactivatedEventMapper(event *repository.Event) (eventstore.Event, error)

func ApplicationRemovedEventMapper

func ApplicationRemovedEventMapper(event *repository.Event) (eventstore.Event, error)

func ChangeAPIAuthMethodType

func ChangeAPIAuthMethodType(authMethodType domain.APIAuthMethodType) func(event *APIConfigChangedEvent)

func ChangeAccessTokenRoleAssertion

func ChangeAccessTokenRoleAssertion(accessTokenRoleAssertion bool) func(event *OIDCConfigChangedEvent)

func ChangeAccessTokenType

func ChangeAccessTokenType(accessTokenType domain.OIDCTokenType) func(event *OIDCConfigChangedEvent)

func ChangeAdditionalOrigins

func ChangeAdditionalOrigins(additionalOrigins []string) func(event *OIDCConfigChangedEvent)

func ChangeApplicationType

func ChangeApplicationType(appType domain.OIDCApplicationType) func(event *OIDCConfigChangedEvent)

func ChangeAuthMethodType

func ChangeAuthMethodType(authMethodType domain.OIDCAuthMethodType) func(event *OIDCConfigChangedEvent)

func ChangeClockSkew

func ChangeClockSkew(clockSkew time.Duration) func(event *OIDCConfigChangedEvent)

func ChangeDevMode

func ChangeDevMode(devMode bool) func(event *OIDCConfigChangedEvent)

func ChangeDisplayName

func ChangeDisplayName(displayName string) func(event *RoleChangedEvent)

func ChangeEntityID

func ChangeEntityID(entityID string) func(event *SAMLConfigChangedEvent)

func ChangeGrantTypes

func ChangeGrantTypes(grantTypes []domain.OIDCGrantType) func(event *OIDCConfigChangedEvent)

func ChangeGroup

func ChangeGroup(group string) func(event *RoleChangedEvent)

func ChangeHasProjectCheck

func ChangeHasProjectCheck(ChangeHasProjectCheck bool) func(event *ProjectChangeEvent)

func ChangeIDTokenRoleAssertion

func ChangeIDTokenRoleAssertion(idTokenRoleAssertion bool) func(event *OIDCConfigChangedEvent)

func ChangeIDTokenUserinfoAssertion

func ChangeIDTokenUserinfoAssertion(idTokenUserinfoAssertion bool) func(event *OIDCConfigChangedEvent)

func ChangeKey

func ChangeKey(key string) func(event *RoleChangedEvent)

func ChangeMetadata

func ChangeMetadata(metadata []byte) func(event *SAMLConfigChangedEvent)

func ChangeMetadataURL

func ChangeMetadataURL(metadataURL string) func(event *SAMLConfigChangedEvent)

func ChangeName

func ChangeName(name string) func(event *ProjectChangeEvent)

func ChangePostLogoutRedirectURIs

func ChangePostLogoutRedirectURIs(logoutRedirects []string) func(event *OIDCConfigChangedEvent)

func ChangePrivateLabelingSetting

func ChangePrivateLabelingSetting(ChangePrivateLabelingSetting domain.PrivateLabelingSetting) func(event *ProjectChangeEvent)

func ChangeProjectRoleAssertion

func ChangeProjectRoleAssertion(projectRoleAssertion bool) func(event *ProjectChangeEvent)

func ChangeProjectRoleCheck

func ChangeProjectRoleCheck(projectRoleCheck bool) func(event *ProjectChangeEvent)

func ChangeRedirectURIs

func ChangeRedirectURIs(uris []string) func(event *OIDCConfigChangedEvent)

func ChangeResponseTypes

func ChangeResponseTypes(responseTypes []domain.OIDCResponseType) func(event *OIDCConfigChangedEvent)

func ChangeVersion

func ChangeVersion(version domain.OIDCVersion) func(event *OIDCConfigChangedEvent)

func GrantAddedEventMapper

func GrantAddedEventMapper(event *repository.Event) (eventstore.Event, error)

func GrantCascadeChangedEventMapper

func GrantCascadeChangedEventMapper(event *repository.Event) (eventstore.Event, error)

func GrantChangedEventMapper

func GrantChangedEventMapper(event *repository.Event) (eventstore.Event, error)

func GrantDeactivateEventMapper

func GrantDeactivateEventMapper(event *repository.Event) (eventstore.Event, error)

func GrantMemberAddedEventMapper

func GrantMemberAddedEventMapper(event *repository.Event) (eventstore.Event, error)

func GrantMemberCascadeRemovedEventMapper

func GrantMemberCascadeRemovedEventMapper(event *repository.Event) (eventstore.Event, error)

func GrantMemberChangedEventMapper

func GrantMemberChangedEventMapper(event *repository.Event) (eventstore.Event, error)

func GrantMemberRemovedEventMapper

func GrantMemberRemovedEventMapper(event *repository.Event) (eventstore.Event, error)

func GrantReactivatedEventMapper

func GrantReactivatedEventMapper(event *repository.Event) (eventstore.Event, error)

func GrantRemovedEventMapper

func GrantRemovedEventMapper(event *repository.Event) (eventstore.Event, error)

func MemberAddedEventMapper

func MemberAddedEventMapper(event *repository.Event) (eventstore.Event, error)

func MemberCascadeRemovedEventMapper

func MemberCascadeRemovedEventMapper(event *repository.Event) (eventstore.Event, error)

func MemberChangedEventMapper

func MemberChangedEventMapper(event *repository.Event) (eventstore.Event, error)

func MemberRemovedEventMapper

func MemberRemovedEventMapper(event *repository.Event) (eventstore.Event, error)

func NewAddApplicationUniqueConstraint

func NewAddApplicationUniqueConstraint(name, projectID string) *eventstore.EventUniqueConstraint

func NewAddProjectGrantMemberUniqueConstraint

func NewAddProjectGrantMemberUniqueConstraint(projectID, userID, grantID string) *eventstore.EventUniqueConstraint

func NewAddProjectGrantUniqueConstraint

func NewAddProjectGrantUniqueConstraint(grantedOrgID, projectID string) *eventstore.EventUniqueConstraint

func NewAddProjectNameUniqueConstraint

func NewAddProjectNameUniqueConstraint(projectName, resourceOwner string) *eventstore.EventUniqueConstraint

func NewAddProjectRoleUniqueConstraint

func NewAddProjectRoleUniqueConstraint(roleKey, projectID string) *eventstore.EventUniqueConstraint

func NewAddSAMLConfigEntityIDUniqueConstraint

func NewAddSAMLConfigEntityIDUniqueConstraint(entityID string) *eventstore.EventUniqueConstraint

func NewRemoveApplicationUniqueConstraint

func NewRemoveApplicationUniqueConstraint(name, projectID string) *eventstore.EventUniqueConstraint

func NewRemoveProjectGrantMemberUniqueConstraint

func NewRemoveProjectGrantMemberUniqueConstraint(projectID, userID, grantID string) *eventstore.EventUniqueConstraint

func NewRemoveProjectGrantUniqueConstraint

func NewRemoveProjectGrantUniqueConstraint(grantedOrgID, projectID string) *eventstore.EventUniqueConstraint

func NewRemoveProjectNameUniqueConstraint

func NewRemoveProjectNameUniqueConstraint(projectName, resourceOwner string) *eventstore.EventUniqueConstraint

func NewRemoveProjectRoleUniqueConstraint

func NewRemoveProjectRoleUniqueConstraint(roleKey, projectID string) *eventstore.EventUniqueConstraint

func NewRemoveSAMLConfigEntityIDUniqueConstraint

func NewRemoveSAMLConfigEntityIDUniqueConstraint(entityID string) *eventstore.EventUniqueConstraint

func OIDCConfigAddedEventMapper

func OIDCConfigAddedEventMapper(event *repository.Event) (eventstore.Event, error)

func OIDCConfigChangedEventMapper

func OIDCConfigChangedEventMapper(event *repository.Event) (eventstore.Event, error)

func OIDCConfigSecretChangedEventMapper

func OIDCConfigSecretChangedEventMapper(event *repository.Event) (eventstore.Event, error)

func OIDCConfigSecretCheckFailedEventMapper

func OIDCConfigSecretCheckFailedEventMapper(event *repository.Event) (eventstore.Event, error)

func OIDCConfigSecretCheckSucceededEventMapper

func OIDCConfigSecretCheckSucceededEventMapper(event *repository.Event) (eventstore.Event, error)

func ProjectAddedEventMapper

func ProjectAddedEventMapper(event *repository.Event) (eventstore.Event, error)

func ProjectChangeEventMapper

func ProjectChangeEventMapper(event *repository.Event) (eventstore.Event, error)

func ProjectDeactivatedEventMapper

func ProjectDeactivatedEventMapper(event *repository.Event) (eventstore.Event, error)

func ProjectReactivatedEventMapper

func ProjectReactivatedEventMapper(event *repository.Event) (eventstore.Event, error)

func ProjectRemovedEventMapper

func ProjectRemovedEventMapper(event *repository.Event) (eventstore.Event, error)

func RegisterEventMappers

func RegisterEventMappers(es *eventstore.Eventstore)

func RoleAddedEventMapper

func RoleAddedEventMapper(event *repository.Event) (eventstore.Event, error)

func RoleChangedEventMapper

func RoleChangedEventMapper(event *repository.Event) (eventstore.Event, error)

func RoleRemovedEventMapper

func RoleRemovedEventMapper(event *repository.Event) (eventstore.Event, error)

func SAMLConfigAddedEventMapper

func SAMLConfigAddedEventMapper(event *repository.Event) (eventstore.Event, error)

func SAMLConfigChangedEventMapper

func SAMLConfigChangedEventMapper(event *repository.Event) (eventstore.Event, error)

Types

type APIConfigAddedEvent

type APIConfigAddedEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID          string                   `json:"appId"`
	ClientID       string                   `json:"clientId,omitempty"`
	ClientSecret   *crypto.CryptoValue      `json:"clientSecret,omitempty"`
	AuthMethodType domain.APIAuthMethodType `json:"authMethodType,omitempty"`
}

func NewAPIConfigAddedEvent

func NewAPIConfigAddedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID,
	clientID string,
	clientSecret *crypto.CryptoValue,
	authMethodType domain.APIAuthMethodType,
) *APIConfigAddedEvent

func (*APIConfigAddedEvent) Data

func (e *APIConfigAddedEvent) Data() interface{}

func (*APIConfigAddedEvent) UniqueConstraints

func (e *APIConfigAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

func (*APIConfigAddedEvent) Validate

func (e *APIConfigAddedEvent) Validate(cmd eventstore.Command) bool

type APIConfigChangedEvent

type APIConfigChangedEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID          string                    `json:"appId"`
	ClientSecret   *crypto.CryptoValue       `json:"clientSecret,omitempty"`
	AuthMethodType *domain.APIAuthMethodType `json:"authMethodType,omitempty"`
}

func NewAPIConfigChangedEvent

func NewAPIConfigChangedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID string,
	changes []APIConfigChanges,
) (*APIConfigChangedEvent, error)

func (*APIConfigChangedEvent) Data

func (e *APIConfigChangedEvent) Data() interface{}

func (*APIConfigChangedEvent) UniqueConstraints

func (e *APIConfigChangedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type APIConfigChanges

type APIConfigChanges func(event *APIConfigChangedEvent)

type APIConfigSecretChangedEvent

type APIConfigSecretChangedEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID        string              `json:"appId"`
	ClientSecret *crypto.CryptoValue `json:"clientSecret,omitempty"`
}

func NewAPIConfigSecretChangedEvent

func NewAPIConfigSecretChangedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID string,
	clientSecret *crypto.CryptoValue,
) *APIConfigSecretChangedEvent

func (*APIConfigSecretChangedEvent) Data

func (e *APIConfigSecretChangedEvent) Data() interface{}

func (*APIConfigSecretChangedEvent) UniqueConstraints

type APIConfigSecretCheckFailedEvent

type APIConfigSecretCheckFailedEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID string `json:"appId"`
}

func NewAPIConfigSecretCheckFailedEvent

func NewAPIConfigSecretCheckFailedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID string,
) *APIConfigSecretCheckFailedEvent

func (*APIConfigSecretCheckFailedEvent) Data

func (e *APIConfigSecretCheckFailedEvent) Data() interface{}

func (*APIConfigSecretCheckFailedEvent) UniqueConstraints

type APIConfigSecretCheckSucceededEvent

type APIConfigSecretCheckSucceededEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID string `json:"appId"`
}

func NewAPIConfigSecretCheckSucceededEvent

func NewAPIConfigSecretCheckSucceededEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID string,
) *APIConfigSecretCheckSucceededEvent

func (*APIConfigSecretCheckSucceededEvent) Data

func (e *APIConfigSecretCheckSucceededEvent) Data() interface{}

func (*APIConfigSecretCheckSucceededEvent) UniqueConstraints

type Aggregate

type Aggregate struct {
	eventstore.Aggregate
}

func NewAggregate

func NewAggregate(id, resourceOwner string) *Aggregate

type ApplicationAddedEvent

type ApplicationAddedEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID string `json:"appId,omitempty"`
	Name  string `json:"name,omitempty"`
}

func NewApplicationAddedEvent

func NewApplicationAddedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID,
	name string,
) *ApplicationAddedEvent

func (*ApplicationAddedEvent) Data

func (e *ApplicationAddedEvent) Data() interface{}

func (*ApplicationAddedEvent) UniqueConstraints

func (e *ApplicationAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type ApplicationChangedEvent

type ApplicationChangedEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID string `json:"appId,omitempty"`
	Name  string `json:"name,omitempty"`
	// contains filtered or unexported fields
}

func NewApplicationChangedEvent

func NewApplicationChangedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID,
	oldName,
	newName string,
) *ApplicationChangedEvent

func (*ApplicationChangedEvent) Data

func (e *ApplicationChangedEvent) Data() interface{}

func (*ApplicationChangedEvent) UniqueConstraints

func (e *ApplicationChangedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type ApplicationDeactivatedEvent

type ApplicationDeactivatedEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID string `json:"appId,omitempty"`
}

func NewApplicationDeactivatedEvent

func NewApplicationDeactivatedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID string,
) *ApplicationDeactivatedEvent

func (*ApplicationDeactivatedEvent) Data

func (e *ApplicationDeactivatedEvent) Data() interface{}

func (*ApplicationDeactivatedEvent) UniqueConstraints

type ApplicationKeyAddedEvent

type ApplicationKeyAddedEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID          string              `json:"applicationId"`
	ClientID       string              `json:"clientId,omitempty"`
	KeyID          string              `json:"keyId,omitempty"`
	KeyType        domain.AuthNKeyType `json:"type,omitempty"`
	ExpirationDate time.Time           `json:"expirationDate,omitempty"`
	PublicKey      []byte              `json:"publicKey,omitempty"`
}

func NewApplicationKeyAddedEvent

func NewApplicationKeyAddedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID,
	clientID,
	keyID string,
	keyType domain.AuthNKeyType,
	expirationDate time.Time,
	publicKey []byte,
) *ApplicationKeyAddedEvent

func (*ApplicationKeyAddedEvent) Data

func (e *ApplicationKeyAddedEvent) Data() interface{}

func (*ApplicationKeyAddedEvent) UniqueConstraints

func (e *ApplicationKeyAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type ApplicationKeyRemovedEvent

type ApplicationKeyRemovedEvent struct {
	eventstore.BaseEvent `json:"-"`

	KeyID string `json:"keyId,omitempty"`
}

func NewApplicationKeyRemovedEvent

func NewApplicationKeyRemovedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	keyID string,
) *ApplicationKeyRemovedEvent

func (*ApplicationKeyRemovedEvent) Data

func (e *ApplicationKeyRemovedEvent) Data() interface{}

func (*ApplicationKeyRemovedEvent) UniqueConstraints

type ApplicationReactivatedEvent

type ApplicationReactivatedEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID string `json:"appId,omitempty"`
}

func NewApplicationReactivatedEvent

func NewApplicationReactivatedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID string,
) *ApplicationReactivatedEvent

func (*ApplicationReactivatedEvent) Data

func (e *ApplicationReactivatedEvent) Data() interface{}

func (*ApplicationReactivatedEvent) UniqueConstraints

type ApplicationRemovedEvent

type ApplicationRemovedEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID string `json:"appId,omitempty"`
	// contains filtered or unexported fields
}

func NewApplicationRemovedEvent

func NewApplicationRemovedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID,
	name string,
	entityID string,
) *ApplicationRemovedEvent

func (*ApplicationRemovedEvent) Data

func (e *ApplicationRemovedEvent) Data() interface{}

func (*ApplicationRemovedEvent) UniqueConstraints

func (e *ApplicationRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type GrantAddedEvent

type GrantAddedEvent struct {
	eventstore.BaseEvent `json:"-"`

	GrantID      string   `json:"grantId,omitempty"`
	GrantedOrgID string   `json:"grantedOrgId,omitempty"`
	RoleKeys     []string `json:"roleKeys,omitempty"`
}

func NewGrantAddedEvent

func NewGrantAddedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	grantID,
	grantedOrgID string,
	roleKeys []string,
) *GrantAddedEvent

func (*GrantAddedEvent) Data

func (e *GrantAddedEvent) Data() interface{}

func (*GrantAddedEvent) UniqueConstraints

func (e *GrantAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type GrantCascadeChangedEvent

type GrantCascadeChangedEvent struct {
	eventstore.BaseEvent `json:"-"`

	GrantID  string   `json:"grantId,omitempty"`
	RoleKeys []string `json:"roleKeys,omitempty"`
}

func NewGrantCascadeChangedEvent

func NewGrantCascadeChangedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	grantID string,
	roleKeys []string,
) *GrantCascadeChangedEvent

func (*GrantCascadeChangedEvent) Data

func (e *GrantCascadeChangedEvent) Data() interface{}

func (*GrantCascadeChangedEvent) UniqueConstraints

func (e *GrantCascadeChangedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type GrantChangedEvent

type GrantChangedEvent struct {
	eventstore.BaseEvent `json:"-"`

	GrantID  string   `json:"grantId,omitempty"`
	RoleKeys []string `json:"roleKeys,omitempty"`
}

func NewGrantChangedEvent

func NewGrantChangedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	grantID string,
	roleKeys []string,
) *GrantChangedEvent

func (*GrantChangedEvent) Data

func (e *GrantChangedEvent) Data() interface{}

func (*GrantChangedEvent) UniqueConstraints

func (e *GrantChangedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type GrantDeactivateEvent

type GrantDeactivateEvent struct {
	eventstore.BaseEvent `json:"-"`

	GrantID string `json:"grantId,omitempty"`
}

func NewGrantDeactivateEvent

func NewGrantDeactivateEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	grantID string,
) *GrantDeactivateEvent

func (*GrantDeactivateEvent) Data

func (e *GrantDeactivateEvent) Data() interface{}

func (*GrantDeactivateEvent) UniqueConstraints

func (e *GrantDeactivateEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type GrantMemberAddedEvent

type GrantMemberAddedEvent struct {
	eventstore.BaseEvent `json:"-"`

	Roles   []string `json:"roles"`
	UserID  string   `json:"userId"`
	GrantID string   `json:"grantId"`
}

func NewProjectGrantMemberAddedEvent

func NewProjectGrantMemberAddedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	userID,
	grantID string,
	roles ...string,
) *GrantMemberAddedEvent

func (*GrantMemberAddedEvent) Data

func (e *GrantMemberAddedEvent) Data() interface{}

func (*GrantMemberAddedEvent) UniqueConstraints

func (e *GrantMemberAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type GrantMemberCascadeRemovedEvent

type GrantMemberCascadeRemovedEvent struct {
	eventstore.BaseEvent `json:"-"`

	UserID  string `json:"userId"`
	GrantID string `json:"grantId"`
}

func NewProjectGrantMemberCascadeRemovedEvent

func NewProjectGrantMemberCascadeRemovedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	userID,
	grantID string,
) *GrantMemberCascadeRemovedEvent

func (*GrantMemberCascadeRemovedEvent) Data

func (e *GrantMemberCascadeRemovedEvent) Data() interface{}

func (*GrantMemberCascadeRemovedEvent) UniqueConstraints

type GrantMemberChangedEvent

type GrantMemberChangedEvent struct {
	eventstore.BaseEvent `json:"-"`

	Roles   []string `json:"roles"`
	GrantID string   `json:"grantId"`
	UserID  string   `json:"userId"`
}

func NewProjectGrantMemberChangedEvent

func NewProjectGrantMemberChangedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	userID,
	grantID string,
	roles ...string,
) *GrantMemberChangedEvent

func (*GrantMemberChangedEvent) Data

func (e *GrantMemberChangedEvent) Data() interface{}

func (*GrantMemberChangedEvent) UniqueConstraints

func (e *GrantMemberChangedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type GrantMemberRemovedEvent

type GrantMemberRemovedEvent struct {
	eventstore.BaseEvent `json:"-"`

	UserID  string `json:"userId"`
	GrantID string `json:"grantId"`
}

func NewProjectGrantMemberRemovedEvent

func NewProjectGrantMemberRemovedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	userID,
	grantID string,
) *GrantMemberRemovedEvent

func (*GrantMemberRemovedEvent) Data

func (e *GrantMemberRemovedEvent) Data() interface{}

func (*GrantMemberRemovedEvent) UniqueConstraints

func (e *GrantMemberRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type GrantReactivatedEvent

type GrantReactivatedEvent struct {
	eventstore.BaseEvent `json:"-"`

	GrantID string `json:"grantId,omitempty"`
}

func NewGrantReactivatedEvent

func NewGrantReactivatedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	grantID string,
) *GrantReactivatedEvent

func (*GrantReactivatedEvent) Data

func (e *GrantReactivatedEvent) Data() interface{}

func (*GrantReactivatedEvent) UniqueConstraints

func (e *GrantReactivatedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type GrantRemovedEvent

type GrantRemovedEvent struct {
	eventstore.BaseEvent `json:"-"`

	GrantID string `json:"grantId,omitempty"`
	// contains filtered or unexported fields
}

func NewGrantRemovedEvent

func NewGrantRemovedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	grantID,
	grantedOrgID string,
) *GrantRemovedEvent

func (*GrantRemovedEvent) Data

func (e *GrantRemovedEvent) Data() interface{}

func (*GrantRemovedEvent) UniqueConstraints

func (e *GrantRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type MemberAddedEvent

type MemberAddedEvent struct {
	member.MemberAddedEvent
}

func NewProjectMemberAddedEvent

func NewProjectMemberAddedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	userID string,
	roles ...string,
) *MemberAddedEvent

type MemberCascadeRemovedEvent

type MemberCascadeRemovedEvent struct {
	member.MemberCascadeRemovedEvent
}

func NewProjectMemberCascadeRemovedEvent

func NewProjectMemberCascadeRemovedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	userID string,
) *MemberCascadeRemovedEvent

type MemberChangedEvent

type MemberChangedEvent struct {
	member.MemberChangedEvent
}

func NewProjectMemberChangedEvent

func NewProjectMemberChangedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	userID string,
	roles ...string,
) *MemberChangedEvent

type MemberRemovedEvent

type MemberRemovedEvent struct {
	member.MemberRemovedEvent
}

func NewProjectMemberRemovedEvent

func NewProjectMemberRemovedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	userID string,
) *MemberRemovedEvent

type OIDCConfigAddedEvent

type OIDCConfigAddedEvent struct {
	eventstore.BaseEvent `json:"-"`

	Version                  domain.OIDCVersion         `json:"oidcVersion,omitempty"`
	AppID                    string                     `json:"appId"`
	ClientID                 string                     `json:"clientId,omitempty"`
	ClientSecret             *crypto.CryptoValue        `json:"clientSecret,omitempty"`
	RedirectUris             []string                   `json:"redirectUris,omitempty"`
	ResponseTypes            []domain.OIDCResponseType  `json:"responseTypes,omitempty"`
	GrantTypes               []domain.OIDCGrantType     `json:"grantTypes,omitempty"`
	ApplicationType          domain.OIDCApplicationType `json:"applicationType,omitempty"`
	AuthMethodType           domain.OIDCAuthMethodType  `json:"authMethodType,omitempty"`
	PostLogoutRedirectUris   []string                   `json:"postLogoutRedirectUris,omitempty"`
	DevMode                  bool                       `json:"devMode,omitempty"`
	AccessTokenType          domain.OIDCTokenType       `json:"accessTokenType,omitempty"`
	AccessTokenRoleAssertion bool                       `json:"accessTokenRoleAssertion,omitempty"`
	IDTokenRoleAssertion     bool                       `json:"idTokenRoleAssertion,omitempty"`
	IDTokenUserinfoAssertion bool                       `json:"idTokenUserinfoAssertion,omitempty"`
	ClockSkew                time.Duration              `json:"clockSkew,omitempty"`
	AdditionalOrigins        []string                   `json:"additionalOrigins,omitempty"`
}

func NewOIDCConfigAddedEvent

func NewOIDCConfigAddedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	version domain.OIDCVersion,
	appID string,
	clientID string,
	clientSecret *crypto.CryptoValue,
	redirectUris []string,
	responseTypes []domain.OIDCResponseType,
	grantTypes []domain.OIDCGrantType,
	applicationType domain.OIDCApplicationType,
	authMethodType domain.OIDCAuthMethodType,
	postLogoutRedirectUris []string,
	devMode bool,
	accessTokenType domain.OIDCTokenType,
	accessTokenRoleAssertion bool,
	idTokenRoleAssertion bool,
	idTokenUserinfoAssertion bool,
	clockSkew time.Duration,
	additionalOrigins []string,
) *OIDCConfigAddedEvent

func (*OIDCConfigAddedEvent) Data

func (e *OIDCConfigAddedEvent) Data() interface{}

func (*OIDCConfigAddedEvent) UniqueConstraints

func (e *OIDCConfigAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

func (*OIDCConfigAddedEvent) Validate

func (e *OIDCConfigAddedEvent) Validate(cmd eventstore.Command) bool

type OIDCConfigChangedEvent

type OIDCConfigChangedEvent struct {
	eventstore.BaseEvent `json:"-"`

	Version                  *domain.OIDCVersion         `json:"oidcVersion,omitempty"`
	AppID                    string                      `json:"appId"`
	RedirectUris             *[]string                   `json:"redirectUris,omitempty"`
	ResponseTypes            *[]domain.OIDCResponseType  `json:"responseTypes,omitempty"`
	GrantTypes               *[]domain.OIDCGrantType     `json:"grantTypes,omitempty"`
	ApplicationType          *domain.OIDCApplicationType `json:"applicationType,omitempty"`
	AuthMethodType           *domain.OIDCAuthMethodType  `json:"authMethodType,omitempty"`
	PostLogoutRedirectUris   *[]string                   `json:"postLogoutRedirectUris,omitempty"`
	DevMode                  *bool                       `json:"devMode,omitempty"`
	AccessTokenType          *domain.OIDCTokenType       `json:"accessTokenType,omitempty"`
	AccessTokenRoleAssertion *bool                       `json:"accessTokenRoleAssertion,omitempty"`
	IDTokenRoleAssertion     *bool                       `json:"idTokenRoleAssertion,omitempty"`
	IDTokenUserinfoAssertion *bool                       `json:"idTokenUserinfoAssertion,omitempty"`
	ClockSkew                *time.Duration              `json:"clockSkew,omitempty"`
	AdditionalOrigins        *[]string                   `json:"additionalOrigins,omitempty"`
}

func NewOIDCConfigChangedEvent

func NewOIDCConfigChangedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID string,
	changes []OIDCConfigChanges,
) (*OIDCConfigChangedEvent, error)

func (*OIDCConfigChangedEvent) Data

func (e *OIDCConfigChangedEvent) Data() interface{}

func (*OIDCConfigChangedEvent) UniqueConstraints

func (e *OIDCConfigChangedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type OIDCConfigChanges

type OIDCConfigChanges func(event *OIDCConfigChangedEvent)

type OIDCConfigSecretChangedEvent

type OIDCConfigSecretChangedEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID        string              `json:"appId"`
	ClientSecret *crypto.CryptoValue `json:"clientSecret,omitempty"`
}

func NewOIDCConfigSecretChangedEvent

func NewOIDCConfigSecretChangedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID string,
	clientSecret *crypto.CryptoValue,
) *OIDCConfigSecretChangedEvent

func (*OIDCConfigSecretChangedEvent) Data

func (e *OIDCConfigSecretChangedEvent) Data() interface{}

func (*OIDCConfigSecretChangedEvent) UniqueConstraints

type OIDCConfigSecretCheckFailedEvent

type OIDCConfigSecretCheckFailedEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID string `json:"appId"`
}

func NewOIDCConfigSecretCheckFailedEvent

func NewOIDCConfigSecretCheckFailedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID string,
) *OIDCConfigSecretCheckFailedEvent

func (*OIDCConfigSecretCheckFailedEvent) Data

func (e *OIDCConfigSecretCheckFailedEvent) Data() interface{}

func (*OIDCConfigSecretCheckFailedEvent) UniqueConstraints

type OIDCConfigSecretCheckSucceededEvent

type OIDCConfigSecretCheckSucceededEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID string `json:"appId"`
}

func NewOIDCConfigSecretCheckSucceededEvent

func NewOIDCConfigSecretCheckSucceededEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID string,
) *OIDCConfigSecretCheckSucceededEvent

func (*OIDCConfigSecretCheckSucceededEvent) Data

func (e *OIDCConfigSecretCheckSucceededEvent) Data() interface{}

func (*OIDCConfigSecretCheckSucceededEvent) UniqueConstraints

type ProjectAddedEvent

type ProjectAddedEvent struct {
	eventstore.BaseEvent `json:"-"`

	Name                   string                        `json:"name,omitempty"`
	ProjectRoleAssertion   bool                          `json:"projectRoleAssertion,omitempty"`
	ProjectRoleCheck       bool                          `json:"projectRoleCheck,omitempty"`
	HasProjectCheck        bool                          `json:"hasProjectCheck,omitempty"`
	PrivateLabelingSetting domain.PrivateLabelingSetting `json:"privateLabelingSetting,omitempty"`
}

func NewProjectAddedEvent

func NewProjectAddedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	name string,
	projectRoleAssertion,
	projectRoleCheck,
	hasProjectCheck bool,
	privateLabelingSetting domain.PrivateLabelingSetting,
) *ProjectAddedEvent

func (*ProjectAddedEvent) Data

func (e *ProjectAddedEvent) Data() interface{}

func (*ProjectAddedEvent) UniqueConstraints

func (e *ProjectAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type ProjectChangeEvent

type ProjectChangeEvent struct {
	eventstore.BaseEvent `json:"-"`

	Name                   *string                        `json:"name,omitempty"`
	ProjectRoleAssertion   *bool                          `json:"projectRoleAssertion,omitempty"`
	ProjectRoleCheck       *bool                          `json:"projectRoleCheck,omitempty"`
	HasProjectCheck        *bool                          `json:"hasProjectCheck,omitempty"`
	PrivateLabelingSetting *domain.PrivateLabelingSetting `json:"privateLabelingSetting,omitempty"`
	// contains filtered or unexported fields
}

func NewProjectChangeEvent

func NewProjectChangeEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	oldName string,
	changes []ProjectChanges,
) (*ProjectChangeEvent, error)

func (*ProjectChangeEvent) Data

func (e *ProjectChangeEvent) Data() interface{}

func (*ProjectChangeEvent) UniqueConstraints

func (e *ProjectChangeEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type ProjectChanges

type ProjectChanges func(event *ProjectChangeEvent)

type ProjectDeactivatedEvent

type ProjectDeactivatedEvent struct {
	eventstore.BaseEvent `json:"-"`
}

func NewProjectDeactivatedEvent

func NewProjectDeactivatedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *ProjectDeactivatedEvent

func (*ProjectDeactivatedEvent) Data

func (e *ProjectDeactivatedEvent) Data() interface{}

func (*ProjectDeactivatedEvent) UniqueConstraints

func (e *ProjectDeactivatedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type ProjectReactivatedEvent

type ProjectReactivatedEvent struct {
	eventstore.BaseEvent `json:"-"`
}

func NewProjectReactivatedEvent

func NewProjectReactivatedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *ProjectReactivatedEvent

func (*ProjectReactivatedEvent) Data

func (e *ProjectReactivatedEvent) Data() interface{}

func (*ProjectReactivatedEvent) UniqueConstraints

func (e *ProjectReactivatedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type ProjectRemovedEvent

type ProjectRemovedEvent struct {
	eventstore.BaseEvent `json:"-"`

	Name string
	// contains filtered or unexported fields
}

func NewProjectRemovedEvent

func NewProjectRemovedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	name string,
	entityIDUniqueContraints []*eventstore.EventUniqueConstraint,
) *ProjectRemovedEvent

func (*ProjectRemovedEvent) Data

func (e *ProjectRemovedEvent) Data() interface{}

func (*ProjectRemovedEvent) UniqueConstraints

func (e *ProjectRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type RoleAddedEvent

type RoleAddedEvent struct {
	eventstore.BaseEvent `json:"-"`

	Key         string `json:"key,omitempty"`
	DisplayName string `json:"displayName,omitempty"`
	Group       string `json:"group,omitempty"`
}

func NewRoleAddedEvent

func NewRoleAddedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	key,
	displayName,
	group string,
) *RoleAddedEvent

func (*RoleAddedEvent) Data

func (e *RoleAddedEvent) Data() interface{}

func (*RoleAddedEvent) UniqueConstraints

func (e *RoleAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type RoleChangedEvent

type RoleChangedEvent struct {
	eventstore.BaseEvent `json:"-"`

	Key         string  `json:"key,omitempty"`
	DisplayName *string `json:"displayName,omitempty"`
	Group       *string `json:"group,omitempty"`
}

func NewRoleChangedEvent

func NewRoleChangedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	key string,
	changes []RoleChanges,
) (*RoleChangedEvent, error)

func (*RoleChangedEvent) Data

func (e *RoleChangedEvent) Data() interface{}

func (*RoleChangedEvent) UniqueConstraints

func (e *RoleChangedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type RoleChanges

type RoleChanges func(event *RoleChangedEvent)

type RoleRemovedEvent

type RoleRemovedEvent struct {
	eventstore.BaseEvent `json:"-"`

	Key string `json:"key,omitempty"`
}

func NewRoleRemovedEvent

func NewRoleRemovedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	key string) *RoleRemovedEvent

func (*RoleRemovedEvent) Data

func (e *RoleRemovedEvent) Data() interface{}

func (*RoleRemovedEvent) UniqueConstraints

func (e *RoleRemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type SAMLConfigAddedEvent

type SAMLConfigAddedEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID       string `json:"appId"`
	EntityID    string `json:"entityId"`
	Metadata    []byte `json:"metadata,omitempty"`
	MetadataURL string `json:"metadata_url,omitempty"`
}

func NewSAMLConfigAddedEvent

func NewSAMLConfigAddedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID string,
	entityID string,
	metadata []byte,
	metadataURL string,
) *SAMLConfigAddedEvent

func (*SAMLConfigAddedEvent) Data

func (e *SAMLConfigAddedEvent) Data() interface{}

func (*SAMLConfigAddedEvent) UniqueConstraints

func (e *SAMLConfigAddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type SAMLConfigChangedEvent

type SAMLConfigChangedEvent struct {
	eventstore.BaseEvent `json:"-"`

	AppID       string  `json:"appId"`
	EntityID    string  `json:"entityId"`
	Metadata    []byte  `json:"metadata,omitempty"`
	MetadataURL *string `json:"metadata_url,omitempty"`
	// contains filtered or unexported fields
}

func NewSAMLConfigChangedEvent

func NewSAMLConfigChangedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	appID string,
	oldEntityID string,
	changes []SAMLConfigChanges,
) (*SAMLConfigChangedEvent, error)

func (*SAMLConfigChangedEvent) Data

func (e *SAMLConfigChangedEvent) Data() interface{}

func (*SAMLConfigChangedEvent) UniqueConstraints

func (e *SAMLConfigChangedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type SAMLConfigChanges

type SAMLConfigChanges func(event *SAMLConfigChangedEvent)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL