Documentation
¶
Overview ¶
Package graphql for grid graphql support
Package graphql for grid graphql support
Index ¶
- Variables
- type Contract
- type Contracts
- type ContractsGetter
- func (c *ContractsGetter) GetNodeContractsByTypeAndName(projectName, deploymentType, deploymentName string) (map[uint32]uint64, error)
- func (c *ContractsGetter) ListContractsByTwinID(states []string) (Contracts, error)
- func (c *ContractsGetter) ListContractsOfProjectName(projectName string, noGateways ...bool) (Contracts, error)
- type GraphQl
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 (*GraphQl) GetItemTotalCount ¶
GetItemTotalCount return count of items
Click to show internal directories.
Click to hide internal directories.