Documentation
¶
Index ¶
- Constants
- Variables
- func GeneratePatcher(sourcePrinter *suffixwriter.Writer, verbose bool, pkg *packages.Package, ...) error
- func GeneratePlain(sourcePrinter *suffixwriter.Writer, verbose bool, pkgs []*packages.Package, ...) error
- func GenerateValidator(sourcePrinter *suffixwriter.Writer, verbose bool, pkgs []*packages.Package, ...) error
- type ConstSet
Constants ¶
View Source
const ( UndPathConversion = "github.com/ngicks/und/conversion" UndPathUndTag = "github.com/ngicks/und/undtag" UndPathValidate = "github.com/ngicks/und/validate" )
Variables ¶
View Source
var ( UndTargetTypes = []imports.TargetType{ UndTargetTypeOption, UndTargetTypeUnd, UndTargetTypeElastic, UndTargetTypeSliceUnd, UndTargetTypeSliceElastic, } UndTargetTypeOption = imports.TargetType{ ImportPath: "github.com/ngicks/und/option", Name: "Option", } UndTargetTypeUnd = imports.TargetType{ ImportPath: "github.com/ngicks/und", Name: "Und", } UndTargetTypeElastic = imports.TargetType{ ImportPath: "github.com/ngicks/und/elastic", Name: "Elastic", } UndTargetTypeSliceUnd = imports.TargetType{ ImportPath: "github.com/ngicks/und/sliceund", Name: "Und", } UndTargetTypeSliceElastic = imports.TargetType{ ImportPath: "github.com/ngicks/und/sliceund/elastic", Name: "Elastic", } UndTargetTypeConversionEmpty = imports.TargetType{ ImportPath: "github.com/ngicks/und/conversion", Name: "Empty", } )
View Source
var ConstUnd = ConstSet{ Imports: []imports.TargetImport{ { Import: imports.Import{Path: "github.com/ngicks/und/option", Name: "option"}, Types: []string{"Option"}, }, { Import: imports.Import{Path: "github.com/ngicks/und", Name: "und"}, Types: []string{"Und"}, }, { Import: imports.Import{Path: "github.com/ngicks/und/elastic", Name: "elastic"}, Types: []string{"Elastic"}, }, { Import: imports.Import{Path: "github.com/ngicks/und/sliceund", Name: "sliceund"}, Types: []string{"Und"}, }, { Import: imports.Import{Path: "github.com/ngicks/und/sliceund/elastic", Name: "elastic"}, Ident: "sliceelastic", Types: []string{"Elastic"}, }, { Import: imports.Import{Path: "github.com/ngicks/und/undtag", Name: "undtag"}, Types: []string{}, }, { Import: imports.Import{Path: "github.com/ngicks/und/validate", Name: "validate"}, Types: []string{}, }, { Import: imports.Import{Path: "github.com/ngicks/und/conversion", Name: "conversion"}, Types: []string{"Empty"}, }, }, ConversionMethod: typematcher.CyclicConversionMethods{ Reverse: "UndRaw", Convert: "UndPlain", }, ValidatorMethod: typematcher.ErrorMethod{ Name: "UndValidate", }, }
Functions ¶
func GeneratePatcher ¶
func GeneratePatcher( sourcePrinter *suffixwriter.Writer, verbose bool, pkg *packages.Package, extra []imports.TargetImport, targetTypeNames ...string, ) error
func GeneratePlain ¶
func GeneratePlain( sourcePrinter *suffixwriter.Writer, verbose bool, pkgs []*packages.Package, extra []imports.TargetImport, ) error
func GenerateValidator ¶
func GenerateValidator( sourcePrinter *suffixwriter.Writer, verbose bool, pkgs []*packages.Package, extra []imports.TargetImport, ) error
Types ¶
type ConstSet ¶
type ConstSet struct { Imports []imports.TargetImport ConversionMethod typematcher.CyclicConversionMethods ValidatorMethod typematcher.ErrorMethod }
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
tests/_generate_test
command
|
|
tests/_generates_targets
command
|
|
testtargets/deeplynested
tests dependant and implementor
|
tests dependant and implementor |
Click to show internal directories.
Click to hide internal directories.