docgen

package
v1.7.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: Apache-2.0, MIT Imports: 43 Imported by: 3

Documentation

Index

Constants

View Source
const NoComment = "There are not yet any comments for this method."

Variables

View Source
var ExampleValues = map[reflect.Type]interface{}{
	reflect.TypeOf(auth.Permission("")): auth.Permission("write"),
	reflect.TypeOf(""):                  "string value",
	reflect.TypeOf(uint64(42)):          uint64(42),
	reflect.TypeOf(byte(7)):             byte(7),
	reflect.TypeOf([]byte{}):            []byte("byte array"),
}

Functions

func ExampleValue

func ExampleValue(method string, t, parent reflect.Type) interface{}

func GetAPIType

func GetAPIType(name, pkg string) (i interface{}, t reflect.Type, permStruct []reflect.Type)

func MethodGroupFromName

func MethodGroupFromName(mn string) string

func ParseApiASTInfo

func ParseApiASTInfo(apiFile, iface, pkg, dir string) (comments map[string]string, groupDocs map[string]string)

Types

type Method

type Method struct {
	Comment         string
	Name            string
	InputExample    string
	ResponseExample string
}

type MethodGroup

type MethodGroup struct {
	GroupName string
	Header    string
	Methods   []*Method
}

type Visitor

type Visitor struct {
	Root    string
	Methods map[string]ast.Node
}

func (*Visitor) Visit

func (v *Visitor) Visit(node ast.Node) ast.Visitor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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