Help us shape the future of Go! Take the 2026 Go Developer Survey

markdown

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseStruct

type BaseStruct struct {
	Class   string
	Context string
}

BaseStruct 模板

type DocMarkdown

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

DocMarkdown

func NewDoc

func NewDoc() *DocMarkdown

NewDoc 新建一个markdown文件

func (*DocMarkdown) AddBaseStruct

func (m *DocMarkdown) AddBaseStruct(pkg, class, context string)

AddBaseStruct 添加一个基础类型

func (*DocMarkdown) GenMarkdown

func (m *DocMarkdown) GenMarkdown(info TplInterface) string

GenMarkdown 生成markdown

func (*DocMarkdown) GetBodyInfo

func (m *DocMarkdown) GetBodyInfo() string

GetBodyInfo 获取table表格

func (*DocMarkdown) GetBoolStr

func (m *DocMarkdown) GetBoolStr(b bool) string

GetBoolStr 获取bool类型字符串

func (*DocMarkdown) GetTableInfo

func (m *DocMarkdown) GetTableInfo() string

GetTableInfo 获取table表格

func (*DocMarkdown) GetTypeList

func (m *DocMarkdown) GetTypeList(k interface{}, isArray bool) interface{}

GetTypeList 转换typelist

func (*DocMarkdown) GetValueType

func (m *DocMarkdown) GetValueType(k, v string, isArray bool) interface{}

GetValueType 根据类型获取内容

type TplElement

type TplElement struct {
	Name     string
	Required string
	Type     string
	Note     string
}

TplElement 元素

type TplInterface

type TplInterface struct {
	SC    string
	Class string
	Note  string
	Item  []TplSub
	BMP   map[string][]BaseStruct
}

TplInterface 模板

type TplSub

type TplSub struct {
	ReqTab  string        // 请求参数列表
	ReqJSON template.HTML // 请求示例

	RespTab  string        // 返回参数列表
	RespJSON template.HTML // 返回示例

	Methods []string // 请求方式

	Note       string // 注释
	RouterPath string // 请求url
}

TplSub 模板

type TplTable

type TplTable struct {
	SC   string
	Pkg  string
	Name string
	Note string
	Item []TplElement
}

TplTable 模板

Jump to

Keyboard shortcuts

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