Documentation ¶
Index ¶
- Constants
- func MakeInputOutputStructs(fn *ast.FuncDecl, imps []*ast.ImportSpec, comments []*ast.CommentGroup) (*Struct, *Struct)
- func MakeMethod(fn *ast.FuncDecl, comments map[string][]string) []string
- func MakePattern(fn *ast.FuncDecl, comments map[string][]string) string
- func MakeProtected(fn *ast.FuncDecl, comments map[string][]string) bool
- func MakeQuery(fn *ast.FuncDecl, comments map[string][]string, method []string, path string) []string
- func ParsePackage(comments []*ast.CommentGroup) *string
- func Render(w io.Writer, tpl string, data interface{}) error
- type ByOrder
- type Field
- type Fields
- type Func
- type Funcs
- type Import
- type Imports
- type Service
- type Services
- type Struct
- type Structs
Constants ¶
View Source
const ( PREFIX_INPUT = "Input" PREFIX_OUTPUT = "Output" TokenMethod = "@method (.*)" TokenPath = "@path (.*)" TokenQuery = "@query (.*)" TokenProtected = "@protected" TokenNameMethod = "method" TokenNamePath = "path" TokenNameQuery = "query" TokenNameProtected = "protected" MethodPOST = "POST" MethodGET = "GET" )
Variables ¶
This section is empty.
Functions ¶
func MakeInputOutputStructs ¶
func MakeInputOutputStructs(fn *ast.FuncDecl, imps []*ast.ImportSpec, comments []*ast.CommentGroup) (*Struct, *Struct)
func ParsePackage ¶
func ParsePackage(comments []*ast.CommentGroup) *string
Types ¶
type Func ¶
type Func struct { PkgPath string Name string Method []string Protected bool Pattern string Query []string In *Struct Out *Struct }
func MakeFunc ¶
func MakeFunc(fn *ast.FuncDecl, imps []*ast.ImportSpec, comments []*ast.CommentGroup) *Func
func (Func) GetFullName ¶
func (Func) GetHandlerName ¶
func (Func) GetOnlyPkgName ¶
func (Func) GetPattern ¶
func (Func) GetPkgPath ¶
func (Func) GetProtected ¶
type Import ¶
func (Import) GetPathAsAlias ¶
type Struct ¶
func (Struct) GetFieldsSlice ¶
Click to show internal directories.
Click to hide internal directories.