counselor

package
v0.0.0-...-6b27e27 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Mux = &http.ServeMux{}
View Source
var SourceDir = os.Getenv("HOME") + "/conf"

Functions

func GetObject

func GetObject(namespace string, objectName string, targetKV ...string) interface{}

func RegisterParser

func RegisterParser(dataFormat string, parser Parser)

func RegisterParserByFunc

func RegisterParserByFunc(dataFormat string, f func(data []byte) (interface{}, error))

func SetObject

func SetObject(namespace string, objectName string, dataFormat string, content []byte)

SetObject is only intended to be used in test

func SetObjectToggle

func SetObjectToggle(namespace string, objectName string, content string)

SetObjectToggle is only intended to be used in test

func SetObjectVariant

func SetObjectVariant(namespace string, objectName string, variantName string, dataFormat string, content []byte)

SetObjectVariant is only intended to be used in test

func ShouldUse

func ShouldUse(namespace string, objectName string, targetKV ...string) bool

Types

type Parser

type Parser interface {
	Parse(data []byte) (interface{}, error)
}

Jump to

Keyboard shortcuts

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