comment

package
v0.0.0-...-dc5dc8e Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

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

Comment

func New

func New(summary, routeBase, routePath, method string) *Comment

func (*Comment) AddAccept

func (c *Comment) AddAccept(accept string)

func (*Comment) AddParam

func (c *Comment) AddParam(param Param)

func (*Comment) AddProduce

func (c *Comment) AddProduce(prod string)

func (*Comment) AddResp

func (c *Comment) AddResp(resp Resp)

func (*Comment) Decs

func (c *Comment) Decs() []string

Decs common

func (*Comment) Merge

func (c *Comment) Merge(decl *dst.FuncDecl) bool

func (*Comment) SetParamRefType

func (c *Comment) SetParamRefType(name, refType string)

type Param

type Param struct {
	Name     string
	Required bool

	RefType     string
	Description string
	// contains filtered or unexported fields
}

func NewBodyParam

func NewBodyParam(name, refType, desc string) Param

func NewFormDataParam

func NewFormDataParam(name, refType, desc string) Param

func NewPathParam

func NewPathParam(name, refType, desc string) Param

func NewQueryParam

func NewQueryParam(name, refType, desc string) Param

func (Param) Decs

func (p Param) Decs() string

type Params

type Params []Param

func (Params) Len

func (ps Params) Len() int

func (Params) Less

func (ps Params) Less(i, j int) bool

func (Params) Swap

func (ps Params) Swap(i, j int)

type Resp

type Resp struct {
	Code int
	Type string
}

func (Resp) Decs

func (r Resp) Decs() string

type Route

type Route struct {
	RoutePath   string // route path
	RouteMethod string // route method: get post put
}

func (Route) Decs

func (cr Route) Decs() string

Jump to

Keyboard shortcuts

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