Skip to content

Commit 251282a

Browse files
author
nashqueue
committed
ignite scaffold nameservice whois
1 parent 813f78c commit 251282a

27 files changed

Lines changed: 3283 additions & 60 deletions

File tree

docs/static/openapi.yml

Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29845,6 +29845,183 @@ paths:
2984529845
additionalProperties: {}
2984629846
tags:
2984729847
- Query
29848+
/nameservice/nameservice/whois:
29849+
get:
29850+
summary: Queries a list of Whois items.
29851+
operationId: NameserviceNameserviceWhoisAll
29852+
responses:
29853+
'200':
29854+
description: A successful response.
29855+
schema:
29856+
type: object
29857+
properties:
29858+
whois:
29859+
type: array
29860+
items:
29861+
type: object
29862+
properties:
29863+
index:
29864+
type: string
29865+
name:
29866+
type: string
29867+
value:
29868+
type: string
29869+
price:
29870+
type: string
29871+
owner:
29872+
type: string
29873+
pagination:
29874+
type: object
29875+
properties:
29876+
next_key:
29877+
type: string
29878+
format: byte
29879+
title: |-
29880+
next_key is the key to be passed to PageRequest.key to
29881+
query the next page most efficiently
29882+
total:
29883+
type: string
29884+
format: uint64
29885+
title: >-
29886+
total is total number of results available if
29887+
PageRequest.count_total
29888+
29889+
was set, its value is undefined otherwise
29890+
description: >-
29891+
PageResponse is to be embedded in gRPC response messages where
29892+
the
29893+
29894+
corresponding request message has used PageRequest.
29895+
29896+
message SomeResponse {
29897+
repeated Bar results = 1;
29898+
PageResponse page = 2;
29899+
}
29900+
default:
29901+
description: An unexpected error response.
29902+
schema:
29903+
type: object
29904+
properties:
29905+
code:
29906+
type: integer
29907+
format: int32
29908+
message:
29909+
type: string
29910+
details:
29911+
type: array
29912+
items:
29913+
type: object
29914+
properties:
29915+
'@type':
29916+
type: string
29917+
additionalProperties: {}
29918+
parameters:
29919+
- name: pagination.key
29920+
description: |-
29921+
key is a value returned in PageResponse.next_key to begin
29922+
querying the next page most efficiently. Only one of offset or key
29923+
should be set.
29924+
in: query
29925+
required: false
29926+
type: string
29927+
format: byte
29928+
- name: pagination.offset
29929+
description: >-
29930+
offset is a numeric offset that can be used when key is unavailable.
29931+
29932+
It is less efficient than using key. Only one of offset or key
29933+
should
29934+
29935+
be set.
29936+
in: query
29937+
required: false
29938+
type: string
29939+
format: uint64
29940+
- name: pagination.limit
29941+
description: >-
29942+
limit is the total number of results to be returned in the result
29943+
page.
29944+
29945+
If left empty it will default to a value to be set by each app.
29946+
in: query
29947+
required: false
29948+
type: string
29949+
format: uint64
29950+
- name: pagination.count_total
29951+
description: >-
29952+
count_total is set to true to indicate that the result set should
29953+
include
29954+
29955+
a count of the total number of items available for pagination in
29956+
UIs.
29957+
29958+
count_total is only respected when offset is used. It is ignored
29959+
when key
29960+
29961+
is set.
29962+
in: query
29963+
required: false
29964+
type: boolean
29965+
- name: pagination.reverse
29966+
description: >-
29967+
reverse is set to true if results are to be returned in the
29968+
descending order.
29969+
29970+
29971+
Since: cosmos-sdk 0.43
29972+
in: query
29973+
required: false
29974+
type: boolean
29975+
tags:
29976+
- Query
29977+
'/nameservice/nameservice/whois/{index}':
29978+
get:
29979+
summary: Queries a Whois by index.
29980+
operationId: NameserviceNameserviceWhois
29981+
responses:
29982+
'200':
29983+
description: A successful response.
29984+
schema:
29985+
type: object
29986+
properties:
29987+
whois:
29988+
type: object
29989+
properties:
29990+
index:
29991+
type: string
29992+
name:
29993+
type: string
29994+
value:
29995+
type: string
29996+
price:
29997+
type: string
29998+
owner:
29999+
type: string
30000+
default:
30001+
description: An unexpected error response.
30002+
schema:
30003+
type: object
30004+
properties:
30005+
code:
30006+
type: integer
30007+
format: int32
30008+
message:
30009+
type: string
30010+
details:
30011+
type: array
30012+
items:
30013+
type: object
30014+
properties:
30015+
'@type':
30016+
type: string
30017+
additionalProperties: {}
30018+
parameters:
30019+
- name: index
30020+
in: path
30021+
required: true
30022+
type: string
30023+
tags:
30024+
- Query
2984830025
/tendermint/spn/claim/airdrop_supply:
2984930026
get:
2985030027
summary: Queries a AirdropSupply by index.
@@ -51561,13 +51738,85 @@ definitions:
5156151738
nameservice.nameservice.Params:
5156251739
type: object
5156351740
description: Params defines the parameters for the module.
51741+
nameservice.nameservice.QueryAllWhoisResponse:
51742+
type: object
51743+
properties:
51744+
whois:
51745+
type: array
51746+
items:
51747+
type: object
51748+
properties:
51749+
index:
51750+
type: string
51751+
name:
51752+
type: string
51753+
value:
51754+
type: string
51755+
price:
51756+
type: string
51757+
owner:
51758+
type: string
51759+
pagination:
51760+
type: object
51761+
properties:
51762+
next_key:
51763+
type: string
51764+
format: byte
51765+
title: |-
51766+
next_key is the key to be passed to PageRequest.key to
51767+
query the next page most efficiently
51768+
total:
51769+
type: string
51770+
format: uint64
51771+
title: >-
51772+
total is total number of results available if
51773+
PageRequest.count_total
51774+
51775+
was set, its value is undefined otherwise
51776+
description: |-
51777+
PageResponse is to be embedded in gRPC response messages where the
51778+
corresponding request message has used PageRequest.
51779+
51780+
message SomeResponse {
51781+
repeated Bar results = 1;
51782+
PageResponse page = 2;
51783+
}
51784+
nameservice.nameservice.QueryGetWhoisResponse:
51785+
type: object
51786+
properties:
51787+
whois:
51788+
type: object
51789+
properties:
51790+
index:
51791+
type: string
51792+
name:
51793+
type: string
51794+
value:
51795+
type: string
51796+
price:
51797+
type: string
51798+
owner:
51799+
type: string
5156451800
nameservice.nameservice.QueryParamsResponse:
5156551801
type: object
5156651802
properties:
5156751803
params:
5156851804
description: params holds all the parameters of this module.
5156951805
type: object
5157051806
description: QueryParamsResponse is response type for the Query/Params RPC method.
51807+
nameservice.nameservice.Whois:
51808+
type: object
51809+
properties:
51810+
index:
51811+
type: string
51812+
name:
51813+
type: string
51814+
value:
51815+
type: string
51816+
price:
51817+
type: string
51818+
owner:
51819+
type: string
5157151820
tendermint.spn.claim.ClaimRecord:
5157251821
type: object
5157351822
properties:

