Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CastNumber ¶
type CastNumber struct {
Name string
}
type Converter ¶
type Converter interface { // Convert does transformations on json Convert(json gjson.Result) (gjson.Result, error) }
Converter can do things with rpc params or results
type ConverterFactory ¶
ConverterFactory returns instance of specific Converter. Each Converter requires ConverterFactory. ConverterFactory should be added to NewProvider function
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider keeps ConverterFactories
func NewProvider ¶
func NewProvider() *Provider
NewProvider returns new Provider with buildin converters
func (*Provider) Add ¶
func (p *Provider) Add(converterType string, factory ConverterFactory)
Add adds ConverterFactory to Provider
Click to show internal directories.
Click to hide internal directories.