requestmanager

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: MIT Imports: 5 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(requesterKeyPair *ed25519.KeyPair, chain *solo.Chain, contractName string,
	functionName string, params ...interface{}) dict.Dict

MustPost creates a request to contract function in the chain as requester. 1 IOTA is necessary to process the request. Fails test if request fails.

func (*RequestManager) MustPostFail

func (requestManager *RequestManager) MustPostFail(requesterKeyPair *ed25519.KeyPair, 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) MustPostWithTransfer added in v0.9.2

func (requestManager *RequestManager) MustPostWithTransfer(requesterKeyPair *ed25519.KeyPair, color colored.Color, amount uint64,
	chain *solo.Chain, contractName string, functionName string, params ...interface{}) dict.Dict

MustPostWithTransfer creates a request to contract function in the chain as requester. It attaches 'amount' of 'color' to call. Fails test if request fails.

func (*RequestManager) MustPostWithTransferFail added in v0.9.2

func (requestManager *RequestManager) MustPostWithTransferFail(requesterKeyPair *ed25519.KeyPair,
	color colored.Color, amount uint64,
	chain *solo.Chain, contractName string, functionName string)

MustPostWithTransferFail creates a request to contract function in the chain as requester. It attaches 'amount' of 'color' to call. 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(requesterKeyPair *ed25519.KeyPair, 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. 1 IOTA is necessary to process the request. The contract function in the chain is called with optional params. Returns response as a Dict or an error.

func (*RequestManager) PostWithTransfer added in v0.9.2

func (requestManager *RequestManager) PostWithTransfer(requesterKeyPair *ed25519.KeyPair, color colored.Color, amount uint64,
	chain *solo.Chain, contractName string, functionName string, params ...interface{}) (dict.Dict, error)

PostWithTransfer creates a request as requester or, if not specified, as the chain originator. The contract function in the chain is called with optional params. It attaches 'amount' of 'color' to call. 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