Documentation ¶
Index ¶
- Constants
- func APIConfigToModel(config *APIConfig) *model.APIConfig
- func ClientKeyToModel(key *ClientKey) *model.ClientKey
- func ClientKeysToModel(keys []*ClientKey) []*model.ClientKey
- func ProjectToModel(project *Project) *model.Project
- type APIConfig
- type Application
- type ApplicationID
- type ClientKey
- type OIDCConfig
- type Project
- type ProjectGrant
- type ProjectGrantID
- type ProjectGrantMember
- type ProjectMember
Constants ¶
View Source
const ( ProjectAggregate models.AggregateType = "project" ProjectAdded models.EventType = "project.added" ProjectChanged models.EventType = "project.changed" ProjectDeactivated models.EventType = "project.deactivated" ProjectReactivated models.EventType = "project.reactivated" ProjectRemoved models.EventType = "project.removed" ProjectMemberAdded models.EventType = "project.member.added" ProjectMemberChanged models.EventType = "project.member.changed" ProjectMemberRemoved models.EventType = "project.member.removed" ProjectMemberCascadeRemoved models.EventType = "project.member.cascade.removed" ProjectRoleAdded models.EventType = "project.role.added" ProjectRoleChanged models.EventType = "project.role.changed" ProjectRoleRemoved models.EventType = "project.role.removed" ProjectGrantAdded models.EventType = "project.grant.added" ProjectGrantChanged models.EventType = "project.grant.changed" ProjectGrantRemoved models.EventType = "project.grant.removed" ProjectGrantDeactivated models.EventType = "project.grant.deactivated" ProjectGrantReactivated models.EventType = "project.grant.reactivated" ProjectGrantCascadeChanged models.EventType = "project.grant.cascade.changed" ProjectGrantMemberAdded models.EventType = "project.grant.member.added" ProjectGrantMemberChanged models.EventType = "project.grant.member.changed" ProjectGrantMemberRemoved models.EventType = "project.grant.member.removed" ProjectGrantMemberCascadeRemoved models.EventType = "project.grant.member.cascade.removed" ApplicationAdded models.EventType = "project.application.added" ApplicationChanged models.EventType = "project.application.changed" ApplicationRemoved models.EventType = "project.application.removed" ApplicationDeactivated models.EventType = "project.application.deactivated" ApplicationReactivated models.EventType = "project.application.reactivated" OIDCConfigAdded models.EventType = "project.application.config.oidc.added" OIDCConfigChanged models.EventType = "project.application.config.oidc.changed" OIDCConfigSecretChanged models.EventType = "project.application.config.oidc.secret.changed" OIDCClientSecretCheckSucceeded models.EventType = "project.application.oidc.secret.check.succeeded" OIDCClientSecretCheckFailed models.EventType = "project.application.oidc.secret.check.failed" APIConfigAdded models.EventType = "project.application.config.api.added" APIConfigChanged models.EventType = "project.application.config.api.changed" APIConfigSecretChanged models.EventType = "project.application.config.api.secret.changed" ClientKeyAdded models.EventType = "project.application.oidc.key.added" ClientKeyRemoved models.EventType = "project.application.oidc.key.removed" )
View Source
const (
ProjectVersion = "v1"
)
Variables ¶
This section is empty.
Functions ¶
func APIConfigToModel ¶
func ClientKeyToModel ¶
func ClientKeysToModel ¶
func ProjectToModel ¶
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 APIConfigFromModel ¶
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:"-"` }
func GetApplication ¶
func GetApplication(apps []*Application, id string) (int, *Application)
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 (*ClientKey) AppendEvents ¶
func (*ClientKey) GenerateClientKeyPair ¶
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 (*Project) AppendAddProjectEvent ¶
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 GetProjectGrant ¶
func GetProjectGrant(grants []*ProjectGrant, id string) (int, *ProjectGrant)
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"` }
type ProjectMember ¶
type ProjectMember struct { es_models.ObjectRoot UserID string `json:"userId,omitempty"` Roles []string `json:"roles,omitempty"` }
Click to show internal directories.
Click to hide internal directories.