model

package
v1.87.5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApplicationKeyID            = "id"
	ApplicationKeyProjectID     = "project_id"
	ApplicationKeyResourceOwner = "resource_owner"
	ApplicationKeyOIDCClientID  = "oidc_client_id"
	ApplicationKeyName          = "app_name"
)
View Source
const (
	OrgProjectMappingKeyProjectID      = "project_id"
	OrgProjectMappingKeyOrgID          = "org_id"
	OrgProjectMappingKeyProjectGrantID = "project_grant_id"
)
View Source
const (
	ProjectKeyProjectID     = "project_id"
	ProjectKeyResourceOwner = "resource_owner"
	ProjectKeyName          = "project_name"
)
View Source
const (
	ProjectGrantKeyProjectID     = "project_id"
	ProjectGrantKeyGrantID       = "grant_id"
	ProjectGrantKeyOrgID         = "org_id"
	ProjectGrantKeyResourceOwner = "resource_owner"
	ProjectGrantKeyName          = "project_name"
	ProjectGrantKeyRoleKeys      = "granted_role_keys"
)
View Source
const (
	ProjectGrantMemberKeyUserID    = "user_id"
	ProjectGrantMemberKeyGrantID   = "grant_id"
	ProjectGrantMemberKeyProjectID = "project_id"
	ProjectGrantMemberKeyUserName  = "user_name"
	ProjectGrantMemberKeyEmail     = "email"
	ProjectGrantMemberKeyFirstName = "first_name"
	ProjectGrantMemberKeyLastName  = "last_name"
)
View Source
const (
	ProjectMemberKeyUserID    = "user_id"
	ProjectMemberKeyProjectID = "project_id"
	ProjectMemberKeyUserName  = "user_name"
	ProjectMemberKeyEmail     = "email"
	ProjectMemberKeyFirstName = "first_name"
	ProjectMemberKeyLastName  = "last_name"
)

Variables

This section is empty.

Functions

func ApplicationViewToModel

func ApplicationViewToModel(app *ApplicationView) *model.ApplicationView

func ApplicationViewsToModel

func ApplicationViewsToModel(roles []*ApplicationView) []*model.ApplicationView

func OIDCGrantTypesToModel

func OIDCGrantTypesToModel(granttypes []int64) []model.OIDCGrantType

func OIDCResponseTypesToModel

func OIDCResponseTypesToModel(oidctypes []int64) []model.OIDCResponseType

func ProjectGrantMemberToModel

func ProjectGrantMemberToModel(member *ProjectGrantMemberView, prefixAvatarURL string) *model.ProjectGrantMemberView

func ProjectGrantMembersToModel

func ProjectGrantMembersToModel(roles []*ProjectGrantMemberView, prefixAvatarURL string) []*model.ProjectGrantMemberView

func ProjectGrantToModel

func ProjectGrantToModel(project *ProjectGrantView) *model.ProjectGrantView

func ProjectGrantsToModel

func ProjectGrantsToModel(projects []*ProjectGrantView) []*model.ProjectGrantView

func ProjectMemberToModel

func ProjectMemberToModel(member *ProjectMemberView, prefixAvatarURL string) *model.ProjectMemberView

func ProjectMembersToModel

func ProjectMembersToModel(roles []*ProjectMemberView, prefixAvatarURL string) []*model.ProjectMemberView

func ProjectToModel

func ProjectToModel(project *ProjectView) *model.ProjectView

func ProjectsToModel

func ProjectsToModel(projects []*ProjectView) []*model.ProjectView

Types

type ApplicationSearchKey

type ApplicationSearchKey proj_model.AppSearchKey

func (ApplicationSearchKey) ToColumnName

func (key ApplicationSearchKey) ToColumnName() string

type ApplicationSearchQuery

type ApplicationSearchQuery proj_model.ApplicationSearchQuery

func (ApplicationSearchQuery) GetKey

func (ApplicationSearchQuery) GetMethod

func (req ApplicationSearchQuery) GetMethod() domain.SearchMethod

func (ApplicationSearchQuery) GetValue

func (req ApplicationSearchQuery) GetValue() interface{}

type ApplicationSearchRequest

type ApplicationSearchRequest proj_model.ApplicationSearchRequest

