client

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientTmpl

type ClientTmpl struct {
	InitField    map[string]string //初始化的成员字段
	PackageName  string            //包名
	ReceiverName string            //接收器名
	StructName   string            //结构体
	AllFunc      []Func            //func
}

func (*ClientTmpl) Gen

func (h *ClientTmpl) Gen(w io.Writer)

func (*ClientTmpl) GenLogic added in v0.0.3

func (h *ClientTmpl) GenLogic(w io.Writer)

生成业务逻辑

type Func

type Func struct {
	URL          string //url 地址
	URLTemplate  bool   //url 启用模板语法
	Method       string //http方法 GET POST DELETE之类的
	DefReqHeader []model.KeyVal[string, string]
	DefReqBody   []model.KeyVal[string, string]
	HaveHeader   bool   //有http header
	HaveQuery    bool   //有查询字符串
	HaveReqBody  bool   //有请求body
	HaveRespBody bool   //有请求body
	ReqWWWForm   bool   //www form 编码
	ReqName      string //函数请求参数名
	RespName     string //函数响应参数名
	HandlerName  string //生成的函数名
}

Jump to

Keyboard shortcuts

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