plugin

package
v0.0.1-beta.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestTypePath   = "path"
	RequestTypeQuery  = "query"
	RequestTypeHeader = "header"
	RequestTypeBody   = "body"
)
View Source
const (
	ScopeTypePrototype = "prototype"
)

Variables

This section is empty.

Functions

func MergeComments

func MergeComments(t *types.Type) []string

func NewCorePlugin

func NewCorePlugin(annotation string, opts ...Opt) *corePlugin

func NewCorePluginManager

func NewCorePluginManager(annotation string, opts ...Opt) *pluginManager

Types

type AutoFillParamFunc

type AutoFillParamFunc func(imports namer.ImportTracker, name string, param *types.Type) (*TypeMeta, error)

type AutowiredMarker

type AutowiredMarker struct {
	Required bool   `marker:"required,optional"`
	Name     string `marker:"name,optional"`
}

func (AutowiredMarker) Help

type BeanMarker

type BeanMarker struct {
	Value         string `marker:"value,optional"`
	InitMethod    string `marker:"initmethod,optional"`
	DestroyMethod string `marker:"destroymethod,optional"`
}

func (BeanMarker) Help

type ComponentMarker

type ComponentMarker struct {
	Value string `marker:"value,optional"`
}

func (ComponentMarker) Help

type ControllerMarker

type ControllerMarker struct {
	Value string `marker:"value,optional"`
}

func (ControllerMarker) Help

type CoreMetadata

type CoreMetadata struct {
	Name                string
	TypeName            string
	ControllerMarker    *ControllerMarker
	ServiceMarker       *ServiceMarker
	ComponentMarker     *ComponentMarker
	BeanMarker          *BeanMarker
	ScopeMarker         *ScopeMarker
	PostConstructMarker *PostConstructMarker
	PreDestroyMarker    *PreDestroyMarker
	Fields              []*Field
	Methods             []*Method
}

type Field

type Field struct {
	TypeMeta
	AutowiredMarker *AutowiredMarker
}

type Method

type Method struct {
	Name            string
	BeanMarker      *BeanMarker
	ScopeMarker     *ScopeMarker
	AutowiredMarker *AutowiredMarker
	Params          []*TypeMeta
	Returns         []*TypeMeta
}

type Opt

type Opt func(*corePlugin)

func SetAutoFillParamFunc

func SetAutoFillParamFunc(f AutoFillParamFunc) Opt

func SetTemplate

func SetTemplate(tmpl string) Opt

type PostConstructMarker

type PostConstructMarker struct {
	MethodName string `marker:"name,optional"`
}

func (PostConstructMarker) Help

type PreDestroyMarker

type PreDestroyMarker struct {
	MethodName string `marker:"name,optional"`
}

func (PreDestroyMarker) Help

type RequestType

type RequestType string

type ScopeMarker

type ScopeMarker struct {
	// singleton | prototype
	Value string `marker:"value,optional"`
}

func (ScopeMarker) Help

type ServiceMarker

type ServiceMarker struct {
	Value string `marker:"value,optional"`
}

func (ServiceMarker) Help

type TypeMeta

type TypeMeta struct {
	Name        string
	TypeName    string
	Default     string
	Required    bool
	RequestType RequestType
}

Jump to

Keyboard shortcuts

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