Documentation ¶
Overview ¶
+build !windows
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStandardPaths ¶
func GetStandardPaths() []string
Types ¶
type Configuration ¶
type Configuration struct { Identifier string Loaders map[Loader]filterable Serializers map[Serializer]SerializerFactory }
func Load ¶
func Load(identifier string, dest interface{}) (*Configuration, error)
func NewConfiguration ¶
func NewConfiguration(identifier string) *Configuration
func (*Configuration) Reload ¶
func (this *Configuration) Reload(dest interface{}) error
func (*Configuration) Watch ¶
func (this *Configuration) Watch(dest interface{}, channel chan interface{}) error
type FileLoader ¶
type FileLoader struct {
// contains filtered or unexported fields
}
func (FileLoader) Locate ¶
func (this FileLoader) Locate() (string, error)
func (FileLoader) Watch ¶
func (this FileLoader) Watch(channel chan bool) error
type Serializer ¶
type Serializer interface { Serialize(interface{}) ([]byte, error) Deserialize([]byte, interface{}) error }
NOTE: It may make more sense to use a map to these instead of creating potentially unnecessray structs for implementing interfaces on.
func NewSerializer ¶
func NewSerializer(identifier string, content []byte) (serializer Serializer, err error)
func NewXMLSerializer ¶
func NewXMLSerializer() Serializer
func NewYAMLSerializer ¶
func NewYAMLSerializer() Serializer
type SerializerFactory ¶
type SerializerFactory func() Serializer
type XMLSerializer ¶
type XMLSerializer struct{}
func (XMLSerializer) Deserialize ¶
func (this XMLSerializer) Deserialize(input []byte, obj interface{}) error
func (XMLSerializer) Serialize ¶
func (this XMLSerializer) Serialize(input interface{}) ([]byte, error)
type YAMLSerializer ¶
type YAMLSerializer struct{}
func (YAMLSerializer) Deserialize ¶
func (this YAMLSerializer) Deserialize(input []byte, obj interface{}) error
func (YAMLSerializer) Serialize ¶
func (this YAMLSerializer) Serialize(input interface{}) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.