Documentation ¶
Index ¶
- type ICompanyRepository
- type Mock
- func (m *Mock) Create(company *accountEntities.Company, tx SQL.InterfaceWrite) (*accountEntities.Company, error)
- func (m *Mock) Delete(companyID uuid.UUID) error
- func (m *Mock) GetAllAccountsInCompany(companyID uuid.UUID) (*[]roles.AccountRole, error)
- func (m *Mock) GetAllOfAccount(accountID uuid.UUID) (*[]accountEntities.CompanyResponse, error)
- func (m *Mock) GetAllOfAccountLdap(permissions []string) (*[]accountEntities.CompanyResponse, error)
- func (m *Mock) GetByID(companyID uuid.UUID) (*accountEntities.Company, error)
- func (m *Mock) Update(companyID uuid.UUID, data *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) GetAllOfAccountLdap(permissions []string) (*[]accountEntities.CompanyResponse, error)
- func (r *Repository) GetByID(companyID uuid.UUID) (*accountEntities.Company, 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) GetAllOfAccountLdap(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(company *accountEntities.Company, tx 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(accountID uuid.UUID) (*[]accountEntities.CompanyResponse, error)
func (*Mock) GetAllOfAccountLdap ¶ added in v1.6.0
func (m *Mock) GetAllOfAccountLdap(permissions []string) (*[]accountEntities.CompanyResponse, error)
func (*Mock) Update ¶ added in v1.0.1
func (m *Mock) Update(companyID uuid.UUID, data *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) GetAllOfAccountLdap ¶ added in v1.6.0
func (r *Repository) GetAllOfAccountLdap(permissions []string) (*[]accountEntities.CompanyResponse, error)
func (*Repository) GetByID ¶
func (r *Repository) GetByID(companyID uuid.UUID) (*accountEntities.Company, 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.