func (ApplicationSearchRequest) GetAsc

func (req ApplicationSearchRequest) GetAsc() bool

func (ApplicationSearchRequest) GetLimit

func (req ApplicationSearchRequest) GetLimit() uint64

func (ApplicationSearchRequest) GetOffset

func (req ApplicationSearchRequest) GetOffset() uint64

func (ApplicationSearchRequest) GetQueries

func (req ApplicationSearchRequest) GetQueries() []repository.SearchQuery

func (ApplicationSearchRequest) GetSortingColumn

func (req ApplicationSearchRequest) GetSortingColumn() repository.ColumnKey

type ApplicationView

type ApplicationView struct {
	ID                     string                        `json:"appId" gorm:"column:id;primary_key"`
	ProjectID              string                        `json:"-" gorm:"column:project_id"`
	Name                   string                        `json:"name" gorm:"column:app_name"`
	CreationDate           time.Time                     `json:"-" gorm:"column:creation_date"`
	ChangeDate             time.Time                     `json:"-" gorm:"column:change_date"`
	State                  int32                         `json:"-" gorm:"column:app_state"`
	ResourceOwner          string                        `json:"-" gorm:"column:resource_owner"`
	ProjectRoleAssertion   bool                          `json:"projectRoleAssertion" gorm:"column:project_role_assertion"`
	ProjectRoleCheck       bool                          `json:"projectRoleCheck" gorm:"column:project_role_check"`
	HasProjectCheck        bool                          `json:"hasProjectCheck" gorm:"column:has_project_check"`
	PrivateLabelingSetting domain.PrivateLabelingSetting `json:"privateLabelingSetting" gorm:"column:private_labeling_setting"`

	IsOIDC                     bool           `json:"-" gorm:"column:is_oidc"`
	OIDCVersion                int32          `json:"oidcVersion" gorm:"column:oidc_version"`
	OIDCClientID               string         `json:"clientId" gorm:"column:oidc_client_id"`
	OIDCRedirectUris           pq.StringArray `json:"redirectUris" gorm:"column:oidc_redirect_uris"`
	OIDCResponseTypes          pq.Int64Array  `json:"responseTypes" gorm:"column:oidc_response_types"`
	OIDCGrantTypes             pq.Int64Array  `json:"grantTypes" gorm:"column:oidc_grant_types"`
	OIDCApplicationType        int32          `json:"applicationType" gorm:"column:oidc_application_type"`
	OIDCAuthMethodType         int32          `json:"authMethodType" gorm:"column:oidc_auth_method_type"`
	OIDCPostLogoutRedirectUris pq.StringArray `json:"postLogoutRedirectUris" gorm:"column:oidc_post_logout_redirect_uris"`
	NoneCompliant              bool           `json:"-" gorm:"column:none_compliant"`
	ComplianceProblems         pq.StringArray `json:"-" gorm:"column:compliance_problems"`
	DevMode                    bool           `json:"devMode" gorm:"column:dev_mode"`
	OriginAllowList            pq.StringArray `json:"-" gorm:"column:origin_allow_list"`
	AdditionalOrigins          pq.StringArray `json:"additionalOrigins" gorm:"column:additional_origins"`
	AccessTokenType            int32          `json:"accessTokenType" gorm:"column:access_token_type"`
	AccessTokenRoleAssertion   bool           `json:"accessTokenRoleAssertion" gorm:"column:access_token_role_assertion"`
	IDTokenRoleAssertion       bool           `json:"idTokenRoleAssertion" gorm:"column:id_token_role_assertion"`
	IDTokenUserinfoAssertion   bool           `json:"idTokenUserinfoAssertion" gorm:"column:id_token_userinfo_assertion"`
	ClockSkew                  time.Duration  `json:"clockSkew" gorm:"column:clock_skew"`

	Sequence uint64 `json:"-" gorm:"sequence"`
}

func (*ApplicationView) AppendEvent

func (a *ApplicationView) AppendEvent(event *models.Event) (err error)

func (*ApplicationView) AppendEventIfMyApp

func (a *ApplicationView) AppendEventIfMyApp(event *models.Event) (err error)

func (*ApplicationView) SetData

func (a *ApplicationView) SetData(event *models.Event) error

