access

package
v0.31.14 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is a simple implementation of the generated AccessAPIServer interface. It uses an index reader interface as the backend to retrieve the desired data. This is generally an on-disk interface, but could be a GRPC-based index as well, in which case there is a double redirection.

func NewServer

func NewServer(index archive.Reader, invoker accessModel.Invoker) *Server

NewServer creates a new server, using the provided index reader as a backend for data retrieval.

func (*Server) ExecuteScriptAtBlockHeight

ExecuteScriptAtBlockHeight implements the ExecuteScriptAtBlockHeight endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#executescriptatblockheight

func (*Server) ExecuteScriptAtBlockID

ExecuteScriptAtBlockID implements the ExecuteScriptAtBlockID endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#executescriptatblockid

func (*Server) ExecuteScriptAtLatestBlock

ExecuteScriptAtLatestBlock implements the ExecuteScriptAtLatestBlock endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#executescriptatlatestblock

func (*Server) GetAccount

GetAccount implements the GetAccount endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getaccount

func (*Server) GetAccountAtBlockHeight

func (s *Server) GetAccountAtBlockHeight(ctx context.Context, in *access.GetAccountAtBlockHeightRequest) (*access.AccountResponse, error)

GetAccountAtBlockHeight implements the GetAccountAtBlockHeight endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getaccountatblockheight

func (*Server) GetAccountAtLatestBlock

func (s *Server) GetAccountAtLatestBlock(ctx context.Context, in *access.GetAccountAtLatestBlockRequest) (*access.AccountResponse, error)

GetAccountAtLatestBlock implements the GetAccountAtLatestBlock endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getaccountatlatestblock

func (*Server) GetBlockByHeight

GetBlockByHeight implements the GetBlockByHeight endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getblockbyheight

func (*Server) GetBlockByID

func (s *Server) GetBlockByID(ctx context.Context, in *access.GetBlockByIDRequest) (*access.BlockResponse, error)

GetBlockByID implements the GetBlockByID endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getblockbyid

func (*Server) GetBlockHeaderByHeight

GetBlockHeaderByHeight implements the GetBlockHeaderByHeight endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getblockheaderbyheight

func (*Server) GetBlockHeaderByID

GetBlockHeaderByID implements the GetBlockHeaderByID endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getblockheaderbyid

func (*Server) GetCollectionByID

GetCollectionByID implements the GetCollectionByID endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getcollectionbyid

func (*Server) GetEventsForBlockIDs

func (s *Server) GetEventsForBlockIDs(_ context.Context, in *access.GetEventsForBlockIDsRequest) (*access.EventsResponse, error)

GetEventsForBlockIDs implements the GetEventsForBlockIDs endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#geteventsforblockids

func (*Server) GetEventsForHeightRange

func (s *Server) GetEventsForHeightRange(_ context.Context, in *access.GetEventsForHeightRangeRequest) (*access.EventsResponse, error)

GetEventsForHeightRange implements the GetEventsForHeightRange endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#geteventsforheightrange

func (*Server) GetLatestBlock

func (s *Server) GetLatestBlock(ctx context.Context, in *access.GetLatestBlockRequest) (*access.BlockResponse, error)

GetLatestBlock implements the GetLatestBlock endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getlatestblock

func (*Server) GetLatestBlockHeader

GetLatestBlockHeader implements the GetLatestBlockHeader endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getlatestblockheader

func (*Server) GetNetworkParameters

GetNetworkParameters implements the GetNetworkParameters endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#getnetworkparameters

func (*Server) GetTransaction

GetTransaction implements the GetTransaction endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#gettransaction

func (*Server) GetTransactionResult

GetTransactionResult implements the GetTransactionResult endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#gettransactionresult

func (*Server) GetTransactionResultByIndex

func (s *Server) GetTransactionResultByIndex(ctx context.Context, in *access.GetTransactionByIndexRequest) (*access.TransactionResultResponse, error)

GetTransactionResultByIndex implements the GetTransactionResultByIndex endpoint from the Flow Access API.

func (*Server) GetTransactionResultsByBlockID

func (s *Server) GetTransactionResultsByBlockID(ctx context.Context, in *access.GetTransactionsByBlockIDRequest) (*access.TransactionResultsResponse, error)

GetTransactionResultsByBlockID implements the GetTransactionResultsByBlockID endpoint from the Flow Access API.

func (*Server) GetTransactionsByBlockID

GetTransactionsByBlockID implements the GetTransactionsByBlockID endpoint from the Flow Access API.

func (*Server) Ping

Ping implements the Ping endpoint from the Flow Access API. See https://docs.onflow.org/access-api/#ping

func (*Server) SendTransaction

SendTransaction is not implemented. See https://docs.onflow.org/access-api/#sendtransaction

Jump to

Keyboard shortcuts

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