Documentation ¶
Index ¶
- Variables
- func RegisterGetEventsByContractAndNameHandler(n *Namespace) error
- func RegisterGetEventsByContractHandler(n *Namespace) error
- func RegisterListEventsHandler(n *Namespace) error
- type InputNetworkAddressNamesPaginated
- type InputNetworkAddressPaginated
- type InputNetworkPaginated
- type Namespace
Constants ¶
This section is empty.
Variables ¶
var EventsServiceName rest.ServiceName = "events"
EventsServiceName defines the service name for the Events service.
Functions ¶
func RegisterGetEventsByContractAndNameHandler ¶
RegisterGetEventsByContractAndNameHandler registers the endpoint to retrieve events by contract and name
func RegisterGetEventsByContractHandler ¶
RegisterGetEventsByContractHandler registers the endpoint to retrieve events by contract
func RegisterListEventsHandler ¶
RegisterListEventsHandler registers the endpoint to retrieve events
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:"[\"OwnershipTransferred\"]" uniqueItems:"true" minItems:"1" doc:"Names of the events"` // Names specifies the events names Limit uint `json:"limit" query:"limit" example:"10" default:"1" doc:"Limit for the number of events to return"` // Limit specifies the number of events 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 events 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 events 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 Events 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 Events namespace.
func (*Namespace) RegisterHandlers ¶
RegisterHandlers registers all the necessary handlers for the Accounts namespace.