requestmanager

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestManager

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

RequestManager manipulates requests

func New

func New(env *solo.Solo) *RequestManager

New instantiates a request manager

func (*RequestManager) MustPost

func (requestManager *RequestManager) MustPost(requesterSigScheme signaturescheme.SignatureScheme, chain *solo.Chain, contractName string, functionName string) dict.Dict

MustPost creates a request to contract function in the chain as requester. Fails test if request fails.

func (*RequestManager) MustPostFail

func (requestManager *RequestManager) MustPostFail(requesterSigScheme signaturescheme.SignatureScheme, chain *solo.Chain, contractName string, functionName string)

MustPostFail creates a request to contract function in the chain as requester. Fails test if request succeeds.

func (*RequestManager) MustView

func (requestManager *RequestManager) MustView(chain *solo.Chain, contractName string,
	functionName string, params ...interface{}) dict.Dict

MustView creates a view request. The contract view in the chain is called with optional params. Returns response as a Dict. Fails test on error.

func (*RequestManager) MustViewFail

func (requestManager *RequestManager) MustViewFail(chain *solo.Chain, contractName string,
	functionName string, params ...interface{})

MustViewFail creates a view request. The contract view in the chain is called with optional params. Fails test if request succeeds.

func (*RequestManager) Post

func (requestManager *RequestManager) Post(requesterSigScheme signaturescheme.SignatureScheme, chain *solo.Chain, contractName string,
	functionName string, params ...interface{}) (dict.Dict, error)

Post creates a request as requester or, if not specified, as the chain originator. The contract function in the chain is called with optional params. Returns response as a Dict or an error.

func (*RequestManager) View

func (requestManager *RequestManager) View(chain *solo.Chain, contractName string,
	functionName string, params ...interface{}) (dict.Dict, error)

View creates a view request. The contract view in the chain is called with optional params. Returns response as a Dict or an error.

Jump to

Keyboard shortcuts

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