Documentation
¶
Index ¶
- type ArrayItem
- type NumberPoint
- type Point
- type Serializer
- func (s *Serializer) Add(name string, item interface{}, variablePath ...string) error
- func (s *Serializer) Serialize(name string, parameters ...interface{}) (string, error)
- func (s *Serializer) SerializeArray(items ...*ArrayItem) (string, error)
- func (s *Serializer) SerializeGeneric(item interface{}) (string, error)
- func (s *Serializer) SerializeGenericArray(items ...interface{}) (string, error)
- type TextPoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayItem ¶ added in v1.2.0
type ArrayItem struct {
Name string
Parameters []interface{}
}
ArrayItem - a configuration to render a json
type NumberPoint ¶ added in v1.3.0
NumberPoint - a point with number type value
type Point ¶ added in v1.3.0
type Point struct {
Metric string `json:"metric"`
Tags map[string]string `json:"tags"`
Timestamp int64 `json:"timestamp"`
}
Point - the base point
type Serializer ¶
type Serializer struct {
serializer.Serializer
// contains filtered or unexported fields
}
Serializer - the json serializer
func (*Serializer) Add ¶
func (s *Serializer) Add(name string, item interface{}, variablePath ...string) error
Add - adds a new JSON mapping
func (*Serializer) Serialize ¶
func (s *Serializer) Serialize(name string, parameters ...interface{}) (string, error)
Serialize - serializes a mapped JSON
func (*Serializer) SerializeArray ¶
func (s *Serializer) SerializeArray(items ...*ArrayItem) (string, error)
SerializeArray - serializes an array of jsons
func (*Serializer) SerializeGeneric ¶ added in v1.2.1
func (s *Serializer) SerializeGeneric(item interface{}) (string, error)
SerializeGeneric - serializes with the correct cast based on the struct ArrayItem
func (*Serializer) SerializeGenericArray ¶ added in v1.2.1
func (s *Serializer) SerializeGenericArray(items ...interface{}) (string, error)
SerializeGenericArray - serializes with the correct cast based on the struct ArrayItem
Click to show internal directories.
Click to hide internal directories.