config

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceUnknown = ""
	SourceZBar    = "zbar"
)

Type of sources

View Source
const (
	HTTPUnknown = HTTPMethod("")
	HTTPGET     = HTTPMethod("GET")
	HTTPPOST    = HTTPMethod("POST")
)

Pre defined of the http methods

Variables

View Source
var (
	ErrUnknownOutput   = errors.New("Config error: unknown type output")
	ErrUnknownSource   = errors.New("Config error: unknown source")
	ErrUnknownLocation = errors.New("Config error: unknown location zbarcam")

	ErrUnknownHTTPMethod = errors.New("Config error: unknown http method")
	ErrUnknownHTTPUrl    = errors.New("Config error: unknown http url")
	ErrEmptyHTTPKeyHdr   = errors.New("Config error: empty apikey but use request header authorization")
)

Errors for config

Functions

This section is empty.

Types

type Config

type Config struct {
	Source string
	Output string
	Once   bool
	ZBar   *zbarconfig
	HTTP   *http
}

A Config it setting of application from .zbarnet.json

func MustConfig

func MustConfig(path string) *Config

MustConfig Load from file "path" in buffer []byte

type HTTPMethod

type HTTPMethod string

A HTTPMethod type request on server

Jump to

Keyboard shortcuts

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