docgen

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PARAM_MODULE_METHOD   = "moduleMethod"  // POST:application/json
	PARAM_REQ_MODEL_PATH  = "reqModelPath"  // request model file path
	PARAM_RESP_MODEL_PATH = "respModelPath" // response model file path
	PARAM_REQ_REMARK      = "reqRemark"     // request custom remark
	PARAM_RESP_REMARK     = "respRemark"    // response custom remark
)

optional

View Source
const (
	MODEL_TYPE_REGX = `(?U)type\s+%s\s+struct\s+{`
)

Variables

This section is empty.

Functions

func GenDoc

func GenDoc(ctx context.Context, docName, docFilePath string, maxdepth int, moduleDocs string)

func GenModuleDoc

func GenModuleDoc(ctx context.Context, moduleName, moduleUri string, paramMap map[string]string, reqTypeNames []string, reqCase interface{},
	respTypeNames []string, respCases ...interface{}) string

func SetupModelPath

func SetupModelPath(path string)

Types

type DefaultServiceResponse added in v1.3.4

type DefaultServiceResponse struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Uri  string      `json:"uri,omitempty"`
	Data interface{} `json:"data"`
}

func (*DefaultServiceResponse) GetCode added in v1.3.4

func (r *DefaultServiceResponse) GetCode() int

func (*DefaultServiceResponse) GetMsg added in v1.3.4

func (r *DefaultServiceResponse) GetMsg() string

func (*DefaultServiceResponse) SetRequrieUri added in v1.3.4

func (r *DefaultServiceResponse) SetRequrieUri(uri string)

type ServiceResponse added in v1.3.4

type ServiceResponse interface {
	GetCode() int
	GetMsg() string
	SetRequrieUri(string)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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