Documentation
¶
Index ¶
Constants ¶
View Source
const ( EncoderTypeJSON = "json" EncoderTypeRaw = "raw" )
Variables ¶
View Source
var ErrFieldNotFound = errors.New("field not found")
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
func NewEncoder ¶
func NewEncoder(cfg EncodingConfig) (Encoder, error)
type EncodingConfig ¶
type EncodingConfig struct {
Type string `json:"type" default:"json" options:"json|raw"`
Params json.RawMessage `json:"params"`
}
type JSONEncoder ¶
type JSONEncoder struct{}
type JSONEncoderParams ¶
type JSONEncoderParams struct{}
type RawEncoder ¶
type RawEncoder struct {
// contains filtered or unexported fields
}
type RawEncoderParams ¶
type RawEncoderParams struct {
Field string `json:"field"`
}
Click to show internal directories.
Click to hide internal directories.