autodoc

package
v0.0.0-...-a4d5418 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoDoc

type AutoDoc struct {
	// contains filtered or unexported fields
}

自动化文档

func NewAutoDoc

func NewAutoDoc(controllerDir string) *AutoDoc

func (*AutoDoc) Create

func (this *AutoDoc) Create()

临时输出

func (*AutoDoc) MakeAutoFile

func (this *AutoDoc) MakeAutoFile() (err error)

自动生成文档

func (*AutoDoc) SetMethod

func (this *AutoDoc) SetMethod(method string) *AutoDoc

设置请求方式

func (*AutoDoc) SetRequest

func (this *AutoDoc) SetRequest(param interface{}, requiredFields ...string) *AutoDoc

设置请求参数

func (*AutoDoc) SetRequestCareField

func (this *AutoDoc) SetRequestCareField(fields ...string) *AutoDoc

func (*AutoDoc) SetRequestParam

func (this *AutoDoc) SetRequestParam(requestParams []RequestParam) *AutoDoc

设置参数数据

func (*AutoDoc) SetResponse

func (this *AutoDoc) SetResponse(param interface{}) *AutoDoc

设置响应参数

func (*AutoDoc) SetUrl

func (this *AutoDoc) SetUrl(url string) *AutoDoc

设置请求地址

type RequestParam

type RequestParam struct {
	Field     string //字段
	FieldType string //字段类型
	Required  bool   //必填字段
	Desc      string //字段说明
}

请求参数

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL