internal

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgsToFunctionArgs

func ArgsToFunctionArgs(argType string, name string, fields []*FieldDef) []ast.Stmt

ArgsToFunctionArgs return the list of statements

func AssignAspect

func AssignAspect(name, pkg, function string) *ast.AssignStmt

AssignAspect create a new assignment

func AssignBeyondContext

func AssignBeyondContext(imports map[string]string) *ast.AssignStmt

AssignBeyondContext create a new assignment

func CallAspectBefore

func CallAspectBefore(name string) *ast.CallExpr

CallAspectBefore reutrn the call expression

func CallAspectReturning

func CallAspectReturning(name string) *ast.CallExpr

CallAspectReturning reutrn the call expression

func CallCreateAspect

func CallCreateAspect(pkg, name string) ast.Expr

CallCreateAspect return the call expression

func CallCreateBeyondContext

func CallCreateBeyondContext(imports map[string]string) *ast.CallExpr

CallCreateBeyondContext reutrn the call expression

func CallFunction

func CallFunction(currentPkg, pkg, name string, fields []*FieldDef) *ast.CallExpr

CallFunction return the call expression

func CallFunctionAndAssign

func CallFunctionAndAssign(currentPkg, pkg, name string, params, results []*FieldDef) ast.Stmt

CallFunctionAndAssign create a new assignment

func CallMethod

func CallMethod(objName string, currentPkg, pkg, name string, fields []*FieldDef) ast.Expr

CallMethod return the call expression

func CallMethodAndAssign

func CallMethodAndAssign(recv *ast.FieldList, currentPkg, pkg, name string, params, results []*FieldDef) ast.Stmt

CallMethodAndAssign create a new assignment

func FuncDecl

func FuncDecl(name string, params, results []*ast.Field, stmts []ast.Stmt) *ast.FuncDecl

FuncDecl create a new FuncDecl

func GetImports

func GetImports(file *ast.File) map[string]string

GetImports return the imports

func IfAdviceIsCompleted

func IfAdviceIsCompleted(results []*FieldDef) ast.Stmt

* var result1 error

if beyondResult1.Value()!=nil{
        result1=beyondResult0.Value().(error)
}

IfAdviceIsCompleted add statements if advice is completed

func NewIdent

func NewIdent(name string) *ast.Ident

NewIdent create an ident

func NewIdentObj

func NewIdentObj(name string) *ast.Ident

NewIdentObj create an ident

func NewIdentObjVar

func NewIdentObjVar(name string) *ast.Ident

NewIdentObjVar create an ident

func ReturnValuesStmt

func ReturnValuesStmt(fields []*FieldDef) ast.Stmt

ReturnValuesStmt return the list of statements

func SetArgValue

func SetArgValue(name string, field *FieldDef, paramName string) ast.Expr

SetArgValue set value to context

func SetArgs

func SetArgs(method string, name string) ast.Stmt

SetArgs set arguments

func SetUpBeyondContext

func SetUpBeyondContext(f *joinpoint.JoinPoint) []ast.Stmt

SetUpBeyondContext return the list of required statements

func TakeArgs

func TakeArgs(name string, method string, declare bool) ast.Stmt

TakeArgs takes the arguments from the method

Types

type FieldDef

type FieldDef struct {
	Name string
	Kind ast.Expr
}

FieldDef struct

func Params

func Params(fields []*ast.Field) []*FieldDef

Params return the params

func Results

func Results(fields []*ast.Field) []*FieldDef

Results return the results

Jump to

Keyboard shortcuts

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