docgen

package
v1.26.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0, MIT Imports: 44 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(api.MinerSubsystem(0)): api.MinerSubsystem(1),
	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 added in v1.9.0

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

func GetAPIType added in v1.9.0

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

func MethodGroupFromName added in v1.9.0

func MethodGroupFromName(mn string) string

func ParseApiASTInfo added in v1.9.0

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