property

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2015 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List []Property

func BuildList

func BuildList(rawProperties []interface{}) (List, error)

BuildList creates a new property List from an slice of interface{}, erroring if any elements are maps with non-string keys. Slices in the property List are converted to property Lists. Maps in the property List are converted to property Maps.

type Map

type Map map[string]Property

func BuildMap

func BuildMap(rawProperties map[interface{}]interface{}) (Map, error)

BuildMap creates a new string keyed map from an interface{}-keyed map, erroring if a key is not a string

type Property

type Property interface{}

Property represents a constrained value which can be a Map, a List, or a primitive. If the property is a Map, keys must be strings and values are properties. These constraints are only enforced by the builder functions: Build, BuildMap, and BuildList.

func Build

func Build(val interface{}) (Property, error)

Build creates a generic property that may be a Map, List or primitive. If it is a Map or List it will be built using the appropriate builder and constraints.

Jump to

Keyboard shortcuts

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