package
0.0.0-20170519234939-acf47f6e7dd7
Repository: https://github.com/ayiga/go-kit-middlewarer.git
Documentation: pkg.go.dev
# Functions
Default returns the default RequestResponseEncoding.
Get will retrieve the encoding registered with the mime-type.
GetErrorInstance will use reflection to attempt and instanciate a new error of the given type string.
GobGenerateDecoder returns a GOB Decoder.
GobGenerateEncoder returns a GOB Encoder.
JSONGenerateDecoder returns a JSON Decoder.
JSONGenerateEncoder returns a JSON Encoder.
MakeErrorEncoder will take a generic GenerateEncoder function and will return an ErrorEncoder.
MakeRequestDecoder exists to help bridge the gaps for encoding.
MakeRequestEncoder takes a GenerateEncoder and returns an httptransport.EncodeRequestFunc.
MakeResponseDecoder exists to help bridge the gaps for encoding.
MakeResponseEncoder takes a GenerateEncoder and returns an httpstransport.EncodeResponseFunc.
Register will register the associated encoding with the given mime type.
RegisterError will attempt to register the given Error with the encoders / decoders and will make it available for Decoding errors for the encoders / decoders.
No description provided by the author
XMLGenerateDecoder returns an XML Decoder.
XMLGenerateEncoder returns an XML Encoder.
# Constants
No description provided by the author
ErrAlreadyRegistered represents an mime type that has already been registered.
ErrMimeNotFound represents a mime type with no associated encoding.
ErrMimeNotSpecified rerpesents that no information has been specified in order to determine the Mime-type.
ErrNoRegistrationsExist represents that nothing has been registered with this Encoder / Decoder.
ErrNotImplemented represents that the functionality of this method is not implemented.
ErrUnableToDetermineMime represents an error that indicates that the attempt to automatically detect the mime type has failed.
ErrUnknown represents a non-error.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
# Interfaces
Decoder is any type that can populate a given structure via a Decode method.
EmbededMime applies to the intermediary transmission representation of method arguments and results.
Encoder is anything that, given an interface, can store an encoding of the structure passed into Encode.
RequestResponseEncoding represents a type that can be used to automatically Encode and Decode on HTTP requests used by files generated with go-kit-middlewarer.
# Type aliases
Err are the errors that can be returned from Register or Get.
GenerateDecoder is a function that takes an io.Reader and returns a Decoder.
GenerateEncoder is a function which takes an io.Writer, and returns an Encoder.
Gob is a simple Gob encoder / decoder that conforms to RequestResponseEncoding.
JSON is a simple JSON encoder / decoder that conforms to RequestResponseEncoding.
XML is a simple XML encoder / decoder that conforms to RequestResponseEncoding.