golang

package
v0.0.0-...-4e0bad1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2016 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ArrayTemps *template.Template
)
View Source
var (
	BoolTemps *template.Template
)
View Source
var (
	ByteTemps *template.Template
)
View Source
var (
	FloatTemps *template.Template
)
View Source
var (
	IntTemps *template.Template
)
View Source
var (
	PointerTemps *template.Template
)
View Source
var (
	SliceTemps *template.Template
)
View Source
var (
	StringTemps *template.Template
)
View Source
var (
	StructTemps *template.Template
)
View Source
var (
	TimeTemps *template.Template
)
View Source
var (
	UnionTemps *template.Template
)

Functions

This section is empty.

Types

type ArrayTemp

type ArrayTemp struct {
	*schema.ArrayType
	W           *Walker
	SubOffset   int
	Target      string
	SubTypeCode string
	SubField    string
}

type BoolTemp

type BoolTemp struct {
	*schema.BoolType
	W      *Walker
	Target string
}

type ByteTemp

type ByteTemp struct {
	*schema.ByteType
	W      *Walker
	Target string
}

type FloatTemp

type FloatTemp struct {
	*schema.FloatType
	W      *Walker
	Target string
}

type GolangBackend

type GolangBackend struct {
	Package string
	Unsafe  bool
}

func (*GolangBackend) Flags

func (gb *GolangBackend) Flags() *flag.FlagSet

func (*GolangBackend) Generate

func (gb *GolangBackend) Generate(s *schema.Schema) (string, error)

func (*GolangBackend) GeneratedFilename

func (gb *GolangBackend) GeneratedFilename(filename string) string

type IntTemp

type IntTemp struct {
	*schema.IntType
	W      *Walker
	Target string
}

type PointerTemp

type PointerTemp struct {
	*schema.PointerType
	W           *Walker
	SubOffset   int
	Target      string
	SubTypeCode string
	SubField    string
}

type SliceTemp

type SliceTemp struct {
	*schema.SliceType
	SubOffset   int
	Target      string
	SubTypeCode string
	SubField    string
	VarIntCode  string
}

type StringBuilder

type StringBuilder []string

func (*StringBuilder) AddTemplate

func (sb *StringBuilder) AddTemplate(t *template.Template, name string, data interface{}) error

func (*StringBuilder) Append

func (sb *StringBuilder) Append(s string)

func (*StringBuilder) Join

func (sb *StringBuilder) Join(s *StringBuilder)

func (*StringBuilder) String

func (sb *StringBuilder) String() string

type StringTemp

type StringTemp struct {
	*schema.StringType
	W          *Walker
	Target     string
	VarIntCode string
}

type StructTemp

type StructTemp struct {
	*schema.StructType
	W      *Walker
	Target string
}

type TimeTemp

type TimeTemp struct {
	*schema.TimeType
	W      *Walker
	Target string
}

type UnionTemp

type UnionTemp struct {
	*schema.UnionType
	Target        string
	VarIntCode    string
	SubTypeCode   []string
	SubTypeField  []string
	SubTypeOffset []int
}

type Walker

type Walker struct {
	Needs     []string
	Offset    int
	IAdjusted bool
	Unsafe    bool
}

func (*Walker) WalkArrayDef

func (w *Walker) WalkArrayDef(at *schema.ArrayType) (parts *StringBuilder, err error)

func (*Walker) WalkArrayMarshal

