Documentation
¶
Index ¶
- type ArrayType
- type Constant
- type CustomNameType
- type Decl
- type Emitter
- func (e *Emitter) Bytes() []byte
- func (e *Emitter) Comment(s string)
- func (e *Emitter) Indent(n int)
- func (e *Emitter) MaxLineLength() uint
- func (e *Emitter) Newline()
- func (e *Emitter) Print(format string, args ...interface{})
- func (e *Emitter) Println(format string, args ...interface{})
- func (e *Emitter) String() string
- type EmptyInterfaceType
- type EmptyStructType
- type File
- type Fragment
- type Import
- type MapType
- type Method
- type Named
- type NamedType
- type NullType
- type Package
- type PointerType
- type PrimitiveType
- type StructField
- type StructTag
- type StructTags
- type StructType
- type Type
- type TypeDecl
- type Var
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomNameType ¶
type CustomNameType struct {
Type string
}
func (CustomNameType) Generate ¶
func (p CustomNameType) Generate(out *Emitter)
func (CustomNameType) IsNillable ¶
func (CustomNameType) IsNillable() bool
type Emitter ¶
type Emitter struct {
// contains filtered or unexported fields
}
func NewEmitter ¶
func (*Emitter) MaxLineLength ¶
type EmptyInterfaceType ¶
type EmptyInterfaceType struct{}
func (EmptyInterfaceType) Generate ¶
func (EmptyInterfaceType) Generate(out *Emitter)
func (EmptyInterfaceType) IsNillable ¶
func (EmptyInterfaceType) IsNillable() bool
type EmptyStructType ¶
type EmptyStructType struct{}
func (EmptyStructType) Generate ¶
func (EmptyStructType) Generate(out *Emitter)
func (EmptyStructType) IsNillable ¶
func (EmptyStructType) IsNillable() bool
type Method ¶
type Method struct {
Impl func(*Emitter)
}
Method defines a method and how to generate it.
type NamedType ¶
func (NamedType) IsNillable ¶
type PointerType ¶
type PointerType struct {
Type Type
}
func (PointerType) Generate ¶
func (p PointerType) Generate(out *Emitter)
func (PointerType) IsNillable ¶
func (PointerType) IsNillable() bool
type PrimitiveType ¶
type PrimitiveType struct {
Type string
}
func (PrimitiveType) Generate ¶
func (p PrimitiveType) Generate(out *Emitter)
func (PrimitiveType) IsNillable ¶
func (PrimitiveType) IsNillable() bool
type StructField ¶
type StructField struct { Name string Type Type Comment string Tags StructTags JSONName string DefaultValue interface{} SchemaType *schemas.Type }
func (*StructField) AddTag ¶
func (f *StructField) AddTag(name, value string)
func (*StructField) Generate ¶
func (f *StructField) Generate(out *Emitter)
func (*StructField) GetName ¶
func (f *StructField) GetName() string
func (*StructField) RemoveTag ¶ added in v1.0.1
func (f *StructField) RemoveTag(name string)
type StructTags ¶
type StructTags []StructTag
func (StructTags) HasTag ¶ added in v1.0.3
func (t StructTags) HasTag(name string) bool
func (StructTags) String ¶
func (t StructTags) String() string
type StructType ¶
type StructType struct { Fields []StructField RequiredJSONFields []string }
func (*StructType) AddField ¶
func (s *StructType) AddField(f StructField)
func (*StructType) Generate ¶
func (s *StructType) Generate(out *Emitter)
func (StructType) IsNillable ¶
func (StructType) IsNillable() bool
Click to show internal directories.
Click to hide internal directories.