fluxdb

package
v0.1.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetABI(ctx context.Context, startBlock uint32, account eos.AccountName) (*GetABIResponse, error)
	GetTable(ctx context.Context, startBlock uint32, request *GetTableRequest) (*GetTableResponse, error)
	GetTableScopes(ctx context.Context, startBlock uint32, request *GetTableScopesRequest) (*GetTableScopesResponse, error)
	GetTablesMultiScopes(ctx context.Context, startBlock uint32, request *GetTablesMultiScopesRequest) (*GetTablesMultiScopesResponse, error)
	GetAccountByPubKey(ctx context.Context, startBlock uint32, pubKey string) (*GetAccountByPubKeyResponses, error)
}

type DefaultClient

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

func NewClient

func NewClient(addr string, transport http.RoundTripper) *DefaultClient

func (*DefaultClient) GetABI

func (c *DefaultClient) GetABI(ctx context.Context, startBlock uint32, account eos.AccountName) (*GetABIResponse, error)

func (*DefaultClient) GetAccountByPubKey

func (c *DefaultClient) GetAccountByPubKey(ctx context.Context, startBlock uint32, pubKey string) (*GetAccountByPubKeyResponses, error)

func (*DefaultClient) GetTable

func (c *DefaultClient) GetTable(ctx context.Context, startBlock uint32, request *GetTableRequest) (*GetTableResponse, error)

func (*DefaultClient) GetTableScopes

func (c *DefaultClient) GetTableScopes(ctx context.Context, startBlock uint32, request *GetTableScopesRequest) (*GetTableScopesResponse, error)

func (*DefaultClient) GetTablesMultiScopes

func (c *DefaultClient) GetTablesMultiScopes(ctx context.Context, startBlock uint32, request *GetTablesMultiScopesRequest) (*GetTablesMultiScopesResponse, error)

type GetABIResponse

type GetABIResponse struct {
	BlockNum uint32          `json:"block_num"`
	Account  eos.AccountName `json:"account"`
	ABI      *eos.ABI        `json:"abi"`
}

type GetAccountByPubKeyResponses

type GetAccountByPubKeyResponses struct {
	BlockNum     uint32            `json:"block_num"`
	AccountNames []eos.AccountName `json:"account_names"`
}

type GetTableRequest

type GetTableRequest struct {
	Account eos.AccountName
	Scope   eos.Name
	Table   eos.TableName
	KeyType string
	JSON    bool
}

func NewGetTableRequest

func NewGetTableRequest(account eos.AccountName, scope eos.Name, table eos.TableName, keyType string) *GetTableRequest

type GetTableResponse

type GetTableResponse struct {
	LastIrreversibleBlockID  string `json:"last_irreversible_block_id"`
	LastIrreversibleBlockNum uint32 `json:"last_irreversible_block_num"`
	UpToBlockID              string `json:"up_to_block_id"`
	UpToBlockNum             uint32 `json:"up_to_block_num"`

	ABI  *eos.ABI
	Rows json.RawMessage `json:"rows"`
}

type GetTableScopesRequest

type GetTableScopesRequest struct {
	Account eos.AccountName
	Table   eos.TableName
}

type GetTableScopesResponse

type GetTableScopesResponse struct {
	Block_num uint32     `json:"block_num"`
	Scopes    []eos.Name `json:"scopes"`
}

type GetTablesMultiScopesRequest

type GetTablesMultiScopesRequest struct {
	Account eos.AccountName
	Scopes  []eos.Name
	Table   eos.TableName
	KeyType string
	JSON    bool
}

type GetTablesMultiScopesResponse

type GetTablesMultiScopesResponse struct {
	LastIrreversibleBlockID  string `json:"last_irreversible_block_id"`
	LastIrreversibleBlockNum uint32 `json:"last_irreversible_block_num"`
	UpToBlockID              string `json:"up_to_block_id"`
	UpToBlockNum             uint32 `json:"up_to_block_num"`

	Tables []struct {
		Scope string          `json:"scope"`
		Rows  json.RawMessage `json:"rows"`
	} `json:"tables"`
}

type TestClient

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

func NewTestFluxClient

func NewTestFluxClient() *TestClient

func (*TestClient) GetABI

func (c *TestClient) GetABI(ctx context.Context, startBlock uint32, account eos.AccountName) (*GetABIResponse, error)

func (*TestClient) GetAccountByPubKey

func (c *TestClient) GetAccountByPubKey(ctx context.Context, startBlock uint32, pubKey string) (*GetAccountByPubKeyResponses, error)

func (*TestClient) GetTable

func (c *TestClient) GetTable(ctx context.Context, startBlock uint32, request *GetTableRequest) (*GetTableResponse, error)

func (*TestClient) GetTableScopes

func (c *TestClient) GetTableScopes(ctx context.Context, startBlock uint32, request *GetTableScopesRequest) (*GetTableScopesResponse, error)

func (*TestClient) GetTablesMultiScopes

func (c *TestClient) GetTablesMultiScopes(ctx context.Context, startBlock uint32, request *GetTablesMultiScopesRequest) (*GetTablesMultiScopesResponse, error)

func (*TestClient) SetGetABIResponse

func (c *TestClient) SetGetABIResponse(response string, err error) *TestClient

func (*TestClient) SetGetTableResponse

func (c *TestClient) SetGetTableResponse(response string, err error) *TestClient

Jump to

Keyboard shortcuts

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