Versions in this module Expand all Collapse all v0 v0.2.7 Aug 24, 2021 Changes in this version + var ErrNotImplMessage = errors.New("The proto.Message interface is not implemented") + var ErrNotJSON = errors.New("Not json data") + var ErrNotXML = errors.New("Not xml data") + var ErrNotYAML = errors.New("Not yaml data") + var ErrUnsupported = errors.New("Encode:Unsupported type") + func Encode(in interface{}, a Adder) error + func XMLValid(b []byte) bool + func YAMLValid(b []byte) bool + type Adder interface + Add func(key string, v reflect.Value, sf reflect.StructField) error + Name func() string + type BodyEncode struct + func NewBodyEncode(obj interface{}) *BodyEncode + func (b *BodyEncode) Encode(w io.Writer) error + func (b *BodyEncode) Name() string + type Encoder interface + Encode func(w io.Writer) error + Name func() string + type FormEncode struct + func NewFormEncode(b *bytes.Buffer) *FormEncode + func (f *FormEncode) Add(key string, v reflect.Value, sf reflect.StructField) (err error) + func (f *FormEncode) CreateFormFile(fieldName, fileName, contentType string) (io.Writer, error) + func (f *FormEncode) End() error + func (f *FormEncode) Name() string + type HeaderEncode struct + func NewHeaderEncode(req *http.Request) *HeaderEncode + func (h *HeaderEncode) Add(key string, v reflect.Value, sf reflect.StructField) error + func (h *HeaderEncode) Name() string + type JSONEncode struct + func NewJSONEncode(obj interface{}) *JSONEncode + func (j *JSONEncode) Encode(w io.Writer) (err error) + func (j *JSONEncode) Name() string + type ProtoBufEncode struct + func NewProtoBufEncode(obj interface{}) *ProtoBufEncode + func (p *ProtoBufEncode) Encode(w io.Writer) (err error) + func (p *ProtoBufEncode) Name() string + type QueryEncode struct + func NewQueryEncode(req *http.Request, s setting.Setting) *QueryEncode + func (q *QueryEncode) Add(key string, v reflect.Value, sf reflect.StructField) error + func (q *QueryEncode) End() string + func (q *QueryEncode) Name() string + type WWWFormEncode struct + func NewWWWFormEncode(s setting.Setting) *WWWFormEncode + func (we *WWWFormEncode) Add(key string, v reflect.Value, sf reflect.StructField) error + func (we *WWWFormEncode) Encode(obj interface{}) (err error) + func (we *WWWFormEncode) End(w io.Writer) error + func (we *WWWFormEncode) Name() string + type XMLEncode struct + func NewXMLEncode(obj interface{}) *XMLEncode + func (x *XMLEncode) Encode(w io.Writer) (err error) + func (x *XMLEncode) Name() string + type YAMLEncode struct + func NewYAMLEncode(obj interface{}) *YAMLEncode + func (y *YAMLEncode) Encode(w io.Writer) (err error) + func (y *YAMLEncode) Name() string