Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTMLEncoder ¶
type HTMLEncoder struct {
// contains filtered or unexported fields
}
func NewHTMLEncoder ¶
func NewHTMLEncoder(tmpl *template.Template, name string) *HTMLEncoder
type JSONCodec ¶
type JSONCodec struct {
// contains filtered or unexported fields
}
func NewJSONCodec ¶
type ProtobufCodec ¶
type ProtobufCodec struct {
}
type MsgpackCodec struct {
w io.Writer
h codec.Handle
}
func NewMsgpackCodec() *MsgpackCodec {
return &MsgpackCodec{
w: ioutil.Discard,
h: new(codec.MsgpackHandle),
}
}
func (c *MsgpackCodec) Encode(w io.Writer, v interface{}) error {
// TODO encoder pool
return codec.NewEncoder(w, c.h).Encode(v)
}
func (c *MsgpackCodec) Decode(r io.Reader, v interface{}) error {
// TODO decoder pool
return codec.NewDecoder(r, c.h).Decode(v)
}
type StringCodec ¶
type StringCodec struct {
// contains filtered or unexported fields
}
func NewStringCodec ¶
func NewStringCodec(opts ...Option) *StringCodec
type XMLCodec ¶
type XMLCodec struct {
}
func NewPBCodec ¶
func NewPBCodec() *XMLCodec
func NewXMLCodec ¶
Click to show internal directories.
Click to hide internal directories.