context

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: 1 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arg

type Arg struct {
	// contains filtered or unexported fields
}

Arg contains attributes to efine an argument

func NewArg

func NewArg(name string, value interface{}) *Arg

NewArg constructs an instance of arg

func (*Arg) Is

func (a *Arg) Is(t reflect.Type) bool

Is check if argument has the provided type

func (*Arg) IsError

func (a *Arg) IsError() bool

IsError check if argument is an error

func (*Arg) Kind

func (a *Arg) Kind() string

Kind returns the argument type

func (*Arg) Name

func (a *Arg) Name() string

Name returns the argument name

func (*Arg) Value

func (a *Arg) Value() interface{}

Value returns the argument value

type Args

type Args struct {
	// contains filtered or unexported fields
}

Args struct

func (*Args) At

func (args *Args) At(index int) *Arg

At returns the argument in the given position

func (*Args) Count

func (args *Args) Count() int

Count returns the number of elements in the list

func (*Args) Find

func (args *Args) Find(fn func(int, *Arg) bool) (int, *Arg)

Find executes find the first argument that matche with the given expression

func (*Args) ForEach

func (args *Args) ForEach(fn func(int, *Arg))

ForEach executes the given function for each arg

func (*Args) Get

func (args *Args) Get(name string) *Arg

Get returns the argument with given name

func (*Args) Set

func (args *Args) Set(name string, value interface{})

Set set a value for the given argument

func (*Args) SetAt

func (args *Args) SetAt(index int, value interface{})

SetAt set a value in the given position

func (*Args) SetWithType

func (args *Args) SetWithType(name string, value interface{}, argType string)

SetWithType set a value for the given argument

type BeyondContext

type BeyondContext struct {
	// contains filtered or unexported fields
}

BeyondContext Beyond context

func NewContext

func NewContext() *BeyondContext

NewContext constructor for beyond context

func (*BeyondContext) Exit

func (c *BeyondContext) Exit()

Exit won't call joinpoint

func (*BeyondContext) Function

func (c *BeyondContext) Function() string

Function returns the name of the function

func (*BeyondContext) Get

func (c *BeyondContext) Get(key string) interface{}

Get return the argument value

func (*BeyondContext) IsCompleted

func (c *BeyondContext) IsCompleted() bool

IsCompleted returns true if flow must stop

func (*BeyondContext) Params

func (c *BeyondContext) Params() *Args

Params returns the input arguments

func (*BeyondContext) Pkg

func (c *BeyondContext) Pkg() string

Pkg returns the package

func (*BeyondContext) Results

func (c *BeyondContext) Results() *Args

Results returns the output arguments

func (*BeyondContext) Set

func (c *BeyondContext) Set(key string, value interface{})

Set set context value

func (*BeyondContext) SetParams

func (c *BeyondContext) SetParams(args *Args) *BeyondContext

SetParams set the input arguments

func (*BeyondContext) SetResults

func (c *BeyondContext) SetResults(args *Args) *BeyondContext

SetResults set the output arguments

func (*BeyondContext) Type

func (c *BeyondContext) Type() interface{}

Type returns the type

func (*BeyondContext) WithName

func (c *BeyondContext) WithName(v string) *BeyondContext

WithName set the function name

func (*BeyondContext) WithPkg

func (c *BeyondContext) WithPkg(v string) *BeyondContext

WithPkg set the package

func (*BeyondContext) WithType

func (c *BeyondContext) WithType(v interface{}) *BeyondContext

WithType set the function type

Jump to

Keyboard shortcuts

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