model

package
v1.84.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OrgAggregate       models.AggregateType = "org"
	OrgDomainAggregate models.AggregateType = "org.domain"
	OrgNameAggregate   models.AggregateType = "org.name"

	OrgAdded                    models.EventType = "org.added"
	OrgChanged                  models.EventType = "org.changed"
	OrgDeactivated              models.EventType = "org.deactivated"
	OrgReactivated              models.EventType = "org.reactivated"
	OrgRemoved                  models.EventType = "org.removed"
	OrgDomainAdded              models.EventType = "org.domain.added"
	OrgDomainVerificationAdded  models.EventType = "org.domain.verification.added"
	OrgDomainVerificationFailed models.EventType = "org.domain.verification.failed"
	OrgDomainVerified           models.EventType = "org.domain.verified"
	OrgDomainRemoved            models.EventType = "org.domain.removed"
	OrgDomainPrimarySet         models.EventType = "org.domain.primary.set"

	OrgNameReserved models.EventType = "org.name.reserved"
	OrgNameReleased models.EventType = "org.name.released"

	OrgDomainReserved models.EventType = "org.domain.reserved"
	OrgDomainReleased models.EventType = "org.domain.released"

	OrgMemberAdded          models.EventType = "org.member.added"
	OrgMemberChanged        models.EventType = "org.member.changed"
	OrgMemberRemoved        models.EventType = "org.member.removed"
	OrgMemberCascadeRemoved models.EventType = "org.member.cascade.removed"

	OrgIAMPolicyAdded   models.EventType = "org.iam.policy.added"
	OrgIAMPolicyChanged models.EventType = "org.iam.policy.changed"
	OrgIAMPolicyRemoved models.EventType = "org.iam.policy.removed"

	IDPConfigAdded       models.EventType = "org.idp.config.added"
	IDPConfigChanged     models.EventType = "org.idp.config.changed"
	IDPConfigRemoved     models.EventType = "org.idp.config.removed"
	IDPConfigDeactivated models.EventType = "org.idp.config.deactivated"
	IDPConfigReactivated models.EventType = "org.idp.config.reactivated"

	OIDCIDPConfigAdded   models.EventType = "org.idp.oidc.config.added"
	OIDCIDPConfigChanged models.EventType = "org.idp.oidc.config.changed"

	SAMLIDPConfigAdded   models.EventType = "org.idp.saml.config.added"
	SAMLIDPConfigChanged models.EventType = "org.idp.saml.config.changed"

	LoginPolicyAdded                     models.EventType = "org.policy.login.added"
	LoginPolicyChanged                   models.EventType = "org.policy.login.changed"
	LoginPolicyRemoved                   models.EventType = "org.policy.login.removed"
	LoginPolicyIDPProviderAdded          models.EventType = "org.policy.login.idpprovider.added"
	LoginPolicyIDPProviderRemoved        models.EventType = "org.policy.login.idpprovider.removed"
	LoginPolicyIDPProviderCascadeRemoved models.EventType = "org.policy.login.idpprovider.cascade.removed"
	LoginPolicySecondFactorAdded         models.EventType = "org.policy.login.secondfactor.added"
	LoginPolicySecondFactorRemoved       models.EventType = "org.policy.login.secondfactor.removed"
	LoginPolicyMultiFactorAdded          models.EventType = "org.policy.login.multifactor.added"
	LoginPolicyMultiFactorRemoved        models.EventType = "org.policy.login.multifactor.removed"

	LabelPolicyAdded           models.EventType = "org.policy.label.added"
	LabelPolicyChanged         models.EventType = "org.policy.label.changed"
	LabelPolicyActivated       models.EventType = "org.policy.label.activated"
	LabelPolicyRemoved         models.EventType = "org.policy.label.removed"
	LabelPolicyLogoAdded       models.EventType = "org.policy.label.logo.added"
	LabelPolicyLogoRemoved     models.EventType = "org.policy.label.logo.removed"
	LabelPolicyIconAdded       models.EventType = "org.policy.label.icon.added"
	LabelPolicyIconRemoved     models.EventType = "org.policy.label.icon.removed"
	LabelPolicyLogoDarkAdded   models.EventType = "org.policy.label.logo.dark.added"
	LabelPolicyLogoDarkRemoved models.EventType = "org.policy.label.logo.dark.removed"
	LabelPolicyIconDarkAdded   models.EventType = "org.policy.label.icon.dark.added"
	LabelPolicyIconDarkRemoved models.EventType = "org.policy.label.icon.dark.removed"
	LabelPolicyFontAdded       models.EventType = "org.policy.label.font.added"
	LabelPolicyFontRemoved     models.EventType = "org.policy.label.font.removed"
	LabelPolicyAssetsRemoved   models.EventType = "org.policy.label.assets.removed"

	MailTemplateAdded   models.EventType = "org.mail.template.added"
	MailTemplateChanged models.EventType = "org.mail.template.changed"
	MailTemplateRemoved models.EventType = "org.mail.template.removed"

	CustomTextSet            models.EventType = "org.customtext.set"
	CustomTextRemoved        models.EventType = "org.customtext.removed"
	CustomTextMessageRemoved models.EventType = "org.customtext.template.removed"

	PasswordComplexityPolicyAdded   models.EventType = "org.policy.password.complexity.added"
	PasswordComplexityPolicyChanged models.EventType = "org.policy.password.complexity.changed"
	PasswordComplexityPolicyRemoved models.EventType = "org.policy.password.complexity.removed"

	PasswordAgePolicyAdded   models.EventType = "org.policy.password.age.added"
	PasswordAgePolicyChanged models.EventType = "org.policy.password.age.changed"
	PasswordAgePolicyRemoved models.EventType = "org.policy.password.age.removed"

	LockoutPolicyAdded   models.EventType = "org.policy.lockout.added"
	LockoutPolicyChanged models.EventType = "org.policy.lockout.changed"
	LockoutPolicyRemoved models.EventType = "org.policy.lockout.removed"

	PrivacyPolicyAdded   models.EventType = "org.policy.privacy.added"
	PrivacyPolicyChanged models.EventType = "org.policy.privacy.changed"
	PrivacyPolicyRemoved models.EventType = "org.policy.privacy.removed"
)
View Source
const (
	OrgVersion = "v1"
)

