Documentation ¶
Overview ¶
Package client provides a GraphQL client for consuming logs.
Index ¶
- Constants
- type Client
- func (c *Client) GetBlockTime(ctx context.Context, chainID int, blockNumber int, ...) (*GetBlockTime, error)
- func (c *Client) GetBlockTimeCount(ctx context.Context, chainID int, ...) (*GetBlockTimeCount, error)
- func (c *Client) GetFirstStoredBlockNumber(ctx context.Context, chainID int, ...) (*GetFirstStoredBlockNumber, error)
- func (c *Client) GetLastConfirmedBlockNumber(ctx context.Context, chainID int, ...) (*GetLastConfirmedBlockNumber, error)
- func (c *Client) GetLastIndexed(ctx context.Context, chainID int, contractAddress string, ...) (*GetLastIndexed, error)
- func (c *Client) GetLastStoredBlockNumber(ctx context.Context, chainID int, ...) (*GetLastStoredBlockNumber, error)
- func (c *Client) GetLogCount(ctx context.Context, chainID int, contractAddress string, ...) (*GetLogCount, error)
- func (c *Client) GetLogsAndTransactionsRange(ctx context.Context, chainID int, startBlock int, endBlock int, page int, ...) (*GetLogsAndTransactionsRange, error)
- func (c *Client) GetLogsRange(ctx context.Context, chainID int, startBlock int, endBlock int, page int, ...) (*GetLogsRange, error)
- func (c *Client) GetReceiptCount(ctx context.Context, chainID int, ...) (*GetReceiptCount, error)
- func (c *Client) GetTransactions(ctx context.Context, chainID int, page int, txHash *string, ...) (*GetTransactions, error)
- func (c *Client) GetTransactionsRange(ctx context.Context, chainID int, startBlock int, endBlock int, page int, ...) (*GetTransactionsRange, error)
- func (c *Client) GetTxSender(ctx context.Context, chainID int, txHash string, ...) (*GetTxSender, error)
- type GetBlockTime
- type GetBlockTimeCount
- type GetFirstStoredBlockNumber
- type GetLastConfirmedBlockNumber
- type GetLastIndexed
- type GetLastStoredBlockNumber
- type GetLogCount
- type GetLogsAndTransactionsRange
- type GetLogsRange
- type GetReceiptCount
- type GetTransactions
- type GetTransactionsRange
- type GetTxSender
- type Query
Constants ¶
View Source
const GetBlockTimeCountDocument = `query GetBlockTimeCount ($chain_id: Int!) {
response: blockTimeCount(chain_id: $chain_id)
}
`
View Source
const GetBlockTimeDocument = `` /* 133-byte string literal not displayed */
View Source
const GetFirstStoredBlockNumberDocument = `query GetFirstStoredBlockNumber ($chain_id: Int!) {
response: firstStoredBlockNumber(chain_id: $chain_id)
}
`
View Source
const GetLastConfirmedBlockNumberDocument = `query GetLastConfirmedBlockNumber ($chain_id: Int!) {
response: lastConfirmedBlockNumber(chain_id: $chain_id)
}
`
View Source
const GetLastIndexedDocument = `` /* 152-byte string literal not displayed */
View Source
const GetLastStoredBlockNumberDocument = `query GetLastStoredBlockNumber ($chain_id: Int!) {
response: lastStoredBlockNumber(chain_id: $chain_id)
}
`
View Source
const GetLogCountDocument = `` /* 146-byte string literal not displayed */
View Source
const GetLogsAndTransactionsRangeDocument = `` /* 665-byte string literal not displayed */
View Source
const GetLogsRangeDocument = `` /* 379-byte string literal not displayed */
View Source
const GetReceiptCountDocument = `query GetReceiptCount ($chain_id: Int!) {
response: receiptCount(chain_id: $chain_id)
}
`
View Source
const GetTransactionsDocument = `` /* 292-byte string literal not displayed */
View Source
const GetTransactionsRangeDocument = `` /* 353-byte string literal not displayed */
View Source
const GetTxSenderDocument = `query GetTxSender ($chain_id: Int!, $tx_hash: String!) {
response: txSender(chain_id: $chain_id, tx_hash: $tx_hash)
}
`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) GetBlockTime ¶
func (c *Client) GetBlockTime(ctx context.Context, chainID int, blockNumber int, httpRequestOptions ...client.HTTPRequestOption) (*GetBlockTime, error)
func (*Client) GetBlockTimeCount ¶
func (c *Client) GetBlockTimeCount(ctx context.Context, chainID int, httpRequestOptions ...client.HTTPRequestOption) (*GetBlockTimeCount, error)
func (*Client) GetFirstStoredBlockNumber ¶
func (c *Client) GetFirstStoredBlockNumber(ctx context.Context, chainID int, httpRequestOptions ...client.HTTPRequestOption) (*GetFirstStoredBlockNumber, error)
func (*Client) GetLastConfirmedBlockNumber ¶
func (c *Client) GetLastConfirmedBlockNumber(ctx context.Context, chainID int, httpRequestOptions ...client.HTTPRequestOption) (*GetLastConfirmedBlockNumber, error)
func (*Client) GetLastIndexed ¶
func (c *Client) GetLastIndexed(ctx context.Context, chainID int, contractAddress string, httpRequestOptions ...client.HTTPRequestOption) (*GetLastIndexed, error)
func (*Client) GetLastStoredBlockNumber ¶
func (c *Client) GetLastStoredBlockNumber(ctx context.Context, chainID int, httpRequestOptions ...client.HTTPRequestOption) (*GetLastStoredBlockNumber, error)
func (*Client) GetLogCount ¶
func (c *Client) GetLogCount(ctx context.Context, chainID int, contractAddress string, httpRequestOptions ...client.HTTPRequestOption) (*GetLogCount, error)
func (*Client) GetLogsAndTransactionsRange ¶
func (*Client) GetLogsRange ¶
func (*Client) GetReceiptCount ¶
func (c *Client) GetReceiptCount(ctx context.Context, chainID int, httpRequestOptions ...client.HTTPRequestOption) (*GetReceiptCount, error)
func (*Client) GetTransactions ¶
func (c *Client) GetTransactions(ctx context.Context, chainID int, page int, txHash *string, httpRequestOptions ...client.HTTPRequestOption) (*GetTransactions, error)
func (*Client) GetTransactionsRange ¶
func (*Client) GetTxSender ¶
func (c *Client) GetTxSender(ctx context.Context, chainID int, txHash string, httpRequestOptions ...client.HTTPRequestOption) (*GetTxSender, error)
type GetBlockTime ¶
type GetBlockTime struct {
Response *int "json:\"response\" graphql:\"response\""
}
type GetBlockTimeCount ¶
type GetBlockTimeCount struct {
Response *int "json:\"response\" graphql:\"response\""
}
type GetFirstStoredBlockNumber ¶
type GetFirstStoredBlockNumber struct {
Response *int "json:\"response\" graphql:\"response\""
}
type GetLastConfirmedBlockNumber ¶
type GetLastConfirmedBlockNumber struct {
Response *int "json:\"response\" graphql:\"response\""
}
type GetLastIndexed ¶
type GetLastIndexed struct {
Response *int "json:\"response\" graphql:\"response\""
}
type GetLastStoredBlockNumber ¶
type GetLastStoredBlockNumber struct {
Response *int "json:\"response\" graphql:\"response\""
}
type GetLogCount ¶
type GetLogCount struct {
Response *int "json:\"response\" graphql:\"response\""
}
type GetLogsAndTransactionsRange ¶
type GetLogsAndTransactionsRange struct { Response []*struct { ChainID int "json:\"chain_id\" graphql:\"chain_id\"" TxHash string "json:\"tx_hash\" graphql:\"tx_hash\"" Protected bool "json:\"protected\" graphql:\"protected\"" Type int "json:\"type\" graphql:\"type\"" Data string "json:\"data\" graphql:\"data\"" Gas int "json:\"gas\" graphql:\"gas\"" GasPrice int "json:\"gas_price\" graphql:\"gas_price\"" GasTipCap string "json:\"gas_tip_cap\" graphql:\"gas_tip_cap\"" GasFeeCap string "json:\"gas_fee_cap\" graphql:\"gas_fee_cap\"" Value string "json:\"value\" graphql:\"value\"" Nonce int "json:\"nonce\" graphql:\"nonce\"" To string "json:\"to\" graphql:\"to\"" Timestamp int "json:\"timestamp\" graphql:\"timestamp\"" Sender string "json:\"sender\" graphql:\"sender\"" } "json:\"response\" graphql:\"response\"" LogsRange []*struct { ContractAddress string "json:\"contract_address\" graphql:\"contract_address\"" ChainID int "json:\"chain_id\" graphql:\"chain_id\"" Topics []string "json:\"topics\" graphql:\"topics\"" Data string "json:\"data\" graphql:\"data\"" BlockNumber int "json:\"block_number\" graphql:\"block_number\"" TxHash string "json:\"tx_hash\" graphql:\"tx_hash\"" TxIndex int "json:\"tx_index\" graphql:\"tx_index\"" BlockHash string "json:\"block_hash\" graphql:\"block_hash\"" Index int "json:\"index\" graphql:\"index\"" Removed bool "json:\"removed\" graphql:\"removed\"" } "json:\"logsRange\" graphql:\"logsRange\"" }
type GetLogsRange ¶
type GetLogsRange struct { Response []*struct { ContractAddress string "json:\"contract_address\" graphql:\"contract_address\"" ChainID int "json:\"chain_id\" graphql:\"chain_id\"" Topics []string "json:\"topics\" graphql:\"topics\"" Data string "json:\"data\" graphql:\"data\"" BlockNumber int "json:\"block_number\" graphql:\"block_number\"" TxHash string "json:\"tx_hash\" graphql:\"tx_hash\"" TxIndex int "json:\"tx_index\" graphql:\"tx_index\"" BlockHash string "json:\"block_hash\" graphql:\"block_hash\"" Index int "json:\"index\" graphql:\"index\"" Removed bool "json:\"removed\" graphql:\"removed\"" } "json:\"response\" graphql:\"response\"" }
type GetReceiptCount ¶
type GetReceiptCount struct {
Response *int "json:\"response\" graphql:\"response\""
}
type GetTransactions ¶
type GetTransactions struct { Response []*struct { ChainID int "json:\"chain_id\" graphql:\"chain_id\"" TxHash string "json:\"tx_hash\" graphql:\"tx_hash\"" Protected bool "json:\"protected\" graphql:\"protected\"" Type int "json:\"type\" graphql:\"type\"" Data string "json:\"data\" graphql:\"data\"" Gas int "json:\"gas\" graphql:\"gas\"" GasPrice int "json:\"gas_price\" graphql:\"gas_price\"" GasTipCap string "json:\"gas_tip_cap\" graphql:\"gas_tip_cap\"" GasFeeCap string "json:\"gas_fee_cap\" graphql:\"gas_fee_cap\"" Value string "json:\"value\" graphql:\"value\"" Nonce int "json:\"nonce\" graphql:\"nonce\"" To string "json:\"to\" graphql:\"to\"" Timestamp int "json:\"timestamp\" graphql:\"timestamp\"" Sender string "json:\"sender\" graphql:\"sender\"" } "json:\"response\" graphql:\"response\"" }
type GetTransactionsRange ¶
type GetTransactionsRange struct { Response []*struct { ChainID int "json:\"chain_id\" graphql:\"chain_id\"" TxHash string "json:\"tx_hash\" graphql:\"tx_hash\"" Protected bool "json:\"protected\" graphql:\"protected\"" Type int "json:\"type\" graphql:\"type\"" Data string "json:\"data\" graphql:\"data\"" Gas int "json:\"gas\" graphql:\"gas\"" GasPrice int "json:\"gas_price\" graphql:\"gas_price\"" GasTipCap string "json:\"gas_tip_cap\" graphql:\"gas_tip_cap\"" GasFeeCap string "json:\"gas_fee_cap\" graphql:\"gas_fee_cap\"" Value string "json:\"value\" graphql:\"value\"" Nonce int "json:\"nonce\" graphql:\"nonce\"" To string "json:\"to\" graphql:\"to\"" Timestamp int "json:\"timestamp\" graphql:\"timestamp\"" Sender string "json:\"sender\" graphql:\"sender\"" } "json:\"response\" graphql:\"response\"" }
type GetTxSender ¶
type GetTxSender struct {
Response *string "json:\"response\" graphql:\"response\""
}
type Query ¶
type Query struct { Logs []*model.Log "json:\"logs\" graphql:\"logs\"" LogsRange []*model.Log "json:\"logsRange\" graphql:\"logsRange\"" TransactionsRange []*model.Transaction "json:\"transactionsRange\" graphql:\"transactionsRange\"" Receipts []*model.Receipt "json:\"receipts\" graphql:\"receipts\"" ReceiptsRange []*model.Receipt "json:\"receiptsRange\" graphql:\"receiptsRange\"" Transactions []*model.Transaction "json:\"transactions\" graphql:\"transactions\"" BlockTime *int "json:\"blockTime\" graphql:\"blockTime\"" LastStoredBlockNumber *int "json:\"lastStoredBlockNumber\" graphql:\"lastStoredBlockNumber\"" FirstStoredBlockNumber *int "json:\"firstStoredBlockNumber\" graphql:\"firstStoredBlockNumber\"" LastConfirmedBlockNumber *int "json:\"lastConfirmedBlockNumber\" graphql:\"lastConfirmedBlockNumber\"" TxSender *string "json:\"txSender\" graphql:\"txSender\"" LastIndexed *int "json:\"lastIndexed\" graphql:\"lastIndexed\"" LogCount *int "json:\"logCount\" graphql:\"logCount\"" ReceiptCount *int "json:\"receiptCount\" graphql:\"receiptCount\"" BlockTimeCount *int "json:\"blockTimeCount\" graphql:\"blockTimeCount\"" LogsAtHeadRange []*model.Log "json:\"logsAtHeadRange\" graphql:\"logsAtHeadRange\"" ReceiptsAtHeadRange []*model.Receipt "json:\"receiptsAtHeadRange\" graphql:\"receiptsAtHeadRange\"" TransactionsAtHeadRange []*model.Transaction "json:\"transactionsAtHeadRange\" graphql:\"transactionsAtHeadRange\"" }
Directories ¶
Path | Synopsis |
---|---|
Package main generates a GQL client.
|
Package main generates a GQL client. |
Package model defines models returned by the graphql server
|
Package model defines models returned by the graphql server |
Package resolvers resolves data from gqlgen
|
Package resolvers resolves data from gqlgen |
Package types provides the GraphQL types for the Scribe service.
|
Package types provides the GraphQL types for the Scribe service. |
Click to show internal directories.
Click to hide internal directories.