api_list

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VarTypeOther = iota
	VarTypeServerHertz
	VarTypeRouteEngine
	VarTypeRouterGroup
)
View Source
const (
	RouterRegisterFuncNameGET     = "GET"
	RouterRegisterFuncNamePOST    = "POST"
	RouterRegisterFuncNamePUT     = "PUT"
	RouterRegisterFuncNameDELETE  = "DELETE"
	RouterRegisterFuncNameHEAD    = "HEAD"
	RouterRegisterFuncNamePATCH   = "PATCH"
	RouterRegisterFuncNameOPTIONS = "OPTIONS"

	RouterRegisterFuncNameGETEX    = "GETEX"
	RouterRegisterFuncNamePOSTEX   = "POSTEX"
	RouterRegisterFuncNamePUTEX    = "PUTEX"
	RouterRegisterFuncNameDELETEEX = "DELETEEX"
	RouterRegisterFuncNameHEADEX   = "HEADEX"
	RouterRegisterFuncNameAnyEX    = "AnyEX"
)
View Source
const (
	BuiltinFuncNameAppend  = "append"
	BuiltinFuncNameCopy    = "copy"
	BuiltinFuncNameDelete  = "delete"
	BuiltinFuncNameLen     = "len"
	BuiltinFuncNameCap     = "cap"
	BuiltinFuncNameMake    = "make"
	BuiltinFuncNameNew     = "new"
	BuiltinFuncNameComplex = "complex"
	BuiltinFuncNameReal    = "real"
	BuiltinFuncNameImag    = "imag"
	BuiltinFuncNameClear   = "clear"
	BuiltinFuncNameClose   = "close"
	BuiltinFuncNamePanic   = "panic"
	BuiltinFuncNameRecover = "recover"
	BuiltinFuncNamePrint   = "print"
	BuiltinFuncNamePrintln = "println"
)

Variables

Functions

func Api

func Api(c *config.ApiArgument) error

Types

type FuncParsed

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

type ImportParsed

type ImportParsed struct {
	Path                 string // full package path
	IsLocalModulePackage bool   // is package in current project
}

type Parser

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

func NewParser

func NewParser(projectPath, hertzRepoUrl string) (*Parser, error)

func (*Parser) PrintRouters

func (p *Parser) PrintRouters()

type RouterParsed

type RouterParsed struct {
	FilePath  string `json:"file_path"`
	StartLine int    `json:"start_line"`
	EndLine   int    `json:"end_line"`
	Method    string `json:"method"`
	RoutePath string `json:"route_path"`
}

type Var

type Var struct {
	Name   string // variable name TODO: not consider shadowed declaration
	Type   VarType
	Prefix string
}

type VarType

type VarType int

Jump to

Keyboard shortcuts

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