repositories

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: EUPL-1.2 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOrganizationNotFound = errors.New("organization does not exist")

Functions

This section is empty.

Types

type OrganizationDBClient

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

func NewOrganizationDBClient

func NewOrganizationDBClient(ctx context.Context, log *zap.Logger, schemeDB *sqlx.DB) (*OrganizationDBClient, error)

func (*OrganizationDBClient) Create

func (s *OrganizationDBClient) Create(ctx context.Context, organization model.Organization) (*model.Organization, error)

func (*OrganizationDBClient) Delete

func (s *OrganizationDBClient) Delete(ctx context.Context, oin string) error

func (*OrganizationDBClient) Get

func (*OrganizationDBClient) GetHealthCheck

func (s *OrganizationDBClient) GetHealthCheck() healthcheck.Result

func (*OrganizationDBClient) List

func (*OrganizationDBClient) Update

func (s *OrganizationDBClient) Update(ctx context.Context, organization model.Organization, oin string) error

type OrganizationRepository

type OrganizationRepository interface {
	Create(ctx context.Context, newOrganizationSetting model.Organization) (*model.Organization, error)
	List(ctx context.Context) (*[]model.Organization, error)
	Get(ctx context.Context, id string) (*model.Organization, error)
	Update(ctx context.Context, newOrganizationSetting model.Organization, oin string) error
	Delete(ctx context.Context, oin string) error
	healthcheck.Checker
}

Jump to

Keyboard shortcuts

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