Documentation ¶
Index ¶
- func Generate(src []byte, opt Options) ([]byte, error)
- func GeneratePkg(pkgPatterns []string, opt Options) ([]byte, error)
- type AliasType
- type CodingStrategy
- type Col
- type Embedding
- type Facet
- type File
- type Logger
- type Name
- type NullWrapping
- type Options
- type PtrType
- type PtrWrapping
- type Struct
- type Type
- type UnknownType
- type UnsupportedType
- type WellKnownPrimitive
- type WellKnownStruct
- type WrappedExpr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CodingStrategy ¶
type CodingStrategy interface {
// contains filtered or unexported methods
}
type Col ¶
type Col struct { IndexInStruct int DBNameConst string DBName string FieldName string Facets []*Facet Type Type TempVarName string CodingStg CodingStrategy ReadOnly bool ExcludeFromAll bool Nullable bool NullableStrategy CodingStrategy Immutable bool InsertDefault bool }
func (*Col) IncludedInFacet ¶
type NullWrapping ¶
type NullWrapping struct { Type Type ValueType Type ValidField string ValueField string Next CodingStrategy }
type PtrType ¶
type PtrType struct {
To Type
}
func (PtrType) MakeZeroValue ¶
func (PtrType) MakeZeroValueCheck ¶
type PtrWrapping ¶ added in v0.1.1
type PtrWrapping struct { Type Type Next CodingStrategy }
type Struct ¶
type Struct struct { Persistent bool IsValue bool Skipped bool Name Name File *File TableName string TableNameConst string SingularIdent string PluralIdent string Cols []*Col Embeddings []*Embedding Facets []*Facet // contains filtered or unexported fields }
func (*Struct) MakeZeroValue ¶
func (*Struct) MakeZeroValueCheck ¶
type UnknownType ¶
type UnknownType Name
func (UnknownType) MakeZeroValue ¶
func (t UnknownType) MakeZeroValue(imp importer) string
func (UnknownType) MakeZeroValueCheck ¶
func (t UnknownType) MakeZeroValueCheck(imp importer, v string) string
func (UnknownType) String ¶
func (t UnknownType) String() string
func (UnknownType) TypeName ¶
func (u UnknownType) TypeName() Name
type UnsupportedType ¶
type UnsupportedType struct {
Name Name
}
func (UnsupportedType) MakeZeroValue ¶
func (t UnsupportedType) MakeZeroValue(imp importer) string
func (UnsupportedType) MakeZeroValueCheck ¶
func (t UnsupportedType) MakeZeroValueCheck(imp importer, v string) string
func (UnsupportedType) String ¶
func (t UnsupportedType) String() string
func (UnsupportedType) TypeName ¶
func (t UnsupportedType) TypeName() Name
type WellKnownPrimitive ¶
func (WellKnownPrimitive) MakeZeroValue ¶
func (t WellKnownPrimitive) MakeZeroValue(imp importer) string
func (WellKnownPrimitive) MakeZeroValueCheck ¶
func (t WellKnownPrimitive) MakeZeroValueCheck(imp importer, v string) string
func (WellKnownPrimitive) String ¶
func (t WellKnownPrimitive) String() string
func (WellKnownPrimitive) TypeName ¶
func (t WellKnownPrimitive) TypeName() Name
type WellKnownStruct ¶
func (WellKnownStruct) MakeZeroValue ¶
func (t WellKnownStruct) MakeZeroValue(imp importer) string
func (WellKnownStruct) MakeZeroValueCheck ¶
func (t WellKnownStruct) MakeZeroValueCheck(imp importer, v string) string
func (WellKnownStruct) String ¶
func (t WellKnownStruct) String() string
func (WellKnownStruct) TypeName ¶
func (t WellKnownStruct) TypeName() Name
type WrappedExpr ¶
func (*WrappedExpr) Append ¶
func (we *WrappedExpr) Append(another *WrappedExpr)
Click to show internal directories.
Click to hide internal directories.