services

package
v0.0.0-...-b7effc6 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2018 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GarbanzoService

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

func NewGarbanzoService

func NewGarbanzoService(octoStore OctoStore, garbanzoStore GarbanzoStore, database persistence.Database) *GarbanzoService

func (*GarbanzoService) Create

func (s *GarbanzoService) Create(ctx context.Context, octoName string, garbanzo data.Garbanzo) (garbanzoOut data.Garbanzo, err error)

func (*GarbanzoService) DeleteByAPIUUIDAndOctoName

func (s *GarbanzoService) DeleteByAPIUUIDAndOctoName(ctx context.Context, apiUUID uuid.UUID, octoName string) error

func (*GarbanzoService) FetchByAPIUUIDAndOctoName

func (s *GarbanzoService) FetchByAPIUUIDAndOctoName(ctx context.Context, apiUUID uuid.UUID, octoName string) (data.Garbanzo, error)

func (*GarbanzoService) FetchByOctoName

func (s *GarbanzoService) FetchByOctoName(ctx context.Context, octoName string) ([]data.Garbanzo, error)

type GarbanzoStore

type GarbanzoStore interface {
	FetchByOctoName(ctx context.Context, database persistence.Database, octoName string) (garbanzos []data.Garbanzo, err error)
	FetchByAPIUUIDAndOctoName(ctx context.Context, database persistence.Database, apiUUID uuid.UUID, octoName string) (garbanzo data.Garbanzo, err error)
	Create(ctx context.Context, database persistence.Database, garbanzo data.Garbanzo) (garbanzoId int, err error)
	DeleteByAPIUUIDAndOctoName(ctx context.Context, database persistence.Database, apiUUID uuid.UUID, octoName string) (err error)
	DeleteByOctoId(ctx context.Context, database persistence.Database, octoId int) (err error)
}

type OctoService

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

func NewOctoService

func NewOctoService(octoStore OctoStore, garbanzoStore GarbanzoStore, database persistence.Database) *OctoService

func (*OctoService) Create

func (s *OctoService) Create(ctx context.Context, octo data.Octo) (data.Octo, error)

func (*OctoService) DeleteByName

func (s *OctoService) DeleteByName(ctx context.Context, name string) error

func (*OctoService) FetchAll

func (s *OctoService) FetchAll(ctx context.Context) ([]data.Octo, error)

func (*OctoService) FetchByName

func (s *OctoService) FetchByName(ctx context.Context, name string) (data.Octo, error)

type OctoStore

type OctoStore interface {
	FetchAll(ctx context.Context, database persistence.Database) (octos []data.Octo, err error)
	FetchByName(ctx context.Context, database persistence.Database, name string, selectForUpdate bool) (octo data.Octo, err error)
	Create(ctx context.Context, database persistence.Database, octo data.Octo) (octoId int, err error)
	DeleteById(ctx context.Context, database persistence.Database, id int) (err error)
}

type ValidationError

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

func NewValidationError

func NewValidationError(errors map[string][]string) ValidationError

func (ValidationError) Error

func (e ValidationError) Error() string

func (ValidationError) Errors

func (e ValidationError) Errors() map[string][]string

Jump to

Keyboard shortcuts

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