public

package
v0.0.0-...-d1fbc97 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package public provides primitives to interact with the openapi HTTP API.

Code generated by github.com/algorand/oapi-codegen DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface, m ...echo.MiddlewareFunc)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string, m ...echo.MiddlewareFunc)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type ServerInterface

type ServerInterface interface {
	// Get account information.
	// (GET /v2/accounts/{address})
	AccountInformation(ctx echo.Context, address string, params AccountInformationParams) error
	// Get account information about a given app.
	// (GET /v2/accounts/{address}/applications/{application-id})
	AccountApplicationInformation(ctx echo.Context, address string, applicationId uint64, params AccountApplicationInformationParams) error
	// Get account information about a given asset.
	// (GET /v2/accounts/{address}/assets/{asset-id})
	AccountAssetInformation(ctx echo.Context, address string, assetId uint64, params AccountAssetInformationParams) error
	// Get application information.
	// (GET /v2/applications/{application-id})
	GetApplicationByID(ctx echo.Context, applicationId uint64) error
	// Get box information for a given application.
	// (GET /v2/applications/{application-id}/box)
	GetApplicationBoxByName(ctx echo.Context, applicationId uint64, params GetApplicationBoxByNameParams) error
	// Get all box names for a given application.
	// (GET /v2/applications/{application-id}/boxes)
	GetApplicationBoxes(ctx echo.Context, applicationId uint64, params GetApplicationBoxesParams) error
	// Get asset information.
	// (GET /v2/assets/{asset-id})
	GetAssetByID(ctx echo.Context, assetId uint64) error
	// Get the block for the given round.
	// (GET /v2/blocks/{round})
	GetBlock(ctx echo.Context, round uint64, params GetBlockParams) error
	// Get the block hash for the block on the given round.
	// (GET /v2/blocks/{round}/hash)
	GetBlockHash(ctx echo.Context, round uint64) error
	// Get the block header for the block on the given round.
	// (GET /v2/blocks/{round}/header)
	GetBlockHeader(ctx echo.Context, round uint64, params GetBlockHeaderParams) error
	// Gets a proof for a given light block header inside a state proof commitment
	// (GET /v2/blocks/{round}/lightheader/proof)
	GetLightBlockHeaderProof(ctx echo.Context, round uint64) error
	// Get all of the logs from outer and inner app calls in the given round
	// (GET /v2/blocks/{round}/logs)
	GetBlockLogs(ctx echo.Context, round uint64) error
	// Get a proof for a transaction in a block.
	// (GET /v2/blocks/{round}/transactions/{txid}/proof)
	GetTransactionProof(ctx echo.Context, round uint64, txid string, params GetTransactionProofParams) error
	// Get the top level transaction IDs for the block on the given round.
	// (GET /v2/blocks/{round}/txids)
	GetBlockTxids(ctx echo.Context, round uint64) error
	// Get a LedgerStateDelta object for a given transaction group
	// (GET /v2/deltas/txn/group/{id})
	GetLedgerStateDeltaForTransactionGroup(ctx echo.Context, id string, params GetLedgerStateDeltaForTransactionGroupParams) error
	// Get a LedgerStateDelta object for a given round
	// (GET /v2/deltas/{round})
	GetLedgerStateDelta(ctx echo.Context, round uint64, params GetLedgerStateDeltaParams) error
	// Get LedgerStateDelta objects for all transaction groups in a given round
	// (GET /v2/deltas/{round}/txn/group)
	GetTransactionGroupLedgerStateDeltasForRound(ctx echo.Context, round uint64, params GetTransactionGroupLedgerStateDeltasForRoundParams) error
	// Returns the timestamp offset. Timestamp offsets can only be set in dev mode.
	// (GET /v2/devmode/blocks/offset)
	GetBlockTimeStampOffset(ctx echo.Context) error
	// Given a timestamp offset in seconds, adds the offset to every subsequent block header's timestamp.
	// (POST /v2/devmode/blocks/offset/{offset})
	SetBlockTimeStampOffset(ctx echo.Context, offset uint64) error
	// Get the current supply reported by the ledger.
	// (GET /v2/ledger/supply)
	GetSupply(ctx echo.Context) error
	// Get a state proof that covers a given round
	// (GET /v2/stateproofs/{round})
	GetStateProof(ctx echo.Context, round uint64) error
	// Gets the current node status.
	// (GET /v2/status)
	GetStatus(ctx echo.Context) error
	// Gets the node status after waiting for a round after the given round.
	// (GET /v2/status/wait-for-block-after/{round})
	WaitForBlock(ctx echo.Context, round uint64) error
	// Compile TEAL source code to binary, produce its hash
	// (POST /v2/teal/compile)
	TealCompile(ctx echo.Context, params TealCompileParams) error
	// Disassemble program bytes into the TEAL source code.
	// (POST /v2/teal/disassemble)
	TealDisassemble(ctx echo.Context) error
	// Provide debugging information for a transaction (or group).
	// (POST /v2/teal/dryrun)
	TealDryrun(ctx echo.Context) error
	// Get parameters for constructing a new transaction
	// (GET /v2/transactions/params)
	TransactionParams(ctx echo.Context) error
	// Simulates a raw transaction or transaction group as it would be evaluated on the network. The simulation will use blockchain state from the latest committed round.
	// (POST /v2/transactions/simulate)
	SimulateTransaction(ctx echo.Context, params SimulateTransactionParams) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) AccountApplicationInformation

func (w *ServerInterfaceWrapper) AccountApplicationInformation(ctx echo.Context) error

AccountApplicationInformation converts echo context to params.

func (*ServerInterfaceWrapper) AccountAssetInformation

func (w *ServerInterfaceWrapper) AccountAssetInformation(ctx echo.Context) error

AccountAssetInformation converts echo context to params.

func (*ServerInterfaceWrapper) AccountInformation

func (w *ServerInterfaceWrapper) AccountInformation(ctx echo.Context) error

AccountInformation converts echo context to params.

func (*ServerInterfaceWrapper) GetApplicationBoxByName

func (w *ServerInterfaceWrapper) GetApplicationBoxByName(ctx echo.Context) error

GetApplicationBoxByName converts echo context to params.

func (*ServerInterfaceWrapper) GetApplicationBoxes

func (w *ServerInterfaceWrapper) GetApplicationBoxes(ctx echo.Context) error

GetApplicationBoxes converts echo context to params.

func (*ServerInterfaceWrapper) GetApplicationByID

func (w *ServerInterfaceWrapper) GetApplicationByID(ctx echo.Context) error

GetApplicationByID converts echo context to params.

func (*ServerInterfaceWrapper) GetAssetByID

func (w *ServerInterfaceWrapper) GetAssetByID(ctx echo.Context) error

GetAssetByID converts echo context to params.

func (*ServerInterfaceWrapper) GetBlock

func (w *ServerInterfaceWrapper) GetBlock(ctx echo.Context) error

GetBlock converts echo context to params.

func (*ServerInterfaceWrapper) GetBlockHash

func (w *ServerInterfaceWrapper) GetBlockHash(ctx echo.Context) error

GetBlockHash converts echo context to params.

func (*ServerInterfaceWrapper) GetBlockHeader

func (w *ServerInterfaceWrapper) GetBlockHeader(ctx echo.Context) error

GetBlockHeader converts echo context to params.

func (*ServerInterfaceWrapper) GetBlockLogs

func (w *ServerInterfaceWrapper) GetBlockLogs(ctx echo.Context) error

GetBlockLogs converts echo context to params.

func (*ServerInterfaceWrapper) GetBlockTimeStampOffset

func (w *ServerInterfaceWrapper) GetBlockTimeStampOffset(ctx echo.Context) error

GetBlockTimeStampOffset converts echo context to params.

func (*ServerInterfaceWrapper) GetBlockTxids

func (w *ServerInterfaceWrapper) GetBlockTxids(ctx echo.Context) error

GetBlockTxids converts echo context to params.

func (*ServerInterfaceWrapper) GetLedgerStateDelta

func (w *ServerInterfaceWrapper) GetLedgerStateDelta(ctx echo.Context) error

GetLedgerStateDelta converts echo context to params.

func (*ServerInterfaceWrapper) GetLedgerStateDeltaForTransactionGroup

func (w *ServerInterfaceWrapper) GetLedgerStateDeltaForTransactionGroup(ctx echo.Context) error

GetLedgerStateDeltaForTransactionGroup converts echo context to params.

func (*ServerInterfaceWrapper) GetLightBlockHeaderProof

func (w *ServerInterfaceWrapper) GetLightBlockHeaderProof(ctx echo.Context) error

GetLightBlockHeaderProof converts echo context to params.

func (*ServerInterfaceWrapper) GetStateProof

func (w *ServerInterfaceWrapper) GetStateProof(ctx echo.Context) error

GetStateProof converts echo context to params.

func (*ServerInterfaceWrapper) GetStatus

func (w *ServerInterfaceWrapper) GetStatus(ctx echo.Context) error

GetStatus converts echo context to params.

func (*ServerInterfaceWrapper) GetSupply

func (w *ServerInterfaceWrapper) GetSupply(ctx echo.Context) error

GetSupply converts echo context to params.

func (*ServerInterfaceWrapper) GetTransactionGroupLedgerStateDeltasForRound

func (w *ServerInterfaceWrapper) GetTransactionGroupLedgerStateDeltasForRound(ctx echo.Context) error

GetTransactionGroupLedgerStateDeltasForRound converts echo context to params.

func (*ServerInterfaceWrapper) GetTransactionProof

func (w *ServerInterfaceWrapper) GetTransactionProof(ctx echo.Context) error

GetTransactionProof converts echo context to params.

func (*ServerInterfaceWrapper) SetBlockTimeStampOffset

func (w *ServerInterfaceWrapper) SetBlockTimeStampOffset(ctx echo.Context) error

SetBlockTimeStampOffset converts echo context to params.

func (*ServerInterfaceWrapper) SimulateTransaction

func (w *ServerInterfaceWrapper) SimulateTransaction(ctx echo.Context) error

SimulateTransaction converts echo context to params.

func (*ServerInterfaceWrapper) TealCompile

func (w *ServerInterfaceWrapper) TealCompile(ctx echo.Context) error

TealCompile converts echo context to params.

func (*ServerInterfaceWrapper) TealDisassemble

func (w *ServerInterfaceWrapper) TealDisassemble(ctx echo.Context) error

TealDisassemble converts echo context to params.

func (*ServerInterfaceWrapper) TealDryrun

func (w *ServerInterfaceWrapper) TealDryrun(ctx echo.Context) error

TealDryrun converts echo context to params.

func (*ServerInterfaceWrapper) TransactionParams

func (w *ServerInterfaceWrapper) TransactionParams(ctx echo.Context) error

TransactionParams converts echo context to params.

func (*ServerInterfaceWrapper) WaitForBlock

func (w *ServerInterfaceWrapper) WaitForBlock(ctx echo.Context) error

WaitForBlock converts echo context to params.

Jump to

Keyboard shortcuts

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