Documentation ¶
Index ¶
- Variables
- func WriteGo(units *codegen.Units, m Model, w DualWriter)
- type Config
- type DualWriter
- type Imports
- type Model
- func (m Model) AllItemsSlice() string
- func (m Model) Asymmetric() bool
- func (m Model) BaseKind() types.BasicKind
- func (m Model) BuildUnits() *codegen.Units
- func (m Model) CheckBadPrefixSuffix() error
- func (m Model) CheckBadTags() error
- func (m Model) FnMap() template.FuncMap
- func (m Model) HasJSONTags() bool
- func (m Model) HasSQLTags() bool
- func (m Model) HasTextTags() bool
- func (m Model) Indexes() string
- func (m Model) InputCase() transform.Case
- func (m Model) InputJSONValues() []string
- func (m Model) InputSQLValues() []string
- func (m Model) InputTextValues() []string
- func (m Model) IsFloat() bool
- func (m Model) JSONIndexes() string
- func (m Model) OutputJSONValues() []string
- func (m Model) OutputSQLValues() []string
- func (m Model) OutputTextValues() []string
- func (m Model) Placeholder() string
- func (m Model) SQLIndexes() string
- func (m Model) SelectImports() Model
- func (m Model) TextIndexes() string
- func (m Model) TransformedInputValues() []string
- func (m Model) TransformedOutputValues() []string
- func (m Model) ValuesJoined(from int, separator string) string
- func (m Model) ValuesWithWrapping(nTabs int) string
- type Value
- type Values
Constants ¶
This section is empty.
Variables ¶
View Source
var Prefix, Suffix string
Functions ¶
Types ¶
type Config ¶
type Config struct { MainType string Plural, Pkg string MarshalTextRep enum.Representation MarshalJSONRep enum.Representation StoreRep enum.Representation IgnoreCase bool Unsnake bool Lenient bool }
Config contains the model parameters obtained from command line options (either directly or computed).
type DualWriter ¶
type DualWriter interface { io.Writer io.StringWriter }
type Model ¶
type Model struct { Config LcType, BaseType string Version string Values Values Case transform.Case AliasTable string Imports collection.StringSet Extra map[string]interface{} }
Model holds the information available during template evaluation.
func (Model) AllItemsSlice ¶
func (Model) Asymmetric ¶
func (Model) BuildUnits ¶ added in v3.1.3
func (Model) CheckBadPrefixSuffix ¶
func (Model) CheckBadTags ¶
func (Model) HasJSONTags ¶
func (Model) HasSQLTags ¶
func (Model) HasTextTags ¶
func (Model) InputJSONValues ¶
func (Model) InputSQLValues ¶
func (Model) InputTextValues ¶
func (Model) JSONIndexes ¶
func (Model) OutputJSONValues ¶
func (Model) OutputSQLValues ¶
func (Model) OutputTextValues ¶
func (Model) Placeholder ¶
func (Model) SQLIndexes ¶
func (Model) SelectImports ¶
func (Model) TextIndexes ¶
func (Model) TransformedInputValues ¶
func (Model) TransformedOutputValues ¶
func (Model) ValuesWithWrapping ¶
Click to show internal directories.
Click to hide internal directories.