Variables

This section is empty.

Functions

func OrgDomainToModel

func OrgDomainToModel(domain *OrgDomain) *model.OrgDomain

func OrgDomainsToModel

func OrgDomainsToModel(domains []*OrgDomain) []*model.OrgDomain

func OrgMemberToModel

func OrgMemberToModel(member *OrgMember) *model.OrgMember

func OrgMembersToModel

func OrgMembersToModel(members []*OrgMember) []*model.OrgMember

func OrgToModel

func OrgToModel(org *Org) *org_model.Org

Types

type Org

type Org struct {
	es_models.ObjectRoot `json:"-"`

	Name  string `json:"name,omitempty"`
	State int32  `json:"-"`

	Domains                  []*OrgDomain                           `json:"-"`
	Members                  []*OrgMember                           `json:"-"`
	OrgIAMPolicy             *iam_es_model.OrgIAMPolicy             `json:"-"`
	LabelPolicy              *iam_es_model.LabelPolicy              `json:"-"`
	MailTemplate             *iam_es_model.MailTemplate             `json:"-"`
	IDPs                     []*iam_es_model.IDPConfig              `json:"-"`
	LoginPolicy              *iam_es_model.LoginPolicy              `json:"-"`
	PasswordComplexityPolicy *iam_es_model.PasswordComplexityPolicy `json:"-"`
	PasswordAgePolicy        *iam_es_model.PasswordAgePolicy        `json:"-"`
	LockoutPolicy            *iam_es_model.LockoutPolicy            `json:"-"`
}

func OrgFromEvents

func OrgFromEvents(org *Org, events ...*es_models.Event) (*Org, error)

func (*Org) AppendEvent

func (o *Org) AppendEvent(event *es_models.Event) (err error)

func (*Org) AppendEvents

func (o *Org) AppendEvents(events ...*es_models.Event) error

func (*Org) Changes

func (o *Org) Changes(changed *Org) map[string]interface{}

func (*Org) SetData

func (o *Org) SetData(event *es_models.Event) error

type OrgDomain

type OrgDomain struct {
	es_models.ObjectRoot `json:"-"`

	Domain         string              `json:"domain"`
	Verified       bool                `json:"-"`
	Primary        bool                `json:"-"`
	ValidationType int32               `json:"validationType"`
	ValidationCode *crypto.CryptoValue `json:"validationCode"`
}

func GetDomain

func GetDomain(domains []*OrgDomain, domain string) (int, *OrgDomain)

func OrgDomainFromModel

func OrgDomainFromModel(domain *model.OrgDomain) *OrgDomain

func OrgDomainsFromModel

func OrgDomainsFromModel(domains []*model.OrgDomain) []*OrgDomain

func (*OrgDomain) SetData

func (m *OrgDomain) SetData(event *es_models.Event) error

type OrgMember

type OrgMember struct {
	es_models.ObjectRoot `json:"-"`

	UserID string   `json:"userId,omitempty"`
	Roles  []string `json:"roles,omitempty"`
}

func OrgMemberFromEvent

func OrgMemberFromEvent(member *OrgMember, event *es_models.Event) (*OrgMember, error)

func OrgMemberFromModel

func OrgMemberFromModel(member *model.OrgMember) *OrgMember

func OrgMembersFromModel

func OrgMembersFromModel(members []*model.OrgMember) []*OrgMember

func (*OrgMember) AppendEvent

func (m *OrgMember) AppendEvent(event *es_models.Event) error

func (*OrgMember) AppendEvents

func (m *OrgMember) AppendEvents(events ...*es_models.Event) error

func (*OrgMember) Changes

func (m *OrgMember) Changes(updatedMember *OrgMember) map[string]interface{}

func (*OrgMember) SetData

func (m *OrgMember) SetData(event *es_models.Event) error

Jump to

Keyboard shortcuts

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