Documentation ¶
Index ¶
- type Advice
- type Aspect
- type Cloneable
- type Component
- type Cutable
- type Field
- type FieldOption
- type Joinpoint
- type Method
- type MethodOption
- type Nameable
- type Option
- func WithAdviceDecl(decl *ast.FuncDecl) Option[advice]
- func WithAdviceName(name string) Option[advice]
- func WithAspectImports(specs []*ast.ImportSpec) Option[aspect]
- func WithAspectName(name string) Option[aspect]
- func WithComponentFactory(pkg, name string) Option[component]
- func WithComponentName(name string) Option[component]
- func WithComponentPkg(path, name string) Option[component]
- type Pointcut
- type PointcutOption
- type ProceedingJoinpoint
- type Proxy
- type ProxyOption
- func WithProxyAbstract(abs string) ProxyOption
- func WithProxyDoc(doc *ast.CommentGroup) ProxyOption
- func WithProxyImports(specs []*ast.ImportSpec) ProxyOption
- func WithProxyMode(s bool) ProxyOption
- func WithProxyName(name string) ProxyOption
- func WithProxyOption(opt string) ProxyOption
- func WithProxyPkg(path, name string) ProxyOption
- func WithProxyPointcuts(po ...Pointcut) ProxyOption
- func WithProxySuffix(suf string) ProxyOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aspect ¶
type Aspect interface { Nameable SetBefore(Advice) SetAfter(Advice) SetAround(Advice) GetBefore() Advice GetAfter() Advice GetAround() Advice Imports() []*ast.ImportSpec }
Aspect
type Component ¶
type Component interface { Nameable // Fields() []Component PkgPath() string PkgName() string Factory() (string, string, string) }
Component
func NewComponent ¶
func NewComponent(opts ...Option[component]) Component
type Field ¶
type Field interface { Nameable Cloneable[field] Type() string TPkg() string Define() string Inject() string Assign() string Docs() *ast.CommentGroup }
Field
type FieldOption ¶
type FieldOption Option[field]
func WithFieldAssign ¶
func WithFieldAssign(assign string) FieldOption
func WithFieldDoc ¶
func WithFieldDoc(doc *ast.CommentGroup) FieldOption
func WithFieldInject ¶
func WithFieldInject(name string) FieldOption
func WithFieldName ¶
func WithFieldName(name string) FieldOption
func WithFieldType ¶
func WithFieldType(pkg, name string) FieldOption
type Joinpoint ¶
type Joinpoint interface { Nameable ParamTo(i int) any Params() []any Results() []any ResultTo(i int) any FuncName() string }
Joinpoint
type Method ¶
type Method interface { Nameable Cutable Cloneable[method] GetParams() ([]string, []string) GetResults() ([]string, []string) }
Method
type MethodOption ¶
type MethodOption Option[method]
func WithMethodDecl ¶
func WithMethodName ¶
func WithMethodName(name string) MethodOption
func WithMethodParams ¶
func WithMethodResults ¶
type Option ¶
type Option[T any] func(*T)
func WithAdviceDecl ¶
func WithAdviceName ¶
func WithAspectImports ¶
func WithAspectImports(specs []*ast.ImportSpec) Option[aspect]
func WithAspectName ¶
func WithComponentFactory ¶
func WithComponentName ¶
func WithComponentPkg ¶
type Pointcut ¶
type Pointcut interface { Nameable }
Pointcut
func NewPointcut ¶
func NewPointcut(opts ...PointcutOption) Pointcut
type PointcutOption ¶
type PointcutOption Option[pointcut]
func WithPointcutName ¶
func WithPointcutName(name string) PointcutOption
type ProceedingJoinpoint ¶
ProceedingJoinpoint
type Proxy ¶
type Proxy interface { Nameable Cutable Cloneable[proxy] SetMethods(m ...Method) GetMethods() []Method PkgPath() string PkgName() string Imports() []*ast.ImportSpec Docs() *ast.CommentGroup Abstract() string Suffix() string AddFields(c ...Field) Fields() []Field Option() string IsSingleton() bool }
Proxy
type ProxyOption ¶
type ProxyOption Option[proxy]
func WithProxyAbstract ¶
func WithProxyAbstract(abs string) ProxyOption
func WithProxyDoc ¶
func WithProxyDoc(doc *ast.CommentGroup) ProxyOption
func WithProxyImports ¶
func WithProxyImports(specs []*ast.ImportSpec) ProxyOption
func WithProxyMode ¶
func WithProxyMode(s bool) ProxyOption
func WithProxyName ¶
func WithProxyName(name string) ProxyOption
func WithProxyOption ¶
func WithProxyOption(opt string) ProxyOption
func WithProxyPkg ¶
func WithProxyPkg(path, name string) ProxyOption
func WithProxyPointcuts ¶
func WithProxyPointcuts(po ...Pointcut) ProxyOption
func WithProxySuffix ¶
func WithProxySuffix(suf string) ProxyOption
Click to show internal directories.
Click to hide internal directories.