restfunctions

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FunctionsServiceName rest.ServiceName = "functions"

FunctionsServiceName defines the service name for the Functions service.

Functions

func RegisterGetFunctionsByContractAndNameHandler

func RegisterGetFunctionsByContractAndNameHandler(n *Namespace) error

RegisterGetFunctionsByContractAndNameHandler registers the endpoint to retrieve functions by contract and name

func RegisterGetFunctionsByContractHandler

func RegisterGetFunctionsByContractHandler(n *Namespace) error

RegisterGetFunctionsByContractHandler registers the endpoint to retrieve functions by contract

func RegisterListFunctionsHandler

func RegisterListFunctionsHandler(n *Namespace) error

RegisterListFunctionsHandler registers the endpoint to retrieve functions

Types

type InputNetworkAddressNamesPaginated

type InputNetworkAddressNamesPaginated struct {
	NetworkId utils.NetworkID `json:"networkId" path:"networkId" default:"1" example:"1" doc:"Network ID"` // Network ID specifies the blockchain network (e.g., 1 for Ethereum Mainnet)
	Address   common.Address  ``                                                                           // Address specifies the contract address
	/* 135-byte string literal not displayed */
	Names  []string `json:"names" query:"names" example:"[\"myFunction\"]" uniqueItems:"true" minItems:"1" doc:"Names of the functions"` // Names specifies the function names
	Limit  uint     `json:"limit" query:"limit" example:"10" default:"10" doc:"Limit for the number of functions to return"`             // Limit specifies the number of functions to return
	Offset uint     `json:"offset" query:"offset" example:"0" default:"0" doc:"Offset for pagination"`                                   // Offset specifies the offset for pagination
}

InputNetworkAddressNamesPaginated represents the input parameters required to specify a network, address, names, and pagination.

type InputNetworkAddressPaginated

type InputNetworkAddressPaginated struct {
	NetworkId utils.NetworkID `json:"networkId" path:"networkId" default:"1" example:"1" doc:"Network ID"` // Network ID specifies the blockchain network (e.g., 1 for Ethereum Mainnet)
	Address   common.Address  ``                                                                           // Address specifies the contract address
	/* 135-byte string literal not displayed */
	Limit  uint `json:"limit" query:"limit" example:"10" default:"10" doc:"Limit for the number of functions to return"` // Limit specifies the number of constructors to return
	Offset uint `json:"offset" query:"offset" example:"0" default:"0" doc:"Offset for pagination"`                       // Offset specifies the offset for pagination
}

InputNetworkAddressPaginated represents the input parameters required to specify a network, address, and pagination.

type InputNetworkPaginated

type InputNetworkPaginated struct {
	NetworkId utils.NetworkID `json:"networkId" path:"networkId" default:"1" example:"1" doc:"Network ID"`                             // Network ID specifies the blockchain network (e.g., 1 for Ethereum Mainnet)
	Limit     uint            `json:"limit" query:"limit" example:"10" default:"10" doc:"Limit for the number of functions to return"` // Limit specifies the number of accounts to return
	Offset    uint            `json:"offset" query:"offset" example:"0" default:"0" doc:"Offset for pagination"`                       // Offset specifies the offset for pagination
}

InputNetworkPaginated represents the input parameters required to specify a network, limit and offset.

type Namespace

type Namespace struct {
	*rest.Server
	// contains filtered or unexported fields
}

Namespace represents a service namespace containing configuration and dependencies for the Functions service.

func NewNamespace

func NewNamespace(server *rest.Server, db db.Adapter, pool *clients.ClientPool, nats *nats.Conn, cache *cache.Redis) *Namespace

NewNamespace creates a new instance of Namespace with the provided server, database adapter, client pool, NATS connection, and Redis cache.

func (*Namespace) GetName

func (s *Namespace) GetName() rest.ServiceName

GetName returns the service name for the Functions namespace.

func (*Namespace) RegisterHandlers

func (s *Namespace) RegisterHandlers() error

RegisterHandlers registers all the necessary handlers for the Accounts namespace.

Jump to

Keyboard shortcuts

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