ccii

package module
Version: v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2018 License: MIT Imports: 7 Imported by: 0

README

CCII is serializer/deserialzier

Build Status

I don't know exactly why did I decide to give such a weird name. Just let it go.

Installation
go get -u github.com/sirkon/ccii

or

dep ensure -add github.com/sirkon/ccii
Purpose

The main purpose is to pass parameters into protocol buffers compiler's plugins

Usage:
  • Marshal
    data, err := ccii.Marshal(obj)
    
  • Unmarshal
    err := ccii.Unmarshal(data, &dest)
    

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(input string) (string, error)

Decode совершает обратное к Encode преобразование

func Encode

func Encode(input string) string

Encode экранирует запрещённые символы в файле

func Marshal

func Marshal(obj interface{}) (string, error)

Marshal обратное преобразование

func Unmarshal

func Unmarshal(data string, dest interface{}) (err error)

Unmarshal преобразует компрессированное текстовое представление в объект

Types

type Visitor

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

Visitor для разбора структуры

func NewVisitor

func NewVisitor(obj interface{}) (*Visitor, error)

NewVisitor конструктор с объектом назначения

func (*Visitor) Visit

func (v *Visitor) Visit(tree antlr.ParseTree) interface{}

Visit ...

func (*Visitor) VisitArray

func (v *Visitor) VisitArray(ctx *parser.ArrayContext) interface{}

VisitArray ...

func (*Visitor) VisitArray_intern

func (v *Visitor) VisitArray_intern(ctx *parser.Array_internContext) interface{}

VisitArray_intern ...

func (*Visitor) VisitArray_item

func (v *Visitor) VisitArray_item(ctx *parser.Array_itemContext) interface{}

VisitArray_item ...

func (*Visitor) VisitChildren

func (v *Visitor) VisitChildren(node antlr.RuleNode) interface{}

VisitChildren ...

func (*Visitor) VisitErrorNode

func (v *Visitor) VisitErrorNode(node antlr.ErrorNode) interface{}

VisitErrorNode ...

func (*Visitor) VisitMain

func (v *Visitor) VisitMain(ctx *parser.MainContext) interface{}

VisitMain ...

func (*Visitor) VisitObject

func (v *Visitor) VisitObject(ctx *parser.ObjectContext) interface{}

VisitObject ...

func (*Visitor) VisitObject_intern

func (v *Visitor) VisitObject_intern(ctx *parser.Object_internContext) interface{}

VisitObject_intern ...

func (*Visitor) VisitObject_item

func (v *Visitor) VisitObject_item(ctx *parser.Object_itemContext) interface{}

VisitObject_item ...

func (*Visitor) VisitTerminal

func (v *Visitor) VisitTerminal(node antlr.TerminalNode) interface{}

VisitTerminal ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL