Documentation
¶
Index ¶
- type Client
- func (instance *Client) GetMetricOneByNodeID(nodeID string, startPeriod int, endPeriod int) error
- func (instance *Client) GetNodeMetadata(nodeID string, network string) error
- func (instance *Client) InitMetric(nodeID string, body *string, signature string) error
- func (instance *Client) MakeQuery(payload string) map[string]string
- func (instance *Client) MakeRequest(query map[string]string) ([]*GraphQLResponse, error)
- func (instance *Client) UploadMetric(nodeID string, body *string, signature string) error
- type GraphQLError
- type GraphQLResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // The graphql can contains a list of server where // make the request. BaseUrl []string // Token to autenticate to the server Token *string Client *http.Client WithProxy bool }
func NewWithProxy ¶
func (*Client) GetMetricOneByNodeID ¶
GetMetricOneByNodeID Utils function that call the GraphQL server to get the metrics about the channel
func (*Client) GetNodeMetadata ¶
GetNodeMetadata Utils function to the the node information from the repository
func (*Client) InitMetric ¶
func (*Client) MakeRequest ¶
func (instance *Client) MakeRequest(query map[string]string) ([]*GraphQLResponse, error)
MakeRequest Make Request is the method to make the http request
type GraphQLError ¶
type GraphQLError struct {
Message string `json:"message"`
}
GraphQLError Partial Wrapper around graphql error response FIXME: adding support for the path filed
type GraphQLResponse ¶
type GraphQLResponse struct { Data *map[string]any `json:"data"` Errors []*GraphQLError `json:"errors"` }
GraphQLResponse GraphQL Response wrapper
Click to show internal directories.
Click to hide internal directories.