proto/nameservice/genesis.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ package nameservice.nameservice;
33

44
import "gogoproto/gogo.proto";
55
import "nameservice/params.proto";
6+
import "nameservice/whois.proto";
67
// this line is used by starport scaffolding # genesis/proto/import
78

89
option go_package = "nameservice/x/nameservice/types";
910

1011
// GenesisState defines the nameservice module's genesis state.
1112
message GenesisState {
1213
Params params = 1 [(gogoproto.nullable) = false];
14+
repeated Whois whoisList = 2 [(gogoproto.nullable) = false];
1315
// this line is used by starport scaffolding # genesis/proto/state
1416
}

proto/nameservice/query.proto

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import "gogoproto/gogo.proto";
55
import "google/api/annotations.proto";
66
import "cosmos/base/query/v1beta1/pagination.proto";
77
import "nameservice/params.proto";
8+
import "nameservice/whois.proto";
89
// this line is used by starport scaffolding # 1
910

1011
option go_package = "nameservice/x/nameservice/types";
@@ -15,7 +16,17 @@ service Query {
1516
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
1617
option (google.api.http).get = "/nameservice/nameservice/params";
1718
}
18-
// this line is used by starport scaffolding # 2
19+
// Queries a Whois by index.
20+
rpc Whois(QueryGetWhoisRequest) returns (QueryGetWhoisResponse) {
21+
option (google.api.http).get = "/nameservice/nameservice/whois/{index}";
22+
}
23+
24+
// Queries a list of Whois items.
25+
rpc WhoisAll(QueryAllWhoisRequest) returns (QueryAllWhoisResponse) {
26+
option (google.api.http).get = "/nameservice/nameservice/whois";
27+
}
28+
29+
// this line is used by starport scaffolding # 2
1930
}
2031

2132
// QueryParamsRequest is request type for the Query/Params RPC method.
@@ -27,4 +38,22 @@ message QueryParamsResponse {
2738
Params params = 1 [(gogoproto.nullable) = false];
2839
}
2940

41+
message QueryGetWhoisRequest {
42+
string index = 1;
43+
44+
}
45+
46+
message QueryGetWhoisResponse {
47+
Whois whois = 1 [(gogoproto.nullable) = false];
48+
}
49+
50+
message QueryAllWhoisRequest {
51+
cosmos.base.query.v1beta1.PageRequest pagination = 1;
52+
}
53+
54+
message QueryAllWhoisResponse {
55+
repeated Whois whois = 1 [(gogoproto.nullable) = false];
56+
cosmos.base.query.v1beta1.PageResponse pagination = 2;
57+
}
58+
3059
// this line is used by starport scaffolding # 3

proto/nameservice/whois.proto

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
syntax = "proto3";
2+
package nameservice.nameservice;
3+
4+
option go_package = "nameservice/x/nameservice/types";
5+
6+
message Whois {
7+
string index = 1;
8+
string name = 2;
9+
string value = 3;
10+
string price = 4;
11+
string owner = 5;
12+
13+
}
14+

0 commit comments

Comments
 (0)