codec

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//FileTypeUnknown represents we don't now (yet)
	FileTypeUnknown    = ""
	FileTypeYAML       = "yaml"
	FileTypeTOML       = "toml"
	FileTypeHCL        = "hcl"
	FileTypeJSON       = "json"
	FileTypeXML        = "xml"
	FileTypeMsgpack    = "msgpack"
	FileTypePlist      = "plist"
	FileTypeBson       = "bson"
	FileTypePickle     = "pickle"
	FileTypeProperties = "properties"
)

Variables

This section is empty.

Functions

func CheckType

func CheckType(path string) string

DetectFileType get fileType

func Marshal

func Marshal(data interface{}, outputFileType string) ([]byte, error)

Marshal Convert struct to []byte

func Typ

func Typ(file string) string

func Unmarshal

func Unmarshal(input []byte, t string) (interface{}, error)

Types

type FileType

type FileType string

FileType represents file type FileType used in Smartling API.

type Transform

type Transform struct {
	InputType  string
	OutputType string
	io.Reader  // os.Stdin if nil
	io.Writer  // os.Stdout if nil
}

func (Transform) PipeLine

func (f Transform) PipeLine() error

func (*Transform) Setin

func (f *Transform) Setin() io.Reader

func (*Transform) Setout

func (f *Transform) Setout() io.Writer

Jump to

Keyboard shortcuts

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