readerclient

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

This package contains a client for the GraphQL reader API for testing purposes.

Index

Constants

View Source
const GetNotice_Operation = `` /* 144-byte string literal not displayed */

The query or mutation executed by GetNotice.

View Source
const GetVoucher_Operation = `` /* 163-byte string literal not displayed */

The query or mutation executed by GetVoucher.

View Source
const InputStatus_Operation = `
query InputStatus ($index: Int!) {
	input(index: $index) {
		status
	}
}
`

The query or mutation executed by InputStatus.

View Source
const State_Operation = `` /* 423-byte string literal not displayed */

The query or mutation executed by State.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompletionStatus

type CompletionStatus string
const (
	CompletionStatusUnprocessed                CompletionStatus = "UNPROCESSED"
	CompletionStatusAccepted                   CompletionStatus = "ACCEPTED"
	CompletionStatusRejected                   CompletionStatus = "REJECTED"
	CompletionStatusException                  CompletionStatus = "EXCEPTION"
	CompletionStatusMachineHalted              CompletionStatus = "MACHINE_HALTED"
	CompletionStatusCycleLimitExceeded         CompletionStatus = "CYCLE_LIMIT_EXCEEDED"
	CompletionStatusTimeLimitExceeded          CompletionStatus = "TIME_LIMIT_EXCEEDED"
	CompletionStatusPayloadLengthLimitExceeded CompletionStatus = "PAYLOAD_LENGTH_LIMIT_EXCEEDED"
)

type GetNoticeNotice added in v1.0.1

type GetNoticeNotice struct {
	// Notice index within the context of the input that produced it
	Index int `json:"index"`
	// Notice data as a payload in Ethereum hex binary format, starting with '0x'
	Payload string `json:"payload"`
}

GetNoticeNotice includes the requested fields of the GraphQL type Notice. The GraphQL type's documentation follows.

Informational statement that can be validated in the base layer blockchain

func (*GetNoticeNotice) GetIndex added in v1.0.1

func (v *GetNoticeNotice) GetIndex() int

GetIndex returns GetNoticeNotice.Index, and is useful for accessing the field via an interface.

func (*GetNoticeNotice) GetPayload added in v1.0.1

func (v *GetNoticeNotice) GetPayload() string

GetPayload returns GetNoticeNotice.Payload, and is useful for accessing the field via an interface.

type GetNoticeResponse added in v1.0.1

type GetNoticeResponse struct {
	// Get a notice based on its index
	Notice GetNoticeNotice `json:"notice"`
}

GetNoticeResponse is returned by GetNotice on success.

func GetNotice added in v1.0.1

func GetNotice(
	ctx context.Context,
	client graphql.Client,
	noticeIndex int,
	inputIndex int,
) (*GetNoticeResponse, error)

func (*GetNoticeResponse) GetNotice added in v1.0.1

func (v *GetNoticeResponse) GetNotice() GetNoticeNotice

GetNotice returns GetNoticeResponse.Notice, and is useful for accessing the field via an interface.

type GetVoucherResponse

type GetVoucherResponse struct {
	// Get a voucher based on its index
	Voucher GetVoucherVoucher `json:"voucher"`
}

GetVoucherResponse is returned by GetVoucher on success.

func GetVoucher

func GetVoucher(
	ctx context.Context,
	client graphql.Client,
	voucherIndex int,
	inputIndex int,
) (*GetVoucherResponse, error)

func (*GetVoucherResponse) GetVoucher

func (v *GetVoucherResponse) GetVoucher() GetVoucherVoucher

GetVoucher returns GetVoucherResponse.Voucher, and is useful for accessing the field via an interface.

type GetVoucherVoucher

type GetVoucherVoucher struct {
	// Voucher index within the context of the input that produced it
	Index int `json:"index"`
	// Transaction payload in Ethereum hex binary format, starting with '0x'
	Payload string `json:"payload"`
	// Transaction destination address in Ethereum hex binary format (20 bytes), starting with '0x'
	Destination string `json:"destination"`
}

