Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Call ¶
type Call struct {
Method func() (string, error) `json:"method"` // Used to call method
MethodHash string `json:"hash"` // Used to identify call
Endpoint string `json:"endpoint"` // Used for calls to rpc
}
Call - call to specified method
type Environment ¶
type Environment struct {
Stacks []*Stack `json:"stacks"` // Fetch reference to Environment stacks
Calls []*Call `json:"calls"` // Used for storing single-reference calls (not in stacks)
}
Environment - stack-based container capable of holding memory-only runtime values
func NewEnvironment ¶
func NewEnvironment(endpoint string) *Environment
NewEnvironment - initialize and return new instance of Environment struct
func (*Environment) AddCall ¶
func (env *Environment) AddCall(call *Call) error
AddCall - attempt to append call to environment list of calls
func (*Environment) AddStack ¶
func (env *Environment) AddStack(stack *Stack) error
AddStack - attempt to append stack to environment list of stacks
func (*Environment) SearchCallEndpoints ¶
func (env *Environment) SearchCallEndpoints(endpoint string) (*Call, error)
SearchCallEndpoints - query for endpoint in environment calls
func (*Environment) SearchStackEndpoints ¶
func (env *Environment) SearchStackEndpoints(endpoint string) (*Stack, error)
SearchStackEndpoints - query for endpoint in environment stacks
type Stack ¶
type Stack struct {
Calls []*Call `json:"calls"` // Used for referencing and running Stack calls
Endpoint string `json:"endpoint"` // Used for http call references
Memory []*interface{} `json:"memory"` // Used for value storage
}
Stack - struct used for referencing/running multiple calls at once
func (*Stack) AddToMemory ¶
func (stack *Stack) AddToMemory(value *interface{})
AddToMemory - attempt to add specified value to stack memory
Click to show internal directories.
Click to hide internal directories.