Documentation ¶
Index ¶
- type ICompanyRepository
- type Mock
- func (m *Mock) Create(_ *accountEntities.Company, _ SQL.InterfaceWrite) (*accountEntities.Company, error)
- func (m *Mock) Delete(_ uuid.UUID) error
- func (m *Mock) GetAllAccountsInCompany(_ uuid.UUID) (*[]roles.AccountRole, error)
- func (m *Mock) GetAllOfAccount(_ uuid.UUID) (*[]accountEntities.CompanyResponse, error)
- func (m *Mock) GetByID(_ uuid.UUID) (*accountEntities.Company, error)
- func (m *Mock) ListByLdapPermissions(_ []string) (*[]accountEntities.CompanyResponse, error)
- func (m *Mock) Update(_ uuid.UUID, _ *accountEntities.Company) (*accountEntities.Company, error)
- type Repository
- func (r *Repository) Create(company *accountEntities.Company, tx SQL.InterfaceWrite) (*accountEntities.Company, error)
- func (r *Repository) Delete(companyID uuid.UUID) error
- func (r *Repository) GetAllAccountsInCompany(companyID uuid.UUID) (*[]roles.AccountRole, error)
- func (r *Repository) GetAllOfAccount(accountID uuid.UUID) (*[]accountEntities.CompanyResponse, error)
- func (r *Repository) GetByID(companyID uuid.UUID) (*accountEntities.Company, error)
- func (r *Repository) ListByLdapPermissions(permissions []string) (*[]accountEntities.CompanyResponse, error)
- func (r *Repository) Update(companyID uuid.UUID, data *accountEntities.Company) (*accountEntities.Company, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ICompanyRepository ¶
type ICompanyRepository interface { Create(company *accountEntities.Company, tx SQL.InterfaceWrite) (*accountEntities.Company, error) Update(companyID uuid.UUID, data *accountEntities.Company) (*accountEntities.Company, error) GetByID(companyID uuid.UUID) (*accountEntities.Company, error) GetAllOfAccount(accountID uuid.UUID) (*[]accountEntities.CompanyResponse, error) Delete(companyID uuid.UUID) error GetAllAccountsInCompany(companyID uuid.UUID) (*[]roles.AccountRole, error) ListByLdapPermissions(permissions []string) (*[]accountEntities.CompanyResponse, error) }
func NewCompanyRepository ¶
func NewCompanyRepository(databaseRead SQL.InterfaceRead, databaseWrite SQL.InterfaceWrite) ICompanyRepository
type Mock ¶ added in v1.0.1
func (*Mock) Create ¶ added in v1.0.1
func (m *Mock) Create(_ *accountEntities.Company, _ SQL.InterfaceWrite) (*accountEntities.Company, error)
func (*Mock) GetAllAccountsInCompany ¶ added in v1.0.1
func (*Mock) GetAllOfAccount ¶ added in v1.0.1
func (m *Mock) GetAllOfAccount(_ uuid.UUID) (*[]accountEntities.CompanyResponse, error)
func (*Mock) ListByLdapPermissions ¶ added in v1.7.0
func (m *Mock) ListByLdapPermissions(_ []string) (*[]accountEntities.CompanyResponse, error)
func (*Mock) Update ¶ added in v1.0.1
func (m *Mock) Update(_ uuid.UUID, _ *accountEntities.Company) (*accountEntities.Company, error)
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func (*Repository) Create ¶
func (r *Repository) Create( company *accountEntities.Company, tx SQL.InterfaceWrite) (*accountEntities.Company, error)
func (*Repository) GetAllAccountsInCompany ¶
func (r *Repository) GetAllAccountsInCompany(companyID uuid.UUID) (*[]roles.AccountRole, error)
nolint
func (*Repository) GetAllOfAccount ¶
func (r *Repository) GetAllOfAccount(accountID uuid.UUID) (*[]accountEntities.CompanyResponse, error)
func (*Repository) GetByID ¶
func (r *Repository) GetByID(companyID uuid.UUID) (*accountEntities.Company, error)
func (*Repository) ListByLdapPermissions ¶ added in v1.7.0
func (r *Repository) ListByLdapPermissions(permissions []string) (*[]accountEntities.CompanyResponse, error)
func (*Repository) Update ¶
func (r *Repository) Update( companyID uuid.UUID, data *accountEntities.Company) (*accountEntities.Company, error)
Click to show internal directories.
Click to hide internal directories.