graphql

package
v0.17.7 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package graphql for grid graphql support

Package graphql for grid graphql support

Index

Constants

This section is empty.

Variables

View Source
var ErrorContractsNotFound = fmt.Errorf("could not find any contracts")

Functions

This section is empty.

Types

type Contract

type Contract struct {
	ContractID     string `json:"contractID"`
	State          string `json:"state"`
	DeploymentData string `json:"deploymentData"`

	// for node and rent contracts
	NodeID uint32 `json:"nodeID"`
	// for name contracts
	Name string `json:"name"`
}

Contract from graphql

type Contracts

type Contracts struct {
	NameContracts []Contract `json:"nameContracts"`
	NodeContracts []Contract `json:"nodeContracts"`
	RentContracts []Contract `json:"rentContracts"`
}

Contracts from graphql

type ContractsGetter

type ContractsGetter struct {
	// contains filtered or unexported fields
}

ContractsGetter for contracts getter from graphql

func NewContractsGetter

func NewContractsGetter(twinID uint32, graphql GraphQl, substrateConn subi.SubstrateExt, ncPool client.NodeClientGetter) ContractsGetter

NewContractsGetter return a new Getter for contracts

func (*ContractsGetter) GetNodeContractsByTypeAndName

func (c *ContractsGetter) GetNodeContractsByTypeAndName(projectName, deploymentType, deploymentName string) (map[uint32]uint64, error)

GetNodeContractsByTypeAndName list node contracts for a given type, project name and deployment name

func (*ContractsGetter) ListContractsByTwinID

func (c *ContractsGetter) ListContractsByTwinID(states []string) (Contracts, error)

ListContractsByTwinID returns contracts for a twinID

func (*ContractsGetter) ListContractsOfProjectName

func (c *ContractsGetter) ListContractsOfProjectName(projectName string, noGateways ...bool) (Contracts, error)

ListContractsOfProjectName returns contracts for a project name

type GraphQl

type GraphQl struct {
	// contains filtered or unexported fields
}

GraphQl for tf graphql

func NewGraphQl

func NewGraphQl(urls ...string) (GraphQl, error)

NewGraphQl new tf graphql

func (*GraphQl) GetItemTotalCount

func (g *GraphQl) GetItemTotalCount(itemName string, options string) (float64, error)

GetItemTotalCount return count of items

func (*GraphQl) Query

func (g *GraphQl) Query(body string, variables map[string]interface{}) (map[string]interface{}, error)

Query queries graphql

Jump to

Keyboard shortcuts

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