repository

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IRepository

type IRepository interface {
	Create(repository *accountEntities.Repository, transaction SQL.InterfaceWrite) error
	Update(repositoryID uuid.UUID, repository *accountEntities.Repository) (*accountEntities.Repository, error)
	Get(repositoryID uuid.UUID) (*accountEntities.Repository, error)
	List(accountID uuid.UUID, companyID uuid.UUID) (*[]accountEntities.RepositoryResponse, error)
	Delete(repositoryID uuid.UUID) error
	GetAllAccountsInRepository(repositoryID uuid.UUID) (*[]roles.AccountRole, error)
	GetByName(companyID uuid.UUID, repositoryName string) (*accountEntities.Repository, error)
	GetAccountCompanyRole(accountID, companyID uuid.UUID) (*roles.AccountCompany, error)
	ListByLdapPermissions(companyID uuid.UUID, permissions []string) (*[]accountEntities.RepositoryResponse, error)
}

func NewRepository

func NewRepository(databaseRead SQL.InterfaceRead, databaseWrite SQL.InterfaceWrite) IRepository

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) Create

func (*Mock) Delete

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

func (*Mock) Get

func (m *Mock) Get(_ uuid.UUID) (*accountEntities.Repository, error)

func (*Mock) GetAccountCompanyRole added in v1.1.0

func (m *Mock) GetAccountCompanyRole(_, _ uuid.UUID) (*roles.AccountCompany, error)

func (*Mock) GetAllAccountsInRepository

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

func (*Mock) GetByName

func (m *Mock) GetByName(_ uuid.UUID, _ string) (*accountEntities.Repository, error)

func (*Mock) List

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

func (*Mock) ListByLdapPermissions added in v1.7.0

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

func (*Mock) Update

type Repository

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

func (*Repository) Create

func (r *Repository) Create(repository *accountEntities.Repository, transaction SQL.InterfaceWrite) error

func (*Repository) Delete

func (r *Repository) Delete(repositoryID uuid.UUID) error

func (*Repository) Get

func (r *Repository) Get(repositoryID uuid.UUID) (*accountEntities.Repository, error)

func (*Repository) GetAccountCompanyRole added in v1.1.0

func (r *Repository) GetAccountCompanyRole(accountID, companyID uuid.UUID) (*roles.AccountCompany, error)

func (*Repository) GetAllAccountsInRepository

func (r *Repository) GetAllAccountsInRepository(repositoryID uuid.UUID) (*[]roles.AccountRole, error)

nolint

func (*Repository) GetByName

func (r *Repository) GetByName(companyID uuid.UUID, name string) (*accountEntities.Repository, error)

func (*Repository) List

func (r *Repository) List(accountID, companyID uuid.UUID) (*[]accountEntities.RepositoryResponse, error)

func (*Repository) ListByLdapPermissions added in v1.7.0

func (r *Repository) ListByLdapPermissions(companyID uuid.UUID,
	permissions []string) (*[]accountEntities.RepositoryResponse, error)

func (*Repository) Update

func (r *Repository) Update(repositoryID uuid.UUID, repository *accountEntities.Repository) (
	*accountEntities.Repository, error)

Jump to

Keyboard shortcuts

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