-
Notifications
You must be signed in to change notification settings - Fork 30
/
querier.go
88 lines (73 loc) · 2.84 KB
/
querier.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
package types
import (
tmbytes "github.com/tendermint/tendermint/libs/bytes"
sdk "github.com/cosmos/cosmos-sdk/types"
)
const (
QueryDefinition = "definition" // query definition
QueryBinding = "binding" // query binding
QueryBindings = "bindings" // query bindings
QueryWithdrawAddress = "withdraw_address" // query withdrawal address
QueryRequest = "request" // query request
QueryRequests = "requests" // query requests
QueryResponse = "response" // query response
QueryRequestContext = "context" // query request context
QueryRequestsByReqCtx = "requests_by_ctx" // query requests by the request context
QueryResponses = "responses" // query responses
QueryEarnedFees = "fees" // query earned fees
QuerySchema = "schema" // query schema
QueryParameters = "parameters" // query parameters
)
// QueryDefinitionParams defines the params to query a service definition
type QueryDefinitionParams struct {
ServiceName string
}
// QueryBindingParams defines the params to query a service binding
type QueryBindingParams struct {
ServiceName string
Provider sdk.AccAddress
}
// QueryBindingsParams defines the params to query all bindings of a service definition with an optional owner
type QueryBindingsParams struct {
ServiceName string
Owner sdk.AccAddress
}
// QueryWithdrawAddressParams defines the params to query the withdrawal address of an owner
type QueryWithdrawAddressParams struct {
Owner sdk.AccAddress
}
// QueryRequestParams defines the params to query the request by ID
type QueryRequestParams struct {
RequestID []byte
}
// QueryRequestsParams defines the params to query active requests for a service binding
type QueryRequestsParams struct {
ServiceName string
Provider sdk.AccAddress
}
// QueryResponseParams defines the params to query the response to a request
type QueryResponseParams struct {
RequestID tmbytes.HexBytes
}
// QueryRequestContextParams defines the params to query the request context
type QueryRequestContextParams struct {
RequestContextID tmbytes.HexBytes
}
// QueryRequestsByReqCtxParams defines the params to query active requests by the request context ID
type QueryRequestsByReqCtxParams struct {
RequestContextID tmbytes.HexBytes
BatchCounter uint64
}
// QueryResponsesParams defines the params to query active responses by the request context ID
type QueryResponsesParams struct {
RequestContextID tmbytes.HexBytes
BatchCounter uint64
}
// QueryEarnedFeesParams defines the params to query the earned fees for a provider
type QueryEarnedFeesParams struct {
Provider sdk.AccAddress
}
// QuerySchemaParams defines the params to query the system schemas by the schema name
type QuerySchemaParams struct {
SchemaName string
}