text

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2016 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ContentType the custom key for the serializer, when used inside iris, Q web frameworks or simply net/http
	ContentType = "text/plain"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct{}

Config is the configuration for this serializer, it's empty

type Serializer

type Serializer struct {
	// contains filtered or unexported fields
}

Serializer the text serializer

func New

func New(cfg ...Config) *Serializer

New returns a new text serializer

func (*Serializer) Serialize

func (e *Serializer) Serialize(val interface{}, options ...map[string]interface{}) ([]byte, error)

Serialize accepts the 'object' value and converts it to bytes in order to be 'renderable' implements the go-serializer.Serializer interface

Jump to

Keyboard shortcuts

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