endpoint

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EchoExtractor

type EchoExtractor struct{}

func (*EchoExtractor) Extract

func (e *EchoExtractor) Extract(callInfo ssautil.CallInfo, parent *ssa.Function, pos token.Pos) (*Endpoint, bool)

type Endpoint

type Endpoint struct {
	Method     string
	Path       string
	FuncName   string
	Comment    string
	DeclarePos *Pos
	FuncPos    *Pos
}

func FindEndpoints

func FindEndpoints(dir, pattern string, ext Extractor) ([]*Endpoint, error)

type Extractor

type Extractor interface {
	Extract(callInfo ssautil.CallInfo, parent *ssa.Function, pos token.Pos) (*Endpoint, bool)
}

type Pos

type Pos struct {
	Func *ssa.Function
	Pos  []token.Pos
}

func NewPos

func NewPos(fn *ssa.Function, pos ...token.Pos) *Pos

func (*Pos) FLC

func (p *Pos) FLC() string

func (*Pos) Package

func (m *Pos) Package() *types.Package

func (*Pos) PackagePath

func (p *Pos) PackagePath() string

func (*Pos) Position

func (m *Pos) Position() token.Position

type WebFramework

type WebFramework int

Jump to

Keyboard shortcuts

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