model

package
v1.83.3 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserGrantKeyID            = "id"
	UserGrantKeyUserID        = "user_id"
	UserGrantKeyProjectID     = "project_id"
	UserGrantKeyGrantID       = "grant_id"
	UserGrantKeyResourceOwner = "resource_owner"
	UserGrantKeyState         = "state"
	UserGrantKeyOrgName       = "org_name"
	UserGrantKeyRole          = "role_keys"
	UserGrantKeyUserName      = "user_name"
	UserGrantKeyFirstName     = "first_name"
	UserGrantKeyLastName      = "last_name"
	UserGrantKeyEmail         = "email"
	UserGrantKeyOrgDomain     = "org_primary_domain"
	UserGrantKeyProjectName   = "project_name"
	UserGrantKeyDisplayName   = "display_name"
)

Variables

This section is empty.

Functions

func UserGrantToModel

func UserGrantToModel(grant *UserGrantView, prefixAvatarURL string) *model.UserGrantView

func UserGrantsToModel

func UserGrantsToModel(grants []*UserGrantView, prefixAvatarURL string) []*model.UserGrantView

Types

type UserGrantSearchKey

type UserGrantSearchKey grant_model.UserGrantSearchKey

func (UserGrantSearchKey) ToColumnName

func (key UserGrantSearchKey) ToColumnName() string

type UserGrantSearchQuery

type UserGrantSearchQuery grant_model.UserGrantSearchQuery

func (UserGrantSearchQuery) GetKey

func (UserGrantSearchQuery) GetMethod

func (req UserGrantSearchQuery) GetMethod() domain.SearchMethod

func (UserGrantSearchQuery) GetValue

func (req UserGrantSearchQuery) GetValue() interface{}

type UserGrantSearchRequest

type UserGrantSearchRequest grant_model.UserGrantSearchRequest

func (UserGrantSearchRequest) GetAsc

func (req UserGrantSearchRequest) GetAsc() bool

func (UserGrantSearchRequest) GetLimit

func (req UserGrantSearchRequest) GetLimit() uint64

func (UserGrantSearchRequest) GetOffset

func (req UserGrantSearchRequest) GetOffset() uint64

func (UserGrantSearchRequest) GetQueries

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

func (UserGrantSearchRequest) GetSortingColumn

func (req UserGrantSearchRequest) GetSortingColumn() repository.ColumnKey

type UserGrantView

type UserGrantView struct {
	ID                string         `json:"-" gorm:"column:id;primary_key"`
	ResourceOwner     string         `json:"-" gorm:"resource_owner"`
	UserID            string         `json:"userId" gorm:"user_id"`
	ProjectID         string         `json:"projectId" gorm:"column:project_id"`
	GrantID           string         `json:"grantId" gorm:"column:grant_id"`
	UserName          string         `json:"-" gorm:"column:user_name"`
	FirstName         string         `json:"-" gorm:"column:first_name"`
	LastName          string         `json:"-" gorm:"column:last_name"`
	DisplayName       string         `json:"-" gorm:"column:display_name"`
	Email             string         `json:"-" gorm:"column:email"`
	ProjectName       string         `json:"-" gorm:"column:project_name"`
	ProjectOwner      string         `json:"-" gorm:"column:project_owner"`
	OrgName           string         `json:"-" gorm:"column:org_name"`
	OrgPrimaryDomain  string         `json:"-" gorm:"column:org_primary_domain"`
	RoleKeys          pq.StringArray `json:"roleKeys" gorm:"column:role_keys"`
	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"`
	State        int32     `json:"-" gorm:"column:grant_state"`

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

func (*UserGrantView) AppendEvent

func (g *UserGrantView) AppendEvent(event *models.Event) (err error)

Jump to

Keyboard shortcuts

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