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: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventsService

type EventsService interface {
	CreateEvent(ctx context.Context, event model.Event) (rs string, err error)
	ReadEvent(ctx context.Context, query model.Query) (rs []model.Event, err error)
	UpdateEvent(ctx context.Context, query model.Query) (rs string, err error)
	DeleteEvent(ctx context.Context, query model.Query) (rs string, err error)
}

EventsService describes the service.

func New

func New(middleware []Middleware) EventsService

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

func NewBasicEventsService

func NewBasicEventsService() EventsService

NewBasicEventsService returns a naive, stateless implementation of EventsService.

type Middleware

type Middleware func(EventsService) EventsService

Middleware describes a service middleware.

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) Middleware

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

Jump to

Keyboard shortcuts

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