Documentation ¶
Index ¶
- func CallError(errIdent string) *ast.CallExpr
- func ErrorCheckReturn(errVarIdent string, body ...ast.Stmt) *ast.IfStmt
- func FieldIndex(fields []*ast.Field, i int) (*ast.Ident, ast.Expr, bool)
- func Format(node ast.Node) string
- func GenerateParseValueFromStringStatements(imports *Imports, tmp string, str, typeExp ast.Expr, ...) ([]ast.Stmt, error)
- func GenerateValidations(imports *Imports, variable, variableType ast.Expr, ...) ([]ast.Stmt, error, bool)
- func HTTPStatusCode(imports *Imports, n int) ast.Expr
- func HTTPStatusName(name string) (int, error)
- func Ident(n string) *ast.Ident
- func Int(n int) *ast.BasicLit
- func IterateFieldTypes(list []*ast.Field) func(func(int, ast.Expr) bool)
- func IterateFunctions(files []*ast.File) func(func(*ast.File, *ast.FuncDecl) bool)
- func IterateGenDecl(files []*ast.File, tok token.Token) func(func(*ast.File, *ast.GenDecl) bool)
- func IterateValueSpecs(files []*ast.File) func(func(*ast.File, *ast.ValueSpec) bool)
- func Nil() *ast.Ident
- func ParseStringWithType(val string, tp ast.Expr) (reflect.Value, error)
- func String(s string) *ast.BasicLit
- func Templates(workingDirectory, templatesVariable string, fileSet *token.FileSet, ...) (*template.Template, error)
- type Imports
- func (imports *Imports) Add(pkgIdent, pkgPath string) string
- func (imports *Imports) AddContext() string
- func (imports *Imports) AddHTMLTemplate() string
- func (imports *Imports) AddNetHTTP() string
- func (imports *Imports) Call(pkgName, pkgPath, funcIdent string, args []ast.Expr) *ast.CallExpr
- func (imports *Imports) HTTPErrorCall(response ast.Expr, message ast.Expr, code int) *ast.CallExpr
- func (imports *Imports) Ident(pkgPath string) string
- func (imports *Imports) ImportSpecs() []*ast.ImportSpec
- func (imports *Imports) SortImports()
- func (imports *Imports) StrconvAtoiCall(expr ast.Expr) *ast.CallExpr
- func (imports *Imports) StrconvParseBoolCall(expr ast.Expr) *ast.CallExpr
- func (imports *Imports) StrconvParseFloatCall(expr ast.Expr, size int) *ast.CallExpr
- func (imports *Imports) StrconvParseIntCall(expr ast.Expr, base, size int) *ast.CallExpr
- func (imports *Imports) StrconvParseUintCall(expr ast.Expr, base, size int) *ast.CallExpr
- func (imports *Imports) TimeParseCall(layout string, expr ast.Expr) *ast.CallExpr
- type MaxValidation
- type MinValidation
- type PatternValidation
- type ValidationGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorCheckReturn ¶ added in v0.8.0
func FieldIndex ¶ added in v0.8.0
func GenerateParseValueFromStringStatements ¶ added in v0.8.4
func GenerateValidations ¶ added in v0.8.4
func HTTPStatusName ¶ added in v0.8.2
func IterateFieldTypes ¶ added in v0.7.0
func IterateFunctions ¶
func IterateGenDecl ¶
func IterateValueSpecs ¶
func ParseStringWithType ¶ added in v0.8.4
Types ¶
type Imports ¶ added in v0.8.4
func NewImports ¶ added in v0.8.4
func (*Imports) AddContext ¶ added in v0.8.4
func (*Imports) AddHTMLTemplate ¶ added in v0.8.4
func (*Imports) AddNetHTTP ¶ added in v0.8.4
func (*Imports) HTTPErrorCall ¶ added in v0.8.4
func (*Imports) ImportSpecs ¶ added in v0.8.4
func (imports *Imports) ImportSpecs() []*ast.ImportSpec
func (*Imports) SortImports ¶ added in v0.8.4
func (imports *Imports) SortImports()
func (*Imports) StrconvAtoiCall ¶ added in v0.8.4
func (*Imports) StrconvParseBoolCall ¶ added in v0.8.4
func (*Imports) StrconvParseFloatCall ¶ added in v0.8.4
func (*Imports) StrconvParseIntCall ¶ added in v0.8.4
func (*Imports) StrconvParseUintCall ¶ added in v0.8.4
type MaxValidation ¶ added in v0.8.4
type MinValidation ¶ added in v0.8.4
type PatternValidation ¶ added in v0.8.4
Click to show internal directories.
Click to hide internal directories.