rest

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type Checkpoint

type Checkpoint struct {
	Epoch EpochString `json:"epoch"`
	Root  Root        `json:"root"`
}

Ref: #/components/schemas/Checkpoint

func (*Checkpoint) Decode

func (s *Checkpoint) Decode(d *jx.Decoder) error

Decode decodes Checkpoint from json.

func (*Checkpoint) Encode

func (s *Checkpoint) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Checkpoint) GetEpoch

func (s *Checkpoint) GetEpoch() EpochString

GetEpoch returns the value of Epoch.

func (*Checkpoint) GetRoot

func (s *Checkpoint) GetRoot() Root

GetRoot returns the value of Root.

func (*Checkpoint) MarshalJSON

func (s *Checkpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Checkpoint) SetEpoch

func (s *Checkpoint) SetEpoch(val EpochString)

SetEpoch sets the value of Epoch.

func (*Checkpoint) SetRoot

func (s *Checkpoint) SetRoot(val Root)

SetRoot sets the value of Root.

func (*Checkpoint) UnmarshalJSON

func (s *Checkpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Client

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

Client implements OAS client.

func NewClient

func NewClient(serverURL string, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) GetEthereumNow

func (c *Client) GetEthereumNow(ctx context.Context) (GetEthereumNowRes, error)

GetEthereumNow invokes getEthereumNow operation.

Get the current wall-clock slot and epoch.

GET /api/v1/ethereum/now

func (*Client) GetEthereumSpec

func (c *Client) GetEthereumSpec(ctx context.Context) (GetEthereumSpecRes, error)

GetEthereumSpec invokes getEthereumSpec operation.

Get the Ethereum network name and spec.

GET /api/v1/ethereum/spec

func (*Client) GetFrame

func (c *Client) GetFrame(ctx context.Context, params GetFrameParams) (GetFrameRes, error)

GetFrame invokes getFrame operation.

Get a single fork-choice frame by ID.

GET /api/v1/frames/{id}

func (*Client) ListMetadata

func (c *Client) ListMetadata(ctx context.Context, request *MetadataQuery) (ListMetadataRes, error)

ListMetadata invokes listMetadata operation.

List fork-choice frame metadata.

POST /api/v1/metadata

func (*Client) ListMetadataEpochs

func (c *Client) ListMetadataEpochs(ctx context.Context, request *MetadataQuery) (ListMetadataEpochsRes, error)

ListMetadataEpochs invokes listMetadataEpochs operation.

List distinct epochs across stored frames.

POST /api/v1/metadata/epochs

func (*Client) ListMetadataLabels

func (c *Client) ListMetadataLabels(ctx context.Context, request *MetadataQuery) (ListMetadataLabelsRes, error)

ListMetadataLabels invokes listMetadataLabels operation.

List distinct labels across stored frames.

POST /api/v1/metadata/labels

func (*Client) ListMetadataNodes

func (c *Client) ListMetadataNodes(ctx context.Context, request *MetadataQuery) (ListMetadataNodesRes, error)

ListMetadataNodes invokes listMetadataNodes operation.

List distinct nodes across stored frames.

POST /api/v1/metadata/nodes

func (*Client) ListMetadataSlots

func (c *Client) ListMetadataSlots(ctx context.Context, request *MetadataQuery) (ListMetadataSlotsRes, error)

ListMetadataSlots invokes listMetadataSlots operation.

List distinct slots across stored frames.

POST /api/v1/metadata/slots

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption is client config option.

func WithClient

func WithClient(client ht.Client) ClientOption

WithClient specifies http client to use.

type Epoch

type Epoch int64

func (*Epoch) Decode

func (s *Epoch) Decode(d *jx.Decoder) error

Decode decodes Epoch from json.

func (Epoch) Encode

func (s Epoch) Encode(e *jx.Encoder)

Encode encodes Epoch as json.

func (Epoch) MarshalJSON

func (s Epoch) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Epoch) UnmarshalJSON

func (s *Epoch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (Epoch) Validate

func (s Epoch) Validate() error

type EpochString

type EpochString string

func (*EpochString) Decode

func (s *EpochString) Decode(d *jx.Decoder) error

Decode decodes EpochString from json.

func (EpochString) Encode

func (s EpochString) Encode(e *jx.Encoder)

Encode encodes EpochString as json.

func (EpochString) MarshalJSON

func (s EpochString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EpochString) UnmarshalJSON

func (s *EpochString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Error

type Error struct {
	// The HTTP status code.
	Code int `json:"code"`
	// A human-readable error message.
	Message string `json:"message"`
}

Ref: #/components/schemas/Error

func (*Error) Decode

func (s *Error) Decode(d *jx.Decoder) error

Decode decodes Error from json.

func (*Error) Encode

func (s *Error) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Error) GetCode

func (s *Error) GetCode() int

GetCode returns the value of Code.

func (*Error) GetMessage

func (s *Error) GetMessage() string

GetMessage returns the value of Message.

func (*Error) MarshalJSON

func (s *Error) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Error) SetCode

func (s *Error) SetCode(val int)

SetCode sets the value of Code.

func (*Error) SetMessage

func (s *Error) SetMessage(val string)

SetMessage sets the value of Message.

func (*Error) UnmarshalJSON

func (s *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type EthereumNow

type EthereumNow struct {
	Slot  Slot  `json:"slot"`
	Epoch Epoch `json:"epoch"`
}

Ref: #/components/schemas/EthereumNow

func (*EthereumNow) Decode

func (s *EthereumNow) Decode(d *jx.Decoder) error

Decode decodes EthereumNow from json.

func (*EthereumNow) Encode

func (s *EthereumNow) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*EthereumNow) GetEpoch

func (s *EthereumNow) GetEpoch() Epoch

GetEpoch returns the value of Epoch.

func (*EthereumNow) GetSlot

func (s *EthereumNow) GetSlot() Slot

GetSlot returns the value of Slot.

func (*EthereumNow) MarshalJSON

func (s *EthereumNow) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EthereumNow) SetEpoch

func (s *EthereumNow) SetEpoch(val Epoch)

SetEpoch sets the value of Epoch.

func (*EthereumNow) SetSlot

func (s *EthereumNow) SetSlot(val Slot)

SetSlot sets the value of Slot.

func (*EthereumNow) UnmarshalJSON

func (s *EthereumNow) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*EthereumNow) Validate

func (s *EthereumNow) Validate() error

type EthereumSpec

type EthereumSpec struct {
	SecondsPerSlot int64     `json:"seconds_per_slot"`
	SlotsPerEpoch  int64     `json:"slots_per_epoch"`
	GenesisTime    time.Time `json:"genesis_time"`
}

Ref: #/components/schemas/EthereumSpec

func (*EthereumSpec) Decode

func (s *EthereumSpec) Decode(d *jx.Decoder) error

Decode decodes EthereumSpec from json.

func (*EthereumSpec) Encode

func (s *EthereumSpec) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*EthereumSpec) GetGenesisTime

func (s *EthereumSpec) GetGenesisTime() time.Time

GetGenesisTime returns the value of GenesisTime.

func (*EthereumSpec) GetSecondsPerSlot

func (s *EthereumSpec) GetSecondsPerSlot() int64

GetSecondsPerSlot returns the value of SecondsPerSlot.

func (*EthereumSpec) GetSlotsPerEpoch

func (s *EthereumSpec) GetSlotsPerEpoch() int64

GetSlotsPerEpoch returns the value of SlotsPerEpoch.

func (*EthereumSpec) MarshalJSON

func (s *EthereumSpec) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EthereumSpec) SetGenesisTime

func (s *EthereumSpec) SetGenesisTime(val time.Time)

SetGenesisTime sets the value of GenesisTime.

func (*EthereumSpec) SetSecondsPerSlot

func (s *EthereumSpec) SetSecondsPerSlot(val int64)

SetSecondsPerSlot sets the value of SecondsPerSlot.

func (*EthereumSpec) SetSlotsPerEpoch

func (s *EthereumSpec) SetSlotsPerEpoch(val int64)

SetSlotsPerEpoch sets the value of SlotsPerEpoch.

func (*EthereumSpec) UnmarshalJSON

func (s *EthereumSpec) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type EthereumSpecResult

type EthereumSpecResult struct {
	NetworkName string       `json:"network_name"`
	Spec        EthereumSpec `json:"spec"`
}

Ref: #/components/schemas/EthereumSpecResult

func (*EthereumSpecResult) Decode

func (s *EthereumSpecResult) Decode(d *jx.Decoder) error

Decode decodes EthereumSpecResult from json.

func (*EthereumSpecResult) Encode

func (s *EthereumSpecResult) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*EthereumSpecResult) GetNetworkName

func (s *EthereumSpecResult) GetNetworkName() string

GetNetworkName returns the value of NetworkName.

func (*EthereumSpecResult) GetSpec

func (s *EthereumSpecResult) GetSpec() EthereumSpec

GetSpec returns the value of Spec.

func (*EthereumSpecResult) MarshalJSON

func (s *EthereumSpecResult) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*EthereumSpecResult) SetNetworkName

func (s *EthereumSpecResult) SetNetworkName(val string)

SetNetworkName sets the value of NetworkName.

func (*EthereumSpecResult) SetSpec

func (s *EthereumSpecResult) SetSpec(val EthereumSpec)

SetSpec sets the value of Spec.

func (*EthereumSpecResult) UnmarshalJSON

func (s *EthereumSpecResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ForkChoice

type ForkChoice struct {
	JustifiedCheckpoint Checkpoint       `json:"justified_checkpoint"`
	FinalizedCheckpoint Checkpoint       `json:"finalized_checkpoint"`
	ForkChoiceNodes     []ForkChoiceNode `json:"fork_choice_nodes"`
}

A beacon node's fork-choice dump. Ref: #/components/schemas/ForkChoice

func (*ForkChoice) Decode

func (s *ForkChoice) Decode(d *jx.Decoder) error

Decode decodes ForkChoice from json.

func (*ForkChoice) Encode

func (s *ForkChoice) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ForkChoice) GetFinalizedCheckpoint

func (s *ForkChoice) GetFinalizedCheckpoint() Checkpoint

GetFinalizedCheckpoint returns the value of FinalizedCheckpoint.

func (*ForkChoice) GetForkChoiceNodes

func (s *ForkChoice) GetForkChoiceNodes() []ForkChoiceNode

GetForkChoiceNodes returns the value of ForkChoiceNodes.

func (*ForkChoice) GetJustifiedCheckpoint

func (s *ForkChoice) GetJustifiedCheckpoint() Checkpoint

GetJustifiedCheckpoint returns the value of JustifiedCheckpoint.

func (*ForkChoice) MarshalJSON

func (s *ForkChoice) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ForkChoice) SetFinalizedCheckpoint

func (s *ForkChoice) SetFinalizedCheckpoint(val Checkpoint)

SetFinalizedCheckpoint sets the value of FinalizedCheckpoint.

func (*ForkChoice) SetForkChoiceNodes

func (s *ForkChoice) SetForkChoiceNodes(val []ForkChoiceNode)

SetForkChoiceNodes sets the value of ForkChoiceNodes.

func (*ForkChoice) SetJustifiedCheckpoint

func (s *ForkChoice) SetJustifiedCheckpoint(val Checkpoint)

SetJustifiedCheckpoint sets the value of JustifiedCheckpoint.

func (*ForkChoice) UnmarshalJSON

func (s *ForkChoice) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ForkChoice) Validate

func (s *ForkChoice) Validate() error

type ForkChoiceNode

type ForkChoiceNode struct {
	Slot           SlotString  `json:"slot"`
	BlockRoot      Root        `json:"block_root"`
	ParentRoot     Root        `json:"parent_root"`
	JustifiedEpoch EpochString `json:"justified_epoch"`
	FinalizedEpoch EpochString `json:"finalized_epoch"`
	// The node's fork-choice weight, serialized as a string.
	Weight string `json:"weight"`
	// The node's validity status.
	Validity           ForkChoiceNodeValidity     `json:"validity"`
	ExecutionBlockHash Root                       `json:"execution_block_hash"`
	ExtraData          OptForkChoiceNodeExtraData `json:"extra_data"`
}

Ref: #/components/schemas/ForkChoiceNode

func (*ForkChoiceNode) Decode

func (s *ForkChoiceNode) Decode(d *jx.Decoder) error

Decode decodes ForkChoiceNode from json.

func (*ForkChoiceNode) Encode

func (s *ForkChoiceNode) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ForkChoiceNode) GetBlockRoot

func (s *ForkChoiceNode) GetBlockRoot() Root

GetBlockRoot returns the value of BlockRoot.

func (*ForkChoiceNode) GetExecutionBlockHash

func (s *ForkChoiceNode) GetExecutionBlockHash() Root

GetExecutionBlockHash returns the value of ExecutionBlockHash.

func (*ForkChoiceNode) GetExtraData

func (s *ForkChoiceNode) GetExtraData() OptForkChoiceNodeExtraData

GetExtraData returns the value of ExtraData.

func (*ForkChoiceNode) GetFinalizedEpoch

func (s *ForkChoiceNode) GetFinalizedEpoch() EpochString

GetFinalizedEpoch returns the value of FinalizedEpoch.

func (*ForkChoiceNode) GetJustifiedEpoch

func (s *ForkChoiceNode) GetJustifiedEpoch() EpochString

GetJustifiedEpoch returns the value of JustifiedEpoch.

func (*ForkChoiceNode) GetParentRoot

func (s *ForkChoiceNode) GetParentRoot() Root

GetParentRoot returns the value of ParentRoot.

func (*ForkChoiceNode) GetSlot

func (s *ForkChoiceNode) GetSlot() SlotString

GetSlot returns the value of Slot.

func (*ForkChoiceNode) GetValidity

func (s *ForkChoiceNode) GetValidity() ForkChoiceNodeValidity

GetValidity returns the value of Validity.

func (*ForkChoiceNode) GetWeight

func (s *ForkChoiceNode) GetWeight() string

GetWeight returns the value of Weight.

func (*ForkChoiceNode) MarshalJSON

func (s *ForkChoiceNode) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ForkChoiceNode) SetBlockRoot

func (s *ForkChoiceNode) SetBlockRoot(val Root)

SetBlockRoot sets the value of BlockRoot.

func (*ForkChoiceNode) SetExecutionBlockHash

func (s *ForkChoiceNode) SetExecutionBlockHash(val Root)

SetExecutionBlockHash sets the value of ExecutionBlockHash.

func (*ForkChoiceNode) SetExtraData

func (s *ForkChoiceNode) SetExtraData(val OptForkChoiceNodeExtraData)

SetExtraData sets the value of ExtraData.

func (*ForkChoiceNode) SetFinalizedEpoch

func (s *ForkChoiceNode) SetFinalizedEpoch(val EpochString)

SetFinalizedEpoch sets the value of FinalizedEpoch.

func (*ForkChoiceNode) SetJustifiedEpoch

func (s *ForkChoiceNode) SetJustifiedEpoch(val EpochString)

SetJustifiedEpoch sets the value of JustifiedEpoch.

func (*ForkChoiceNode) SetParentRoot

func (s *ForkChoiceNode) SetParentRoot(val Root)

SetParentRoot sets the value of ParentRoot.

func (*ForkChoiceNode) SetSlot

func (s *ForkChoiceNode) SetSlot(val SlotString)

SetSlot sets the value of Slot.

func (*ForkChoiceNode) SetValidity

func (s *ForkChoiceNode) SetValidity(val ForkChoiceNodeValidity)

SetValidity sets the value of Validity.

func (*ForkChoiceNode) SetWeight

func (s *ForkChoiceNode) SetWeight(val string)

SetWeight sets the value of Weight.

func (*ForkChoiceNode) UnmarshalJSON

func (s *ForkChoiceNode) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ForkChoiceNode) Validate

func (s *ForkChoiceNode) Validate() error

type ForkChoiceNodeExtraData

type ForkChoiceNodeExtraData map[string]jx.Raw

func (*ForkChoiceNodeExtraData) Decode

func (s *ForkChoiceNodeExtraData) Decode(d *jx.Decoder) error

Decode decodes ForkChoiceNodeExtraData from json.

func (ForkChoiceNodeExtraData) Encode

func (s ForkChoiceNodeExtraData) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (ForkChoiceNodeExtraData) MarshalJSON

func (s ForkChoiceNodeExtraData) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ForkChoiceNodeExtraData) UnmarshalJSON

func (s *ForkChoiceNodeExtraData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ForkChoiceNodeValidity

type ForkChoiceNodeValidity string

The node's validity status.

const (
	ForkChoiceNodeValidityValid      ForkChoiceNodeValidity = "valid"
	ForkChoiceNodeValidityInvalid    ForkChoiceNodeValidity = "invalid"
	ForkChoiceNodeValidityOptimistic ForkChoiceNodeValidity = "optimistic"
	ForkChoiceNodeValidityUnknown    ForkChoiceNodeValidity = "unknown"
)

func (ForkChoiceNodeValidity) AllValues

AllValues returns all ForkChoiceNodeValidity values.

func (*ForkChoiceNodeValidity) Decode

func (s *ForkChoiceNodeValidity) Decode(d *jx.Decoder) error

Decode decodes ForkChoiceNodeValidity from json.

func (ForkChoiceNodeValidity) Encode

func (s ForkChoiceNodeValidity) Encode(e *jx.Encoder)

Encode encodes ForkChoiceNodeValidity as json.

func (ForkChoiceNodeValidity) MarshalJSON

func (s ForkChoiceNodeValidity) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (ForkChoiceNodeValidity) MarshalText

func (s ForkChoiceNodeValidity) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*ForkChoiceNodeValidity) UnmarshalJSON

func (s *ForkChoiceNodeValidity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ForkChoiceNodeValidity) UnmarshalText

func (s *ForkChoiceNodeValidity) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (ForkChoiceNodeValidity) Validate

func (s ForkChoiceNodeValidity) Validate() error

type Frame

type Frame struct {
	Data     ForkChoice    `json:"data"`
	Metadata FrameMetadata `json:"metadata"`
}

Ref: #/components/schemas/Frame

func (*Frame) Decode

func (s *Frame) Decode(d *jx.Decoder) error

Decode decodes Frame from json.

func (*Frame) Encode

func (s *Frame) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Frame) GetData

func (s *Frame) GetData() ForkChoice

GetData returns the value of Data.

func (*Frame) GetMetadata

func (s *Frame) GetMetadata() FrameMetadata

GetMetadata returns the value of Metadata.

func (*Frame) MarshalJSON

func (s *Frame) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Frame) SetData

func (s *Frame) SetData(val ForkChoice)

SetData sets the value of Data.

func (*Frame) SetMetadata

func (s *Frame) SetMetadata(val FrameMetadata)

SetMetadata sets the value of Metadata.

func (*Frame) UnmarshalJSON

func (s *Frame) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Frame) Validate

func (s *Frame) Validate() error

type FrameFilter

type FrameFilter struct {
	Node            OptString   `json:"node"`
	Before          OptDateTime `json:"before"`
	After           OptDateTime `json:"after"`
	Slot            OptSlot     `json:"slot"`
	Epoch           OptEpoch    `json:"epoch"`
	Labels          []string    `json:"labels"`
	ConsensusClient OptString   `json:"consensus_client"`
	EventSource     OptString   `json:"event_source"`
}

Filters applied to a frame query. All fields are optional. Ref: #/components/schemas/FrameFilter

func (*FrameFilter) Decode

func (s *FrameFilter) Decode(d *jx.Decoder) error

Decode decodes FrameFilter from json.

func (*FrameFilter) Encode

func (s *FrameFilter) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*FrameFilter) GetAfter

func (s *FrameFilter) GetAfter() OptDateTime

GetAfter returns the value of After.

func (*FrameFilter) GetBefore

func (s *FrameFilter) GetBefore() OptDateTime

GetBefore returns the value of Before.

func (*FrameFilter) GetConsensusClient

func (s *FrameFilter) GetConsensusClient() OptString

GetConsensusClient returns the value of ConsensusClient.

func (*FrameFilter) GetEpoch

func (s *FrameFilter) GetEpoch() OptEpoch

GetEpoch returns the value of Epoch.

func (*FrameFilter) GetEventSource

func (s *FrameFilter) GetEventSource() OptString

GetEventSource returns the value of EventSource.

func (*FrameFilter) GetLabels

func (s *FrameFilter) GetLabels() []string

GetLabels returns the value of Labels.

func (*FrameFilter) GetNode

func (s *FrameFilter) GetNode() OptString

GetNode returns the value of Node.

func (*FrameFilter) GetSlot

func (s *FrameFilter) GetSlot() OptSlot

GetSlot returns the value of Slot.

func (*FrameFilter) MarshalJSON

func (s *FrameFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FrameFilter) SetAfter

func (s *FrameFilter) SetAfter(val OptDateTime)

SetAfter sets the value of After.

func (*FrameFilter) SetBefore

func (s *FrameFilter) SetBefore(val OptDateTime)

SetBefore sets the value of Before.

func (*FrameFilter) SetConsensusClient

func (s *FrameFilter) SetConsensusClient(val OptString)

SetConsensusClient sets the value of ConsensusClient.

func (*FrameFilter) SetEpoch

func (s *FrameFilter) SetEpoch(val OptEpoch)

SetEpoch sets the value of Epoch.

func (*FrameFilter) SetEventSource

func (s *FrameFilter) SetEventSource(val OptString)

SetEventSource sets the value of EventSource.

func (*FrameFilter) SetLabels

func (s *FrameFilter) SetLabels(val []string)

SetLabels sets the value of Labels.

func (*FrameFilter) SetNode

func (s *FrameFilter) SetNode(val OptString)

SetNode sets the value of Node.

func (*FrameFilter) SetSlot

func (s *FrameFilter) SetSlot(val OptSlot)

SetSlot sets the value of Slot.

func (*FrameFilter) UnmarshalJSON

func (s *FrameFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*FrameFilter) Validate

func (s *FrameFilter) Validate() error

type FrameMetadata

type FrameMetadata struct {
	// The frame ID.
	ID string `json:"id"`
	// The node that provided the frame. For a beacon node this is the
	// configured node ID; for Xatu it is the Xatu Sentry ID.
	Node string `json:"node"`
	// When the frame was fetched.
	FetchedAt       time.Time `json:"fetched_at"`
	WallClockSlot   Slot      `json:"wall_clock_slot"`
	WallClockEpoch  Epoch     `json:"wall_clock_epoch"`
	Labels          []string  `json:"labels"`
	ConsensusClient string    `json:"consensus_client"`
	EventSource     string    `json:"event_source"`
}

Ref: #/components/schemas/FrameMetadata

func (*FrameMetadata) Decode

func (s *FrameMetadata) Decode(d *jx.Decoder) error

Decode decodes FrameMetadata from json.

func (*FrameMetadata) Encode

func (s *FrameMetadata) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*FrameMetadata) GetConsensusClient

func (s *FrameMetadata) GetConsensusClient() string

GetConsensusClient returns the value of ConsensusClient.

func (*FrameMetadata) GetEventSource

func (s *FrameMetadata) GetEventSource() string

GetEventSource returns the value of EventSource.

func (*FrameMetadata) GetFetchedAt

func (s *FrameMetadata) GetFetchedAt() time.Time

GetFetchedAt returns the value of FetchedAt.

func (*FrameMetadata) GetID

func (s *FrameMetadata) GetID() string

GetID returns the value of ID.

func (*FrameMetadata) GetLabels

func (s *FrameMetadata) GetLabels() []string

GetLabels returns the value of Labels.

func (*FrameMetadata) GetNode

func (s *FrameMetadata) GetNode() string

GetNode returns the value of Node.

func (*FrameMetadata) GetWallClockEpoch

func (s *FrameMetadata) GetWallClockEpoch() Epoch

GetWallClockEpoch returns the value of WallClockEpoch.

func (*FrameMetadata) GetWallClockSlot

func (s *FrameMetadata) GetWallClockSlot() Slot

GetWallClockSlot returns the value of WallClockSlot.

func (*FrameMetadata) MarshalJSON

func (s *FrameMetadata) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FrameMetadata) SetConsensusClient

func (s *FrameMetadata) SetConsensusClient(val string)

SetConsensusClient sets the value of ConsensusClient.

func (*FrameMetadata) SetEventSource

func (s *FrameMetadata) SetEventSource(val string)

SetEventSource sets the value of EventSource.

func (*FrameMetadata) SetFetchedAt

func (s *FrameMetadata) SetFetchedAt(val time.Time)

SetFetchedAt sets the value of FetchedAt.

func (*FrameMetadata) SetID

func (s *FrameMetadata) SetID(val string)

SetID sets the value of ID.

func (*FrameMetadata) SetLabels

func (s *FrameMetadata) SetLabels(val []string)

SetLabels sets the value of Labels.

func (*FrameMetadata) SetNode

func (s *FrameMetadata) SetNode(val string)

SetNode sets the value of Node.

func (*FrameMetadata) SetWallClockEpoch

func (s *FrameMetadata) SetWallClockEpoch(val Epoch)

SetWallClockEpoch sets the value of WallClockEpoch.

func (*FrameMetadata) SetWallClockSlot

func (s *FrameMetadata) SetWallClockSlot(val Slot)

SetWallClockSlot sets the value of WallClockSlot.

func (*FrameMetadata) UnmarshalJSON

func (s *FrameMetadata) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*FrameMetadata) Validate

func (s *FrameMetadata) Validate() error

type GetEthereumNowOK

type GetEthereumNowOK struct {
	Data EthereumNow `json:"data"`
}

func (*GetEthereumNowOK) Decode

func (s *GetEthereumNowOK) Decode(d *jx.Decoder) error

Decode decodes GetEthereumNowOK from json.

func (*GetEthereumNowOK) Encode

func (s *GetEthereumNowOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetEthereumNowOK) GetData

func (s *GetEthereumNowOK) GetData() EthereumNow

GetData returns the value of Data.

func (*GetEthereumNowOK) MarshalJSON

func (s *GetEthereumNowOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetEthereumNowOK) SetData

func (s *GetEthereumNowOK) SetData(val EthereumNow)

SetData sets the value of Data.

func (*GetEthereumNowOK) UnmarshalJSON

func (s *GetEthereumNowOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GetEthereumNowOK) Validate

func (s *GetEthereumNowOK) Validate() error

type GetEthereumNowOKHeaders

type GetEthereumNowOKHeaders struct {
	CacheControl OptString
	Response     GetEthereumNowOK
}

GetEthereumNowOKHeaders wraps GetEthereumNowOK with response headers.

func (*GetEthereumNowOKHeaders) GetCacheControl

func (s *GetEthereumNowOKHeaders) GetCacheControl() OptString

GetCacheControl returns the value of CacheControl.

func (*GetEthereumNowOKHeaders) GetResponse

func (s *GetEthereumNowOKHeaders) GetResponse() GetEthereumNowOK

GetResponse returns the value of Response.

func (*GetEthereumNowOKHeaders) SetCacheControl

func (s *GetEthereumNowOKHeaders) SetCacheControl(val OptString)

SetCacheControl sets the value of CacheControl.

func (*GetEthereumNowOKHeaders) SetResponse

func (s *GetEthereumNowOKHeaders) SetResponse(val GetEthereumNowOK)

SetResponse sets the value of Response.

func (*GetEthereumNowOKHeaders) Validate

func (s *GetEthereumNowOKHeaders) Validate() error

type GetEthereumNowRes

type GetEthereumNowRes interface {
	// contains filtered or unexported methods
}

type GetEthereumSpecOK

type GetEthereumSpecOK struct {
	Data EthereumSpecResult `json:"data"`
}

func (*GetEthereumSpecOK) Decode

func (s *GetEthereumSpecOK) Decode(d *jx.Decoder) error

Decode decodes GetEthereumSpecOK from json.

func (*GetEthereumSpecOK) Encode

func (s *GetEthereumSpecOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetEthereumSpecOK) GetData

GetData returns the value of Data.

func (*GetEthereumSpecOK) MarshalJSON

func (s *GetEthereumSpecOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetEthereumSpecOK) SetData

func (s *GetEthereumSpecOK) SetData(val EthereumSpecResult)

SetData sets the value of Data.

func (*GetEthereumSpecOK) UnmarshalJSON

func (s *GetEthereumSpecOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetEthereumSpecOKHeaders

type GetEthereumSpecOKHeaders struct {
	CacheControl OptString
	Response     GetEthereumSpecOK
}

GetEthereumSpecOKHeaders wraps GetEthereumSpecOK with response headers.

func (*GetEthereumSpecOKHeaders) GetCacheControl

func (s *GetEthereumSpecOKHeaders) GetCacheControl() OptString

GetCacheControl returns the value of CacheControl.

func (*GetEthereumSpecOKHeaders) GetResponse

GetResponse returns the value of Response.

func (*GetEthereumSpecOKHeaders) SetCacheControl

func (s *GetEthereumSpecOKHeaders) SetCacheControl(val OptString)

SetCacheControl sets the value of CacheControl.

func (*GetEthereumSpecOKHeaders) SetResponse

func (s *GetEthereumSpecOKHeaders) SetResponse(val GetEthereumSpecOK)

SetResponse sets the value of Response.

type GetEthereumSpecRes

type GetEthereumSpecRes interface {
	// contains filtered or unexported methods
}

type GetFrameOK

type GetFrameOK struct {
	Data GetFrameOKData `json:"data"`
}

func (*GetFrameOK) Decode

func (s *GetFrameOK) Decode(d *jx.Decoder) error

Decode decodes GetFrameOK from json.

func (*GetFrameOK) Encode

func (s *GetFrameOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetFrameOK) GetData

func (s *GetFrameOK) GetData() GetFrameOKData

GetData returns the value of Data.

func (*GetFrameOK) MarshalJSON

func (s *GetFrameOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetFrameOK) SetData

func (s *GetFrameOK) SetData(val GetFrameOKData)

SetData sets the value of Data.

func (*GetFrameOK) UnmarshalJSON

func (s *GetFrameOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GetFrameOK) Validate

func (s *GetFrameOK) Validate() error

type GetFrameOKData

type GetFrameOKData struct {
	Frame Frame `json:"frame"`
}

func (*GetFrameOKData) Decode

func (s *GetFrameOKData) Decode(d *jx.Decoder) error

Decode decodes GetFrameOKData from json.

func (*GetFrameOKData) Encode

func (s *GetFrameOKData) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetFrameOKData) GetFrame

func (s *GetFrameOKData) GetFrame() Frame

GetFrame returns the value of Frame.

func (*GetFrameOKData) MarshalJSON

func (s *GetFrameOKData) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetFrameOKData) SetFrame

func (s *GetFrameOKData) SetFrame(val Frame)

SetFrame sets the value of Frame.

func (*GetFrameOKData) UnmarshalJSON

func (s *GetFrameOKData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GetFrameOKData) Validate

func (s *GetFrameOKData) Validate() error

type GetFrameOKHeaders

type GetFrameOKHeaders struct {
	CacheControl OptString
	Response     GetFrameOK
}

GetFrameOKHeaders wraps GetFrameOK with response headers.

func (*GetFrameOKHeaders) GetCacheControl

func (s *GetFrameOKHeaders) GetCacheControl() OptString

GetCacheControl returns the value of CacheControl.

func (*GetFrameOKHeaders) GetResponse

func (s *GetFrameOKHeaders) GetResponse() GetFrameOK

GetResponse returns the value of Response.

func (*GetFrameOKHeaders) SetCacheControl

func (s *GetFrameOKHeaders) SetCacheControl(val OptString)

SetCacheControl sets the value of CacheControl.

func (*GetFrameOKHeaders) SetResponse

func (s *GetFrameOKHeaders) SetResponse(val GetFrameOK)

SetResponse sets the value of Response.

func (*GetFrameOKHeaders) Validate

func (s *GetFrameOKHeaders) Validate() error

type GetFrameParams

type GetFrameParams struct {
	// The frame ID.
	ID string
}

GetFrameParams is parameters of getFrame operation.

type GetFrameRes

type GetFrameRes interface {
	// contains filtered or unexported methods
}

type Handler

type Handler interface {
	// GetEthereumNow implements getEthereumNow operation.
	//
	// Get the current wall-clock slot and epoch.
	//
	// GET /api/v1/ethereum/now
	GetEthereumNow(ctx context.Context) (GetEthereumNowRes, error)
	// GetEthereumSpec implements getEthereumSpec operation.
	//
	// Get the Ethereum network name and spec.
	//
	// GET /api/v1/ethereum/spec
	GetEthereumSpec(ctx context.Context) (GetEthereumSpecRes, error)
	// GetFrame implements getFrame operation.
	//
	// Get a single fork-choice frame by ID.
	//
	// GET /api/v1/frames/{id}
	GetFrame(ctx context.Context, params GetFrameParams) (GetFrameRes, error)
	// ListMetadata implements listMetadata operation.
	//
	// List fork-choice frame metadata.
	//
	// POST /api/v1/metadata
	ListMetadata(ctx context.Context, req *MetadataQuery) (ListMetadataRes, error)
	// ListMetadataEpochs implements listMetadataEpochs operation.
	//
	// List distinct epochs across stored frames.
	//
	// POST /api/v1/metadata/epochs
	ListMetadataEpochs(ctx context.Context, req *MetadataQuery) (ListMetadataEpochsRes, error)
	// ListMetadataLabels implements listMetadataLabels operation.
	//
	// List distinct labels across stored frames.
	//
	// POST /api/v1/metadata/labels
	ListMetadataLabels(ctx context.Context, req *MetadataQuery) (ListMetadataLabelsRes, error)
	// ListMetadataNodes implements listMetadataNodes operation.
	//
	// List distinct nodes across stored frames.
	//
	// POST /api/v1/metadata/nodes
	ListMetadataNodes(ctx context.Context, req *MetadataQuery) (ListMetadataNodesRes, error)
	// ListMetadataSlots implements listMetadataSlots operation.
	//
	// List distinct slots across stored frames.
	//
	// POST /api/v1/metadata/slots
	ListMetadataSlots(ctx context.Context, req *MetadataQuery) (ListMetadataSlotsRes, error)
	// NewError creates *UnexpectedErrorStatusCode from error returned by handler.
	//
	// Used for common default response.
	NewError(ctx context.Context, err error) *UnexpectedErrorStatusCode
}

Handler handles operations described by OpenAPI v3 specification.

type Invoker

