model

package
v0.53.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Org

type Org struct {
	es_models.ObjectRoot

	State   OrgState
	Name    string
	Domains []*OrgDomain

	Members      []*OrgMember
	OrgIamPolicy *OrgIamPolicy
}

func NewOrg

func NewOrg(id string) *Org

func OrgViewToOrg added in v0.18.0

func OrgViewToOrg(o *OrgView) *Org

func (*Org) AddIAMDomain added in v0.26.0

func (o *Org) AddIAMDomain(iamDomain string)

func (*Org) ContainsMember

func (o *Org) ContainsMember(userID string) bool

func (*Org) GetDomain added in v0.47.3

func (o *Org) GetDomain(domain *OrgDomain) (int, *OrgDomain)

func (*Org) GetPrimaryDomain added in v0.28.0

func (o *Org) GetPrimaryDomain() *OrgDomain

func (*Org) IsActive

func (o *Org) IsActive() bool

func (*Org) IsValid

func (o *Org) IsValid() bool

type OrgChange added in v0.25.1

type OrgChange struct {
	ChangeDate   *timestamp.Timestamp `json:"changeDate,omitempty"`
	EventType    string               `json:"eventType,omitempty"`
	Sequence     uint64               `json:"sequence,omitempty"`
	ModifierId   string               `json:"modifierUser,omitempty"`
	ModifierName string               `json:"-"`
	Data         interface{}          `json:"data,omitempty"`
}

type OrgChanges added in v0.25.1

type OrgChanges struct {
	Changes      []*OrgChange
	LastSequence uint64
}

type OrgDomain added in v0.26.0

type OrgDomain struct {
	es_models.ObjectRoot
	Domain   string
	Primary  bool
	Verified bool
}

func NewOrgDomain added in v0.26.0

func NewOrgDomain(orgID, domain string) *OrgDomain

func (*OrgDomain) IsValid added in v0.26.0

func (domain *OrgDomain) IsValid() bool

type OrgDomainSearchKey added in v0.26.0

type OrgDomainSearchKey int32
const (
	OrgDomainSearchKeyUnspecified OrgDomainSearchKey = iota
	OrgDomainSearchKeyDomain
	OrgDomainSearchKeyOrgID
	OrgDomainSearchKeyVerified
	OrgDomainSearchKeyPrimary
)

type OrgDomainSearchQuery added in v0.26.0

type OrgDomainSearchQuery struct {
	Key    OrgDomainSearchKey
	Method model.SearchMethod
	Value  interface{}
}

type OrgDomainSearchRequest added in v0.26.0

type OrgDomainSearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn OrgDomainSearchKey
	Asc           bool
	Queries       []*OrgDomainSearchQuery
}

func (*OrgDomainSearchRequest) EnsureLimit added in v0.26.0

func (r *OrgDomainSearchRequest) EnsureLimit(limit uint64)

type OrgDomainSearchResponse added in v0.26.0

type OrgDomainSearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*OrgDomainView
}

type OrgDomainView added in v0.26.0

type OrgDomainView struct {
	OrgID        string
	CreationDate time.Time
	ChangeDate   time.Time
	Domain       string
	Primary      bool
	Verified     bool
}

type OrgIamPolicy added in v0.26.0

type OrgIamPolicy struct {
	models.ObjectRoot

	Description           string
	State                 PolicyState
	UserLoginMustBeDomain bool
	Default               bool
}

type OrgMember

type OrgMember struct {
	es_models.ObjectRoot
	UserID string
	Roles  []string
}

func NewOrgMember

func NewOrgMember(orgID, userID string) *OrgMember

func NewOrgMemberWithRoles

func NewOrgMemberWithRoles(orgID, userID string, roles ...string) *OrgMember

func (*OrgMember) IsValid

func (member *OrgMember) IsValid() bool

type OrgMemberSearchKey added in v0.18.0

type OrgMemberSearchKey int32
const (
	OrgMemberSearchKeyUnspecified OrgMemberSearchKey = iota
	OrgMemberSearchKeyUserName
	OrgMemberSearchKeyEmail
	OrgMemberSearchKeyFirstName
	OrgMemberSearchKeyLastName
	OrgMemberSearchKeyOrgID
	OrgMemberSearchKeyUserID
)

type OrgMemberSearchQuery added in v0.18.0

type OrgMemberSearchQuery struct {
	Key    OrgMemberSearchKey
	Method model.SearchMethod
	Value  interface{}
}

type OrgMemberSearchRequest added in v0.18.0

type OrgMemberSearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn OrgMemberSearchKey
	Asc           bool
	Queries       []*OrgMemberSearchQuery
}

func (*OrgMemberSearchRequest) EnsureLimit added in v0.18.0

func (r *OrgMemberSearchRequest) EnsureLimit(limit uint64)

type OrgMemberSearchResponse added in v0.18.0

type OrgMemberSearchResponse struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*OrgMemberView
}

type OrgMemberView added in v0.18.0

type OrgMemberView struct {
	UserID       string
	OrgID        string
	UserName     string
	Email        string
	FirstName    string
	LastName     string
	Roles        []string
	CreationDate time.Time
	ChangeDate   time.Time
	Sequence     uint64
}

type OrgSearchKey added in v0.18.0

type OrgSearchKey int32
const (
	OrgSearchKeyUnspecified OrgSearchKey = iota
	OrgSearchKeyOrgID
	OrgSearchKeyOrgName
	OrgSearchKeyOrgDomain
	OrgSearchKeyState
	OrgSearchKeyResourceOwner
)

type OrgSearchQuery added in v0.18.0

type OrgSearchQuery struct {
	Key    OrgSearchKey
	Method model.SearchMethod
	Value  interface{}
}

type OrgSearchRequest added in v0.18.0

type OrgSearchRequest struct {
	Offset        uint64
	Limit         uint64
	SortingColumn OrgSearchKey
	Asc           bool
	Queries       []*OrgSearchQuery
}

func (*OrgSearchRequest) EnsureLimit added in v0.18.0

func (r *OrgSearchRequest) EnsureLimit(limit uint64)

type OrgSearchResult added in v0.18.0

type OrgSearchResult struct {
	Offset      uint64
	Limit       uint64
	TotalResult uint64
	Result      []*OrgView
}

type OrgState

type OrgState int32
const (
	OrgStateActive OrgState = iota
	OrgStateInactive
)

type OrgView added in v0.18.0

type OrgView struct {
	ID            string
	CreationDate  time.Time
	ChangeDate    time.Time
	State         OrgState
	ResourceOwner string
	Sequence      uint64

	Name string
}

type PolicyState added in v0.26.0

type PolicyState int32
const (
	PolicyStateActive PolicyState = iota
	PolicyStateRemoved
)

Jump to

Keyboard shortcuts

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