GetVoucherVoucher includes the requested fields of the GraphQL type Voucher. The GraphQL type's documentation follows.

Representation of a transaction that can be carried out on the base layer blockchain, such as a transfer of assets

func (*GetVoucherVoucher) GetDestination

func (v *GetVoucherVoucher) GetDestination() string

GetDestination returns GetVoucherVoucher.Destination, and is useful for accessing the field via an interface.

func (*GetVoucherVoucher) GetIndex

func (v *GetVoucherVoucher) GetIndex() int

GetIndex returns GetVoucherVoucher.Index, and is useful for accessing the field via an interface.

func (*GetVoucherVoucher) GetPayload

func (v *GetVoucherVoucher) GetPayload() string

GetPayload returns GetVoucherVoucher.Payload, and is useful for accessing the field via an interface.

type InputStatusInput

type InputStatusInput struct {
	// Status of the input
	Status CompletionStatus `json:"status"`
}

InputStatusInput includes the requested fields of the GraphQL type Input. The GraphQL type's documentation follows.

Request submitted to the application to advance its state

func (*InputStatusInput) GetStatus

func (v *InputStatusInput) GetStatus() CompletionStatus

GetStatus returns InputStatusInput.Status, and is useful for accessing the field via an interface.

type InputStatusResponse

type InputStatusResponse struct {
	// Get input based on its identifier
	Input InputStatusInput `json:"input"`
}

InputStatusResponse is returned by InputStatus on success.

func InputStatus

func InputStatus(
	ctx context.Context,
	client graphql.Client,
	index int,
) (*InputStatusResponse, error)

Get the input status.

func (*InputStatusResponse) GetInput

func (v *InputStatusResponse) GetInput() InputStatusInput

GetInput returns InputStatusResponse.Input, and is useful for accessing the field via an interface.

type StateInputsInputConnection

type StateInputsInputConnection struct {
	// Pagination entries returned for the current page
	Edges []StateInputsInputConnectionEdgesInputEdge `json:"edges"`
}

StateInputsInputConnection includes the requested fields of the GraphQL type InputConnection. The GraphQL type's documentation follows.

Pagination result

func (*StateInputsInputConnection) GetEdges

GetEdges returns StateInputsInputConnection.Edges, and is useful for accessing the field via an interface.

type StateInputsInputConnectionEdgesInputEdge

type StateInputsInputConnectionEdgesInputEdge struct {
	// Node instance
	Node StateInputsInputConnectionEdgesInputEdgeNodeInput `json:"node"`
}

StateInputsInputConnectionEdgesInputEdge includes the requested fields of the GraphQL type InputEdge. The GraphQL type's documentation follows.

Pagination entry

func (*StateInputsInputConnectionEdgesInputEdge) GetNode

GetNode returns StateInputsInputConnectionEdgesInputEdge.Node, and is useful for accessing the field via an interface.

type StateInputsInputConnectionEdgesInputEdgeNodeInput

type StateInputsInputConnectionEdgesInputEdgeNodeInput struct {
	// Input index starting from genesis
	Index int `json:"index"`
	// Status of the input
	Status CompletionStatus `json:"status"`
	// Address responsible for submitting the input
	MsgSender string `json:"msgSender"`
	// Timestamp associated with the input submission, as defined by the base layer's block in which it was recorded
	Timestamp string `json:"timestamp"`
	// Number of the base layer block in which the input was recorded
	BlockNumber string `json:"blockNumber"`
	// Input payload in Ethereum hex binary format, starting with '0x'
	Payload string `json:"payload"`
	// Get notices from this particular input with support for pagination
	Notices StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnection `json:"notices"`
	// Get vouchers from this particular input with support for pagination
	Vouchers StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnection `json:"vouchers"`
	// Get reports from this particular input with support for pagination
	Reports StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnection `json:"reports"`
}

StateInputsInputConnectionEdgesInputEdgeNodeInput includes the requested fields of the GraphQL type Input. The GraphQL type's documentation follows.

Request submitted to the application to advance its state

func (*StateInputsInputConnectionEdgesInputEdgeNodeInput) GetBlockNumber