func (w *Walker) WalkArrayMarshal(at *schema.ArrayType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkArraySize

func (w *Walker) WalkArraySize(at *schema.ArrayType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkArrayUnmarshal

func (w *Walker) WalkArrayUnmarshal(at *schema.ArrayType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkBoolDef

func (w *Walker) WalkBoolDef(bt *schema.BoolType) (parts *StringBuilder, err error)

func (*Walker) WalkBoolMarshal

func (w *Walker) WalkBoolMarshal(bt *schema.BoolType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkBoolSize

func (w *Walker) WalkBoolSize(bt *schema.BoolType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkBoolUnmarshal

func (w *Walker) WalkBoolUnmarshal(bt *schema.BoolType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkByteDef

func (w *Walker) WalkByteDef(bt *schema.ByteType) (parts *StringBuilder, err error)

func (*Walker) WalkByteMarshal

func (w *Walker) WalkByteMarshal(bt *schema.ByteType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkByteSize

func (w *Walker) WalkByteSize(bt *schema.ByteType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkByteUnmarshal

func (w *Walker) WalkByteUnmarshal(bt *schema.ByteType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkDeferDef

func (w *Walker) WalkDeferDef(dt *schema.DeferType) (parts *StringBuilder, err error)

func (*Walker) WalkDeferMarshal

func (w *Walker) WalkDeferMarshal(dt *schema.DeferType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkDeferSize

func (w *Walker) WalkDeferSize(dt *schema.DeferType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkDeferUnmarshal

func (w *Walker) WalkDeferUnmarshal(dt *schema.DeferType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkFieldDef

func (w *Walker) WalkFieldDef(s *schema.Field) (parts *StringBuilder, err error)

func (*Walker) WalkFieldMarshal

func (w *Walker) WalkFieldMarshal(s *schema.Field) (parts *StringBuilder, err error)

func (*Walker) WalkFieldSize

func (w *Walker) WalkFieldSize(s *schema.Field) (parts *StringBuilder, err error)

func (*Walker) WalkFieldUnmarshal

func (w *Walker) WalkFieldUnmarshal(s *schema.Field) (parts *StringBuilder, err error)

func (*Walker) WalkFloatDef

func (w *Walker) WalkFloatDef(ft *schema.FloatType) (parts *StringBuilder, err error)

func (*Walker) WalkFloatMarshal

func (w *Walker) WalkFloatMarshal(ft *schema.FloatType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkFloatSize

func (w *Walker) WalkFloatSize(ft *schema.FloatType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkFloatUnmarshal

func (w *Walker) WalkFloatUnmarshal(ft *schema.FloatType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkIntDef

func (w *Walker) WalkIntDef(it *schema.IntType) (parts *StringBuilder, err error)

func (*Walker) WalkIntMarshal

func (w *Walker) WalkIntMarshal(it *schema.IntType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkIntSize

func (w *Walker) WalkIntSize(it *schema.IntType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkIntUnmarshal

func (w *Walker) WalkIntUnmarshal(it *schema.IntType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkPointerDef

func (w *Walker) WalkPointerDef(pt *schema.PointerType) (parts *StringBuilder, err error)

func (*Walker) WalkPointerMarshal

func (w *Walker) WalkPointerMarshal(pt *schema.PointerType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkPointerSize

func (w *Walker) WalkPointerSize(pt *schema.PointerType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkPointerUnmarshal

func (w *Walker) WalkPointerUnmarshal(pt *schema.PointerType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkSchema

func (w *Walker) WalkSchema(s *schema.Schema, Package string) (parts *StringBuilder, err error)

func (*Walker) WalkSliceDef

func (w *Walker) WalkSliceDef(st *schema.SliceType) (parts *StringBuilder, err error)

func (*Walker) WalkSliceMarshal

func (w *Walker) WalkSliceMarshal(st *schema.SliceType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkSliceSize

func (w *Walker) WalkSliceSize(st *schema.SliceType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkSliceUnmarshal

func (w *Walker) WalkSliceUnmarshal(st *schema.SliceType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkStringDef

func (w *Walker) WalkStringDef(st *schema.StringType) (parts *StringBuilder, err error)

func (*Walker) WalkStringMarshal

func (w *Walker) WalkStringMarshal(st *schema.StringType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkStringSize

func (w *Walker) WalkStringSize(st *schema.StringType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkStringUnmarshal

func (w *Walker) WalkStringUnmarshal(st *schema.StringType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkStruct

func (w *Walker) WalkStruct(s *schema.Struct) (parts *StringBuilder, err error)

func (*Walker) WalkStructDef

func (w *Walker) WalkStructDef(st *schema.StructType) (parts *StringBuilder, err error)

func (*Walker) WalkStructMarshal

func (w *Walker) WalkStructMarshal(st *schema.StructType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkStructSize

func (w *Walker) WalkStructSize(st *schema.StructType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkStructUnmarshal

func (w *Walker) WalkStructUnmarshal(st *schema.StructType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkTimeDef

func (w *Walker) WalkTimeDef(tt *schema.TimeType) (parts *StringBuilder, err error)

func (*Walker) WalkTimeMarshal

func (w *Walker) WalkTimeMarshal(tt *schema.TimeType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkTimeSize

func (w *Walker) WalkTimeSize(tt *schema.TimeType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkTimeUnmarshal

func (w *Walker) WalkTimeUnmarshal(tt *schema.TimeType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkTypeDef

func (w *Walker) WalkTypeDef(t schema.Type) (*StringBuilder, error)

func (*Walker) WalkTypeMarshal

func (w *Walker) WalkTypeMarshal(t schema.Type, target string) (*StringBuilder, error)

func (*Walker) WalkTypeSize

func (w *Walker) WalkTypeSize(t schema.Type, target string) (*StringBuilder, error)

func (*Walker) WalkTypeUnmarshal

func (w *Walker) WalkTypeUnmarshal(t schema.Type, target string) (*StringBuilder, error)

func (*Walker) WalkUnionDef

func (w *Walker) WalkUnionDef(ut *schema.UnionType) (parts *StringBuilder, err error)

func (*Walker) WalkUnionMarshal

func (w *Walker) WalkUnionMarshal(ut *schema.UnionType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkUnionSize

func (w *Walker) WalkUnionSize(ut *schema.UnionType, target string) (parts *StringBuilder, err error)

func (*Walker) WalkUnionUnmarshal

func (w *Walker) WalkUnionUnmarshal(ut *schema.UnionType, target string) (parts *StringBuilder, err error)

Jump to

Keyboard shortcuts

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