-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerated.go
118 lines (95 loc) · 4.01 KB
/
generated.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
// Code generated by github.com/Khan/genqlient, DO NOT EDIT.
package opplasmairys
import (
"context"
"github.com/Khan/genqlient/graphql"
)
// QueryTxResponse is returned by QueryTx on success.
type QueryTxResponse struct {
Transactions QueryTxTransactionsEdges `json:"transactions"`
}
// GetTransactions returns QueryTxResponse.Transactions, and is useful for accessing the field via an interface.
func (v *QueryTxResponse) GetTransactions() QueryTxTransactionsEdges { return v.Transactions }
// QueryTxTransactionsEdges includes the requested fields of the GraphQL type Edges.
type QueryTxTransactionsEdges struct {
Edges []QueryTxTransactionsEdgesEdgesNode `json:"edges"`
}
// GetEdges returns QueryTxTransactionsEdges.Edges, and is useful for accessing the field via an interface.
func (v *QueryTxTransactionsEdges) GetEdges() []QueryTxTransactionsEdgesEdgesNode { return v.Edges }
// QueryTxTransactionsEdgesEdgesNode includes the requested fields of the GraphQL type Node.
type QueryTxTransactionsEdgesEdgesNode struct {
Node QueryTxTransactionsEdgesEdgesNodeNodeTransaction `json:"node"`
}
// GetNode returns QueryTxTransactionsEdgesEdgesNode.Node, and is useful for accessing the field via an interface.
func (v *QueryTxTransactionsEdgesEdgesNode) GetNode() QueryTxTransactionsEdgesEdgesNodeNodeTransaction {
return v.Node
}
// QueryTxTransactionsEdgesEdgesNodeNodeTransaction includes the requested fields of the GraphQL type Transaction.
type QueryTxTransactionsEdgesEdgesNodeNodeTransaction struct {
Id string `json:"id"`
Tags []QueryTxTransactionsEdgesEdgesNodeNodeTransactionTagsTag `json:"tags"`
}
// GetId returns QueryTxTransactionsEdgesEdgesNodeNodeTransaction.Id, and is useful for accessing the field via an interface.
func (v *QueryTxTransactionsEdgesEdgesNodeNodeTransaction) GetId() string { return v.Id }
// GetTags returns QueryTxTransactionsEdgesEdgesNodeNodeTransaction.Tags, and is useful for accessing the field via an interface.
func (v *QueryTxTransactionsEdgesEdgesNodeNodeTransaction) GetTags() []QueryTxTransactionsEdgesEdgesNodeNodeTransactionTagsTag {
return v.Tags
}
// QueryTxTransactionsEdgesEdgesNodeNodeTransactionTagsTag includes the requested fields of the GraphQL type Tag.
type QueryTxTransactionsEdgesEdgesNodeNodeTransactionTagsTag struct {
Name string `json:"name"`
Value string `json:"value"`
}
// GetName returns QueryTxTransactionsEdgesEdgesNodeNodeTransactionTagsTag.Name, and is useful for accessing the field via an interface.
func (v *QueryTxTransactionsEdgesEdgesNodeNodeTransactionTagsTag) GetName() string { return v.Name }
// GetValue returns QueryTxTransactionsEdgesEdgesNodeNodeTransactionTagsTag.Value, and is useful for accessing the field via an interface.
func (v *QueryTxTransactionsEdgesEdgesNodeNodeTransactionTagsTag) GetValue() string { return v.Value }
// __QueryTxInput is used internally by genqlient
type __QueryTxInput struct {
Address []string `json:"address"`
Key string `json:"key"`
}
// GetAddress returns __QueryTxInput.Address, and is useful for accessing the field via an interface.
func (v *__QueryTxInput) GetAddress() []string { return v.Address }
// GetKey returns __QueryTxInput.Key, and is useful for accessing the field via an interface.
func (v *__QueryTxInput) GetKey() string { return v.Key }
// The query or mutation executed by QueryTx.
const QueryTx_Operation = `
query QueryTx ($address: [String!]!, $key: String!) {
transactions(owners: $address, tags: [{name:"OP-PLASMA-KEY",values:[$key]}]) {
edges {
node {
id
tags {
name
value
}
}
}
}
}
`
func QueryTx(
ctx_ context.Context,
client_ graphql.Client,
address []string,
key string,
) (*QueryTxResponse, error) {
req_ := &graphql.Request{
OpName: "QueryTx",
Query: QueryTx_Operation,
Variables: &__QueryTxInput{
Address: address,
Key: key,
},
}
var err_ error
var data_ QueryTxResponse
resp_ := &graphql.Response{Data: &data_}
err_ = client_.MakeRequest(
ctx_,
req_,
resp_,
)
return &data_, err_
}