repositories

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 21 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, repository *accountEntities.Repository,
	permissions []string) (*accountEntities.Repository, error)

func (*Controller) CreateAccountRepository

func (c *Controller) CreateAccountRepository(accountRepository *roles.AccountRepository) error

func (*Controller) Delete

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

func (*Controller) Get

func (c *Controller) Get(repositoryID, accountID uuid.UUID) (*accountEntities.RepositoryResponse, error)

func (*Controller) GetAllAccountsInRepository

func (c *Controller) GetAllAccountsInRepository(repositoryID uuid.UUID) (*[]roles.AccountRole, error)

func (*Controller) InviteUser

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

func (*Controller) List

func (c *Controller) List(accountID, companyID uuid.UUID,
	permissions []string) (repositories *[]accountEntities.RepositoryResponse, err error)

func (*Controller) RemoveUser

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

func (*Controller) Update

func (c *Controller) Update(repositoryID uuid.UUID, repositoryEntity *accountEntities.Repository,
	permissions []string) (*accountEntities.Repository, error)

func (*Controller) UpdateAccountRepository

func (c *Controller) UpdateAccountRepository(companyID uuid.UUID, accountRepository *roles.AccountRepository) error

type IController

type IController interface {
	Create(accountID uuid.UUID, repositoryEntity *accountEntities.Repository,
		permissions []string) (*accountEntities.Repository, error)
	Update(repositoryID uuid.UUID, repositoryEntity *accountEntities.Repository,
		permissions []string) (*accountEntities.Repository, error)
	Get(repositoryID, accountID uuid.UUID) (*accountEntities.RepositoryResponse, error)
	List(accountID uuid.UUID, companyID uuid.UUID,
		permissions []string) (repositories *[]accountEntities.RepositoryResponse, err error)
	CreateAccountRepository(accountRepository *roles.AccountRepository) error
	UpdateAccountRepository(companyID uuid.UUID, accountRepository *roles.AccountRepository) error
	InviteUser(inviteUser *dto.InviteUser) error
	Delete(repositoryID uuid.UUID) error
	GetAllAccountsInRepository(repositoryID uuid.UUID) (*[]roles.AccountRole, error)
	RemoveUser(removeUser *dto.RemoveUser) error
}

func NewController

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

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) Create

func (*Mock) CreateAccountRepository

func (m *Mock) CreateAccountRepository(_ *roles.AccountRepository) error

func (*Mock) Delete

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

func (*Mock) Get

func (*Mock) GetAllAccountsInRepository

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

func (*Mock) InviteUser

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

func (*Mock) List

func (m *Mock) List(_ uuid.UUID, _ uuid.UUID, _ []string) (repositories *[]accountEntities.RepositoryResponse, err error)

func (*Mock) RemoveUser

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

func (*Mock) Update

func (*Mock) UpdateAccountRepository

func (m *Mock) UpdateAccountRepository(_ uuid.UUID, _ *roles.AccountRepository) error

Jump to

Keyboard shortcuts

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