task

package
v0.0.0-...-430e8a6 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(r *httprouter.Router, prefix string, l Logger, rf responseMapper.ResponseFormatter, taskRepo usecase.TaskRepo)

Handle adds task handling endpoints

Types

type Formatter

type Formatter interface {
	ClearedCompleted(count int) ([]byte, error)
	TaskID(id usecase.TaskID) ([]byte, error)
	Task(td *usecase.TaskData) ([]byte, error)
	TaskMap(ts map[usecase.TaskID]*task.Task) ([]byte, error)
	responseMapper.ResponseFormatter
}

Formatter defines the formatter interface for output responses

type Logger

type Logger interface {
	Printf(format string, v ...interface{})
}

Logger interface needed for log messages

type Parser

type Parser interface {
	AddTask(b io.Reader, uid user.ID) (*task.Task, error)
}

Parser defines the parser interface for parsing input requests

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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