model

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 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 (
	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"
)
View Source
const (
	ProjectRoleKeyKey           = "role_key"
	ProjectRoleKeyOrgID         = "org_id"
	ProjectRoleKeyProjectID     = "project_id"
	ProjectRoleKeyResourceOwner = "resource_owner"
)

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) *model.ProjectGrantMemberView

func ProjectGrantMembersToModel

func ProjectGrantMembersToModel(roles []*ProjectGrantMemberView) []*model.ProjectGrantMemberView

func ProjectGrantToModel added in v0.25.0

func ProjectGrantToModel(project *ProjectGrantView) *model.ProjectGrantView

func ProjectGrantsToModel added in v0.25.0

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

func ProjectMemberToModel

func ProjectMemberToModel(member *ProjectMemberView) *model.ProjectMemberView

func ProjectMembersToModel

func ProjectMembersToModel(roles []*ProjectMemberView) []*model.ProjectMemberView

func ProjectRoleToModel

func ProjectRoleToModel(role *ProjectRoleView) *model.ProjectRoleView

func ProjectRolesToModel

func ProjectRolesToModel(roles []*ProjectRoleView) []*model.ProjectRoleView

func ProjectToModel added in v0.25.0

func ProjectToModel(project *ProjectView) *model.ProjectView

func ProjectsToModel added in v0.25.0

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"`
	ProjectRoleAssertion bool      `json:"projectRoleAssertion" gorm:"column:project_role_assertion"`
	ProjectRoleCheck     bool      `json:"projectRoleCheck" gorm:"column:project_role_check"`

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

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

func (*ApplicationView) SetData

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

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"`

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

type ProjectGrantSearchKey proj_model.ProjectGrantViewSearchKey

func (ProjectGrantSearchKey) ToColumnName added in v0.25.0

func (key ProjectGrantSearchKey) ToColumnName() string

type ProjectGrantSearchQuery added in v0.25.0

type ProjectGrantSearchQuery proj_model.ProjectGrantViewSearchQuery

func (ProjectGrantSearchQuery) GetKey added in v0.25.0

func (ProjectGrantSearchQuery) GetMethod added in v0.25.0

func (ProjectGrantSearchQuery) GetValue added in v0.25.0

func (req ProjectGrantSearchQuery) GetValue() interface{}

type ProjectGrantSearchRequest added in v0.25.0

type ProjectGrantSearchRequest proj_model.ProjectGrantViewSearchRequest

func (ProjectGrantSearchRequest) GetAsc added in v0.25.0

func (req ProjectGrantSearchRequest) GetAsc() bool

func (ProjectGrantSearchRequest) GetLimit added in v0.25.0

func (req ProjectGrantSearchRequest) GetLimit() uint64

func (ProjectGrantSearchRequest) GetOffset added in v0.25.0

func (req ProjectGrantSearchRequest) GetOffset() uint64

func (ProjectGrantSearchRequest) GetQueries added in v0.25.0

func (ProjectGrantSearchRequest) GetSortingColumn added in v0.25.0

func (req ProjectGrantSearchRequest) GetSortingColumn() repository.ColumnKey

type ProjectGrantView added in v0.25.0

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

func ProjectGrantFromModel(project *model.ProjectGrantView) *ProjectGrantView

func (*ProjectGrantView) AppendEvent added in v0.25.0

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"`

	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 ProjectRoleSearchKey

type ProjectRoleSearchKey proj_model.ProjectRoleSearchKey

func (ProjectRoleSearchKey) ToColumnName

func (key ProjectRoleSearchKey) ToColumnName() string

type ProjectRoleSearchQuery

type ProjectRoleSearchQuery proj_model.ProjectRoleSearchQuery

func (ProjectRoleSearchQuery) GetKey

func (ProjectRoleSearchQuery) GetMethod

func (req ProjectRoleSearchQuery) GetMethod() domain.SearchMethod

func (ProjectRoleSearchQuery) GetValue

func (req ProjectRoleSearchQuery) GetValue() interface{}

type ProjectRoleSearchRequest

type ProjectRoleSearchRequest proj_model.ProjectRoleSearchRequest

func (ProjectRoleSearchRequest) GetAsc

func (req ProjectRoleSearchRequest) GetAsc() bool

func (ProjectRoleSearchRequest) GetLimit

func (req ProjectRoleSearchRequest) GetLimit() uint64

func (ProjectRoleSearchRequest) GetOffset

func (req ProjectRoleSearchRequest) GetOffset() uint64

func (ProjectRoleSearchRequest) GetQueries

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

func (ProjectRoleSearchRequest) GetSortingColumn

func (req ProjectRoleSearchRequest) GetSortingColumn() repository.ColumnKey

type ProjectRoleView

type ProjectRoleView struct {
	OrgID       string `json:"-" gorm:"column:org_id;primary_key"`
	ProjectID   string `json:"projectId,omitempty" gorm:"column:project_id;primary_key"`
	Key         string `json:"key" gorm:"column:role_key;primary_key"`
	DisplayName string `json:"displayName" gorm:"column:display_name"`
	Group       string `json:"group" gorm:"column:group_name"`
	Sequence    uint64 `json:"-" gorm:"column:sequence"`

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

func ProjectRoleViewFromModel

func ProjectRoleViewFromModel(role *model.ProjectRoleView) *ProjectRoleView

func (*ProjectRoleView) AppendEvent

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

func (*ProjectRoleView) SetData

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

type ProjectSearchKey added in v0.25.0

type ProjectSearchKey proj_model.ProjectViewSearchKey

func (ProjectSearchKey) ToColumnName added in v0.25.0

func (key ProjectSearchKey) ToColumnName() string

type ProjectSearchQuery added in v0.25.0

type ProjectSearchQuery proj_model.ProjectViewSearchQuery

func (ProjectSearchQuery) GetKey added in v0.25.0

func (ProjectSearchQuery) GetMethod added in v0.25.0

func (req ProjectSearchQuery) GetMethod() domain.SearchMethod

func (ProjectSearchQuery) GetValue added in v0.25.0

func (req ProjectSearchQuery) GetValue() interface{}

type ProjectSearchRequest added in v0.25.0

type ProjectSearchRequest proj_model.ProjectViewSearchRequest

func (ProjectSearchRequest) GetAsc added in v0.25.0

func (req ProjectSearchRequest) GetAsc() bool

func (ProjectSearchRequest) GetLimit added in v0.25.0

func (req ProjectSearchRequest) GetLimit() uint64

func (ProjectSearchRequest) GetOffset added in v0.25.0

func (req ProjectSearchRequest) GetOffset() uint64

func (ProjectSearchRequest) GetQueries added in v0.25.0

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

func (ProjectSearchRequest) GetSortingColumn added in v0.25.0

func (req ProjectSearchRequest) GetSortingColumn() repository.ColumnKey

type ProjectView added in v0.25.0

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"`
	Sequence             uint64    `json:"-" gorm:"column:sequence"`
}

func ProjectFromModel added in v0.25.0

func ProjectFromModel(project *model.ProjectView) *ProjectView

func (*ProjectView) AppendEvent added in v0.25.0

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

func (*ProjectView) SetData added in v0.25.0

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