type OrgProjectMapping

type OrgProjectMapping struct {
	ProjectID      string `json:"-" gorm:"column:project_id;primary_key"`
	OrgID          string `json:"-" gorm:"column:org_id;primary_key"`
	ProjectGrantID string `json:"-" gorm:"column:project_grant_id;"`
}

type OrgProjectMappingSearchKey

type OrgProjectMappingSearchKey proj_model.OrgProjectMappingViewSearchKey

func (OrgProjectMappingSearchKey) ToColumnName

func (key OrgProjectMappingSearchKey) ToColumnName() string

type OrgProjectMappingSearchQuery

type OrgProjectMappingSearchQuery proj_model.OrgProjectMappingViewSearchQuery

func (OrgProjectMappingSearchQuery) GetKey

func (OrgProjectMappingSearchQuery) GetMethod

func (OrgProjectMappingSearchQuery) GetValue

func (req OrgProjectMappingSearchQuery) GetValue() interface{}

type OrgProjectMappingSearchRequest

type OrgProjectMappingSearchRequest proj_model.OrgProjectMappingViewSearchRequest

func (OrgProjectMappingSearchRequest) GetAsc

func (req OrgProjectMappingSearchRequest) GetAsc() bool

func (OrgProjectMappingSearchRequest) GetLimit

func (req OrgProjectMappingSearchRequest) GetLimit() uint64

func (OrgProjectMappingSearchRequest) GetOffset

func (req OrgProjectMappingSearchRequest) GetOffset() uint64

func (OrgProjectMappingSearchRequest) GetQueries

func (OrgProjectMappingSearchRequest) GetSortingColumn

func (req OrgProjectMappingSearchRequest) GetSortingColumn() repository.ColumnKey

type ProjectGrant

type ProjectGrant struct {
	GrantID      string   `json:"grantId"`
	GrantedOrgID string   `json:"grantedOrgId"`
	RoleKeys     []string `json:"roleKeys"`
}

func (*ProjectGrant) SetData

func (p *ProjectGrant) SetData(event *models.Event) error

type ProjectGrantMemberSearchKey

type ProjectGrantMemberSearchKey proj_model.ProjectGrantMemberSearchKey

func (ProjectGrantMemberSearchKey) ToColumnName

func (key ProjectGrantMemberSearchKey) ToColumnName() string

type ProjectGrantMemberSearchQuery

type ProjectGrantMemberSearchQuery proj_model.ProjectGrantMemberSearchQuery

func (ProjectGrantMemberSearchQuery) GetKey

func (ProjectGrantMemberSearchQuery) GetMethod

func (ProjectGrantMemberSearchQuery) GetValue

func (req ProjectGrantMemberSearchQuery) GetValue() interface{}

type ProjectGrantMemberSearchRequest

type ProjectGrantMemberSearchRequest proj_model.ProjectGrantMemberSearchRequest

func (ProjectGrantMemberSearchRequest) GetAsc

func (ProjectGrantMemberSearchRequest) GetLimit

func (req ProjectGrantMemberSearchRequest) GetLimit() uint64

func (ProjectGrantMemberSearchRequest) GetOffset

func (req ProjectGrantMemberSearchRequest) GetOffset() uint64

func (ProjectGrantMemberSearchRequest) GetQueries

func (ProjectGrantMemberSearchRequest) GetSortingColumn

func (req ProjectGrantMemberSearchRequest) GetSortingColumn() repository.ColumnKey

type ProjectGrantMemberView

type ProjectGrantMemberView struct {
	UserID             string         `json:"userId" gorm:"column:user_id;primary_key"`
	GrantID            string         `json:"grantId" gorm:"column:grant_id;primary_key"`
	ProjectID          string         `json:"-" gorm:"column:project_id"`
	UserName           string         `json:"-" gorm:"column:user_name"`
	Email              string         `json:"-" gorm:"column:email_address"`
	FirstName          string         `json:"-" gorm:"column:first_name"`
	LastName           string         `json:"-" gorm:"column:last_name"`
	DisplayName        string         `json:"-" gorm:"column:display_name"`
	Roles              pq.StringArray `json:"roles" gorm:"column:roles"`
	Sequence           uint64         `json:"-" gorm:"column:sequence"`
	PreferredLoginName string         `json:"-" gorm:"column:preferred_login_name"`
	AvatarKey          string         `json:"-" gorm:"column:avatar_key"`
	UserResourceOwner  string         `json:"-" gorm:"column:user_resource_owner"`

	CreationDate time.Time `json:"-" gorm:"column:creation_date"`
	ChangeDate   time.Time `json:"-" gorm:"column:change_date"`
}

