Documentation ¶
Index ¶
- Variables
- func RegisterGetVariablesByContractAndNameHandler(n *Namespace) error
- func RegisterGetVariablesByContractAndStorageIndexHandler(n *Namespace) error
- func RegisterGetVariablesByContractHandler(n *Namespace) error
- func RegisterGetVariablesByNameHandler(n *Namespace) error
- func RegisterListVariablesHandler(n *Namespace) error
- type InputNetworkAddress
- type InputNetworkAddressNamePaginated
- type InputNetworkAddressPaginated
- type InputNetworkAddressStorageIndexPaginated
- type InputNetworkNamePaginated
- type InputNetworkPaginated
- type Namespace
Constants ¶
This section is empty.
Variables ¶
var VariablesServiceName rest.ServiceName = "variables"
VariablesServiceName defines the service name for the Variables service.
Functions ¶
func RegisterGetVariablesByContractAndNameHandler ¶
RegisterGetVariablesByContractAndNameHandler registers the endpoint to retrieve variables by contract and name
func RegisterGetVariablesByContractAndStorageIndexHandler ¶
RegisterGetVariablesByContractAndStorageIndexHandler registers the endpoint to retrieve variables by contract and storage index
func RegisterGetVariablesByContractHandler ¶
RegisterGetVariablesByContractHandler registers the endpoint to retrieve variables by contract
func RegisterGetVariablesByNameHandler ¶
RegisterGetVariablesByNameHandler registers the endpoint to retrieve variables by name
func RegisterListVariablesHandler ¶
RegisterListVariablesHandler registers the endpoint to retrieve variables
Types ¶
type InputNetworkAddress ¶
type InputNetworkAddress 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 account address /* 135-byte string literal not displayed */ }
InputNetworkAddress represents the input parameters required to specify a network and address.
type InputNetworkAddressNamePaginated ¶
type InputNetworkAddressNamePaginated 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 */ Name string `json:"name" query:"name" minLength:"1" maxLength:"100" example:"myVariable" doc:"Variable name"` // Name specifies the variable name Limit uint `json:"limit" query:"limit" example:"10" default:"10" doc:"Limit for the number of variables to return"` // Limit specifies the number of variables to return Offset uint `json:"offset" query:"offset" example:"0" default:"0" doc:"Offset for pagination"` // Offset specifies the offset for pagination }
InputNetworkAddressNamePaginated represents the input parameters required to specify a network, address, name, 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 variables 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 InputNetworkAddressStorageIndexPaginated ¶
type InputNetworkAddressStorageIndexPaginated 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 */ StorageIndex int64 `json:"storageIndex" query:"storageIndex" default:"0" example:"0" doc:"Storage index"` // Storage index specifies the storage index Limit uint `json:"limit" query:"limit" example:"10" default:"10" doc:"Limit for the number of variables to return"` // Limit specifies the number of variables to return Offset uint `json:"offset" query:"offset" example:"0" default:"0" doc:"Offset for pagination"` // Offset specifies the offset for pagination }
InputNetworkAddressStorageIndexPaginated represents the input parameters required to specify a network, address, storage index, and pagination.
type InputNetworkNamePaginated ¶
type InputNetworkNamePaginated 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) Name string `json:"name" query:"name" minLength:"1" maxLength:"100" example:"myVariable" doc:"Variable name"` // Name specifies the variable name Limit uint `json:"limit" query:"limit" example:"10" default:"10" doc:"Limit for the number of variables to return"` // Limit specifies the number of variables to return Offset uint `json:"offset" query:"offset" example:"0" default:"0" doc:"Offset for pagination"` // Offset specifies the offset for pagination }
InputNetworkNamePaginated represents the input parameters required to specify a network, name, 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 variables 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 ¶
Namespace represents a service namespace containing configuration and dependencies for the Variables 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 Variables namespace.
func (*Namespace) RegisterHandlers ¶
RegisterHandlers registers all the necessary handlers for the Accounts namespace.