package encoding
import "github.com/mesos/mesos-go/api/v1/lib/encoding"
Index ¶
- type Codec
- type Decoder
- type DecoderFunc
- type Encoder
- type EncoderFunc
- type Marshaler
- type MediaType
- type Sink
- type SinkFactory
- type SinkFactoryFunc
- type Source
- type SourceFactory
- type SourceFactoryFunc
- type Unmarshaler
Types ¶
type Codec ¶
type Codec struct { Name string Type MediaType NewEncoder func(Sink) Encoder NewDecoder func(Source) Decoder }
A Codec composes encoding and decoding of a serialization format.
func (*Codec) String ¶
String implements the fmt.Stringer interface.
type Decoder ¶
type Decoder interface { Decode(Unmarshaler) error }
A Decoder decodes a given Unmarshaler or returns an error in case of failure.
type DecoderFunc ¶
type DecoderFunc func(Unmarshaler) error
DecoderFunc is the functional adapter for Decoder
func (DecoderFunc) Decode ¶
func (f DecoderFunc) Decode(u Unmarshaler) error
Decode implements the Decoder interface
type Encoder ¶
An Encoder encodes a given Marshaler or returns an error in case of failure.
type EncoderFunc ¶
EncoderFunc is the functional adapter for Encoder
func (EncoderFunc) Encode ¶
func (f EncoderFunc) Encode(m Marshaler) error
Encode implements the Encoder interface
type Marshaler ¶
Marshaler composes the supported marshaling formats.
type MediaType ¶
type MediaType string
func (MediaType) ContentType ¶
ContentType returns the HTTP Content-Type associated with the MediaType
type Sink ¶
func SinkWriter ¶
SinkWriter returns a Sink that sends a frame to an io.Writer with no decoration.
type SinkFactory ¶
type SinkFactoryFunc ¶
func (SinkFactoryFunc) NewSink ¶
func (f SinkFactoryFunc) NewSink(w io.Writer) Sink
type Source ¶
func SourceReader ¶
SourceReader returns a Source that buffers all input from the given io.Reader and returns the contents in a single frame.
type SourceFactory ¶
type SourceFactoryFunc ¶
func (SourceFactoryFunc) NewSource ¶
func (f SourceFactoryFunc) NewSource(r io.Reader) Source
type Unmarshaler ¶
type Unmarshaler interface { pb.Unmarshaler json.Unmarshaler }
Unmarshaler composes the supporter unmarshaling formats.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
api/v1/lib/encoding/codecs | |
api/v1/lib/encoding/framing | |
api/v1/lib/encoding/json | |
api/v1/lib/encoding/proto | Package proto implements protobuf utilities such as functional options to construct complex structs and encoders and decoders composable with io.ReadWriters. |
- Version
- v0.0.11 (latest)
- Published
- May 15, 2020
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 1 hour ago –
Tools for package owners.