gasserviceclient

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LOGGER = logging.MustGetLogger("gasserviceclient")

Functions

This section is empty.

Types

type AccountSeqResponse

type AccountSeqResponse struct {
	Pkey           string
	SequenceNumber string
}

func RetryGetAccountAndSequence

func RetryGetAccountAndSequence(gs *Client, attempts int, sleep time.Duration) (AccountSeqResponse, error)

type Client

type Client struct {
	HTTP HTTPClient
	URL  string
}

func (*Client) GetAccountAndSequence

func (gs *Client) GetAccountAndSequence() (string, uint64, error)

func (*Client) SubmitTxe

func (gs *Client) SubmitTxe(txeOfiRfiSignedB64 string) (string, uint64, error)

type GasServiceClient

type GasServiceClient interface {
	GetAccountAndSequence() (string, uint64, error)
	SubmitTxe(txeOfiRfiSignedB64 string) (string, uint64, error)
}

type HTTPClient

type HTTPClient interface {
	HTTPPoster
	HTTPGetter
}

type HTTPGetter

type HTTPGetter interface {
	Get(url string) (*http.Response, error)
}

type HTTPPoster

type HTTPPoster interface {
	Post(url, contentType string, body io.Reader) (*http.Response, error)
}

type MockClient

type MockClient struct {
	HTTP *http.Client
}

func (*MockClient) GetAccountAndSequence

func (mgs *MockClient) GetAccountAndSequence() (string, uint64, error)

func (*MockClient) SubmitTxe

func (mgs *MockClient) SubmitTxe(txeOfiRfiSignedB64 string) (string, uint64, error)

type SubmitTexResponse

type SubmitTexResponse struct {
	Title  string
	Ledger uint64
	Hash   string
}

Jump to

Keyboard shortcuts

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