model

package
v0.120.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 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"

	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"
	LabelPolicyRemoved models.EventType = "org.policy.label.removed"

	MailTemplateAdded   models.EventType = "org.mail.template.added"
	MailTemplateChanged models.EventType = "org.mail.template.changed"
	MailTemplateRemoved models.EventType = "org.mail.template.removed"
	MailTextAdded       models.EventType = "org.mail.text.added"
	MailTextChanged     models.EventType = "org.mail.text.changed"
	MailTextRemoved     models.EventType = "org.mail.text.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"

	PasswordLockoutPolicyAdded   models.EventType = "org.policy.password.lockout.added"
	PasswordLockoutPolicyChanged models.EventType = "org.policy.password.lockout.changed"
	PasswordLockoutPolicyRemoved models.EventType = "org.policy.password.lockout.removed"
)
View Source
const (
	OrgVersion = "v1"
)

Variables

This section is empty.

Functions

func OrgDomainToModel added in v0.26.0

func OrgDomainToModel(domain *OrgDomain) *model.OrgDomain

func OrgDomainsToModel added in v0.26.0

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:"-"`
	MailTexts                []*iam_es_model.MailText               `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:"-"`
	PasswordLockoutPolicy    *iam_es_model.PasswordLockoutPolicy    `json:"-"`
}

func OrgFromEvents

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

func OrgFromModel

func OrgFromModel(org *org_model.Org) *Org

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{}

type OrgDomain added in v0.26.0

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 added in v0.26.0

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

func OrgDomainFromModel added in v0.26.0

func OrgDomainFromModel(domain *model.OrgDomain) *OrgDomain

func OrgDomainsFromModel added in v0.26.0

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

func (*OrgDomain) SetData added in v0.26.0

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