repositories

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: EUPL-1.2 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLegalizationNotFound = errors.New("legalization does not exist")

Functions

This section is empty.

Types

type LegalizationRepository

type LegalizationRepository interface {
	CreateLegalization(ctx context.Context, newLegalization model.Legalization) (*model.Legalization, error)
	ListLegalization(ctx context.Context) []model.Legalization
	GetLegalization(ctx context.Context, legalizationToken string) (*model.Legalization, error)
	UpdateLegalization(ctx context.Context, newLegalization model.Legalization, legalizationToken string) (*model.Legalization, error)
	DeleteLegalization(ctx context.Context, legalizationToken string) error
	healthcheck.Checker
}

type LegalizationStore

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

func NewLegalizationStore

func NewLegalizationStore(ctx context.Context, log *zap.Logger) *LegalizationStore

func (*LegalizationStore) CreateLegalization

func (s *LegalizationStore) CreateLegalization(ctx context.Context, newLegalization model.Legalization) (*model.Legalization, error)

func (*LegalizationStore) DeleteLegalization

func (s *LegalizationStore) DeleteLegalization(ctx context.Context, legalizationToken string) error

func (*LegalizationStore) GetHealthCheck

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

func (*LegalizationStore) GetLegalization

func (s *LegalizationStore) GetLegalization(ctx context.Context, legalizationToken string) (*model.Legalization, error)

func (*LegalizationStore) ListLegalization

func (s *LegalizationStore) ListLegalization(ctx context.Context) []model.Legalization

func (*LegalizationStore) UpdateLegalization

func (s *LegalizationStore) UpdateLegalization(ctx context.Context, newLegalization model.Legalization, legalizationToken string) (*model.Legalization, error)

Jump to

Keyboard shortcuts

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