func (*ProjectGrantMemberView) AppendEvent

func (r *ProjectGrantMemberView) AppendEvent(event *models.Event) (err error)

func (*ProjectGrantMemberView) SetData

func (r *ProjectGrantMemberView) SetData(event *models.Event) error

type ProjectGrantSearchKey

type ProjectGrantSearchKey proj_model.ProjectGrantViewSearchKey

func (ProjectGrantSearchKey) ToColumnName

func (key ProjectGrantSearchKey) ToColumnName() string

type ProjectGrantSearchQuery

type ProjectGrantSearchQuery proj_model.ProjectGrantViewSearchQuery

func (ProjectGrantSearchQuery) GetKey

func (ProjectGrantSearchQuery) GetMethod

func (ProjectGrantSearchQuery) GetValue

func (req ProjectGrantSearchQuery) GetValue() interface{}

type ProjectGrantSearchRequest

type ProjectGrantSearchRequest proj_model.ProjectGrantViewSearchRequest

func (ProjectGrantSearchRequest) GetAsc

func (req ProjectGrantSearchRequest) GetAsc() bool

func (ProjectGrantSearchRequest) GetLimit

func (req ProjectGrantSearchRequest) GetLimit() uint64

func (ProjectGrantSearchRequest) GetOffset

func (req ProjectGrantSearchRequest) GetOffset() uint64

func (ProjectGrantSearchRequest) GetQueries

func (ProjectGrantSearchRequest) GetSortingColumn

func (req ProjectGrantSearchRequest) GetSortingColumn() repository.ColumnKey

type ProjectGrantView

type ProjectGrantView struct {
	GrantID           string         `json:"-" gorm:"column:grant_id;primary_key"`
	ProjectID         string         `json:"-" gorm:"column:project_id"`
	OrgID             string         `json:"-" gorm:"column:org_id"`
	Name              string         `json:"name" gorm:"column:project_name"`
	CreationDate      time.Time      `json:"-" gorm:"column:creation_date"`
	ChangeDate        time.Time      `json:"-" gorm:"column:change_date"`
	State             int32          `json:"-" gorm:"column:project_state"`
	ResourceOwner     string         `json:"-" gorm:"column:resource_owner"`
	ResourceOwnerName string         `json:"-" gorm:"column:resource_owner_name"`
	OrgName           string         `json:"-" gorm:"column:org_name"`
	Sequence          uint64         `json:"-" gorm:"column:sequence"`
	GrantedRoleKeys   pq.StringArray `json:"-" gorm:"column:granted_role_keys"`
}

func ProjectGrantFromModel

func ProjectGrantFromModel(project *model.ProjectGrantView) *ProjectGrantView

func (*ProjectGrantView) AppendEvent

func (p *ProjectGrantView) AppendEvent(event *models.Event) (err error)

type ProjectMemberSearchKey

type ProjectMemberSearchKey proj_model.ProjectMemberSearchKey

func (ProjectMemberSearchKey) ToColumnName

func (key ProjectMemberSearchKey) ToColumnName() string

type ProjectMemberSearchQuery

type ProjectMemberSearchQuery proj_model.ProjectMemberSearchQuery

func (ProjectMemberSearchQuery) GetKey

func (ProjectMemberSearchQuery) GetMethod

func (ProjectMemberSearchQuery) GetValue

func (req ProjectMemberSearchQuery) GetValue() interface{}

type ProjectMemberSearchRequest

type ProjectMemberSearchRequest proj_model.ProjectMemberSearchRequest

func (ProjectMemberSearchRequest) GetAsc

func (req ProjectMemberSearchRequest) GetAsc() bool

func (ProjectMemberSearchRequest) GetLimit

func (req ProjectMemberSearchRequest) GetLimit() uint64

func (ProjectMemberSearchRequest) GetOffset

