goaop

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

README

goaop

Runtime AOP Proxy Generator and Interceptor for Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(i interface{}, dir string) (err error)

func RegisterInterceptorFactory

func RegisterInterceptorFactory(tag string, i InterceptorFactory)

func RegisterInterceptorProxy

func RegisterInterceptorProxy(name string, i InterceptorProxy)

func WrapInterceptorProxy

func WrapInterceptorProxy(tag, name string, origin interface{}) (wrappedProxy interface{}, ok bool)

Types

type Interceptor

type Interceptor interface {
	Defer()
}

type InterceptorFactory

type InterceptorFactory interface {
	InitInterceptor(point *JoinPoint) (Interceptor, bool)
}

type InterceptorProxy

type InterceptorProxy interface {
	RegisterInterceptor(origin interface{}, inceptorFactory InterceptorFactory) interface{}
}

type JoinPoint

type JoinPoint struct {
	Method  interface{}
	Params  []interface{}
	Returns []interface{}
}

func (*JoinPoint) Defer

func (jp *JoinPoint) Defer()

func (*JoinPoint) InitInterceptor

func (_ *JoinPoint) InitInterceptor(point *JoinPoint) (Interceptor, bool)

Jump to

Keyboard shortcuts

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