classifier

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2016 License: BSD-2-Clause Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrClassifierNotFound = errors.New("Classifier key not found")

ErrClassifierNotFound is returned if the requested classifier was not found in the classifier registry

View Source
var Registry = make(map[string]provider)

Registry provides a global registry for all classifiers

Functions

func Register

func Register(key string, p provider) error

Register registers a new classifier to the registry

Types

type Classifier

type Classifier struct {
	// Classifier key
	Key string `json:"key"`

	// Classifier value
	Value string `json:"value"`
}

Classifier type contains a key/value pair repsenting a classifier

func Get

func Get(key string) (*Classifier, error)

Get retrieves a classifier from the registry by looking up its key

Jump to

Keyboard shortcuts

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