func (req ProjectMemberSearchRequest) GetOffset() uint64

func (ProjectMemberSearchRequest) GetQueries

func (ProjectMemberSearchRequest) GetSortingColumn

func (req ProjectMemberSearchRequest) GetSortingColumn() repository.ColumnKey

type ProjectMemberView

type ProjectMemberView struct {
	UserID             string         `json:"userId" gorm:"column:user_id;primary_key"`
	ProjectID          string         `json:"-" gorm:"column:project_id;primary_key"`
	UserName           string         `json:"-" gorm:"column:user_name"`
	Email              string         `json:"-" gorm:"column:email_address"`
	FirstName          string         `json:"-" gorm:"column:first_name"`
	LastName           string         `json:"-" gorm:"column:last_name"`
	DisplayName        string         `json:"-" gorm:"column:display_name"`
	Roles              pq.StringArray `json:"roles" gorm:"column:roles"`
	Sequence           uint64         `json:"-" gorm:"column:sequence"`
	PreferredLoginName string         `json:"-" gorm:"column:preferred_login_name"`
	AvatarKey          string         `json:"-" gorm:"column:avatar_key"`
	UserResourceOwner  string         `json:"-" gorm:"column:user_resource_owner"`

	CreationDate time.Time `json:"-" gorm:"column:creation_date"`
	ChangeDate   time.Time `json:"-" gorm:"column:change_date"`
}

func (*ProjectMemberView) AppendEvent

func (r *ProjectMemberView) AppendEvent(event *models.Event) (err error)

func (*ProjectMemberView) SetData

func (r *ProjectMemberView) SetData(event *models.Event) error

type ProjectSearchKey

type ProjectSearchKey proj_model.ProjectViewSearchKey

func (ProjectSearchKey) ToColumnName

func (key ProjectSearchKey) ToColumnName() string

type ProjectSearchQuery

type ProjectSearchQuery proj_model.ProjectViewSearchQuery

func (ProjectSearchQuery) GetKey

func (ProjectSearchQuery) GetMethod

func (req ProjectSearchQuery) GetMethod() domain.SearchMethod

func (ProjectSearchQuery) GetValue

func (req ProjectSearchQuery) GetValue() interface{}

type ProjectSearchRequest

type ProjectSearchRequest proj_model.ProjectViewSearchRequest

func (ProjectSearchRequest) GetAsc

func (req ProjectSearchRequest) GetAsc() bool

func (ProjectSearchRequest) GetLimit

func (req ProjectSearchRequest) GetLimit() uint64

func (ProjectSearchRequest) GetOffset

func (req ProjectSearchRequest) GetOffset() uint64

func (ProjectSearchRequest) GetQueries

func (req ProjectSearchRequest) GetQueries() []repository.SearchQuery

func (ProjectSearchRequest) GetSortingColumn

func (req ProjectSearchRequest) GetSortingColumn() repository.ColumnKey

type ProjectView

type ProjectView struct {
	ProjectID              string                        `json:"-" gorm:"column:project_id;primary_key"`
	Name                   string                        `json:"name" gorm:"column:project_name"`
	CreationDate           time.Time                     `json:"-" gorm:"column:creation_date"`
	ChangeDate             time.Time                     `json:"-" gorm:"column:change_date"`
	State                  int32                         `json:"-" gorm:"column:project_state"`
	ResourceOwner          string                        `json:"-" gorm:"column:resource_owner"`
	ProjectRoleAssertion   bool                          `json:"projectRoleAssertion" gorm:"column:project_role_assertion"`
	ProjectRoleCheck       bool                          `json:"projectRoleCheck" gorm:"column:project_role_check"`
	HasProjectCheck        bool                          `json:"hasProjectCheck" gorm:"column:has_project_check"`
	PrivateLabelingSetting domain.PrivateLabelingSetting `json:"privateLabelingSetting" gorm:"column:private_labeling_setting"`
	Sequence               uint64                        `json:"-" gorm:"column:sequence"`
}

func (*ProjectView) AppendEvent

func (p *ProjectView) AppendEvent(event *models.Event) (err error)

func (*ProjectView) SetData

func (p *ProjectView) SetData(event *models.Event) error

Jump to

Keyboard shortcuts

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