companies

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func (*Controller) Create

func (c *Controller) Create(accountID uuid.UUID, data *accountEntities.Company) (*accountEntities.Company, error)

func (*Controller) Delete

func (c *Controller) Delete(companyID uuid.UUID) error

func (*Controller) Get

func (c *Controller) Get(companyID, accountID uuid.UUID) (*accountEntities.CompanyResponse, error)

func (*Controller) GetAccountIDByEmail added in v1.3.0

func (c *Controller) GetAccountIDByEmail(email string) (uuid.UUID, error)

func (*Controller) GetAllAccountsInCompany

func (c *Controller) GetAllAccountsInCompany(companyID uuid.UUID) (*[]roles.AccountRole, error)

func (*Controller) InviteUser

func (c *Controller) InviteUser(inviteUser *dto.InviteUser) error

func (*Controller) List

func (c *Controller) List(accountID uuid.UUID) (*[]accountEntities.CompanyResponse, error)

func (*Controller) RemoveUser

func (c *Controller) RemoveUser(removeUser *dto.RemoveUser) error

func (*Controller) Update

func (c *Controller) Update(
	companyID uuid.UUID, data *accountEntities.Company) (*accountEntities.Company, error)

func (*Controller) UpdateAccountCompany

func (c *Controller) UpdateAccountCompany(role *roles.AccountCompany) error

type IController

type IController interface {
	Create(accountID uuid.UUID, data *accountEntities.Company) (*accountEntities.Company, error)
	Update(companyID uuid.UUID, data *accountEntities.Company) (*accountEntities.Company, error)
	Get(companyID, accountID uuid.UUID) (*accountEntities.CompanyResponse, error)
	List(accountID uuid.UUID) (*[]accountEntities.CompanyResponse, error)
	UpdateAccountCompany(role *roles.AccountCompany) error
	InviteUser(inviteUser *dto.InviteUser) error
	Delete(companyID uuid.UUID) error
	GetAllAccountsInCompany(companyID uuid.UUID) (*[]roles.AccountRole, error)
	RemoveUser(removeUser *dto.RemoveUser) error
	GetAccountIDByEmail(email string) (uuid.UUID, error)
}

func NewController

func NewController(databaseWrite SQL.InterfaceWrite, databaseRead SQL.InterfaceRead,
	broker brokerLib.IBroker, appConfig app.IAppConfig) IController

type Mock added in v1.0.1

type Mock struct {
	mock.Mock
}

func (*Mock) Create added in v1.0.1

func (*Mock) Delete added in v1.0.1

func (m *Mock) Delete(_ uuid.UUID) error

func (*Mock) Get added in v1.0.1

func (*Mock) GetAccountIDByEmail added in v1.3.0

func (m *Mock) GetAccountIDByEmail(_ string) (uuid.UUID, error)

func (*Mock) GetAllAccountsInCompany added in v1.0.1

func (m *Mock) GetAllAccountsInCompany(_ uuid.UUID) (*[]roles.AccountRole, error)

func (*Mock) InviteUser added in v1.0.1

func (m *Mock) InviteUser(_ *dto.InviteUser) error

func (*Mock) List added in v1.0.1

func (*Mock) RemoveUser added in v1.0.1

func (m *Mock) RemoveUser(_ *dto.RemoveUser) error

func (*Mock) Update added in v1.0.1

func (*Mock) UpdateAccountCompany added in v1.0.1

func (m *Mock) UpdateAccountCompany(_ *roles.AccountCompany) error

Jump to

Keyboard shortcuts

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