Documentation
¶
Index ¶
- Constants
- func CallError(errIdent string) *ast.CallExpr
- func ErrorCheckReturn(errVarIdent string, body ...ast.Stmt) *ast.IfStmt
- func ExecuteTemplateArguments(node ast.Node, info *types.Info, templatesVariableName string) (string, types.Type, bool)
- func FieldIndex(fields []*ast.Field, i int) (*ast.Ident, ast.Expr, bool)
- func FindFieldWithName(list *ast.FieldList, name string) (*ast.Field, bool)
- func Format(node ast.Node) string
- func FormatFile(filePath string, node ast.Node) (string, error)
- func GenerateValidations(imports *Imports, variable ast.Expr, variableType types.Type, ...) ([]ast.Stmt, error, bool)
- func HTTPStatusCode(imports *Imports, n int) ast.Expr
- func HTTPStatusName(name string) (int, error)
- func Int(n int) *ast.BasicLit
- func IterateFieldTypes(list []*ast.Field) func(func(int, ast.Expr) 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 types.Type) (reflect.Value, error)
- func String(s string) *ast.BasicLit
- type Functions
- 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) AddPackages(packages ...*packages.Package)
- func (imports *Imports) AddPath() string
- func (imports *Imports) BytesNewBuffer(expr ast.Expr) *ast.CallExpr
- func (imports *Imports) Call(pkgName, pkgPath, funcIdent string, args []ast.Expr) *ast.CallExpr
- func (imports *Imports) FileSet() *token.FileSet
- func (imports *Imports) Format(variable ast.Expr, kind types.BasicKind) (ast.Expr, error)
- func (imports *Imports) FormatBool(in ast.Expr) *ast.CallExpr
- func (imports *Imports) FormatInt(in ast.Expr) *ast.CallExpr
- func (imports *Imports) FormatInt16(in ast.Expr) *ast.CallExpr
- func (imports *Imports) FormatInt32(in ast.Expr) *ast.CallExpr
- func (imports *Imports) FormatInt64(in ast.Expr) *ast.CallExpr
- func (imports *Imports) FormatInt8(in ast.Expr) *ast.CallExpr
- func (imports *Imports) FormatUint(in ast.Expr) *ast.CallExpr
- func (imports *Imports) FormatUint16(in ast.Expr) *ast.CallExpr
- func (imports *Imports) FormatUint32(in ast.Expr) *ast.CallExpr
- func (imports *Imports) FormatUint64(in ast.Expr) *ast.CallExpr
- func (imports *Imports) FormatUint8(in ast.Expr) *ast.CallExpr
- func (imports *Imports) HTTPErrorCall(response, message ast.Expr, code int) *ast.CallExpr
- func (imports *Imports) HTTPHeader() *ast.SelectorExpr
- func (imports *Imports) HTTPRequestPtr() *ast.StarExpr
- func (imports *Imports) HTTPResponseWriter() *ast.SelectorExpr
- func (imports *Imports) Ident(pkgPath string) string
- func (imports *Imports) ImportSpecs() []*ast.ImportSpec
- func (imports *Imports) OutputPackage() string
- func (imports *Imports) OutputPackageType() *types.Package
- func (imports *Imports) Package(path string) (*packages.Package, bool)
- func (imports *Imports) PackageAtFilepath(p string) (*packages.Package, bool)
- func (imports *Imports) SetOutputPackage(pkg *types.Package)
- func (imports *Imports) SortImports()
- func (imports *Imports) StrconvAtoiCall(expr ast.Expr) *ast.CallExpr
- func (imports *Imports) StrconvItoaCall(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) StrconvParseInt16Call(in ast.Expr) *ast.CallExpr
- func (imports *Imports) StrconvParseInt32Call(in ast.Expr) *ast.CallExpr
- func (imports *Imports) StrconvParseInt64Call(in ast.Expr) *ast.CallExpr
- func (imports *Imports) StrconvParseInt8Call(in ast.Expr) *ast.CallExpr
- func (imports *Imports) StrconvParseIntCall(expr ast.Expr, base, size int) *ast.CallExpr
- func (imports *Imports) StrconvParseUint0Call(in ast.Expr) *ast.CallExpr
- func (imports *Imports) StrconvParseUint16Call(in ast.Expr) *ast.CallExpr
- func (imports *Imports) StrconvParseUint32Call(in ast.Expr) *ast.CallExpr
- func (imports *Imports) StrconvParseUint64Call(in ast.Expr) *ast.CallExpr
- func (imports *Imports) StrconvParseUint8Call(in ast.Expr) *ast.CallExpr
- func (imports *Imports) StrconvParseUintCall(expr ast.Expr, base, size int) *ast.CallExpr
- func (imports *Imports) StructField(pos token.Pos) (*ast.Field, error)
- func (imports *Imports) SyntaxFile(pos token.Pos) (*ast.File, *token.FileSet, error)
- func (imports *Imports) TimeParseCall(layout string, expr ast.Expr) *ast.CallExpr
- func (imports *Imports) TypeASTExpression(tp types.Type) (ast.Expr, error)
- func (imports *Imports) Types(pkgPath string) (*types.Package, bool)
- type MaxLengthValidation
- type MaxValidation
- type MinLengthValidation
- type MinValidation
- type PatternValidation
- type ValidationGenerator
Constants ¶
View Source
const IntBitLength = 32 << (^uint(0) >> 63)
Variables ¶
This section is empty.
Functions ¶
func ErrorCheckReturn ¶ added in v0.8.0
func ExecuteTemplateArguments ¶ added in v0.12.0
func FieldIndex ¶ added in v0.8.0
func FindFieldWithName ¶ 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 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) AddPackages ¶ added in v0.8.9
func (*Imports) BytesNewBuffer ¶ added in v0.13.4
func (*Imports) FormatBool ¶ added in v0.13.4
func (*Imports) FormatInt16 ¶ added in v0.13.4
func (*Imports) FormatInt32 ¶ added in v0.13.4
func (*Imports) FormatInt64 ¶ added in v0.13.4
func (*Imports) FormatInt8 ¶ added in v0.13.4
func (*Imports) FormatUint ¶ added in v0.13.4
func (*Imports) FormatUint16 ¶ added in v0.13.4
func (*Imports) FormatUint32 ¶ added in v0.13.4
func (*Imports) FormatUint64 ¶ added in v0.13.4
func (*Imports) FormatUint8 ¶ added in v0.13.4
func (*Imports) HTTPErrorCall ¶ added in v0.8.4
func (*Imports) HTTPHeader ¶ added in v0.14.0
func (imports *Imports) HTTPHeader() *ast.SelectorExpr
func (*Imports) HTTPRequestPtr ¶ added in v0.12.0
func (*Imports) HTTPResponseWriter ¶ added in v0.14.0
func (imports *Imports) HTTPResponseWriter() *ast.SelectorExpr
func (*Imports) ImportSpecs ¶ added in v0.8.4
func (imports *Imports) ImportSpecs() []*ast.ImportSpec
func (*Imports) OutputPackage ¶ added in v0.8.9
func (*Imports) OutputPackageType ¶ added in v0.14.0
func (*Imports) PackageAtFilepath ¶ added in v0.9.10
func (*Imports) SetOutputPackage ¶ added in v0.8.9
func (*Imports) SortImports ¶ added in v0.8.4
func (imports *Imports) SortImports()
func (*Imports) StrconvAtoiCall ¶ added in v0.8.4
func (*Imports) StrconvItoaCall ¶ added in v0.13.4
func (*Imports) StrconvParseBoolCall ¶ added in v0.8.4
func (*Imports) StrconvParseFloatCall ¶ added in v0.8.4
func (*Imports) StrconvParseInt16Call ¶ added in v0.13.4
func (*Imports) StrconvParseInt32Call ¶ added in v0.13.4
func (*Imports) StrconvParseInt64Call ¶ added in v0.13.4
func (*Imports) StrconvParseInt8Call ¶ added in v0.13.4
func (*Imports) StrconvParseIntCall ¶ added in v0.8.4
func (*Imports) StrconvParseUint0Call ¶ added in v0.13.4
func (*Imports) StrconvParseUint16Call ¶ added in v0.13.4
func (*Imports) StrconvParseUint32Call ¶ added in v0.13.4
func (*Imports) StrconvParseUint64Call ¶ added in v0.13.4
func (*Imports) StrconvParseUint8Call ¶ added in v0.13.4
func (*Imports) StrconvParseUintCall ¶ added in v0.8.4
func (*Imports) StructField ¶ added in v0.13.1
func (*Imports) SyntaxFile ¶ added in v0.8.9
func (*Imports) TimeParseCall ¶ added in v0.8.4
func (*Imports) TypeASTExpression ¶ added in v0.13.4
type MaxLengthValidation ¶ added in v0.13.1
type MaxValidation ¶ added in v0.8.4
type MinLengthValidation ¶ added in v0.13.1
type MinValidation ¶ added in v0.8.4
type PatternValidation ¶ added in v0.8.4
Click to show internal directories.
Click to hide internal directories.