epf

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 8 Imported by: 2

README

epf

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
	PathRegexpPattern string
	FuncName          string
	Comment           string
	DeclarePos        *ssautil.Posx
}

func FindEndpoints

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

func (*Endpoint) String

func (e *Endpoint) String() string

type Extractor

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

func AutoExtractor

func AutoExtractor(dir, pattern string) (Extractor, error)

type NetHttpExtractor

type NetHttpExtractor struct{}

func (*NetHttpExtractor) Extract

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

type WebFramework

type WebFramework int
const (
	EchoV4 WebFramework = iota
	Gin
	ChiV5
	Iris12
	Gorilla
	NetHttp
	None
)

func DetectImported

func DetectImported(dir, pattern string) (WebFramework, error)

Directories

Path Synopsis
cmd
epf command

Jump to

Keyboard shortcuts

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