Documentation
¶
Index ¶
- type Account
- func (a *Account) GetTable() string
- func (a *Account) IsAccountConfirmed() error
- func (a *Account) IsNotApplicationAdminAccount() bool
- func (a *Account) SetAccountData() *Account
- func (a *Account) SetAccountID()
- func (a *Account) SetCreatedAt()
- func (a *Account) SetIsConfirmed() *Account
- func (a *Account) SetPasswordHash()
- func (a *Account) SetUpdatedAt() *Account
- func (a *Account) ToBytes() []byte
- func (a *Account) ToCreateAccountFromKeycloakResponse() *CreateAccountFromKeycloakResponse
- func (a *Account) ToLoginResponse(accessToken, refreshToken string, expiresAt time.Time) *LoginResponse
- func (a *Account) ToMap() map[string]interface{}
- func (a *Account) Validate() error
- type ClaimsJWT
- type Company
- func (c *Company) GetAuthzAdmin() string
- func (c *Company) GetAuthzMember() string
- func (c *Company) GetAuthzSupervisor() string
- func (c *Company) GetTable() string
- func (c *Company) SetCreateData() *Company
- func (c *Company) SetUpdateData() *Company
- func (c *Company) ToBytes() []byte
- func (c *Company) ToCompanyResponse(role rolesEnum.Role) *CompanyResponse
- func (c *Company) Validate() error
- type CompanyApplicationAdmin
- type CompanyResponse
- type CreateAccount
- type CreateAccountFromKeycloakResponse
- type EmailData
- type InviteUser
- func (i *InviteUser) SetInviteUserCompanyID(companyID uuid.UUID) *InviteUser
- func (i *InviteUser) SetInviteUserRepositoryAndCompanyID(companyID, repositoryID uuid.UUID) *InviteUser
- func (i *InviteUser) ToAccountRepository(accountID uuid.UUID) *roles.AccountRepository
- func (i *InviteUser) ToBytes() []byte
- func (i *InviteUser) Validate() error
- type KeycloakToken
- type LoginData
- type LoginResponse
- type RemoveUser
- type Repository
- func (r *Repository) GetAuthzAdmin() string
- func (r *Repository) GetAuthzMember() string
- func (r *Repository) GetAuthzSupervisor() string
- func (r *Repository) GetTable() string
- func (r *Repository) SetCreateData(companyID uuid.UUID) *Repository
- func (r *Repository) SetUpdateData(name, description, authzAdmin, authzMember, authzSupervisor string) *Repository
- func (r *Repository) ToAccountRepository(role accountEnum.Role, accountID uuid.UUID) *roles.AccountRepository
- func (r *Repository) ToRepositoryResponse(role accountEnum.Role) *RepositoryResponse
- func (r *Repository) Validate() error
- type RepositoryResponse
- type ResetCodeData
- type ValidateUnique
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
AccountID uuid.UUID `json:"accountID" gorm:"primary_key"`
Email string `json:"email"`
Password string `json:"password"`
Username string `json:"username"`
IsConfirmed bool `json:"isConfirmed"`
IsApplicationAdmin bool `json:"isApplicationAdmin"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
Companies []Company `gorm:"many2many:account_company;association_jointable_foreignkey:company_id;jointable_foreignkey:account_id"` // nolint
Repositories []Repository `gorm:"many2many:account_repository;association_jointable_foreignkey:repository_id;jointable_foreignkey:account_id"` // nolint
}
nolint
func (*Account) IsAccountConfirmed ¶
func (*Account) IsNotApplicationAdminAccount ¶ added in v1.2.0
func (*Account) SetAccountData ¶
func (*Account) SetAccountID ¶
func (a *Account) SetAccountID()
func (*Account) SetCreatedAt ¶
func (a *Account) SetCreatedAt()
func (*Account) SetIsConfirmed ¶
func (*Account) SetPasswordHash ¶
func (a *Account) SetPasswordHash()
func (*Account) SetUpdatedAt ¶
func (*Account) ToCreateAccountFromKeycloakResponse ¶ added in v1.2.0
func (a *Account) ToCreateAccountFromKeycloakResponse() *CreateAccountFromKeycloakResponse
func (*Account) ToLoginResponse ¶
func (a *Account) ToLoginResponse(accessToken, refreshToken string, expiresAt time.Time) *LoginResponse
type ClaimsJWT ¶
type Company ¶
type Company struct {
CompanyID uuid.UUID `json:"companyID" gorm:"primary_key" swaggerignore:"true"`
Name string `json:"name"`
Description string `json:"description"`
AuthzMember string `json:"authzMember"`
AuthzAdmin string `json:"authzAdmin"`
CreatedAt time.Time `json:"createdAt" swaggerignore:"true"`
UpdatedAt time.Time `json:"updatedAt" swaggerignore:"true"`
}
func (*Company) GetAuthzAdmin ¶ added in v1.2.0
func (*Company) GetAuthzMember ¶ added in v1.2.0
func (*Company) GetAuthzSupervisor ¶ added in v1.2.0
func (*Company) SetCreateData ¶
func (*Company) SetUpdateData ¶
func (*Company) ToCompanyResponse ¶
func (c *Company) ToCompanyResponse(role rolesEnum.Role) *CompanyResponse
type CompanyApplicationAdmin ¶ added in v1.2.0
type CompanyApplicationAdmin struct {
CompanyID uuid.UUID `json:"companyID" gorm:"primary_key" swaggerignore:"true"`
Name string `json:"name"`
AdminEmail string `json:"adminEmail"`
Description string `json:"description"`
AuthzMember string `json:"authzMember"`
AuthzAdmin string `json:"authzAdmin"`
CreatedAt time.Time `json:"createdAt" swaggerignore:"true"`
UpdatedAt time.Time `json:"updatedAt" swaggerignore:"true"`
}
func (*CompanyApplicationAdmin) ToCompany ¶ added in v1.2.0
func (c *CompanyApplicationAdmin) ToCompany() *Company
func (*CompanyApplicationAdmin) Validate ¶ added in v1.2.0
func (c *CompanyApplicationAdmin) Validate() error
type CompanyResponse ¶
type CompanyResponse struct {
CompanyID uuid.UUID `json:"companyID"`
Name string `json:"name"`
Role rolesEnum.Role `json:"role"`
Description string `json:"description"`
AuthzMember string `json:"authzMember"`
AuthzAdmin string `json:"authzAdmin"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type CreateAccount ¶
type CreateAccount struct {
Email string `json:"email"`
Password string `json:"password"`
Username string `json:"username"`
}
func (*CreateAccount) ToAccount ¶
func (c *CreateAccount) ToAccount() *Account
type CreateAccountFromKeycloakResponse ¶ added in v1.2.0
type InviteUser ¶
type InviteUser struct {
Role accountEnums.Role `json:"role"`
Email string `json:"email"`
RepositoryID uuid.UUID `json:"repositoryID" swaggerignore:"true"`
CompanyID uuid.UUID `json:"companyID" swaggerignore:"true"`
}
func (*InviteUser) SetInviteUserCompanyID ¶
func (i *InviteUser) SetInviteUserCompanyID(companyID uuid.UUID) *InviteUser
func (*InviteUser) SetInviteUserRepositoryAndCompanyID ¶
func (i *InviteUser) SetInviteUserRepositoryAndCompanyID(companyID, repositoryID uuid.UUID) *InviteUser
func (*InviteUser) ToAccountRepository ¶
func (i *InviteUser) ToAccountRepository(accountID uuid.UUID) *roles.AccountRepository
func (*InviteUser) ToBytes ¶ added in v1.2.0
func (i *InviteUser) ToBytes() []byte
func (*InviteUser) Validate ¶
func (i *InviteUser) Validate() error
type KeycloakToken ¶ added in v1.2.0
type KeycloakToken struct {
AccessToken string `json:"accessToken"`
}
func (*KeycloakToken) ToBytes ¶ added in v1.2.0
func (l *KeycloakToken) ToBytes() []byte
func (*KeycloakToken) Validate ¶ added in v1.2.0
func (l *KeycloakToken) Validate() error
type LoginResponse ¶
type RemoveUser ¶
type RemoveUser struct {
AccountID uuid.UUID `json:"accountID"`
CompanyID uuid.UUID `json:"companyID"`
RepositoryID uuid.UUID `json:"repositoryID"`
}
func (*RemoveUser) SetAccountAndCompanyID ¶
func (r *RemoveUser) SetAccountAndCompanyID(accountID, companyID uuid.UUID) *RemoveUser
func (*RemoveUser) SetAccountAndRepositoryID ¶
func (r *RemoveUser) SetAccountAndRepositoryID(accountID, repositoryID uuid.UUID) *RemoveUser
type Repository ¶
type Repository struct {
RepositoryID uuid.UUID `json:"repositoryID" gorm:"primary_key" swaggerignore:"true"`
CompanyID uuid.UUID `json:"companyID" swaggerignore:"true"`
Name string `json:"name"`
Description string `json:"description"`
AuthzMember string `json:"authzMember"`
AuthzAdmin string `json:"authzAdmin"`
AuthzSupervisor string `json:"authzSupervisor"`
CreatedAt time.Time `json:"createdAt" swaggerignore:"true"`
UpdatedAt time.Time `json:"updatedAt" swaggerignore:"true"`
}
func (*Repository) GetAuthzAdmin ¶ added in v1.2.0
func (r *Repository) GetAuthzAdmin() string
func (*Repository) GetAuthzMember ¶ added in v1.2.0
func (r *Repository) GetAuthzMember() string
func (*Repository) GetAuthzSupervisor ¶ added in v1.2.0
func (r *Repository) GetAuthzSupervisor() string
func (*Repository) GetTable ¶
func (r *Repository) GetTable() string
func (*Repository) SetCreateData ¶
func (r *Repository) SetCreateData(companyID uuid.UUID) *Repository
func (*Repository) SetUpdateData ¶
func (r *Repository) SetUpdateData( name, description, authzAdmin, authzMember, authzSupervisor string) *Repository
func (*Repository) ToAccountRepository ¶
func (r *Repository) ToAccountRepository(role accountEnum.Role, accountID uuid.UUID) *roles.AccountRepository
func (*Repository) ToRepositoryResponse ¶
func (r *Repository) ToRepositoryResponse(role accountEnum.Role) *RepositoryResponse
func (*Repository) Validate ¶
func (r *Repository) Validate() error
type RepositoryResponse ¶
type RepositoryResponse struct {
CompanyID uuid.UUID `json:"companyID"`
RepositoryID uuid.UUID `json:"repositoryID"`
Name string `json:"name"`
Role accountEnum.Role `json:"role"`
Description string `json:"description"`
AuthzMember string `json:"authzMember"`
AuthzAdmin string `json:"authzAdmin"`
AuthzSupervisor string `json:"authzSupervisor"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type ResetCodeData ¶
func (*ResetCodeData) Validate ¶
func (r *ResetCodeData) Validate() error
type ValidateUnique ¶ added in v1.0.1
func (*ValidateUnique) Validate ¶ added in v1.0.1
func (v *ValidateUnique) Validate() error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.