service

package
v0.0.0-...-09b6e72 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: GPL-3.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

Middleware describes a service middleware.

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) Middleware

LoggingMiddleware takes a logger as a dependency and returns a SimpleProjectionService Middleware.

type SimpleProjectionService

type SimpleProjectionService interface {
	ProjectAll(ctx context.Context, event string, query model.Query) (rs []model.Participant, err error)
	ProjectPresent(ctx context.Context, event string, day int, query model.Query) (rs []model.Participant, err error)
	ProjectAbsent(ctx context.Context, event string, day int, query model.Query) (rs []model.Participant, err error)
}

SimpleProjectionService describes the service.

func New

func New(middleware []Middleware) SimpleProjectionService

New returns a SimpleProjectionService with all of the expected middleware wired in.

func NewBasicSimpleProjectionService

func NewBasicSimpleProjectionService() SimpleProjectionService

NewBasicSimpleProjectionService returns a naive, stateless implementation of SimpleProjectionService.

Jump to

Keyboard shortcuts

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