registry

package
v0.0.0-...-8c0919e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound   = errors.New("Not found")
	ErrValidation = errors.New("Input validation failed")
	ErrExpected   = errors.New("Expected error")
	ErrUnexpected = errors.New("Unexpected error")
)

Functions

This section is empty.

Types

type Repo

type Repo interface {
	Get(ctx context.Context, id uint32) (*customer.Customer, error)
	Insert(ctx context.Context, c *customer.Customer) error
	Update(ctx context.Context, c *customer.Customer) error
}

type Service

type Service interface {
	Get(ctx context.Context, id uint32) (*customer.Customer, error)
	New(ctx context.Context, i customer.Info) (*customer.Customer, error)
	UpdateInfo(ctx context.Context, id uint32, i customer.Info) (*customer.Customer, error)
	SetState(ctx context.Context, id uint32, s customer.State) error
}

func NewService

func NewService(r Repo) Service

Jump to

Keyboard shortcuts

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