Documentation ¶
Index ¶
- func GenerateGoCode(sch *tlschema.Schema, options Options) string
- func IDConstName(comb *tlschema.Comb) string
- type ArgCondType
- type ArgRepr
- type BigIntRepr
- 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
- 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
- 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
- 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
- type Contributor
- type DoubleRepr
- 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
- type GenericVectorRepr
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- type Repr
- type 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
- type StringRepr
- 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
- 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
- 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
- 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
- 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
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IDConstName ¶
Types ¶
type ArgRepr ¶
type BigIntRepr ¶
type BigIntRepr struct { }
func (*BigIntRepr) AppendGoDefs ¶
func (r *BigIntRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*BigIntRepr) AppendReadStmt ¶
func (r *BigIntRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string)
func (*BigIntRepr) AppendSwitchCase ¶
func (r *BigIntRepr) AppendSwitchCase(buf *bytes.Buffer, indent string)
func (*BigIntRepr) AppendWriteStmt ¶
func (r *BigIntRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string)
func (*BigIntRepr) GoImports ¶
func (r *BigIntRepr) GoImports() []string
func (*BigIntRepr) GoType ¶
func (r *BigIntRepr) GoType() string
func (*BigIntRepr) InternalTypeID ¶
func (r *BigIntRepr) InternalTypeID() string
func (*BigIntRepr) Resolve ¶
func (r *BigIntRepr) Resolve(resolver Resolver) error
func (*BigIntRepr) Specialize ¶
func (r *BigIntRepr) Specialize(typ tlschema.TypeExpr) Repr
type BoolRepr ¶
type BoolRepr struct {
// contains filtered or unexported fields
}
func (*BoolRepr) AppendGoDefs ¶
func (r *BoolRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*BoolRepr) AppendReadStmt ¶
func (*BoolRepr) AppendSwitchCase ¶
func (*BoolRepr) AppendWriteStmt ¶
func (*BoolRepr) InternalTypeID ¶
type BoxedRepr ¶
func (*BoxedRepr) AppendGoDefs ¶
func (r *BoxedRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*BoxedRepr) AppendReadStmt ¶
func (*BoxedRepr) AppendWriteStmt ¶
func (*BoxedRepr) InternalTypeID ¶
type BytesRepr ¶
type BytesRepr struct { }
func (*BytesRepr) AppendGoDefs ¶
func (r *BytesRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*BytesRepr) AppendReadStmt ¶
func (*BytesRepr) AppendSwitchCase ¶
func (*BytesRepr) AppendWriteStmt ¶
func (*BytesRepr) InternalTypeID ¶
type CodeGenOptions ¶
type Contributor ¶
type DoubleRepr ¶
type DoubleRepr struct { }
func (*DoubleRepr) AppendGoDefs ¶
func (r *DoubleRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*DoubleRepr) AppendReadStmt ¶
func (r *DoubleRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string)
func (*DoubleRepr) AppendSwitchCase ¶
func (r *DoubleRepr) AppendSwitchCase(buf *bytes.Buffer, indent string)
func (*DoubleRepr) AppendWriteStmt ¶
func (r *DoubleRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string)
func (*DoubleRepr) GoImports ¶
func (r *DoubleRepr) GoImports() []string
func (*DoubleRepr) GoType ¶
func (r *DoubleRepr) GoType() string
func (*DoubleRepr) InternalTypeID ¶
func (r *DoubleRepr) InternalTypeID() string
func (*DoubleRepr) Resolve ¶
func (r *DoubleRepr) Resolve(resolver Resolver) error
func (*DoubleRepr) Specialize ¶
func (r *DoubleRepr) Specialize(typ tlschema.TypeExpr) Repr
type GenericRepr ¶
type GenericVectorRepr ¶
type GenericVectorRepr struct {
// contains filtered or unexported fields
}
func (*GenericVectorRepr) AppendGoDefs ¶
func (r *GenericVectorRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*GenericVectorRepr) AppendSwitchCase ¶
func (r *GenericVectorRepr) AppendSwitchCase(buf *bytes.Buffer, indent string)
func (*GenericVectorRepr) GoImports ¶
func (r *GenericVectorRepr) GoImports() []string
func (*GenericVectorRepr) InternalTypeID ¶
func (r *GenericVectorRepr) InternalTypeID() string
func (*GenericVectorRepr) Resolve ¶
func (r *GenericVectorRepr) Resolve(resolver Resolver) error
func (*GenericVectorRepr) Specialize ¶
func (r *GenericVectorRepr) Specialize(typ tlschema.TypeExpr) Repr
type Int128Repr ¶
type Int128Repr struct { }
func (*Int128Repr) AppendGoDefs ¶
func (r *Int128Repr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*Int128Repr) AppendReadStmt ¶
func (r *Int128Repr) AppendReadStmt(buf *bytes.Buffer, indent, dst string)
func (*Int128Repr) AppendSwitchCase ¶
func (r *Int128Repr) AppendSwitchCase(buf *bytes.Buffer, indent string)
func (*Int128Repr) AppendWriteStmt ¶
func (r *Int128Repr) AppendWriteStmt(buf *bytes.Buffer, indent, src string)
func (*Int128Repr) GoImports ¶
func (r *Int128Repr) GoImports() []string
func (*Int128Repr) GoType ¶
func (r *Int128Repr) GoType() string
func (*Int128Repr) InternalTypeID ¶
func (r *Int128Repr) InternalTypeID() string
func (*Int128Repr) Resolve ¶
func (r *Int128Repr) Resolve(resolver Resolver) error
func (*Int128Repr) Specialize ¶
func (r *Int128Repr) Specialize(typ tlschema.TypeExpr) Repr
type Int256Repr ¶
type Int256Repr struct { }
func (*Int256Repr) AppendGoDefs ¶
func (r *Int256Repr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*Int256Repr) AppendReadStmt ¶
func (r *Int256Repr) AppendReadStmt(buf *bytes.Buffer, indent, dst string)
func (*Int256Repr) AppendSwitchCase ¶
func (r *Int256Repr) AppendSwitchCase(buf *bytes.Buffer, indent string)
func (*Int256Repr) AppendWriteStmt ¶
func (r *Int256Repr) AppendWriteStmt(buf *bytes.Buffer, indent, src string)
func (*Int256Repr) GoImports ¶
func (r *Int256Repr) GoImports() []string
func (*Int256Repr) GoType ¶
func (r *Int256Repr) GoType() string
func (*Int256Repr) InternalTypeID ¶
func (r *Int256Repr) InternalTypeID() string
func (*Int256Repr) Resolve ¶
func (r *Int256Repr) Resolve(resolver Resolver) error
func (*Int256Repr) Specialize ¶
func (r *Int256Repr) Specialize(typ tlschema.TypeExpr) Repr
type IntRepr ¶
type IntRepr struct { }
func (*IntRepr) AppendGoDefs ¶
func (r *IntRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*IntRepr) AppendReadStmt ¶
func (*IntRepr) AppendSwitchCase ¶
func (*IntRepr) AppendWriteStmt ¶
func (*IntRepr) InternalTypeID ¶
type LongRepr ¶
type LongRepr struct { }
func (*LongRepr) AppendGoDefs ¶
func (r *LongRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*LongRepr) AppendReadStmt ¶
func (*LongRepr) AppendSwitchCase ¶
func (*LongRepr) AppendWriteStmt ¶
func (*LongRepr) InternalTypeID ¶
type MultiCtorRepr ¶
type MultiCtorRepr struct { TLName string GoName string GoMarkerFuncName string Structs []*StructRepr }
func (*MultiCtorRepr) AppendGoDefs ¶
func (r *MultiCtorRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*MultiCtorRepr) AppendReadStmt ¶
func (r *MultiCtorRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string)
func (*MultiCtorRepr) AppendSwitchCase ¶
func (r *MultiCtorRepr) AppendSwitchCase(buf *bytes.Buffer, indent string)
func (*MultiCtorRepr) AppendWriteStmt ¶
func (r *MultiCtorRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string)
func (*MultiCtorRepr) GoImports ¶
func (r *MultiCtorRepr) GoImports() []string
func (*MultiCtorRepr) GoType ¶
func (r *MultiCtorRepr) GoType() string
func (*MultiCtorRepr) InternalTypeID ¶
func (r *MultiCtorRepr) InternalTypeID() string
func (*MultiCtorRepr) Resolve ¶
func (r *MultiCtorRepr) Resolve(resolver Resolver) error
func (*MultiCtorRepr) Specialize ¶
func (r *MultiCtorRepr) Specialize(typ tlschema.TypeExpr) Repr
type NatRepr ¶
type NatRepr struct { }
func (*NatRepr) AppendGoDefs ¶
func (r *NatRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*NatRepr) AppendReadStmt ¶
func (*NatRepr) AppendSwitchCase ¶
func (*NatRepr) AppendWriteStmt ¶
func (*NatRepr) InternalTypeID ¶
type ObjectRepr ¶
type ObjectRepr struct { }
func (*ObjectRepr) AppendGoDefs ¶
func (r *ObjectRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*ObjectRepr) AppendReadStmt ¶
func (r *ObjectRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string)
func (*ObjectRepr) AppendSwitchCase ¶
func (r *ObjectRepr) AppendSwitchCase(buf *bytes.Buffer, indent string)
func (*ObjectRepr) AppendWriteStmt ¶
func (r *ObjectRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string)
func (*ObjectRepr) GoImports ¶
func (r *ObjectRepr) GoImports() []string
func (*ObjectRepr) GoType ¶
func (r *ObjectRepr) GoType() string
func (*ObjectRepr) InternalTypeID ¶
func (r *ObjectRepr) InternalTypeID() string
func (*ObjectRepr) Resolve ¶
func (r *ObjectRepr) Resolve(resolver Resolver) error
func (*ObjectRepr) Specialize ¶
func (r *ObjectRepr) Specialize(typ tlschema.TypeExpr) Repr
type ReprMapper ¶
type ReprMapper struct {
// contains filtered or unexported fields
}
func NewReprMapper ¶
func NewReprMapper(sch *tlschema.Schema) *ReprMapper
func (*ReprMapper) AddContributor ¶
func (rm *ReprMapper) AddContributor(c Contributor) Contributor
func (*ReprMapper) AddSpecialType ¶
func (rm *ReprMapper) AddSpecialType(name, def string, gr GenericRepr, internal bool)
func (*ReprMapper) AddType ¶
func (rm *ReprMapper) AddType(typ *tlschema.Type)
func (*ReprMapper) AllTypeIDs ¶
func (rm *ReprMapper) AllTypeIDs() []string
func (*ReprMapper) AppendGoDefs ¶
func (rm *ReprMapper) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*ReprMapper) Finalize ¶
func (rm *ReprMapper) Finalize()
func (*ReprMapper) GoImports ¶
func (rm *ReprMapper) GoImports() []string
func (*ReprMapper) ResolveTypeExpr ¶
func (rm *ReprMapper) ResolveTypeExpr(expr tlschema.TypeExpr, context string) Repr
func (*ReprMapper) Specialize ¶
func (rm *ReprMapper) Specialize(gr GenericRepr, typeExpr tlschema.TypeExpr) Repr
type Resolver ¶
type Resolver interface { ResolveTypeExpr(expr tlschema.TypeExpr, context string) Repr AddContributor(c Contributor) Contributor FindComb(name string) *tlschema.Comb }
type StringRepr ¶
type StringRepr struct { }
func (*StringRepr) AppendGoDefs ¶
func (r *StringRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*StringRepr) AppendReadStmt ¶
func (r *StringRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string)
func (*StringRepr) AppendSwitchCase ¶
func (r *StringRepr) AppendSwitchCase(buf *bytes.Buffer, indent string)
func (*StringRepr) AppendWriteStmt ¶
func (r *StringRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string)
func (*StringRepr) GoImports ¶
func (r *StringRepr) GoImports() []string
func (*StringRepr) GoType ¶
func (r *StringRepr) GoType() string
func (*StringRepr) InternalTypeID ¶
func (r *StringRepr) InternalTypeID() string
func (*StringRepr) Resolve ¶
func (r *StringRepr) Resolve(resolver Resolver) error
func (*StringRepr) Specialize ¶
func (r *StringRepr) Specialize(typ tlschema.TypeExpr) Repr
type StructRepr ¶
type StructRepr struct { TLName string GoName string Ctor *tlschema.Comb GoMarkerFuncName string ArgReprs []*ArgRepr }
func (*StructRepr) AppendGoDefs ¶
func (r *StructRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*StructRepr) AppendReadStmt ¶
func (r *StructRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string)
func (*StructRepr) AppendSwitchCase ¶
func (r *StructRepr) AppendSwitchCase(buf *bytes.Buffer, indent string)
func (*StructRepr) AppendWriteStmt ¶
func (r *StructRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string)
func (*StructRepr) GoImports ¶
func (r *StructRepr) GoImports() []string
func (*StructRepr) GoType ¶
func (r *StructRepr) GoType() string
func (*StructRepr) InternalTypeID ¶
func (r *StructRepr) InternalTypeID() string
func (*StructRepr) Resolve ¶
func (r *StructRepr) Resolve(resolver Resolver) error
func (*StructRepr) Specialize ¶
func (r *StructRepr) Specialize(typ tlschema.TypeExpr) Repr
type TrueRepr ¶
type TrueRepr struct {
// contains filtered or unexported fields
}
func (*TrueRepr) AppendGoDefs ¶
func (r *TrueRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*TrueRepr) AppendReadStmt ¶
func (*TrueRepr) AppendSwitchCase ¶
func (*TrueRepr) AppendWriteStmt ¶
func (*TrueRepr) InternalTypeID ¶
type UnixTimeRepr ¶
type UnixTimeRepr struct { }
func (*UnixTimeRepr) AppendGoDefs ¶
func (r *UnixTimeRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*UnixTimeRepr) AppendReadStmt ¶
func (r *UnixTimeRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string)
func (*UnixTimeRepr) AppendSwitchCase ¶
func (r *UnixTimeRepr) AppendSwitchCase(buf *bytes.Buffer, indent string)
func (*UnixTimeRepr) AppendWriteStmt ¶
func (r *UnixTimeRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string)
func (*UnixTimeRepr) GoImports ¶
func (r *UnixTimeRepr) GoImports() []string
func (*UnixTimeRepr) GoType ¶
func (r *UnixTimeRepr) GoType() string
func (*UnixTimeRepr) InternalTypeID ¶
func (r *UnixTimeRepr) InternalTypeID() string
func (*UnixTimeRepr) Resolve ¶
func (r *UnixTimeRepr) Resolve(resolver Resolver) error
func (*UnixTimeRepr) Specialize ¶
func (r *UnixTimeRepr) Specialize(typ tlschema.TypeExpr) Repr
type UnsupportedRepr ¶
func (*UnsupportedRepr) AppendGoDefs ¶
func (r *UnsupportedRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*UnsupportedRepr) AppendReadStmt ¶
func (r *UnsupportedRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string)
func (*UnsupportedRepr) AppendSwitchCase ¶
func (r *UnsupportedRepr) AppendSwitchCase(buf *bytes.Buffer, indent string)
func (*UnsupportedRepr) AppendWriteStmt ¶
func (r *UnsupportedRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string)
func (*UnsupportedRepr) GoImports ¶
func (r *UnsupportedRepr) GoImports() []string
func (*UnsupportedRepr) GoType ¶
func (r *UnsupportedRepr) GoType() string
func (*UnsupportedRepr) InternalTypeID ¶
func (r *UnsupportedRepr) InternalTypeID() string
func (*UnsupportedRepr) Resolve ¶
func (r *UnsupportedRepr) Resolve(resolver Resolver) error
func (*UnsupportedRepr) Specialize ¶
func (r *UnsupportedRepr) Specialize(typ tlschema.TypeExpr) Repr
type VectorRepr ¶
func (*VectorRepr) AppendGoDefs ¶
func (r *VectorRepr) AppendGoDefs(buf *bytes.Buffer, options CodeGenOptions)
func (*VectorRepr) AppendReadStmt ¶
func (r *VectorRepr) AppendReadStmt(buf *bytes.Buffer, indent, dst string)
func (*VectorRepr) AppendWriteStmt ¶
func (r *VectorRepr) AppendWriteStmt(buf *bytes.Buffer, indent, src string)
func (*VectorRepr) GoImports ¶
func (r *VectorRepr) GoImports() []string
func (*VectorRepr) GoType ¶
func (r *VectorRepr) GoType() string
func (*VectorRepr) InternalTypeID ¶
func (r *VectorRepr) InternalTypeID() string
func (*VectorRepr) Resolve ¶
func (r *VectorRepr) Resolve(resolver Resolver) error
Click to show internal directories.
Click to hide internal directories.