pool

package
v0.0.0-...-d378361 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2017 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	LabelAddToTask      = Action("LabelAddToTask")
	LabelsAllOnTask     = Action("LabelsAllOnTask")
	LabelDeleteFromTask = Action("LabelDeleteFromTask")
)
View Source
const (
	ProjectCreate     = Action("ProjectCreate")
	ProjectsAll       = Action("ProjectsAll")
	ProjectFindById   = Action("ProjectFindById")
	ProjectAllUsers   = Action("ProjectAllUsers")
	ProjectAllTasks   = Action("ProjectAllTasks")
	ProjectAddUser    = Action("ProjectAddUser")
	ProjectDeleteUser = Action("ProjectDeleteUser")
)
View Source
const (
	TaskCreate        = Action("TaskCreate")
	TasksAllOnProject = Action("TasksAllOnProject")
	TaskFindById      = Action("TaskFindById")
)
View Source
const (
	UserCreate      = Action("UserCreate")
	UserExists      = Action("UserExists")
	UserAuthorized  = Action("UserAuthorized")
	UserFindById    = Action("UserFindById")
	UserFindByEmail = Action("UserFindByEmail")
	UsersAll        = Action("UsersAll")
	UserAllProjects = Action("UserAllProjects")
)

Variables

This section is empty.

Functions

func Dispatch

func Dispatch(action Action, input interface{}) (interface{}, error)

Creates job with given action and input and returns result.

Types

type Action

type Action string

func (Action) HasPrefix

func (a Action) HasPrefix(prefix string) bool

Returns true if action has prefix "prefix"

type ResolverFunc

type ResolverFunc func(action Action) (service ServiceFunc, err error)

Function that takes action and returns service function

type ServiceFunc

type ServiceFunc func(source db.DataSource, data interface{}) (result interface{}, err error)

Function to be passed to workers pool

Jump to

Keyboard shortcuts

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