Documentation
¶
Index ¶
- Variables
- type BackendGenerator
- func (b BackendGenerator) Aliases() []ds.Backend
- func (b BackendGenerator) Check(cl *ds.RecordPackage) error
- func (b BackendGenerator) CheckFields(cl *ds.RecordPackage) error
- func (b BackendGenerator) CheckIndexes(cl *ds.RecordPackage) error
- func (b BackendGenerator) CheckNamespace(cl *ds.RecordPackage) error
- func (b *BackendGenerator) Init()
- func (b BackendGenerator) Name() ds.Backend
- func (b BackendGenerator) TemplateFuncs() template.FuncMap
- func (b BackendGenerator) TemplatePath() string
- func (b BackendGenerator) Templates() embed.FS
- type FormatType
- func (p FormatType) DefaultValue() string
- func (p FormatType) GetMutatorByName(name string) Mutator
- func (p FormatType) Len(l uint32) uint
- func (p FormatType) MaxValue() string
- func (p FormatType) MinValue() string
- func (p FormatType) MutatorTypeConv() string
- func (p FormatType) OrigType() string
- func (p FormatType) PackConvFunc(fieldname string) string
- func (p FormatType) PackFunc() string
- func (p FormatType) StringDeserializer() []string
- func (p FormatType) ToString() []string
- func (p FormatType) UnpackFunc() string
- func (p FormatType) UnpackType() string
- type Mutator
Constants ¶
This section is empty.
Variables ¶
View Source
var AllFormatT = append(append(append(append( NumericFormatT, FloatFormatT...), DataFormatT...), DateFormatT...), FormatType{TypeName: "bool", Name: "Uint8", len: 2, fromstr: "strconv.ParseBool(%%)", DBTypeName: "BOOLEAN"}, FormatType{TypeName: "uuid.UUID", Name: "UUID", len: 16, fromstr: "uuid.Parse(%%)", DBTypeName: "UUID"}, )
View Source
var DataFormatT = []FormatType{ {TypeName: "string", Name: "String", DBTypeName: "VARCHAR(n)", /* contains filtered or unexported fields */}, {TypeName: "postgres.BYTEA", Name: "Bytea", DBTypeName: "BYTEA", /* contains filtered or unexported fields */}, }
View Source
var DateFormatT = []FormatType{ {TypeName: "time.Time", Name: "DateTime", DBTypeName: "TIMESTAMP", /* contains filtered or unexported fields */}, }
View Source
var FloatFormatT = []FormatType{ {TypeName: "float32", Name: "Float32", DBTypeName: "REAL", /* contains filtered or unexported fields */}, {TypeName: "float64", Name: "Float64", DBTypeName: "DOUBLE PRECISION", /* contains filtered or unexported fields */}, }
View Source
var NumericFormatT = []FormatType{ {TypeName: "int16", Name: "Int16", DBTypeName: "SMALLINT", /* contains filtered or unexported fields */}, {TypeName: "int32", Name: "Int32", DBTypeName: "INTEGER", /* contains filtered or unexported fields */}, {TypeName: "int64", Name: "Int64", DBTypeName: "BIGINT", /* contains filtered or unexported fields */}, }
ToDo numeric or numeric(p,s) ByteArray Format = "[]byte"
View Source
var Templates embed.FS
Functions ¶
This section is empty.
Types ¶
type BackendGenerator ¶
type BackendGenerator struct {
// contains filtered or unexported fields
}
func (BackendGenerator) Aliases ¶
func (b BackendGenerator) Aliases() []ds.Backend
func (BackendGenerator) Check ¶
func (b BackendGenerator) Check(cl *ds.RecordPackage) error
func (BackendGenerator) CheckFields ¶
func (b BackendGenerator) CheckFields(cl *ds.RecordPackage) error
func (BackendGenerator) CheckIndexes ¶
func (b BackendGenerator) CheckIndexes(cl *ds.RecordPackage) error
func (BackendGenerator) CheckNamespace ¶
func (b BackendGenerator) CheckNamespace(cl *ds.RecordPackage) error
func (*BackendGenerator) Init ¶
func (b *BackendGenerator) Init()
func (BackendGenerator) Name ¶
func (b BackendGenerator) Name() ds.Backend
func (BackendGenerator) TemplateFuncs ¶
func (b BackendGenerator) TemplateFuncs() template.FuncMap
func (BackendGenerator) TemplatePath ¶
func (b BackendGenerator) TemplatePath() string
func (BackendGenerator) Templates ¶
func (b BackendGenerator) Templates() embed.FS
type FormatType ¶
type FormatType struct { TypeName ds.Format Name string DBTypeName string // contains filtered or unexported fields }
func (FormatType) DefaultValue ¶
func (p FormatType) DefaultValue() string
func (FormatType) GetMutatorByName ¶
func (p FormatType) GetMutatorByName(name string) Mutator
ToDo Перенести метод в интерфейс вместе с переделкой мутаторов в octopus-е
func (FormatType) Len ¶
func (p FormatType) Len(l uint32) uint
func (FormatType) MaxValue ¶
func (p FormatType) MaxValue() string
func (FormatType) MinValue ¶
func (p FormatType) MinValue() string
func (FormatType) MutatorTypeConv ¶
func (p FormatType) MutatorTypeConv() string
func (FormatType) OrigType ¶
func (p FormatType) OrigType() string
func (FormatType) PackConvFunc ¶
func (p FormatType) PackConvFunc(fieldname string) string
func (FormatType) PackFunc ¶
func (p FormatType) PackFunc() string
func (FormatType) StringDeserializer ¶
func (p FormatType) StringDeserializer() []string
func (FormatType) ToString ¶
func (p FormatType) ToString() []string
func (FormatType) UnpackFunc ¶
func (p FormatType) UnpackFunc() string
func (FormatType) UnpackType ¶
func (p FormatType) UnpackType() string
Click to show internal directories.
Click to hide internal directories.