type Invoker interface {
	// GetEthereumNow invokes getEthereumNow operation.
	//
	// Get the current wall-clock slot and epoch.
	//
	// GET /api/v1/ethereum/now
	GetEthereumNow(ctx context.Context) (GetEthereumNowRes, error)
	// GetEthereumSpec invokes getEthereumSpec operation.
	//
	// Get the Ethereum network name and spec.
	//
	// GET /api/v1/ethereum/spec
	GetEthereumSpec(ctx context.Context) (GetEthereumSpecRes, error)
	// GetFrame invokes getFrame operation.
	//
	// Get a single fork-choice frame by ID.
	//
	// GET /api/v1/frames/{id}
	GetFrame(ctx context.Context, params GetFrameParams) (GetFrameRes, error)
	// ListMetadata invokes listMetadata operation.
	//
	// List fork-choice frame metadata.
	//
	// POST /api/v1/metadata
	ListMetadata(ctx context.Context, request *MetadataQuery) (ListMetadataRes, error)
	// ListMetadataEpochs invokes listMetadataEpochs operation.
	//
	// List distinct epochs across stored frames.
	//
	// POST /api/v1/metadata/epochs
	ListMetadataEpochs(ctx context.Context, request *MetadataQuery) (ListMetadataEpochsRes, error)
	// ListMetadataLabels invokes listMetadataLabels operation.
	//
	// List distinct labels across stored frames.
	//
	// POST /api/v1/metadata/labels
	ListMetadataLabels(ctx context.Context, request *MetadataQuery) (ListMetadataLabelsRes, error)
	// ListMetadataNodes invokes listMetadataNodes operation.
	//
	// List distinct nodes across stored frames.
	//
	// POST /api/v1/metadata/nodes
	ListMetadataNodes(ctx context.Context, request *MetadataQuery) (ListMetadataNodesRes, error)
	// ListMetadataSlots invokes listMetadataSlots operation.
	//
	// List distinct slots across stored frames.
	//
	// POST /api/v1/metadata/slots
	ListMetadataSlots(ctx context.Context, request *MetadataQuery) (ListMetadataSlotsRes, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type Labeler

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

Labeler is used to allow adding custom attributes to the server request metrics.

func LabelerFromContext

func LabelerFromContext(ctx context.Context) (*Labeler, bool)

LabelerFromContext retrieves the Labeler from the provided context, if present.

If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.

func (*Labeler) Add

func (l *Labeler) Add(attrs ...attribute.KeyValue)

Add attributes to the Labeler.

func (*Labeler) AttributeSet

func (l *Labeler) AttributeSet() attribute.Set

AttributeSet returns the attributes added to the Labeler as an attribute.Set.

type ListMetadataEpochsOK

type ListMetadataEpochsOK struct {
	Data ListMetadataEpochsOKData `json:"data"`
}

func (*ListMetadataEpochsOK) Decode

func (s *ListMetadataEpochsOK) Decode(d *jx.Decoder) error

Decode decodes ListMetadataEpochsOK from json.

func (*ListMetadataEpochsOK) Encode

func (s *ListMetadataEpochsOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ListMetadataEpochsOK) GetData

GetData returns the value of Data.

func (*ListMetadataEpochsOK) MarshalJSON

func (s *ListMetadataEpochsOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListMetadataEpochsOK) SetData

SetData sets the value of Data.

func (*ListMetadataEpochsOK) UnmarshalJSON

func (s *ListMetadataEpochsOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ListMetadataEpochsOK) Validate

func (s *ListMetadataEpochsOK) Validate() error

type ListMetadataEpochsOKData

type ListMetadataEpochsOKData struct {
	Epochs     []Epoch            `json:"epochs"`
	Pagination PaginationResponse `json:"pagination"`
}

func (*ListMetadataEpochsOKData) Decode

func (s *ListMetadataEpochsOKData) Decode(d *jx.Decoder) error

Decode decodes ListMetadataEpochsOKData from json.

func (*ListMetadataEpochsOKData) Encode

func (s *ListMetadataEpochsOKData) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ListMetadataEpochsOKData) GetEpochs

func (s *ListMetadataEpochsOKData) GetEpochs() []Epoch

GetEpochs returns the value of Epochs.

func (*ListMetadataEpochsOKData) GetPagination

func (s *ListMetadataEpochsOKData) GetPagination() PaginationResponse

GetPagination returns the value of Pagination.

func (*ListMetadataEpochsOKData) MarshalJSON

func (s *ListMetadataEpochsOKData) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListMetadataEpochsOKData) SetEpochs

func (s *ListMetadataEpochsOKData) SetEpochs(val []Epoch)

SetEpochs sets the value of Epochs.

func (*ListMetadataEpochsOKData) SetPagination

func (s *ListMetadataEpochsOKData) SetPagination(val PaginationResponse)

SetPagination sets the value of Pagination.

func (*ListMetadataEpochsOKData) UnmarshalJSON

func (s *ListMetadataEpochsOKData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ListMetadataEpochsOKData) Validate

func (s *ListMetadataEpochsOKData) Validate() error

type ListMetadataEpochsOKHeaders

type ListMetadataEpochsOKHeaders struct {
	CacheControl OptString
	Response     ListMetadataEpochsOK
}

ListMetadataEpochsOKHeaders wraps ListMetadataEpochsOK with response headers.

func (*ListMetadataEpochsOKHeaders) GetCacheControl

func (s *ListMetadataEpochsOKHeaders) GetCacheControl() OptString

GetCacheControl returns the value of CacheControl.

func (*ListMetadataEpochsOKHeaders) GetResponse

GetResponse returns the value of Response.

func (*ListMetadataEpochsOKHeaders) SetCacheControl

func (s *ListMetadataEpochsOKHeaders) SetCacheControl(val OptString)

SetCacheControl sets the value of CacheControl.

func (*ListMetadataEpochsOKHeaders) SetResponse

SetResponse sets the value of Response.

func (*ListMetadataEpochsOKHeaders) Validate

func (s *ListMetadataEpochsOKHeaders) Validate() error

type ListMetadataEpochsRes

type ListMetadataEpochsRes interface {
	// contains filtered or unexported methods
}

type ListMetadataLabelsOK

type ListMetadataLabelsOK struct {
	Data ListMetadataLabelsOKData `json:"data"`
}

func (*ListMetadataLabelsOK) Decode

func (s *ListMetadataLabelsOK) Decode(d *jx.Decoder) error

Decode decodes ListMetadataLabelsOK from json.

func (*ListMetadataLabelsOK) Encode

func (s *ListMetadataLabelsOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ListMetadataLabelsOK) GetData

GetData returns the value of Data.

func (*ListMetadataLabelsOK) MarshalJSON

func (s *ListMetadataLabelsOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListMetadataLabelsOK) SetData

SetData sets the value of Data.

func (*ListMetadataLabelsOK) UnmarshalJSON

func (s *ListMetadataLabelsOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ListMetadataLabelsOK) Validate

func (s *ListMetadataLabelsOK) Validate() error

type ListMetadataLabelsOKData

type ListMetadataLabelsOKData struct {
	Labels     []string           `json:"labels"`
	Pagination PaginationResponse `json:"pagination"`
}

func (*ListMetadataLabelsOKData) Decode

func (s *ListMetadataLabelsOKData) Decode(d *jx.Decoder) error

Decode decodes ListMetadataLabelsOKData from json.

func (*ListMetadataLabelsOKData) Encode

func (s *ListMetadataLabelsOKData) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ListMetadataLabelsOKData) GetLabels

func (s *ListMetadataLabelsOKData) GetLabels() []string

GetLabels returns the value of Labels.

func (*ListMetadataLabelsOKData) GetPagination

func (s *ListMetadataLabelsOKData) GetPagination() PaginationResponse

GetPagination returns the value of Pagination.

func (*ListMetadataLabelsOKData) MarshalJSON

func (s *ListMetadataLabelsOKData) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListMetadataLabelsOKData) SetLabels

func (s *ListMetadataLabelsOKData) SetLabels(val []string)

SetLabels sets the value of Labels.

func (*ListMetadataLabelsOKData) SetPagination

func (s *ListMetadataLabelsOKData) SetPagination(val PaginationResponse)

SetPagination sets the value of Pagination.

func (*ListMetadataLabelsOKData) UnmarshalJSON

func (s *ListMetadataLabelsOKData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ListMetadataLabelsOKData) Validate

func (s *ListMetadataLabelsOKData) Validate() error

type ListMetadataLabelsOKHeaders

type ListMetadataLabelsOKHeaders struct {
	CacheControl OptString
	Response     ListMetadataLabelsOK
}

ListMetadataLabelsOKHeaders wraps ListMetadataLabelsOK with response headers.

func (*ListMetadataLabelsOKHeaders) GetCacheControl

func (s *ListMetadataLabelsOKHeaders) GetCacheControl() OptString

GetCacheControl returns the value of CacheControl.

func (*ListMetadataLabelsOKHeaders) GetResponse

GetResponse returns the value of Response.

func (*ListMetadataLabelsOKHeaders) SetCacheControl

func (s *ListMetadataLabelsOKHeaders) SetCacheControl(val OptString)

SetCacheControl sets the value of CacheControl.

func (*ListMetadataLabelsOKHeaders) SetResponse

SetResponse sets the value of Response.

func (*ListMetadataLabelsOKHeaders) Validate

func (s *ListMetadataLabelsOKHeaders) Validate() error

type ListMetadataLabelsRes

type ListMetadataLabelsRes interface {
	// contains filtered or unexported methods
}

type ListMetadataNodesOK

type ListMetadataNodesOK struct {
	Data ListMetadataNodesOKData `json:"data"`
}

func (*ListMetadataNodesOK) Decode

func (s *ListMetadataNodesOK) Decode(d *jx.Decoder) error

Decode decodes ListMetadataNodesOK from json.

func (*ListMetadataNodesOK) Encode

func (s *ListMetadataNodesOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ListMetadataNodesOK) GetData

GetData returns the value of Data.

func (*ListMetadataNodesOK) MarshalJSON

func (s *ListMetadataNodesOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListMetadataNodesOK) SetData

SetData sets the value of Data.

func (*ListMetadataNodesOK) UnmarshalJSON

func (s *ListMetadataNodesOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ListMetadataNodesOK) Validate

func (s *ListMetadataNodesOK) Validate() error

type ListMetadataNodesOKData

