codex

package
v0.0.0-...-33d5fe2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coder

type Coder struct {
	MaxBody int64 // максимально допустимый размер запроса
}

Coder поддерживает декодирование запроса и отсылку ответа в форматах JSON, CBOR, MsgPack и Binc.

func NewCoder

func NewCoder(maxSize int64) *Coder

NewCoder возвращает новый инициализированный Coder, поддерживающий формат JSON, CBOR, MsgPack и Binc.

func (Coder) Bind

func (cdx Coder) Bind(c *rest.Context, obj interface{}) error

func (Coder) Encode

func (Coder) Encode(c *rest.Context, obj interface{}) error

Encode кодирует и отправляет ответ с содержимым obj в формате JSON.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL