Versions in this module Expand all Collapse all v0 v0.9.0 May 25, 2017 Changes in this version + func GenerateGoCode(sch *tlschema.Schema, options Options) string + func IDConstName(comb *tlschema.Comb) string + type ArgCondType int + const FieldWithFlag + const NoCond + const PureFlag + type ArgRepr struct + Arg tlschema.Arg + CondArg *ArgRepr + CondBit int + CondGetterGoName string + CondSetterGoName string + CondType ArgCondType + GoName string + TLName string + TLTypeName string + TypeRepr Repr + func (ar *ArgRepr) HasField() bool + func (ar *ArgRepr) IsCond() bool + type BigIntRepr struct + func (r *BigIntRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *BigIntRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *BigIntRepr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *BigIntRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *BigIntRepr) GoImports() []string + func (r *BigIntRepr) GoType() string + func (r *BigIntRepr) InternalTypeID() string + func (r *BigIntRepr) Resolve(resolver Resolver) error + func (r *BigIntRepr) Specialize(typ tlschema.TypeExpr) Repr + type BoolRepr struct + func (r *BoolRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *BoolRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *BoolRepr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *BoolRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *BoolRepr) GoImports() []string + func (r *BoolRepr) GoType() string + func (r *BoolRepr) InternalTypeID() string + func (r *BoolRepr) Resolve(resolver Resolver) error + func (r *BoolRepr) Specialize(typ tlschema.TypeExpr) Repr + type BoxedRepr struct + Comb *tlschema.Comb + ItemRepr Repr + func (r *BoxedRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *BoxedRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *BoxedRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *BoxedRepr) GoImports() []string + func (r *BoxedRepr) GoType() string + func (r *BoxedRepr) InternalTypeID() string + func (r *BoxedRepr) Resolve(resolver Resolver) error + type BytesRepr struct + func (r *BytesRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *BytesRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *BytesRepr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *BytesRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *BytesRepr) GoImports() []string + func (r *BytesRepr) GoType() string + func (r *BytesRepr) InternalTypeID() string + func (r *BytesRepr) Resolve(resolver Resolver) error + func (r *BytesRepr) Specialize(typ tlschema.TypeExpr) Repr + type CodeGenOptions struct + SkipComments bool + SkipSwitch bool + SkipUtil bool + type Contributor interface + AppendGoDefs func(buf *bytes.Buffer, options CodeGenOptions) + GoImports func() []string + InternalTypeID func() string + Resolve func(resolver Resolver) error + type DoubleRepr struct + func (r *DoubleRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *DoubleRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *DoubleRepr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *DoubleRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *DoubleRepr) GoImports() []string + func (r *DoubleRepr) GoType() string + func (r *DoubleRepr) InternalTypeID() string + func (r *DoubleRepr) Resolve(resolver Resolver) error + func (r *DoubleRepr) Specialize(typ tlschema.TypeExpr) Repr + type GenericRepr interface + AppendSwitchCase func(buf *bytes.Buffer, indent string) + Specialize func(typ tlschema.TypeExpr) Repr + type GenericVectorRepr struct + func (r *GenericVectorRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *GenericVectorRepr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *GenericVectorRepr) GoImports() []string + func (r *GenericVectorRepr) InternalTypeID() string + func (r *GenericVectorRepr) Resolve(resolver Resolver) error + func (r *GenericVectorRepr) Specialize(typ tlschema.TypeExpr) Repr + type Int128Repr struct + func (r *Int128Repr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *Int128Repr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *Int128Repr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *Int128Repr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *Int128Repr) GoImports() []string + func (r *Int128Repr) GoType() string + func (r *Int128Repr) InternalTypeID() string + func (r *Int128Repr) Resolve(resolver Resolver) error + func (r *Int128Repr) Specialize(typ tlschema.TypeExpr) Repr + type Int256Repr struct + func (r *Int256Repr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *Int256Repr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *Int256Repr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *Int256Repr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *Int256Repr) GoImports() []string + func (r *Int256Repr) GoType() string + func (r *Int256Repr) InternalTypeID() string + func (r *Int256Repr) Resolve(resolver Resolver) error + func (r *Int256Repr) Specialize(typ tlschema.TypeExpr) Repr + type IntRepr struct + func (r *IntRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *IntRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *IntRepr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *IntRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *IntRepr) GoImports() []string + func (r *IntRepr) GoType() string + func (r *IntRepr) InternalTypeID() string + func (r *IntRepr) Resolve(resolver Resolver) error + func (r *IntRepr) Specialize(typ tlschema.TypeExpr) Repr + type LongRepr struct + func (r *LongRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *LongRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *LongRepr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *LongRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *LongRepr) GoImports() []string + func (r *LongRepr) GoType() string + func (r *LongRepr) InternalTypeID() string + func (r *LongRepr) Resolve(resolver Resolver) error + func (r *LongRepr) Specialize(typ tlschema.TypeExpr) Repr + type MultiCtorRepr struct + GoMarkerFuncName string + GoName string + Structs []*StructRepr + TLName string + func (r *MultiCtorRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *MultiCtorRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *MultiCtorRepr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *MultiCtorRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *MultiCtorRepr) GoImports() []string + func (r *MultiCtorRepr) GoType() string + func (r *MultiCtorRepr) InternalTypeID() string + func (r *MultiCtorRepr) Resolve(resolver Resolver) error + func (r *MultiCtorRepr) Specialize(typ tlschema.TypeExpr) Repr + type NatRepr struct + func (r *NatRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *NatRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *NatRepr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *NatRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *NatRepr) GoImports() []string + func (r *NatRepr) GoType() string + func (r *NatRepr) InternalTypeID() string + func (r *NatRepr) Resolve(resolver Resolver) error + func (r *NatRepr) Specialize(typ tlschema.TypeExpr) Repr + type ObjectRepr struct + func (r *ObjectRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *ObjectRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *ObjectRepr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *ObjectRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *ObjectRepr) GoImports() []string + func (r *ObjectRepr) GoType() string + func (r *ObjectRepr) InternalTypeID() string + func (r *ObjectRepr) Resolve(resolver Resolver) error + func (r *ObjectRepr) Specialize(typ tlschema.TypeExpr) Repr + type Options struct + PackageName string + SkipPrelude bool + type Repr interface + AppendReadStmt func(buf *bytes.Buffer, indent, dst string) + AppendWriteStmt func(buf *bytes.Buffer, indent, src string) + GoType func() string + type ReprMapper struct + func NewReprMapper(sch *tlschema.Schema) *ReprMapper + func (rm *ReprMapper) AddContributor(c Contributor) Contributor + func (rm *ReprMapper) AddSpecialType(name, def string, gr GenericRepr, internal bool) + func (rm *ReprMapper) AddType(typ *tlschema.Type) + func (rm *ReprMapper) AllTypeIDs() []string + func (rm *ReprMapper) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (rm *ReprMapper) Finalize() + func (rm *ReprMapper) FindComb(name string) *tlschema.Comb + func (rm *ReprMapper) GoImports() []string + func (rm *ReprMapper) ResolveTypeExpr(expr tlschema.TypeExpr, context string) Repr + func (rm *ReprMapper) Specialize(gr GenericRepr, typeExpr tlschema.TypeExpr) Repr + type Resolver interface + AddContributor func(c Contributor) Contributor + FindComb func(name string) *tlschema.Comb + ResolveTypeExpr func(expr tlschema.TypeExpr, context string) Repr + type StringRepr struct + func (r *StringRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *StringRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *StringRepr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *StringRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *StringRepr) GoImports() []string + func (r *StringRepr) GoType() string + func (r *StringRepr) InternalTypeID() string + func (r *StringRepr) Resolve(resolver Resolver) error + func (r *StringRepr) Specialize(typ tlschema.TypeExpr) Repr + type StructRepr struct + ArgReprs []*ArgRepr + Ctor *tlschema.Comb + GoMarkerFuncName string + GoName string + TLName string + func (r *StructRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *StructRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *StructRepr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *StructRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *StructRepr) GoImports() []string + func (r *StructRepr) GoType() string + func (r *StructRepr) InternalTypeID() string + func (r *StructRepr) Resolve(resolver Resolver) error + func (r *StructRepr) Specialize(typ tlschema.TypeExpr) Repr + type TrueRepr struct + func (r *TrueRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *TrueRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *TrueRepr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *TrueRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *TrueRepr) GoImports() []string + func (r *TrueRepr) GoType() string + func (r *TrueRepr) InternalTypeID() string + func (r *TrueRepr) Resolve(resolver Resolver) error + func (r *TrueRepr) Specialize(typ tlschema.TypeExpr) Repr + type UnixTimeRepr struct + func (r *UnixTimeRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *UnixTimeRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *UnixTimeRepr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *UnixTimeRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *UnixTimeRepr) GoImports() []string + func (r *UnixTimeRepr) GoType() string + func (r *UnixTimeRepr) InternalTypeID() string + func (r *UnixTimeRepr) Resolve(resolver Resolver) error + func (r *UnixTimeRepr) Specialize(typ tlschema.TypeExpr) Repr + type UnsupportedRepr struct + ErrMsg string + Name string + func (r *UnsupportedRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *UnsupportedRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *UnsupportedRepr) AppendSwitchCase(buf *bytes.Buffer, indent string) + func (r *UnsupportedRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *UnsupportedRepr) GoImports() []string + func (r *UnsupportedRepr) GoType() string + func (r *UnsupportedRepr) InternalTypeID() string + func (r *UnsupportedRepr) Resolve(resolver Resolver) error + func (r *UnsupportedRepr) Specialize(typ tlschema.TypeExpr) Repr + type VectorRepr struct + ItemRepr Repr + ItemType tlschema.TypeExpr + func (r *VectorRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions) + func (r *VectorRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string) + func (r *VectorRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string) + func (r *VectorRepr) GoImports() []string + func (r *VectorRepr) GoType() string + func (r *VectorRepr) InternalTypeID() string + func (r *VectorRepr) Resolve(resolver Resolver) error