Documentation ¶
Index ¶
- type AccountRepository
- type Data
- func (d *Data) CheckLdapGroups(authorizationType auth.AuthenticationType) error
- func (d *Data) SetWorkspaceAndRepositoryID(workspaceID, repositoryID uuid.UUID) *Data
- func (d *Data) SetWorkspaceIDAndAccountData(workspaceID uuid.UUID, accountData *proto.GetAccountDataResponse) *Data
- func (d *Data) ToBytes() []byte
- func (d *Data) ToRepository() *Repository
- func (d *Data) Validate() error
- type PaginatedContent
- func (p *PaginatedContent) GetOffset() int
- func (p *PaginatedContent) GetSearch() string
- func (p *PaginatedContent) SetEnable(enable bool) *PaginatedContent
- func (p *PaginatedContent) SetPage(pageString string) *PaginatedContent
- func (p *PaginatedContent) SetSearch(search string) *PaginatedContent
- func (p *PaginatedContent) SetSize(sizeString string) *PaginatedContent
- type Repository
- func (r *Repository) ContainsAllAuthzGroups() bool
- func (r *Repository) ToAccountRepository(accountID uuid.UUID, role account.Role) *AccountRepository
- func (r *Repository) ToRepositoryResponse(role account.Role) *Response
- func (r *Repository) ToUpdateMap(data *Data) map[string]interface{}
- func (r *Repository) Update(data *Data) *Repository
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountRepository ¶
type AccountRepository struct { RepositoryID uuid.UUID `json:"repositoryID"` AccountID uuid.UUID `json:"accountID"` WorkspaceID uuid.UUID `json:"workspaceID"` Role accountEnums.Role `json:"role"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
TODO add unity tests
func (*AccountRepository) ToResponse ¶
func (a *AccountRepository) ToResponse() *roleEntities.Response
func (*AccountRepository) ToResponseWithEmailAndUsername ¶
func (a *AccountRepository) ToResponseWithEmailAndUsername(email, username string) *roleEntities.Response
func (*AccountRepository) Update ¶
func (a *AccountRepository) Update(role accountEnums.Role)
type Data ¶
type Data struct { WorkspaceID uuid.UUID `json:"workspaceID" swaggerignore:"true"` RepositoryID uuid.UUID `json:"repositoryID" swaggerignore:"true"` AccountID uuid.UUID `json:"accountID" swaggerignore:"true"` Name string `json:"name"` Description string `json:"description"` AuthzMember []string `json:"authzMember"` AuthzAdmin []string `json:"authzAdmin"` AuthzSupervisor []string `json:"authzSupervisor"` Permissions []string `json:"permissions" swaggerignore:"true"` IsApplicationAdmin bool `json:"isApplicationAdmin" swaggerignore:"true"` }
func (*Data) CheckLdapGroups ¶
func (d *Data) CheckLdapGroups(authorizationType auth.AuthenticationType) error
func (*Data) SetWorkspaceAndRepositoryID ¶
func (*Data) SetWorkspaceIDAndAccountData ¶
func (*Data) ToRepository ¶
func (d *Data) ToRepository() *Repository
type PaginatedContent ¶
type PaginatedContent struct { // ToRemove: Paginated method is optional for now because is not generate breaking changes Enable bool Page int Size int Search string }
func (*PaginatedContent) GetOffset ¶
func (p *PaginatedContent) GetOffset() int
func (*PaginatedContent) GetSearch ¶
func (p *PaginatedContent) GetSearch() string
func (*PaginatedContent) SetEnable ¶
func (p *PaginatedContent) SetEnable(enable bool) *PaginatedContent
func (*PaginatedContent) SetPage ¶
func (p *PaginatedContent) SetPage(pageString string) *PaginatedContent
func (*PaginatedContent) SetSearch ¶
func (p *PaginatedContent) SetSearch(search string) *PaginatedContent
func (*PaginatedContent) SetSize ¶
func (p *PaginatedContent) SetSize(sizeString string) *PaginatedContent
type Repository ¶
type Repository struct { RepositoryID uuid.UUID `json:"repositoryID" gorm:"primary_key"` WorkspaceID uuid.UUID `json:"workspaceID"` Name string `json:"name"` Description string `json:"description"` AuthzMember pq.StringArray `json:"authzMember" gorm:"type:text[]"` AuthzAdmin pq.StringArray `json:"authzAdmin" gorm:"type:text[]"` AuthzSupervisor pq.StringArray `json:"authzSupervisor" gorm:"type:text[]"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
func (*Repository) ContainsAllAuthzGroups ¶
func (r *Repository) ContainsAllAuthzGroups() bool
func (*Repository) ToAccountRepository ¶
func (r *Repository) ToAccountRepository(accountID uuid.UUID, role account.Role) *AccountRepository
func (*Repository) ToRepositoryResponse ¶
func (r *Repository) ToRepositoryResponse(role account.Role) *Response
func (*Repository) ToUpdateMap ¶
func (r *Repository) ToUpdateMap(data *Data) map[string]interface{}
func (*Repository) Update ¶
func (r *Repository) Update(data *Data) *Repository
type Response ¶
type Response struct { WorkspaceID uuid.UUID `json:"workspaceID"` RepositoryID uuid.UUID `json:"repositoryID"` Name string `json:"name"` Role account.Role `json:"role"` Description string `json:"description"` AuthzMember pq.StringArray `json:"authzMember" gorm:"type:text[]"` AuthzAdmin pq.StringArray `json:"authzAdmin" gorm:"type:text[]"` AuthzSupervisor pq.StringArray `json:"authzSupervisor" gorm:"type:text[]"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
Click to show internal directories.
Click to hide internal directories.