type ListMetadataNodesOKData struct {
	Nodes      []string           `json:"nodes"`
	Pagination PaginationResponse `json:"pagination"`
}

func (*ListMetadataNodesOKData) Decode

func (s *ListMetadataNodesOKData) Decode(d *jx.Decoder) error

Decode decodes ListMetadataNodesOKData from json.

func (*ListMetadataNodesOKData) Encode

func (s *ListMetadataNodesOKData) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ListMetadataNodesOKData) GetNodes

func (s *ListMetadataNodesOKData) GetNodes() []string

GetNodes returns the value of Nodes.

func (*ListMetadataNodesOKData) GetPagination

func (s *ListMetadataNodesOKData) GetPagination() PaginationResponse

GetPagination returns the value of Pagination.

func (*ListMetadataNodesOKData) MarshalJSON

func (s *ListMetadataNodesOKData) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListMetadataNodesOKData) SetNodes

func (s *ListMetadataNodesOKData) SetNodes(val []string)

SetNodes sets the value of Nodes.

func (*ListMetadataNodesOKData) SetPagination

func (s *ListMetadataNodesOKData) SetPagination(val PaginationResponse)

SetPagination sets the value of Pagination.

func (*ListMetadataNodesOKData) UnmarshalJSON

func (s *ListMetadataNodesOKData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ListMetadataNodesOKData) Validate

func (s *ListMetadataNodesOKData) Validate() error

type ListMetadataNodesOKHeaders

type ListMetadataNodesOKHeaders struct {
	CacheControl OptString
	Response     ListMetadataNodesOK
}

ListMetadataNodesOKHeaders wraps ListMetadataNodesOK with response headers.

func (*ListMetadataNodesOKHeaders) GetCacheControl

func (s *ListMetadataNodesOKHeaders) GetCacheControl() OptString

GetCacheControl returns the value of CacheControl.

func (*ListMetadataNodesOKHeaders) GetResponse

GetResponse returns the value of Response.

func (*ListMetadataNodesOKHeaders) SetCacheControl

func (s *ListMetadataNodesOKHeaders) SetCacheControl(val OptString)

SetCacheControl sets the value of CacheControl.

func (*ListMetadataNodesOKHeaders) SetResponse

func (s *ListMetadataNodesOKHeaders) SetResponse(val ListMetadataNodesOK)

SetResponse sets the value of Response.

func (*ListMetadataNodesOKHeaders) Validate

func (s *ListMetadataNodesOKHeaders) Validate() error

type ListMetadataNodesRes

type ListMetadataNodesRes interface {
	// contains filtered or unexported methods
}

type ListMetadataOK

type ListMetadataOK struct {
	Data ListMetadataOKData `json:"data"`
}

func (*ListMetadataOK) Decode

func (s *ListMetadataOK) Decode(d *jx.Decoder) error

Decode decodes ListMetadataOK from json.

func (*ListMetadataOK) Encode

func (s *ListMetadataOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ListMetadataOK) GetData

func (s *ListMetadataOK) GetData() ListMetadataOKData

GetData returns the value of Data.

func (*ListMetadataOK) MarshalJSON

func (s *ListMetadataOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListMetadataOK) SetData

func (s *ListMetadataOK) SetData(val ListMetadataOKData)

SetData sets the value of Data.

func (*ListMetadataOK) UnmarshalJSON

func (s *ListMetadataOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ListMetadataOK) Validate

func (s *ListMetadataOK) Validate() error

type ListMetadataOKData

type ListMetadataOKData struct {
	Frames     []FrameMetadata    `json:"frames"`
	Pagination PaginationResponse `json:"pagination"`
}

func (*ListMetadataOKData) Decode

func (s *ListMetadataOKData) Decode(d *jx.Decoder) error

Decode decodes ListMetadataOKData from json.

func (*ListMetadataOKData) Encode

func (s *ListMetadataOKData) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ListMetadataOKData) GetFrames

func (s *ListMetadataOKData) GetFrames() []FrameMetadata

GetFrames returns the value of Frames.

func (*ListMetadataOKData) GetPagination

func (s *ListMetadataOKData) GetPagination() PaginationResponse

GetPagination returns the value of Pagination.

func (*ListMetadataOKData) MarshalJSON

func (s *ListMetadataOKData) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListMetadataOKData) SetFrames

func (s *ListMetadataOKData) SetFrames(val []FrameMetadata)

SetFrames sets the value of Frames.

func (*ListMetadataOKData) SetPagination

func (s *ListMetadataOKData) SetPagination(val PaginationResponse)

SetPagination sets the value of Pagination.

func (*ListMetadataOKData) UnmarshalJSON

func (s *ListMetadataOKData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ListMetadataOKData) Validate

func (s *ListMetadataOKData) Validate() error

type ListMetadataRes

type ListMetadataRes interface {
	// contains filtered or unexported methods
}

type ListMetadataSlotsOK

type ListMetadataSlotsOK struct {
	Data ListMetadataSlotsOKData `json:"data"`
}

func (*ListMetadataSlotsOK) Decode

func (s *ListMetadataSlotsOK) Decode(d *jx.Decoder) error

Decode decodes ListMetadataSlotsOK from json.

func (*ListMetadataSlotsOK) Encode

func (s *ListMetadataSlotsOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ListMetadataSlotsOK) GetData

GetData returns the value of Data.

func (*ListMetadataSlotsOK) MarshalJSON

func (s *ListMetadataSlotsOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListMetadataSlotsOK) SetData

SetData sets the value of Data.

func (*ListMetadataSlotsOK) UnmarshalJSON

func (s *ListMetadataSlotsOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ListMetadataSlotsOK) Validate

func (s *ListMetadataSlotsOK) Validate() error

type ListMetadataSlotsOKData

type ListMetadataSlotsOKData struct {
	Slots      []Slot             `json:"slots"`
	Pagination PaginationResponse `json:"pagination"`
}

func (*ListMetadataSlotsOKData) Decode

func (s *ListMetadataSlotsOKData) Decode(d *jx.Decoder) error

Decode decodes ListMetadataSlotsOKData from json.

func (*ListMetadataSlotsOKData) Encode

func (s *ListMetadataSlotsOKData) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ListMetadataSlotsOKData) GetPagination

func (s *ListMetadataSlotsOKData) GetPagination() PaginationResponse

GetPagination returns the value of Pagination.

func (*ListMetadataSlotsOKData) GetSlots

func (s *ListMetadataSlotsOKData) GetSlots() []Slot

GetSlots returns the value of Slots.

func (*ListMetadataSlotsOKData) MarshalJSON

func (s *ListMetadataSlotsOKData) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ListMetadataSlotsOKData) SetPagination

func (s *ListMetadataSlotsOKData) SetPagination(val PaginationResponse)

SetPagination sets the value of Pagination.

func (*ListMetadataSlotsOKData) SetSlots

func (s *ListMetadataSlotsOKData) SetSlots(val []Slot)

SetSlots sets the value of Slots.

func (*ListMetadataSlotsOKData) UnmarshalJSON

func (s *ListMetadataSlotsOKData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ListMetadataSlotsOKData) Validate

func (s *ListMetadataSlotsOKData) Validate() error

type ListMetadataSlotsOKHeaders

type ListMetadataSlotsOKHeaders struct {
	CacheControl OptString
	Response     ListMetadataSlotsOK
}

ListMetadataSlotsOKHeaders wraps ListMetadataSlotsOK with response headers.

func (*ListMetadataSlotsOKHeaders) GetCacheControl

func (s *ListMetadataSlotsOKHeaders) GetCacheControl() OptString

GetCacheControl returns the value of CacheControl.

func (*ListMetadataSlotsOKHeaders) GetResponse

GetResponse returns the value of Response.

func (*ListMetadataSlotsOKHeaders) SetCacheControl

func (s *ListMetadataSlotsOKHeaders) SetCacheControl(val OptString)

SetCacheControl sets the value of CacheControl.

func (*ListMetadataSlotsOKHeaders) SetResponse

func (s *ListMetadataSlotsOKHeaders) SetResponse(val ListMetadataSlotsOK)

SetResponse sets the value of Response.

func (*ListMetadataSlotsOKHeaders) Validate

func (s *ListMetadataSlotsOKHeaders) Validate() error

type ListMetadataSlotsRes

type ListMetadataSlotsRes interface {
	// contains filtered or unexported methods
}

type MetadataQuery

type MetadataQuery struct {
	Filter     OptFrameFilter      `json:"filter"`
	Pagination OptPaginationCursor `json:"pagination"`
}

Ref: #/components/schemas/MetadataQuery

func (*MetadataQuery) Decode

func (s *MetadataQuery) Decode(d *jx.Decoder) error

Decode decodes MetadataQuery from json.

func (*MetadataQuery) Encode

func (s *MetadataQuery) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*MetadataQuery) GetFilter

func (s *MetadataQuery) GetFilter() OptFrameFilter

GetFilter returns the value of Filter.

func (*MetadataQuery) GetPagination

func (s *MetadataQuery) GetPagination() OptPaginationCursor

GetPagination returns the value of Pagination.

func (*MetadataQuery) MarshalJSON

