mirror of
https://github.com/go-micro/go-micro.git
synced 2024-11-24 08:02:32 +02:00
13 lines
417 B
Go
13 lines
417 B
Go
package codec
|
|
|
|
// Codec used to encode and decode request/responses
|
|
type Codec interface {
|
|
// Marshal returns the wire format of v.
|
|
Marshal(v interface{}) ([]byte, error)
|
|
// Unmarshal parses the wire format into v.
|
|
Unmarshal(data []byte, v interface{}) error
|
|
// String returns the name of the Codec implementation. The returned
|
|
// string will be used as part of content type in transmission.
|
|
String() string
|
|
}
|