model

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

This section is empty.

Variables

This section is empty.

Functions

func ProjectToModel

func ProjectToModel(project *Project) *model.Project

Types

type APIConfig

type APIConfig struct {
	es_models.ObjectRoot
	AppID          string              `json:"appId"`
	ClientID       string              `json:"clientId,omitempty"`
	ClientSecret   *crypto.CryptoValue `json:"clientSecret,omitempty"`
	AuthMethodType int32               `json:"authMethodType,omitempty"`
	ClientKeys     []*ClientKey        `json:"-"`
}

func (*APIConfig) Changes

func (c *APIConfig) Changes(changed *APIConfig) map[string]interface{}

type Application

type Application struct {
	es_models.ObjectRoot
	AppID      string      `json:"appId"`
	State      int32       `json:"-"`
	Name       string      `json:"name,omitempty"`
	Type       int32       `json:"appType,omitempty"`
	OIDCConfig *OIDCConfig `json:"-"`
	APIConfig  *APIConfig  `json:"-"`
	SAMLConfig *SAMLConfig `json:"-"`
}

type ApplicationID

type ApplicationID struct {
	es_models.ObjectRoot
	AppID string `json:"appId"`
}

type ClientKey

type ClientKey struct {
	es_models.ObjectRoot `json:"-"`
	ApplicationID        string    `json:"applicationId,omitempty"`
	ClientID             string    `json:"clientId,omitempty"`
	KeyID                string    `json:"keyId,omitempty"`
	Type                 int32     `json:"type,omitempty"`
	ExpirationDate       time.Time `json:"expirationDate,omitempty"`
	PublicKey            []byte    `json:"publicKey,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientKey) AppendEvent

func (key *ClientKey) AppendEvent(event *es_models.Event) (err error)

func (*ClientKey) AppendEvents

func (key *ClientKey) AppendEvents(events ...*es_models.Event) error

func (*ClientKey) GenerateClientKeyPair

func (key *ClientKey) GenerateClientKeyPair(keySize int) error

func (*ClientKey) SetData

func (key *ClientKey) SetData(event *es_models.Event) error

type OIDCConfig

type OIDCConfig struct {
	es_models.ObjectRoot
	Version                  int32               `json:"oidcVersion,omitempty"`
	AppID                    string              `json:"appId"`
	ClientID                 string              `json:"clientId,omitempty"`
	ClientSecret             *crypto.CryptoValue `json:"clientSecret,omitempty"`
	RedirectUris             []string            `json:"redirectUris,omitempty"`
	ResponseTypes            []int32             `json:"responseTypes,omitempty"`
	GrantTypes               []int32             `json:"grantTypes,omitempty"`
	ApplicationType          int32               `json:"applicationType,omitempty"`
	AuthMethodType           int32               `json:"authMethodType,omitempty"`
	PostLogoutRedirectUris   []string            `json:"postLogoutRedirectUris,omitempty"`
	DevMode                  bool                `json:"devMode,omitempty"`
	AccessTokenType          int32               `json:"accessTokenType,omitempty"`
	AccessTokenRoleAssertion bool                `json:"accessTokenRoleAssertion,omitempty"`
	IDTokenRoleAssertion     bool                `json:"idTokenRoleAssertion,omitempty"`
	IDTokenUserinfoAssertion bool                `json:"idTokenUserinfoAssertion,omitempty"`
	ClockSkew                time.Duration       `json:"clockSkew,omitempty"`
	ClientKeys               []*ClientKey        `json:"-"`
}

type Project

type Project struct {
	es_models.ObjectRoot
	Name                 string `json:"name,omitempty"`
	ProjectRoleAssertion bool   `json:"projectRoleAssertion,omitempty"`
	ProjectRoleCheck     bool   `json:"projectRoleCheck,omitempty"`
	HasProjectCheck      bool   `json:"hasProjectCheck,omitempty"`
	State                int32  `json:"-"`
}

func ProjectFromEvents

func ProjectFromEvents(project *Project, events ...*es_models.Event) (*Project, error)

func (*Project) AppendAddProjectEvent

func (p *Project) AppendAddProjectEvent(event *es_models.Event) error

func (*Project) AppendEvent

func (p *Project) AppendEvent(event *es_models.Event) error

func (*Project) AppendEvents

func (p *Project) AppendEvents(events ...*es_models.Event) error

func (*Project) SetData

func (p *Project) SetData(event *es_models.Event) error

type ProjectGrant

type ProjectGrant struct {
	es_models.ObjectRoot
	State        int32                 `json:"-"`
	GrantID      string                `json:"grantId,omitempty"`
	GrantedOrgID string                `json:"grantedOrgId,omitempty"`
	RoleKeys     []string              `json:"roleKeys,omitempty"`
	Members      []*ProjectGrantMember `json:"-"`
}

func (*ProjectGrant) Changes

func (g *ProjectGrant) Changes(changed *ProjectGrant) map[string]interface{}

type ProjectGrantID

type ProjectGrantID struct {
	es_models.ObjectRoot
	GrantID string `json:"grantId"`
}

type ProjectGrantMember

type ProjectGrantMember struct {
	es_models.ObjectRoot
	GrantID string   `json:"grantId,omitempty"`
	UserID  string   `json:"userId,omitempty"`
	Roles   []string `json:"roles,omitempty"`
}

func (*ProjectGrantMember) SetData

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

type ProjectMember

type ProjectMember struct {
	es_models.ObjectRoot
	UserID string   `json:"userId,omitempty"`
	Roles  []string `json:"roles,omitempty"`
}

func (*ProjectMember) SetData

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

type SAMLConfig

type SAMLConfig struct {
	es_models.ObjectRoot
	AppID       string `json:"appId"`
	Metadata    []byte `json:"metadata,omitempty"`
	MetadataURL string `json:"metadataUrl,omitempty"`
}

Jump to

Keyboard shortcuts

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