graphql

package
v0.11.6 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 14 Imported by: 5

Documentation

Overview

Package graphql for grid graphql support

Package graphql for grid graphql support

Index

Constants

This section is empty.

Variables

This section is empty.

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) (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(url 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