func (s *MetadataQuery) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*MetadataQuery) SetFilter

func (s *MetadataQuery) SetFilter(val OptFrameFilter)

SetFilter sets the value of Filter.

func (*MetadataQuery) SetPagination

func (s *MetadataQuery) SetPagination(val OptPaginationCursor)

SetPagination sets the value of Pagination.

func (*MetadataQuery) UnmarshalJSON

func (s *MetadataQuery) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*MetadataQuery) Validate

func (s *MetadataQuery) Validate() error

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OperationName

type OperationName = string

OperationName is the ogen operation name

const (
	GetEthereumNowOperation     OperationName = "GetEthereumNow"
	GetEthereumSpecOperation    OperationName = "GetEthereumSpec"
	GetFrameOperation           OperationName = "GetFrame"
	ListMetadataOperation       OperationName = "ListMetadata"
	ListMetadataEpochsOperation OperationName = "ListMetadataEpochs"
	ListMetadataLabelsOperation OperationName = "ListMetadataLabels"
	ListMetadataNodesOperation  OperationName = "ListMetadataNodes"
	ListMetadataSlotsOperation  OperationName = "ListMetadataSlots"
)

type OptDateTime

type OptDateTime struct {
	Value time.Time
	Set   bool
}

OptDateTime is optional time.Time.

func NewOptDateTime

func NewOptDateTime(v time.Time) OptDateTime

NewOptDateTime returns new OptDateTime with value set to v.

func (*OptDateTime) Decode

func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error

Decode decodes time.Time from json.

func (OptDateTime) Encode

func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))

Encode encodes time.Time as json.

func (OptDateTime) Get

func (o OptDateTime) Get() (v time.Time, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptDateTime) IsSet

func (o OptDateTime) IsSet() bool

IsSet returns true if OptDateTime was set.

func (OptDateTime) MarshalJSON

func (s OptDateTime) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptDateTime) Or

func (o OptDateTime) Or(d time.Time) time.Time

Or returns value if set, or given parameter if does not.

func (*OptDateTime) Reset

func (o *OptDateTime) Reset()

Reset unsets value.

func (*OptDateTime) SetTo

func (o *OptDateTime) SetTo(v time.Time)

SetTo sets value to v.

func (*OptDateTime) UnmarshalJSON

func (s *OptDateTime) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptEpoch

type OptEpoch struct {
	Value Epoch
	Set   bool
}

OptEpoch is optional Epoch.

func NewOptEpoch

func NewOptEpoch(v Epoch) OptEpoch

NewOptEpoch returns new OptEpoch with value set to v.

func (*OptEpoch) Decode

func (o *OptEpoch) Decode(d *jx.Decoder) error

Decode decodes Epoch from json.

func (OptEpoch) Encode

func (o OptEpoch) Encode(e *jx.Encoder)

Encode encodes Epoch as json.

func (OptEpoch) Get

func (o OptEpoch) Get() (v Epoch, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptEpoch) IsSet

func (o OptEpoch) IsSet() bool

IsSet returns true if OptEpoch was set.

func (OptEpoch) MarshalJSON

func (s OptEpoch) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptEpoch) Or

func (o OptEpoch) Or(d Epoch) Epoch

Or returns value if set, or given parameter if does not.

func (*OptEpoch) Reset

func (o *OptEpoch) Reset()

Reset unsets value.

func (*OptEpoch) SetTo

func (o *OptEpoch) SetTo(v Epoch)

SetTo sets value to v.

func (*OptEpoch) UnmarshalJSON

func (s *OptEpoch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptForkChoiceNodeExtraData

type OptForkChoiceNodeExtraData struct {
	Value ForkChoiceNodeExtraData
	Set   bool
}

OptForkChoiceNodeExtraData is optional ForkChoiceNodeExtraData.

func NewOptForkChoiceNodeExtraData

func NewOptForkChoiceNodeExtraData(v ForkChoiceNodeExtraData) OptForkChoiceNodeExtraData

NewOptForkChoiceNodeExtraData returns new OptForkChoiceNodeExtraData with value set to v.

func (*OptForkChoiceNodeExtraData) Decode

Decode decodes ForkChoiceNodeExtraData from json.

func (OptForkChoiceNodeExtraData) Encode

func (o OptForkChoiceNodeExtraData) Encode(e *jx.Encoder)

Encode encodes ForkChoiceNodeExtraData as json.

func (OptForkChoiceNodeExtraData) Get

Get returns value and boolean that denotes whether value was set.

func (OptForkChoiceNodeExtraData) IsSet

func (o OptForkChoiceNodeExtraData) IsSet() bool

IsSet returns true if OptForkChoiceNodeExtraData was set.

func (OptForkChoiceNodeExtraData) MarshalJSON

func (s OptForkChoiceNodeExtraData) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptForkChoiceNodeExtraData) Or

Or returns value if set, or given parameter if does not.

func (*OptForkChoiceNodeExtraData) Reset

func (o *OptForkChoiceNodeExtraData) Reset()

Reset unsets value.

func (*OptForkChoiceNodeExtraData) SetTo

SetTo sets value to v.

func (*OptForkChoiceNodeExtraData) UnmarshalJSON

func (s *OptForkChoiceNodeExtraData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptFrameFilter

type OptFrameFilter struct {
	Value FrameFilter
	Set   bool
}

OptFrameFilter is optional FrameFilter.

func NewOptFrameFilter

func NewOptFrameFilter(v FrameFilter) OptFrameFilter

NewOptFrameFilter returns new OptFrameFilter with value set to v.

func (*OptFrameFilter) Decode

func (o *OptFrameFilter) Decode(d *jx.Decoder) error

Decode decodes FrameFilter from json.

func (OptFrameFilter) Encode

func (o OptFrameFilter) Encode(e *jx.Encoder)

Encode encodes FrameFilter as json.

func (OptFrameFilter) Get

func (o OptFrameFilter) Get() (v FrameFilter, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptFrameFilter) IsSet

func (o OptFrameFilter) IsSet() bool

IsSet returns true if OptFrameFilter was set.

func (OptFrameFilter) MarshalJSON

func (s OptFrameFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptFrameFilter) Or

Or returns value if set, or given parameter if does not.

func (*OptFrameFilter) Reset

func (o *OptFrameFilter) Reset()

Reset unsets value.

func (*OptFrameFilter) SetTo

func (o *OptFrameFilter) SetTo(v FrameFilter)

SetTo sets value to v.

func (*OptFrameFilter) UnmarshalJSON

func (s *OptFrameFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt

type OptInt struct {
	Value int
	Set   bool
}

OptInt is optional int.

func NewOptInt

func NewOptInt(v int) OptInt

NewOptInt returns new OptInt with value set to v.

func (*OptInt) Decode

func (o *OptInt) Decode(d *jx.Decoder) error

Decode decodes int from json.

func (OptInt) Encode

func (o OptInt) Encode(e *jx.Encoder)

Encode encodes int as json.

func (OptInt) Get

func (o OptInt) Get() (v int, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt) IsSet

func (o OptInt) IsSet() bool

IsSet returns true if OptInt was set.

func (OptInt) MarshalJSON

func (s OptInt) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt) Or

func (o OptInt) Or(d int) int

Or returns value if set, or given parameter if does not.

func (*OptInt) Reset

func (o *OptInt) Reset()

Reset unsets value.

func (*OptInt) SetTo

func (o *OptInt) SetTo(v int)

SetTo sets value to v.

func (*OptInt) UnmarshalJSON

func (s *OptInt) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptPaginationCursor

type OptPaginationCursor struct {
	Value PaginationCursor
	Set   bool
}

OptPaginationCursor is optional PaginationCursor.

func NewOptPaginationCursor

func NewOptPaginationCursor(v PaginationCursor) OptPaginationCursor

NewOptPaginationCursor returns new OptPaginationCursor with value set to v.

func (*OptPaginationCursor) Decode

func (o *OptPaginationCursor) Decode(d *jx.Decoder) error

Decode decodes PaginationCursor from json.

func (OptPaginationCursor) Encode

func (o OptPaginationCursor) Encode(e *jx.Encoder)

Encode encodes PaginationCursor as json.

func (OptPaginationCursor) Get

func (o OptPaginationCursor) Get() (v PaginationCursor, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptPaginationCursor) IsSet

func (o OptPaginationCursor) IsSet() bool

IsSet returns true if OptPaginationCursor was set.

func (OptPaginationCursor) MarshalJSON

func (s OptPaginationCursor) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptPaginationCursor) Or

Or returns value if set, or given parameter if does not.

func (*OptPaginationCursor) Reset

func (o *OptPaginationCursor) Reset()

Reset unsets value.

func (*OptPaginationCursor) SetTo

SetTo sets value to v.

func (*OptPaginationCursor) UnmarshalJSON

func (s *OptPaginationCursor) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptSlot

type OptSlot struct {
	Value Slot
	Set   bool
}

OptSlot is optional Slot.

func NewOptSlot

func NewOptSlot(v Slot) OptSlot

NewOptSlot returns new OptSlot with value set to v.

