Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JsonProcessor ¶
type JsonProcessor struct{}
JsonProcessor handles transforming Objects into JSON and vice-versa
func (*JsonProcessor) UnmarshalFile ¶
func (j *JsonProcessor) UnmarshalFile(file string) (Object, error)
UnmarshalFile will read the contents of file, unmarshal the json, and convert any encrypted data fields
type Object ¶
type Object map[string]interface{}
Object represent a structured data map with string keys
type Processor ¶
type Processor interface { Marshal(Object) (*bytes.Buffer, error) UnmarshalFile(string) (Object, error) }
Processor manages transforming objects into specific data formats
func NewJsonProcessor ¶
func NewJsonProcessor() Processor
NewJsonProcessor returns a JSON backed processor.
func NewYamlProcessor ¶
func NewYamlProcessor() Processor
NewYamlProcessor returns an instance of a YamlProcessor
type YamlProcessor ¶
type YamlProcessor struct{}
func (*YamlProcessor) Marshal ¶
func (y *YamlProcessor) Marshal(data Object) (*bytes.Buffer, error)
Marshal data string into a yaml file
func (*YamlProcessor) UnmarshalFile ¶
func (y *YamlProcessor) UnmarshalFile(file string) (Object, error)
Click to show internal directories.
Click to hide internal directories.