client

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ABCIKeyQuery

func ABCIKeyQuery(ctx context.Context, c BnsClient, path string, data []byte, destination *models.KeyModel) error

Types

type ABCIIterator

type ABCIIterator interface {
	Next(orm.Model) ([]byte, error)
}

func ABCIFullRangeQuery

func ABCIFullRangeQuery(ctx context.Context, bns BnsClient, path, data string) ABCIIterator

func ABCIKeyQueryIter added in v0.21.4

func ABCIKeyQueryIter(ctx context.Context, c BnsClient, path string, data []byte) ABCIIterator

func ABCIPrefixQuery added in v0.21.4

func ABCIPrefixQuery(ctx context.Context, c BnsClient, path string, prefix []byte) ABCIIterator

func ABCIRangeQuery

func ABCIRangeQuery(ctx context.Context, c BnsClient, path string, data string) ABCIIterator

type BnsClient

type BnsClient interface {
	Get(ctx context.Context, path string, dest interface{}) error
	Post(ctx context.Context, data []byte, dest interface{}) error
}

BnsClient is implemented by any service that provides access to BNS API.

type HTTPBnsClient

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

HTTPBnsClient implements BnsClient interface and it is using HTTP transport to communicate with BNS instance.

func NewHTTPBnsClient

func NewHTTPBnsClient(apiURL string) *HTTPBnsClient

NewHTTPBnsClient returns an instance of a BnsClient that is using HTTP transport.

func (*HTTPBnsClient) Get

func (c *HTTPBnsClient) Get(ctx context.Context, path string, dest interface{}) error

func (*HTTPBnsClient) Post

func (c *HTTPBnsClient) Post(ctx context.Context, data []byte, dest interface{}) error

Jump to

Keyboard shortcuts

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