annotation

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MethodReceiver

func MethodReceiver(decl *ast.FuncDecl) string

Types

type Anon

type Anon struct {
}

func (*Anon) As

func (g *Anon) As() M

func (*Anon) Match

func (g *Anon) Match(node ast.Node) error

func (*Anon) Name

func (g *Anon) Name() string

type Gen

type Gen struct {
	Target string `annotation:"name=target,default="`
}

func (Gen) As

func (g Gen) As() (_ M)

func (Gen) Match

func (Gen) Match(node ast.Node) (err error)

func (Gen) Name

func (Gen) Name() string

type Inject

type Inject struct {
	IsLazy     bool   `annotation:"name=lazy,default=true"`
	N          string `annotation:"name=name,default="`
	Alias      string `annotation:"name=alias,default="`
	Initialize string `annotation:"name=init,default="`
	Px         string `annotation:"name=proxy,default="`
	Qualifier  string `annotation:"name=qualifier,default="`
}

func (Inject) As

func (i Inject) As() (_ M)

func (Inject) Match

func (i Inject) Match(node ast.Node) (err error)

func (Inject) Name

func (Inject) Name() string

type M

type M interface {
	Name() string
	Match(node ast.Node) error
	As() M
}

type Proxy

type Proxy struct {
	Target string `annotation:"name=target,default="`
}

func (Proxy) As

func (p Proxy) As() (_ M)

func (Proxy) Match

func (p Proxy) Match(node ast.Node) (err error)

func (Proxy) Name

func (p Proxy) Name() string

type Router

type Router struct {
	Path   string `annotation:"name=path,default=/"`
	Method string `annotation:"name=method,default=GET"`
}

func (Router) As

func (r Router) As() (_ M)

func (Router) Match

func (r Router) Match(node ast.Node) (err error)

func (Router) Name

func (r Router) Name() string

Jump to

Keyboard shortcuts

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