Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FuncSpec ¶
type FuncSpec struct {
Package string // "auth"
Name string // "hashPassword"
Description string // @description value
ErrStatus int // @error HTTP status code (0 = unspecified)
RequestFields []Field // FuncNameRequest struct fields
ResponseFields []Field // FuncNameResponse struct fields
HasBody bool // true if function body is not just "// TODO: implement"
Imports []string // import paths (e.g. "database/sql", "net/http")
}
FuncSpec holds a parsed func spec file.
func ParseDir ¶
func ParseDir(dir string) ([]FuncSpec, []diagnostic.Diagnostic)
ParseDir parses all .go files under dir (recursively by package subdirectory). Returns a flat list of FuncSpecs and accumulated diagnostics.
func ParseFile ¶
func ParseFile(path string) (*FuncSpec, []diagnostic.Diagnostic)
ParseFile parses a single func spec .go file.
Source Files
¶
- apply_annotation.go
- build_fields.go
- collect_package_types.go
- collect_structs_from_file.go
- collect_structs_from_gen_decl.go
- expr_to_string.go
- extract_fields.go
- extract_json_tag.go
- field.go
- fill_missing_fields.go
- fill_spec_from_type_map.go
- func_spec.go
- is_stub_body.go
- parse_comment_group.go
- parse_dir.go
- parse_file.go
- process_decl.go
- process_type_specs.go
- uc_first.go
Click to show internal directories.
Click to hide internal directories.