func (*OptSlot) Decode

func (o *OptSlot) Decode(d *jx.Decoder) error

Decode decodes Slot from json.

func (OptSlot) Encode

func (o OptSlot) Encode(e *jx.Encoder)

Encode encodes Slot as json.

func (OptSlot) Get

func (o OptSlot) Get() (v Slot, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptSlot) IsSet

func (o OptSlot) IsSet() bool

IsSet returns true if OptSlot was set.

func (OptSlot) MarshalJSON

func (s OptSlot) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptSlot) Or

func (o OptSlot) Or(d Slot) Slot

Or returns value if set, or given parameter if does not.

func (*OptSlot) Reset

func (o *OptSlot) Reset()

Reset unsets value.

func (*OptSlot) SetTo

func (o *OptSlot) SetTo(v Slot)

SetTo sets value to v.

func (*OptSlot) UnmarshalJSON

func (s *OptSlot) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithAttributes

func WithAttributes(attributes ...attribute.KeyValue) Option

WithAttributes specifies default otel attributes.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider specifies a meter provider to use for creating a meter.

If none is specified, the otel.GetMeterProvider() is used.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider specifies a tracer provider to use for creating a tracer.

If none is specified, the global provider is used.

type PaginationCursor

type PaginationCursor struct {
	// The number of items to skip.
	Offset OptInt `json:"offset"`
	// The maximum number of items to return.
	Limit OptInt `json:"limit"`
}

Offset-based pagination cursor. Ref: #/components/schemas/PaginationCursor

func (*PaginationCursor) Decode

func (s *PaginationCursor) Decode(d *jx.Decoder) error

Decode decodes PaginationCursor from json.

func (*PaginationCursor) Encode

func (s *PaginationCursor) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PaginationCursor) GetLimit

func (s *PaginationCursor) GetLimit() OptInt

GetLimit returns the value of Limit.

func (*PaginationCursor) GetOffset

func (s *PaginationCursor) GetOffset() OptInt

GetOffset returns the value of Offset.

func (*PaginationCursor) MarshalJSON

func (s *PaginationCursor) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PaginationCursor) SetLimit

func (s *PaginationCursor) SetLimit(val OptInt)

SetLimit sets the value of Limit.

func (*PaginationCursor) SetOffset

func (s *PaginationCursor) SetOffset(val OptInt)

SetOffset sets the value of Offset.

func (*PaginationCursor) UnmarshalJSON

func (s *PaginationCursor) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type PaginationResponse

type PaginationResponse struct {
	// The total number of matching items.
	Total int64 `json:"total"`
}

Ref: #/components/schemas/PaginationResponse

func (*PaginationResponse) Decode

func (s *PaginationResponse) Decode(d *jx.Decoder) error

Decode decodes PaginationResponse from json.

func (*PaginationResponse) Encode

func (s *PaginationResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*PaginationResponse) GetTotal

func (s *PaginationResponse) GetTotal() int64

GetTotal returns the value of Total.

func (*PaginationResponse) MarshalJSON

func (s *PaginationResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*PaginationResponse) SetTotal

func (s *PaginationResponse) SetTotal(val int64)

SetTotal sets the value of Total.

func (*PaginationResponse) UnmarshalJSON

func (s *PaginationResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Root

type Root string

func (*Root) Decode

func (s *Root) Decode(d *jx.Decoder) error

Decode decodes Root from json.

func (Root) Encode

func (s Root) Encode(e *jx.Encoder)

Encode encodes Root as json.

func (Root) MarshalJSON

func (s Root) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Root) UnmarshalJSON

func (s *Root) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Route

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

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationGroup

func (r Route) OperationGroup() string

OperationGroup returns the x-ogen-operation-group value.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

type Server

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

Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.

func NewServer

func NewServer(h Handler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

type ServerOption

type ServerOption interface {
	// contains filtered or unexported methods
}

ServerOption is server config option.

func WithErrorHandler

func WithErrorHandler(h ErrorHandler) ServerOption

WithErrorHandler specifies error handler to use.

func WithMaxMultipartMemory

func WithMaxMultipartMemory(max int64) ServerOption

WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.

func WithMethodNotAllowed

func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption

WithMethodNotAllowed specifies Method Not Allowed handler to use.

func WithMiddleware

func WithMiddleware(m ...Middleware) ServerOption

WithMiddleware specifies middlewares to use.

func WithNotFound

func WithNotFound(notFound http.HandlerFunc) ServerOption

WithNotFound specifies Not Found handler to use.

func WithPathPrefix

func WithPathPrefix(prefix string) ServerOption

WithPathPrefix specifies server path prefix.

type Slot

type Slot int64

func (*Slot) Decode

func (s *Slot) Decode(d *jx.Decoder) error

Decode decodes Slot from json.

func (Slot) Encode

func (s Slot) Encode(e *jx.Encoder)

Encode encodes Slot as json.

func (Slot) MarshalJSON

func (s Slot) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Slot) UnmarshalJSON

func (s *Slot) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (Slot) Validate

func (s Slot) Validate() error

type SlotString

type SlotString string

func (*SlotString) Decode

func (s *SlotString) Decode(d *jx.Decoder) error

Decode decodes SlotString from json.

func (SlotString) Encode

func (s SlotString) Encode(e *jx.Encoder)

Encode encodes SlotString as json.

func (SlotString) MarshalJSON

func (s SlotString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SlotString) UnmarshalJSON

func (s *SlotString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UnexpectedErrorStatusCode

type UnexpectedErrorStatusCode struct {
	StatusCode int
	Response   Error
}

UnexpectedErrorStatusCode wraps Error with StatusCode.

func (*UnexpectedErrorStatusCode) Error

func (s *UnexpectedErrorStatusCode) Error() string

func (*UnexpectedErrorStatusCode) GetResponse

func (s *UnexpectedErrorStatusCode) GetResponse() Error

GetResponse returns the value of Response.

func (*UnexpectedErrorStatusCode) GetStatusCode

func (s *UnexpectedErrorStatusCode) GetStatusCode() int

GetStatusCode returns the value of StatusCode.

func (*UnexpectedErrorStatusCode) SetResponse

func (s *UnexpectedErrorStatusCode) SetResponse(val Error)

SetResponse sets the value of Response.

func (*UnexpectedErrorStatusCode) SetStatusCode

func (s *UnexpectedErrorStatusCode) SetStatusCode(val int)

SetStatusCode sets the value of StatusCode.

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) GetEthereumNow

func (UnimplementedHandler) GetEthereumNow(ctx context.Context) (r GetEthereumNowRes, _ error)

GetEthereumNow implements getEthereumNow operation.

Get the current wall-clock slot and epoch.

GET /api/v1/ethereum/now

func (UnimplementedHandler) GetEthereumSpec

func (UnimplementedHandler) GetEthereumSpec(ctx context.Context) (r GetEthereumSpecRes, _ error)

GetEthereumSpec implements getEthereumSpec operation.

Get the Ethereum network name and spec.

GET /api/v1/ethereum/spec

func (UnimplementedHandler) GetFrame

func (UnimplementedHandler) GetFrame(ctx context.Context, params GetFrameParams) (r GetFrameRes, _ error)

GetFrame implements getFrame operation.

Get a single fork-choice frame by ID.

GET /api/v1/frames/{id}

func (UnimplementedHandler) ListMetadata

func (UnimplementedHandler) ListMetadata(ctx context.Context, req *MetadataQuery) (r ListMetadataRes, _ error)

ListMetadata implements listMetadata operation.

List fork-choice frame metadata.

POST /api/v1/metadata

func (UnimplementedHandler) ListMetadataEpochs

func (UnimplementedHandler) ListMetadataEpochs(ctx context.Context, req *MetadataQuery) (r ListMetadataEpochsRes, _ error)

ListMetadataEpochs implements listMetadataEpochs operation.

List distinct epochs across stored frames.

POST /api/v1/metadata/epochs

func (UnimplementedHandler) ListMetadataLabels

func (UnimplementedHandler) ListMetadataLabels(ctx context.Context, req *MetadataQuery) (r ListMetadataLabelsRes, _ error)

ListMetadataLabels implements listMetadataLabels operation.

List distinct labels across stored frames.

POST /api/v1/metadata/labels

func (UnimplementedHandler) ListMetadataNodes

func (UnimplementedHandler) ListMetadataNodes(ctx context.Context, req *MetadataQuery) (r ListMetadataNodesRes, _ error)

ListMetadataNodes implements listMetadataNodes operation.

List distinct nodes across stored frames.

POST /api/v1/metadata/nodes

func (UnimplementedHandler) ListMetadataSlots

func (UnimplementedHandler) ListMetadataSlots(ctx context.Context, req *MetadataQuery) (r ListMetadataSlotsRes, _ error)

ListMetadataSlots implements listMetadataSlots operation.

List distinct slots across stored frames.

POST /api/v1/metadata/slots

func (UnimplementedHandler) NewError

NewError creates *UnexpectedErrorStatusCode from error returned by handler.

Used for common default response.

Jump to

Keyboard shortcuts

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