GetBlockNumber returns StateInputsInputConnectionEdgesInputEdgeNodeInput.BlockNumber, and is useful for accessing the field via an interface.

func (*StateInputsInputConnectionEdgesInputEdgeNodeInput) GetIndex

GetIndex returns StateInputsInputConnectionEdgesInputEdgeNodeInput.Index, and is useful for accessing the field via an interface.

func (*StateInputsInputConnectionEdgesInputEdgeNodeInput) GetMsgSender

GetMsgSender returns StateInputsInputConnectionEdgesInputEdgeNodeInput.MsgSender, and is useful for accessing the field via an interface.

func (*StateInputsInputConnectionEdgesInputEdgeNodeInput) GetNotices

GetNotices returns StateInputsInputConnectionEdgesInputEdgeNodeInput.Notices, and is useful for accessing the field via an interface.

func (*StateInputsInputConnectionEdgesInputEdgeNodeInput) GetPayload

GetPayload returns StateInputsInputConnectionEdgesInputEdgeNodeInput.Payload, and is useful for accessing the field via an interface.

func (*StateInputsInputConnectionEdgesInputEdgeNodeInput) GetReports

GetReports returns StateInputsInputConnectionEdgesInputEdgeNodeInput.Reports, and is useful for accessing the field via an interface.

func (*StateInputsInputConnectionEdgesInputEdgeNodeInput) GetStatus

GetStatus returns StateInputsInputConnectionEdgesInputEdgeNodeInput.Status, and is useful for accessing the field via an interface.

func (*StateInputsInputConnectionEdgesInputEdgeNodeInput) GetTimestamp

GetTimestamp returns StateInputsInputConnectionEdgesInputEdgeNodeInput.Timestamp, and is useful for accessing the field via an interface.

func (*StateInputsInputConnectionEdgesInputEdgeNodeInput) GetVouchers

GetVouchers returns StateInputsInputConnectionEdgesInputEdgeNodeInput.Vouchers, and is useful for accessing the field via an interface.

type StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnection

type StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnection struct {
	// Pagination entries returned for the current page
	Edges []StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnectionEdgesNoticeEdge `json:"edges"`
}

StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnection includes the requested fields of the GraphQL type NoticeConnection. The GraphQL type's documentation follows.

Pagination result

func (*StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnection) GetEdges

GetEdges returns StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnection.Edges, and is useful for accessing the field via an interface.

type StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnectionEdgesNoticeEdge

type StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnectionEdgesNoticeEdge struct {
	// Node instance
	Node StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnectionEdgesNoticeEdgeNodeNotice `json:"node"`
}

StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnectionEdgesNoticeEdge includes the requested fields of the GraphQL type NoticeEdge. The GraphQL type's documentation follows.

Pagination entry

func (*StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnectionEdgesNoticeEdge) GetNode

GetNode returns StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnectionEdgesNoticeEdge.Node, and is useful for accessing the field via an interface.

type StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnectionEdgesNoticeEdgeNodeNotice

type StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnectionEdgesNoticeEdgeNodeNotice struct {
	// Notice index within the context of the input that produced it
	Index int `json:"index"`
	// Notice data as a payload in Ethereum hex binary format, starting with '0x'
	Payload string `json:"payload"`
}

StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnectionEdgesNoticeEdgeNodeNotice includes the requested fields of the GraphQL type Notice. The GraphQL type's documentation follows.

Informational statement that can be validated in the base layer blockchain

func (*StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnectionEdgesNoticeEdgeNodeNotice) GetIndex

GetIndex returns StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnectionEdgesNoticeEdgeNodeNotice.Index, and is useful for accessing the field via an interface.

func (*StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnectionEdgesNoticeEdgeNodeNotice) GetPayload

GetPayload returns StateInputsInputConnectionEdgesInputEdgeNodeInputNoticesNoticeConnectionEdgesNoticeEdgeNodeNotice.Payload, and is useful for accessing the field via an interface.

type StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnection

type StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnection struct {
	// Pagination entries returned for the current page
	Edges []StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnectionEdgesReportEdge `json:"edges"`
}

StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnection includes the requested fields of the GraphQL type ReportConnection. The GraphQL type's documentation follows.

Pagination result

func (*StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnection) GetEdges

GetEdges returns StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnection.Edges, and is useful for accessing the field via an interface.

type StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnectionEdgesReportEdge

type StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnectionEdgesReportEdge struct {
	// Node instance
	Node StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnectionEdgesReportEdgeNodeReport `json:"node"`
}

StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnectionEdgesReportEdge includes the requested fields of the GraphQL type ReportEdge. The GraphQL type's documentation follows.

Pagination entry

func (*StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnectionEdgesReportEdge) GetNode

GetNode returns StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnectionEdgesReportEdge.Node, and is useful for accessing the field via an interface.

type StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnectionEdgesReportEdgeNodeReport

type StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnectionEdgesReportEdgeNodeReport struct {
	// Report index within the context of the input that produced it
	Index int `json:"index"`
	// Report data as a payload in Ethereum hex binary format, starting with '0x'
	Payload string `json:"payload"`
}

StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnectionEdgesReportEdgeNodeReport includes the requested fields of the GraphQL type Report. The GraphQL type's documentation follows.

Application log or diagnostic information

func (*StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnectionEdgesReportEdgeNodeReport) GetIndex

GetIndex returns StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnectionEdgesReportEdgeNodeReport.Index, and is useful for accessing the field via an interface.

func (*StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnectionEdgesReportEdgeNodeReport) GetPayload

GetPayload returns StateInputsInputConnectionEdgesInputEdgeNodeInputReportsReportConnectionEdgesReportEdgeNodeReport.Payload, and is useful for accessing the field via an interface.

type StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnection

type StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnection struct {
	// Pagination entries returned for the current page
	Edges []StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdge `json:"edges"`
}

StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnection includes the requested fields of the GraphQL type VoucherConnection. The GraphQL type's documentation follows.

Pagination result

func (*StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnection) GetEdges

GetEdges returns StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnection.Edges, and is useful for accessing the field via an interface.

type StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdge

type StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdge struct {
	// Node instance
	Node StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdgeNodeVoucher `json:"node"`
}

StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdge includes the requested fields of the GraphQL type VoucherEdge. The GraphQL type's documentation follows.

Pagination entry

func (*StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdge) GetNode

GetNode returns StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdge.Node, and is useful for accessing the field via an interface.

type StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdgeNodeVoucher

type StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdgeNodeVoucher struct {
	// Voucher index within the context of the input that produced it
	Index int `json:"index"`
	// Transaction payload in Ethereum hex binary format, starting with '0x'
	Payload string `json:"payload"`
	// Transaction destination address in Ethereum hex binary format (20 bytes), starting with '0x'
	Destination string `json:"destination"`
}

StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdgeNodeVoucher includes the requested fields of the GraphQL type Voucher. The GraphQL type's documentation follows.

Representation of a transaction that can be carried out on the base layer blockchain, such as a transfer of assets

func (*StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdgeNodeVoucher) GetDestination

GetDestination returns StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdgeNodeVoucher.Destination, and is useful for accessing the field via an interface.

func (*StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdgeNodeVoucher) GetIndex

GetIndex returns StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdgeNodeVoucher.Index, and is useful for accessing the field via an interface.

func (*StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdgeNodeVoucher) GetPayload

GetPayload returns StateInputsInputConnectionEdgesInputEdgeNodeInputVouchersVoucherConnectionEdgesVoucherEdgeNodeVoucher.Payload, and is useful for accessing the field via an interface.

type StateResponse

type StateResponse struct {
	// Get inputs with support for pagination
	Inputs StateInputsInputConnection `json:"inputs"`
}

StateResponse is returned by State on success.

func State

func State(
	ctx context.Context,
	client graphql.Client,
) (*StateResponse, error)

Get the whole node state.

func (*StateResponse) GetInputs

GetInputs returns StateResponse.Inputs, and is useful for accessing the field via an interface.

Jump to

Keyboard shortcuts

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