service

package
v0.0.0-...-4aec9fb Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware func(TaskService) TaskService

Middleware describes a service middleware.

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) Middleware

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

type TaskService

type TaskService interface {
	// Add your methods here
	// e.x: Foo(ctx context.Context,s string)(rs string, err error)
	GetTasksByID(ctx context.Context, id string, state string) (status bool, errinfo string, data []model.Task)
}

TaskService describes the service.

func New

func New(middleware []Middleware) TaskService

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

func NewBasicTaskService

func NewBasicTaskService() TaskService

NewBasicTaskService returns a naive, stateless implementation of TaskService.

Jump to

Keyboard shortcuts

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