From 124946b122c12ba8bfb3abab0d1048b39bc032a8 Mon Sep 17 00:00:00 2001 From: Srinivas Baride Date: Thu, 14 Mar 2024 19:48:10 +0530 Subject: [PATCH] feat: add v1 proto files --- proto/sentinel/node/v1/events.proto | 24 + proto/sentinel/node/v1/genesis.proto | 18 + proto/sentinel/node/v1/msg.proto | 54 + proto/sentinel/node/v1/node.proto | 26 + proto/sentinel/node/v1/params.proto | 30 + proto/sentinel/node/v1/querier.proto | 66 + proto/sentinel/plan/v1/events.proto | 32 + proto/sentinel/plan/v1/genesis.proto | 17 + proto/sentinel/plan/v1/msg.proto | 69 + proto/sentinel/plan/v1/params.proto | 4 + proto/sentinel/plan/v1/plan.proto | 34 + proto/sentinel/plan/v1/querier.proto | 70 + proto/sentinel/provider/v1/events.proto | 16 + proto/sentinel/provider/v1/genesis.proto | 18 + proto/sentinel/provider/v1/msg.proto | 37 + proto/sentinel/provider/v1/params.proto | 17 + proto/sentinel/provider/v1/provider.proto | 16 + proto/sentinel/provider/v1/querier.proto | 49 + proto/sentinel/session/v1/events.proto | 39 + proto/sentinel/session/v1/genesis.proto | 18 + proto/sentinel/session/v1/msg.proto | 45 + proto/sentinel/session/v1/params.proto | 17 + proto/sentinel/session/v1/proof.proto | 19 + proto/sentinel/session/v1/querier.proto | 65 + proto/sentinel/session/v1/session.proto | 29 + proto/sentinel/subscription/v1/events.proto | 30 + proto/sentinel/subscription/v1/genesis.proto | 27 + proto/sentinel/subscription/v1/msg.proto | 77 + proto/sentinel/subscription/v1/params.proto | 16 + proto/sentinel/subscription/v1/querier.proto | 93 + proto/sentinel/subscription/v1/quota.proto | 20 + .../subscription/v1/subscription.proto | 34 + x/node/types/v1/events.pb.go | 761 +++++ x/node/types/v1/genesis.pb.go | 372 +++ x/node/types/v1/msg.pb.go | 1493 +++++++++ x/node/types/v1/node.pb.go | 546 ++++ x/node/types/v1/params.pb.go | 532 ++++ x/node/types/v1/querier.pb.go | 1881 ++++++++++++ x/node/types/v1/querier.pb.gw.go | 456 +++ x/plan/types/v1/events.pb.go | 1039 +++++++ x/plan/types/v1/genesis.pb.go | 364 +++ x/plan/types/v1/msg.pb.go | 1855 +++++++++++ x/plan/types/v1/params.pb.go | 36 + x/plan/types/v1/plan.pb.go | 580 ++++ x/plan/types/v1/querier.pb.go | 2010 ++++++++++++ x/plan/types/v1/querier.pb.gw.go | 510 ++++ x/provider/types/v1/events.pb.go | 476 +++ x/provider/types/v1/genesis.pb.go | 375 +++ x/provider/types/v1/msg.pb.go | 1198 ++++++++ x/provider/types/v1/params.pb.go | 368 +++ x/provider/types/v1/provider.pb.go | 492 +++ x/provider/types/v1/querier.pb.go | 1341 ++++++++ x/provider/types/v1/querier.pb.gw.go | 337 ++ x/session/types/v1/events.pb.go | 1114 +++++++ x/session/types/v1/genesis.pb.go | 373 +++ x/session/types/v1/msg.pb.go | 1390 +++++++++ x/session/types/v1/params.pb.go | 354 +++ x/session/types/v1/proof.pb.go | 396 +++ x/session/types/v1/querier.pb.go | 1838 +++++++++++ x/session/types/v1/querier.pb.gw.go | 456 +++ x/session/types/v1/session.pb.go | 592 ++++ x/subscription/types/v1/events.pb.go | 938 ++++++ x/subscription/types/v1/genesis.pb.go | 599 ++++ x/subscription/types/v1/msg.pb.go | 2255 ++++++++++++++ x/subscription/types/v1/params.pb.go | 320 ++ x/subscription/types/v1/querier.pb.go | 2704 +++++++++++++++++ x/subscription/types/v1/querier.pb.gw.go | 698 +++++ x/subscription/types/v1/quota.pb.go | 412 +++ x/subscription/types/v1/subscription.pb.go | 735 +++++ 69 files changed, 33322 insertions(+) create mode 100644 proto/sentinel/node/v1/events.proto create mode 100644 proto/sentinel/node/v1/genesis.proto create mode 100644 proto/sentinel/node/v1/msg.proto create mode 100644 proto/sentinel/node/v1/node.proto create mode 100644 proto/sentinel/node/v1/params.proto create mode 100644 proto/sentinel/node/v1/querier.proto create mode 100644 proto/sentinel/plan/v1/events.proto create mode 100644 proto/sentinel/plan/v1/genesis.proto create mode 100644 proto/sentinel/plan/v1/msg.proto create mode 100644 proto/sentinel/plan/v1/params.proto create mode 100644 proto/sentinel/plan/v1/plan.proto create mode 100644 proto/sentinel/plan/v1/querier.proto create mode 100644 proto/sentinel/provider/v1/events.proto create mode 100644 proto/sentinel/provider/v1/genesis.proto create mode 100644 proto/sentinel/provider/v1/msg.proto create mode 100644 proto/sentinel/provider/v1/params.proto create mode 100644 proto/sentinel/provider/v1/provider.proto create mode 100644 proto/sentinel/provider/v1/querier.proto create mode 100644 proto/sentinel/session/v1/events.proto create mode 100644 proto/sentinel/session/v1/genesis.proto create mode 100644 proto/sentinel/session/v1/msg.proto create mode 100644 proto/sentinel/session/v1/params.proto create mode 100644 proto/sentinel/session/v1/proof.proto create mode 100644 proto/sentinel/session/v1/querier.proto create mode 100644 proto/sentinel/session/v1/session.proto create mode 100644 proto/sentinel/subscription/v1/events.proto create mode 100644 proto/sentinel/subscription/v1/genesis.proto create mode 100644 proto/sentinel/subscription/v1/msg.proto create mode 100644 proto/sentinel/subscription/v1/params.proto create mode 100644 proto/sentinel/subscription/v1/querier.proto create mode 100644 proto/sentinel/subscription/v1/quota.proto create mode 100644 proto/sentinel/subscription/v1/subscription.proto create mode 100644 x/node/types/v1/events.pb.go create mode 100644 x/node/types/v1/genesis.pb.go create mode 100644 x/node/types/v1/msg.pb.go create mode 100644 x/node/types/v1/node.pb.go create mode 100644 x/node/types/v1/params.pb.go create mode 100644 x/node/types/v1/querier.pb.go create mode 100644 x/node/types/v1/querier.pb.gw.go create mode 100644 x/plan/types/v1/events.pb.go create mode 100644 x/plan/types/v1/genesis.pb.go create mode 100644 x/plan/types/v1/msg.pb.go create mode 100644 x/plan/types/v1/params.pb.go create mode 100644 x/plan/types/v1/plan.pb.go create mode 100644 x/plan/types/v1/querier.pb.go create mode 100644 x/plan/types/v1/querier.pb.gw.go create mode 100644 x/provider/types/v1/events.pb.go create mode 100644 x/provider/types/v1/genesis.pb.go create mode 100644 x/provider/types/v1/msg.pb.go create mode 100644 x/provider/types/v1/params.pb.go create mode 100644 x/provider/types/v1/provider.pb.go create mode 100644 x/provider/types/v1/querier.pb.go create mode 100644 x/provider/types/v1/querier.pb.gw.go create mode 100644 x/session/types/v1/events.pb.go create mode 100644 x/session/types/v1/genesis.pb.go create mode 100644 x/session/types/v1/msg.pb.go create mode 100644 x/session/types/v1/params.pb.go create mode 100644 x/session/types/v1/proof.pb.go create mode 100644 x/session/types/v1/querier.pb.go create mode 100644 x/session/types/v1/querier.pb.gw.go create mode 100644 x/session/types/v1/session.pb.go create mode 100644 x/subscription/types/v1/events.pb.go create mode 100644 x/subscription/types/v1/genesis.pb.go create mode 100644 x/subscription/types/v1/msg.pb.go create mode 100644 x/subscription/types/v1/params.pb.go create mode 100644 x/subscription/types/v1/querier.pb.go create mode 100644 x/subscription/types/v1/querier.pb.gw.go create mode 100644 x/subscription/types/v1/quota.pb.go create mode 100644 x/subscription/types/v1/subscription.pb.go diff --git a/proto/sentinel/node/v1/events.proto b/proto/sentinel/node/v1/events.proto new file mode 100644 index 00000000..6af7116b --- /dev/null +++ b/proto/sentinel/node/v1/events.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package sentinel.node.v1; + +import "gogoproto/gogo.proto"; +import "sentinel/types/v1/status.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/node/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message EventRegister { + string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + string provider = 2 [(gogoproto.moretags) = "yaml:\"provider\""]; +} + +message EventUpdate { + string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + string provider = 2 [(gogoproto.moretags) = "yaml:\"provider\""]; +} + +message EventSetStatus { + string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; + sentinel.types.v1.Status status = 2 [(gogoproto.moretags) = "yaml:\"status\""]; +} diff --git a/proto/sentinel/node/v1/genesis.proto b/proto/sentinel/node/v1/genesis.proto new file mode 100644 index 00000000..8fdd07e5 --- /dev/null +++ b/proto/sentinel/node/v1/genesis.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +package sentinel.node.v1; + +import "gogoproto/gogo.proto"; +import "sentinel/node/v1/node.proto"; +import "sentinel/node/v1/params.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/node/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message GenesisState { + repeated Node nodes = 1 [ + (gogoproto.jsontag) = "_,omitempty", + (gogoproto.nullable) = false + ]; + Params params = 2 [(gogoproto.nullable) = false]; +} diff --git a/proto/sentinel/node/v1/msg.proto b/proto/sentinel/node/v1/msg.proto new file mode 100644 index 00000000..6789243a --- /dev/null +++ b/proto/sentinel/node/v1/msg.proto @@ -0,0 +1,54 @@ +syntax = "proto3"; +package sentinel.node.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "sentinel/types/v1/status.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/node/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +// MsgRegisterRequest defines the SDK message for registering a node +message MsgRegisterRequest { + string from = 1; + string provider = 2; + repeated cosmos.base.v1beta1.Coin price = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + string remote_url = 4 [(gogoproto.customname) = "RemoteURL"]; +} + +// MsgUpdateRequest defines the SDK message for updating a node +message MsgUpdateRequest { + string from = 1; + string provider = 2; + repeated cosmos.base.v1beta1.Coin price = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + string remote_url = 4 [(gogoproto.customname) = "RemoteURL"]; +} + +// MsgSetStatusRequest defines the SDK message for modifying the status of a +// node +message MsgSetStatusRequest { + string from = 1; + sentinel.types.v1.Status status = 2; +} + +// MsgRegisterResponse defines the response of message MsgRegisterRequest +message MsgRegisterResponse {} + +// MsgUpdateResponse defines the response of message MsgUpdateRequest +message MsgUpdateResponse {} + +// MsgSetStatusResponse defines the response of message MsgSetStatusRequest +message MsgSetStatusResponse {} + +service MsgService { + rpc MsgRegister(MsgRegisterRequest) returns (MsgRegisterResponse); + rpc MsgUpdate(MsgUpdateRequest) returns (MsgUpdateResponse); + rpc MsgSetStatus(MsgSetStatusRequest) returns (MsgSetStatusResponse); +} diff --git a/proto/sentinel/node/v1/node.proto b/proto/sentinel/node/v1/node.proto new file mode 100644 index 00000000..551a061d --- /dev/null +++ b/proto/sentinel/node/v1/node.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package sentinel.node.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "sentinel/types/v1/status.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/node/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message Node { + string address = 1; + string provider = 2; + repeated cosmos.base.v1beta1.Coin price = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + string remote_url = 4 [(gogoproto.customname) = "RemoteURL"]; + sentinel.types.v1.Status status = 5; + google.protobuf.Timestamp status_at = 6 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; +} diff --git a/proto/sentinel/node/v1/params.proto b/proto/sentinel/node/v1/params.proto new file mode 100644 index 00000000..ff753ee3 --- /dev/null +++ b/proto/sentinel/node/v1/params.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package sentinel.node.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/node/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message Params { + cosmos.base.v1beta1.Coin deposit = 1 [(gogoproto.nullable) = false]; + google.protobuf.Duration inactive_duration = 2 [ + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true + ]; + repeated cosmos.base.v1beta1.Coin max_price = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + repeated cosmos.base.v1beta1.Coin min_price = 4 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + string staking_share = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/sentinel/node/v1/querier.proto b/proto/sentinel/node/v1/querier.proto new file mode 100644 index 00000000..0e47ce2e --- /dev/null +++ b/proto/sentinel/node/v1/querier.proto @@ -0,0 +1,66 @@ +syntax = "proto3"; +package sentinel.node.v1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "sentinel/node/v1/node.proto"; +import "sentinel/node/v1/params.proto"; +import "sentinel/types/v1/status.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/node/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message QueryNodesRequest { + sentinel.types.v1.Status status = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +message QueryNodesForProviderRequest { + string address = 1; + sentinel.types.v1.Status status = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 3; +} + +message QueryNodeRequest { + string address = 1; +} + +message QueryParamsRequest {} + +message QueryNodesResponse { + repeated Node nodes = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryNodesForProviderResponse { + repeated Node nodes = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryNodeResponse { + Node node = 1 [(gogoproto.nullable) = false]; +} + +message QueryParamsResponse { + Params params = 1 [(gogoproto.nullable) = false]; +} + +service QueryService { + rpc QueryNodes(QueryNodesRequest) returns (QueryNodesResponse) { + option (google.api.http).get = "/sentinel/nodes"; + } + + rpc QueryNodesForProvider(QueryNodesForProviderRequest) returns (QueryNodesForProviderResponse) { + option (google.api.http).get = "/sentinel/providers/{address}/nodes"; + } + + rpc QueryNode(QueryNodeRequest) returns (QueryNodeResponse) { + option (google.api.http).get = "/sentinel/nodes/{address}"; + } + + rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/sentinel/modules/node/params"; + } +} diff --git a/proto/sentinel/plan/v1/events.proto b/proto/sentinel/plan/v1/events.proto new file mode 100644 index 00000000..3291e41b --- /dev/null +++ b/proto/sentinel/plan/v1/events.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; +package sentinel.plan.v1; + +import "gogoproto/gogo.proto"; +import "sentinel/types/v1/status.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/plan/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message EventAdd { + uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; + string provider = 2 [(gogoproto.moretags) = "yaml:\"provider\""]; +} + +message EventSetStatus { + uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; + string provider = 2 [(gogoproto.moretags) = "yaml:\"provider\""]; + sentinel.types.v1.Status status = 3 [(gogoproto.moretags) = "yaml:\"status\""]; +} + +message EventAddNode { + uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; + string node = 2 [(gogoproto.moretags) = "yaml:\"node\""]; + string provider = 3 [(gogoproto.moretags) = "yaml:\"provider\""]; +} + +message EventRemoveNode { + uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; + string node = 2 [(gogoproto.moretags) = "yaml:\"node\""]; + string provider = 3 [(gogoproto.moretags) = "yaml:\"provider\""]; +} diff --git a/proto/sentinel/plan/v1/genesis.proto b/proto/sentinel/plan/v1/genesis.proto new file mode 100644 index 00000000..273d0a44 --- /dev/null +++ b/proto/sentinel/plan/v1/genesis.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package sentinel.plan.v1; + +import "gogoproto/gogo.proto"; +import "sentinel/plan/v1/plan.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/plan/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message GenesisPlan { + Plan plan = 1 [ + (gogoproto.jsontag) = "_,omitempty", + (gogoproto.nullable) = false + ]; + repeated string nodes = 2; +} diff --git a/proto/sentinel/plan/v1/msg.proto b/proto/sentinel/plan/v1/msg.proto new file mode 100644 index 00000000..b44a6ca2 --- /dev/null +++ b/proto/sentinel/plan/v1/msg.proto @@ -0,0 +1,69 @@ +syntax = "proto3"; +package sentinel.plan.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; +import "sentinel/types/v1/status.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/plan/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +// MsgAddRequest defines the SDK message for adding a plan +message MsgAddRequest { + string from = 1; + repeated cosmos.base.v1beta1.Coin price = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + google.protobuf.Duration validity = 3 [ + (gogoproto.stdduration) = true, + (gogoproto.nullable) = false + ]; + string bytes = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} + +// MsgSetStatusRequest defines the SDK message for modifying the status of a +// plan +message MsgSetStatusRequest { + string from = 1; + uint64 id = 2; + sentinel.types.v1.Status status = 3; +} + +// MsgAddNodeRequest defines the SDK message for adding a node to a plan +message MsgAddNodeRequest { + string from = 1; + uint64 id = 2; + string address = 3; +} + +// MsgRemoveNodeRequest defines the SDK message for removing a node from a plan +message MsgRemoveNodeRequest { + string from = 1; + uint64 id = 2; + string address = 3; +} + +// MsgAddResponse defines the response of message MsgRegisterRequest +message MsgAddResponse {} + +// MsgSetStatusResponse defines the response of message MsgSetStatusRequest +message MsgSetStatusResponse {} + +// MsgAddNodeResponse defines the response of message MsgAddNodeRequest +message MsgAddNodeResponse {} + +// MsgRemoveNodeResponse defines the response of message MsgRemoveNodeRequest +message MsgRemoveNodeResponse {} + +service MsgService { + rpc MsgAdd(MsgAddRequest) returns (MsgAddResponse); + rpc MsgSetStatus(MsgSetStatusRequest) returns (MsgSetStatusResponse); + rpc MsgAddNode(MsgAddNodeRequest) returns (MsgAddNodeResponse); + rpc MsgRemoveNode(MsgRemoveNodeRequest) returns (MsgRemoveNodeResponse); +} diff --git a/proto/sentinel/plan/v1/params.proto b/proto/sentinel/plan/v1/params.proto new file mode 100644 index 00000000..84e2ee0e --- /dev/null +++ b/proto/sentinel/plan/v1/params.proto @@ -0,0 +1,4 @@ +syntax = "proto3"; +package sentinel.plan.v1; + +option go_package = "github.com/sentinel-official/hub/v12/x/plan/types/v1"; diff --git a/proto/sentinel/plan/v1/plan.proto b/proto/sentinel/plan/v1/plan.proto new file mode 100644 index 00000000..3aa9022d --- /dev/null +++ b/proto/sentinel/plan/v1/plan.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; +package sentinel.plan.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "sentinel/types/v1/status.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/plan/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message Plan { + uint64 id = 1; + string provider = 2; + repeated cosmos.base.v1beta1.Coin price = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + google.protobuf.Duration validity = 4 [ + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true + ]; + string bytes = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + sentinel.types.v1.Status status = 6; + google.protobuf.Timestamp status_at = 7 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; +} diff --git a/proto/sentinel/plan/v1/querier.proto b/proto/sentinel/plan/v1/querier.proto new file mode 100644 index 00000000..6c99804a --- /dev/null +++ b/proto/sentinel/plan/v1/querier.proto @@ -0,0 +1,70 @@ +syntax = "proto3"; +package sentinel.plan.v1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "sentinel/node/v1/node.proto"; +import "sentinel/plan/v1/plan.proto"; +import "sentinel/types/v1/status.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/plan/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message QueryPlansRequest { + sentinel.types.v1.Status status = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +message QueryPlansForProviderRequest { + string address = 1; + sentinel.types.v1.Status status = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 3; +} + +message QueryPlanRequest { + uint64 id = 1; +} + +message QueryNodesForPlanRequest { + uint64 id = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +message QueryPlansResponse { + repeated Plan plans = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryPlansForProviderResponse { + repeated Plan plans = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryPlanResponse { + Plan plan = 1 [(gogoproto.nullable) = false]; +} + +message QueryNodesForPlanResponse { + repeated sentinel.node.v1.Node nodes = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +service QueryService { + rpc QueryPlans(QueryPlansRequest) returns (QueryPlansResponse) { + option (google.api.http).get = "/sentinel/plans"; + } + + rpc QueryPlansForProvider(QueryPlansForProviderRequest) returns (QueryPlansForProviderResponse) { + option (google.api.http).get = "/sentinel/providers/{address}/plans"; + } + + rpc QueryPlan(QueryPlanRequest) returns (QueryPlanResponse) { + option (google.api.http).get = "/sentinel/plans/{id}"; + } + + rpc QueryNodesForPlan(QueryNodesForPlanRequest) returns (QueryNodesForPlanResponse) { + option (google.api.http).get = "/sentinel/plans/{id}/nodes"; + } +} diff --git a/proto/sentinel/provider/v1/events.proto b/proto/sentinel/provider/v1/events.proto new file mode 100644 index 00000000..f7cbad07 --- /dev/null +++ b/proto/sentinel/provider/v1/events.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package sentinel.provider.v1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/provider/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message EventRegister { + string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; +} + +message EventUpdate { + string address = 1 [(gogoproto.moretags) = "yaml:\"address\""]; +} diff --git a/proto/sentinel/provider/v1/genesis.proto b/proto/sentinel/provider/v1/genesis.proto new file mode 100644 index 00000000..316ab6b0 --- /dev/null +++ b/proto/sentinel/provider/v1/genesis.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +package sentinel.provider.v1; + +import "gogoproto/gogo.proto"; +import "sentinel/provider/v1/params.proto"; +import "sentinel/provider/v1/provider.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/provider/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message GenesisState { + repeated Provider providers = 1 [ + (gogoproto.jsontag) = "_,omitempty", + (gogoproto.nullable) = false + ]; + Params params = 2 [(gogoproto.nullable) = false]; +} diff --git a/proto/sentinel/provider/v1/msg.proto b/proto/sentinel/provider/v1/msg.proto new file mode 100644 index 00000000..41fc0eb8 --- /dev/null +++ b/proto/sentinel/provider/v1/msg.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; +package sentinel.provider.v1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/provider/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +// MsgRegisterRequest defines the SDK message for registering a provider +message MsgRegisterRequest { + string from = 1; + string name = 2; + string identity = 3; + string website = 4; + string description = 5; +} + +// MsgUpdateRequest defines the SDK message for updating a provider +message MsgUpdateRequest { + string from = 1; + string name = 2; + string identity = 3; + string website = 4; + string description = 5; +} + +// MsgRegisterResponse defines the response of message MsgRegisterRequest +message MsgRegisterResponse {} + +// MsgUpdateResponse defines the response of message MsgUpdateRequest +message MsgUpdateResponse {} + +service MsgService { + rpc MsgRegister(MsgRegisterRequest) returns (MsgRegisterResponse); + rpc MsgUpdate(MsgUpdateRequest) returns (MsgUpdateResponse); +} diff --git a/proto/sentinel/provider/v1/params.proto b/proto/sentinel/provider/v1/params.proto new file mode 100644 index 00000000..40b69698 --- /dev/null +++ b/proto/sentinel/provider/v1/params.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package sentinel.provider.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/provider/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message Params { + cosmos.base.v1beta1.Coin deposit = 1 [(gogoproto.nullable) = false]; + string staking_share = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/sentinel/provider/v1/provider.proto b/proto/sentinel/provider/v1/provider.proto new file mode 100644 index 00000000..e6b3adb3 --- /dev/null +++ b/proto/sentinel/provider/v1/provider.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package sentinel.provider.v1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/provider/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message Provider { + string address = 1; + string name = 2; + string identity = 3; + string website = 4; + string description = 5; +} diff --git a/proto/sentinel/provider/v1/querier.proto b/proto/sentinel/provider/v1/querier.proto new file mode 100644 index 00000000..6cf5183f --- /dev/null +++ b/proto/sentinel/provider/v1/querier.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; +package sentinel.provider.v1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "sentinel/provider/v1/params.proto"; +import "sentinel/provider/v1/provider.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/provider/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message QueryProvidersRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +message QueryProviderRequest { + string address = 1; +} + +message QueryParamsRequest {} + +message QueryProvidersResponse { + repeated Provider providers = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryProviderResponse { + Provider provider = 1 [(gogoproto.nullable) = false]; +} + +message QueryParamsResponse { + Params params = 1 [(gogoproto.nullable) = false]; +} + +service QueryService { + rpc QueryProviders(QueryProvidersRequest) returns (QueryProvidersResponse) { + option (google.api.http).get = "/sentinel/providers"; + } + + rpc QueryProvider(QueryProviderRequest) returns (QueryProviderResponse) { + option (google.api.http).get = "/sentinel/providers/{address}"; + } + + rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/sentinel/modules/provider/params"; + } +} diff --git a/proto/sentinel/session/v1/events.proto b/proto/sentinel/session/v1/events.proto new file mode 100644 index 00000000..cb8ff01c --- /dev/null +++ b/proto/sentinel/session/v1/events.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; +package sentinel.session.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "sentinel/types/v1/status.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/session/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message EventStart { + uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; + string node = 2 [(gogoproto.moretags) = "yaml:\"node\""]; + uint64 subscription = 3 [(gogoproto.moretags) = "yaml:\"subscription\""]; +} + +message EventUpdate { + uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; + string node = 2 [(gogoproto.moretags) = "yaml:\"node\""]; + uint64 subscription = 3 [(gogoproto.moretags) = "yaml:\"subscription\""]; +} + +message EventSetStatus { + uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; + string node = 2 [(gogoproto.moretags) = "yaml:\"node\""]; + uint64 subscription = 3 [(gogoproto.moretags) = "yaml:\"subscription\""]; + sentinel.types.v1.Status status = 4 [(gogoproto.moretags) = "yaml:\"status\""]; +} + +message EventPay { + uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; + string node = 2 [(gogoproto.moretags) = "yaml:\"node\""]; + uint64 subscription = 3 [(gogoproto.moretags) = "yaml:\"subscription\""]; + cosmos.base.v1beta1.Coin amount = 4 [ + (gogoproto.moretags) = "yaml:\"amount\"", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/sentinel/session/v1/genesis.proto b/proto/sentinel/session/v1/genesis.proto new file mode 100644 index 00000000..ef2f77c0 --- /dev/null +++ b/proto/sentinel/session/v1/genesis.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +package sentinel.session.v1; + +import "gogoproto/gogo.proto"; +import "sentinel/session/v1/params.proto"; +import "sentinel/session/v1/session.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/session/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message GenesisState { + repeated Session sessions = 1 [ + (gogoproto.jsontag) = "_,omitempty", + (gogoproto.nullable) = false + ]; + Params params = 2 [(gogoproto.nullable) = false]; +} diff --git a/proto/sentinel/session/v1/msg.proto b/proto/sentinel/session/v1/msg.proto new file mode 100644 index 00000000..bb5ea7c3 --- /dev/null +++ b/proto/sentinel/session/v1/msg.proto @@ -0,0 +1,45 @@ +syntax = "proto3"; +package sentinel.session.v1; + +import "gogoproto/gogo.proto"; +import "sentinel/session/v1/proof.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/session/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +// MsgStartRequest defines the SDK message for starting a session +message MsgStartRequest { + string from = 1; + uint64 id = 2; + string node = 3; +} + +// MsgUpdateRequest defines the SDK message for updating a session +message MsgUpdateRequest { + string from = 1; + Proof proof = 2 [(gogoproto.nullable) = false]; + bytes signature = 3; +} + +// MsgEndRequest defines the SDK message for ending a session +message MsgEndRequest { + string from = 1; + uint64 id = 2; + uint64 rating = 3; +} + +// MsgStartResponse defines the response of message MsgStartRequest +message MsgStartResponse {} + +// MsgUpdateResponse defines the response of message MsgUpdateRequest +message MsgUpdateResponse {} + +// MsgEndResponse defines the response of message MsgEndRequest +message MsgEndResponse {} + +service MsgService { + rpc MsgStart(MsgStartRequest) returns (MsgStartResponse); + rpc MsgUpdate(MsgUpdateRequest) returns (MsgUpdateResponse); + rpc MsgEnd(MsgEndRequest) returns (MsgEndResponse); +} diff --git a/proto/sentinel/session/v1/params.proto b/proto/sentinel/session/v1/params.proto new file mode 100644 index 00000000..f57db5fa --- /dev/null +++ b/proto/sentinel/session/v1/params.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package sentinel.session.v1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/session/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message Params { + google.protobuf.Duration inactive_duration = 1 [ + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true + ]; + bool proof_verification_enabled = 2; +} diff --git a/proto/sentinel/session/v1/proof.proto b/proto/sentinel/session/v1/proof.proto new file mode 100644 index 00000000..e4af8eb7 --- /dev/null +++ b/proto/sentinel/session/v1/proof.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; +package sentinel.session.v1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; +import "sentinel/types/v1/bandwidth.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/session/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message Proof { + uint64 id = 1; + google.protobuf.Duration duration = 2 [ + (gogoproto.stdduration) = true, + (gogoproto.nullable) = false + ]; + sentinel.types.v1.Bandwidth bandwidth = 3 [(gogoproto.nullable) = false]; +} diff --git a/proto/sentinel/session/v1/querier.proto b/proto/sentinel/session/v1/querier.proto new file mode 100644 index 00000000..1cb4a89c --- /dev/null +++ b/proto/sentinel/session/v1/querier.proto @@ -0,0 +1,65 @@ +syntax = "proto3"; +package sentinel.session.v1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "sentinel/session/v1/params.proto"; +import "sentinel/session/v1/session.proto"; +import "sentinel/types/v1/status.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/session/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message QuerySessionsRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +message QuerySessionsForAddressRequest { + string address = 1; + sentinel.types.v1.Status status = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 3; +} + +message QuerySessionRequest { + uint64 id = 1; +} + +message QueryParamsRequest {} + +message QuerySessionsResponse { + repeated Session sessions = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QuerySessionsForAddressResponse { + repeated Session sessions = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QuerySessionResponse { + Session session = 1 [(gogoproto.nullable) = false]; +} + +message QueryParamsResponse { + Params params = 1 [(gogoproto.nullable) = false]; +} + +service QueryService { + rpc QuerySessions(QuerySessionsRequest) returns (QuerySessionsResponse) { + option (google.api.http).get = "/sentinel/sessions"; + } + + rpc QuerySessionsForAddress(QuerySessionsForAddressRequest) returns (QuerySessionsForAddressResponse) { + option (google.api.http).get = "/sentinel/accounts/{address}/sessions"; + } + + rpc QuerySession(QuerySessionRequest) returns (QuerySessionResponse) { + option (google.api.http).get = "/sentinel/sessions/{id}"; + } + + rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/sentinel/modules/session/params"; + } +} diff --git a/proto/sentinel/session/v1/session.proto b/proto/sentinel/session/v1/session.proto new file mode 100644 index 00000000..a13b0d86 --- /dev/null +++ b/proto/sentinel/session/v1/session.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; +package sentinel.session.v1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "sentinel/types/v1/bandwidth.proto"; +import "sentinel/types/v1/status.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/session/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message Session { + uint64 id = 1; + uint64 subscription = 2; + string node = 3; + string address = 4; + google.protobuf.Duration duration = 5 [ + (gogoproto.stdduration) = true, + (gogoproto.nullable) = false + ]; + sentinel.types.v1.Bandwidth bandwidth = 6 [(gogoproto.nullable) = false]; + sentinel.types.v1.Status status = 7; + google.protobuf.Timestamp status_at = 8 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; +} diff --git a/proto/sentinel/subscription/v1/events.proto b/proto/sentinel/subscription/v1/events.proto new file mode 100644 index 00000000..de760a76 --- /dev/null +++ b/proto/sentinel/subscription/v1/events.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package sentinel.subscription.v1; + +import "gogoproto/gogo.proto"; +import "sentinel/types/v1/status.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/subscription/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message EventSubscribe { + uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; + string node = 2 [(gogoproto.moretags) = "yaml:\"node\""]; + uint64 plan = 3 [(gogoproto.moretags) = "yaml:\"plan\""]; +} + +message EventSetStatus { + uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; + sentinel.types.v1.Status status = 2 [(gogoproto.moretags) = "yaml:\"status\""]; +} + +message EventAddQuota { + uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; + string address = 2 [(gogoproto.moretags) = "yaml:\"address\""]; +} + +message EventUpdateQuota { + uint64 id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; + string address = 2 [(gogoproto.moretags) = "yaml:\"address\""]; +} diff --git a/proto/sentinel/subscription/v1/genesis.proto b/proto/sentinel/subscription/v1/genesis.proto new file mode 100644 index 00000000..40c9a8de --- /dev/null +++ b/proto/sentinel/subscription/v1/genesis.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; +package sentinel.subscription.v1; + +import "gogoproto/gogo.proto"; +import "sentinel/subscription/v1/params.proto"; +import "sentinel/subscription/v1/quota.proto"; +import "sentinel/subscription/v1/subscription.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/subscription/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message GenesisSubscription { + Subscription subscription = 1 [ + (gogoproto.jsontag) = "_", + (gogoproto.nullable) = false + ]; + repeated Quota quotas = 2 [(gogoproto.nullable) = false]; +} + +message GenesisState { + repeated GenesisSubscription subscriptions = 1 [ + (gogoproto.jsontag) = "_,omitempty", + (gogoproto.nullable) = false + ]; + Params params = 2 [(gogoproto.nullable) = false]; +} diff --git a/proto/sentinel/subscription/v1/msg.proto b/proto/sentinel/subscription/v1/msg.proto new file mode 100644 index 00000000..b5e6fca9 --- /dev/null +++ b/proto/sentinel/subscription/v1/msg.proto @@ -0,0 +1,77 @@ +syntax = "proto3"; +package sentinel.subscription.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/subscription/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +// MsgSubscribeToNodeRequest defines the SDK message for subscribing to a node +message MsgSubscribeToNodeRequest { + string from = 1; + string address = 2; + cosmos.base.v1beta1.Coin deposit = 3 [(gogoproto.nullable) = false]; +} + +// MsgSubscribeToPlanRequest defines the SDK message for subscribing to a plan +message MsgSubscribeToPlanRequest { + string from = 1; + uint64 id = 2; + string denom = 3; +} + +// MsgCancelRequest defines the SDK message for cancelling a subscription +message MsgCancelRequest { + string from = 1; + uint64 id = 2; +} + +// MsgAddQuotaRequest defines the SDK message for adding the quota to an address +message MsgAddQuotaRequest { + string from = 1; + uint64 id = 2; + string address = 3; + string bytes = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} + +// MsgUpdateQuotaRequest defines the SDK message for updating the quota of an +// address +message MsgUpdateQuotaRequest { + string from = 1; + uint64 id = 2; + string address = 3; + string bytes = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} + +// MsgSubscribeToNodeResponse defines the response of message +// MsgSubscribeToNodeRequest +message MsgSubscribeToNodeResponse {} + +// MsgSubscribeToPlanResponse defines the response of message +// MsgSubscribeToPlanRequest +message MsgSubscribeToPlanResponse {} + +// MsgCancelResponse defines the response of message MsgCancelRequest +message MsgCancelResponse {} + +// MsgAddQuotaResponse defines the response of message MsgAddQuotaRequest +message MsgAddQuotaResponse {} + +// MsgUpdateQuotaResponse defines the response of message MsgUpdateQuotaRequest +message MsgUpdateQuotaResponse {} + +service MsgService { + rpc MsgSubscribeToNode(MsgSubscribeToNodeRequest) returns (MsgSubscribeToNodeResponse); + rpc MsgSubscribeToPlan(MsgSubscribeToPlanRequest) returns (MsgSubscribeToPlanResponse); + rpc MsgCancel(MsgCancelRequest) returns (MsgCancelResponse); + rpc MsgAddQuota(MsgAddQuotaRequest) returns (MsgAddQuotaResponse); + rpc MsgUpdateQuota(MsgUpdateQuotaRequest) returns (MsgUpdateQuotaResponse); +} diff --git a/proto/sentinel/subscription/v1/params.proto b/proto/sentinel/subscription/v1/params.proto new file mode 100644 index 00000000..4754bc4e --- /dev/null +++ b/proto/sentinel/subscription/v1/params.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package sentinel.subscription.v1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/subscription/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message Params { + google.protobuf.Duration inactive_duration = 1 [ + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true + ]; +} diff --git a/proto/sentinel/subscription/v1/querier.proto b/proto/sentinel/subscription/v1/querier.proto new file mode 100644 index 00000000..e5d3371d --- /dev/null +++ b/proto/sentinel/subscription/v1/querier.proto @@ -0,0 +1,93 @@ +syntax = "proto3"; +package sentinel.subscription.v1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "sentinel/subscription/v1/params.proto"; +import "sentinel/subscription/v1/quota.proto"; +import "sentinel/subscription/v1/subscription.proto"; +import "sentinel/types/v1/status.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/subscription/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message QuerySubscriptionsRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +message QuerySubscriptionsForAddressRequest { + string address = 1; + sentinel.types.v1.Status status = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 3; +} + +message QuerySubscriptionRequest { + uint64 id = 1; +} + +message QueryQuotaRequest { + uint64 id = 1; + string address = 2; +} + +message QueryQuotasRequest { + uint64 id = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +message QueryParamsRequest {} + +message QuerySubscriptionsResponse { + repeated Subscription subscriptions = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QuerySubscriptionsForAddressResponse { + repeated Subscription subscriptions = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QuerySubscriptionResponse { + Subscription subscription = 1 [(gogoproto.nullable) = false]; +} + +message QueryQuotaResponse { + Quota quota = 1 [(gogoproto.nullable) = false]; +} + +message QueryQuotasResponse { + repeated Quota quotas = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryParamsResponse { + Params params = 1 [(gogoproto.nullable) = false]; +} + +service QueryService { + rpc QuerySubscriptions(QuerySubscriptionsRequest) returns (QuerySubscriptionsResponse) { + option (google.api.http).get = "/sentinel/subscriptions"; + } + + rpc QuerySubscriptionsForAddress(QuerySubscriptionsForAddressRequest) returns (QuerySubscriptionsForAddressResponse) { + option (google.api.http).get = "/sentinel/accounts/{address}/subscriptions"; + } + + rpc QuerySubscription(QuerySubscriptionRequest) returns (QuerySubscriptionResponse) { + option (google.api.http).get = "/sentinel/subscriptions/{id}"; + } + + rpc QueryQuota(QueryQuotaRequest) returns (QueryQuotaResponse) { + option (google.api.http).get = "/accounts/{address}/subscriptions/{id}/quotas"; + } + + rpc QueryQuotas(QueryQuotasRequest) returns (QueryQuotasResponse) { + option (google.api.http).get = "/sentinel/subscriptions/{id}/quotas"; + } + + rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/sentinel/modules/subscription/params"; + } +} diff --git a/proto/sentinel/subscription/v1/quota.proto b/proto/sentinel/subscription/v1/quota.proto new file mode 100644 index 00000000..118ffe5c --- /dev/null +++ b/proto/sentinel/subscription/v1/quota.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; +package sentinel.subscription.v1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/subscription/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message Quota { + string address = 1; + string allocated = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + string consumed = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/sentinel/subscription/v1/subscription.proto b/proto/sentinel/subscription/v1/subscription.proto new file mode 100644 index 00000000..d35759c5 --- /dev/null +++ b/proto/sentinel/subscription/v1/subscription.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; +package sentinel.subscription.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "sentinel/types/v1/status.proto"; + +option go_package = "github.com/sentinel-official/hub/v12/x/subscription/types/v1"; +option (gogoproto.equal_all) = false; +option (gogoproto.goproto_getters_all) = false; + +message Subscription { + uint64 id = 1; + string owner = 2; + string node = 3; + cosmos.base.v1beta1.Coin price = 4 [(gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin deposit = 5 [(gogoproto.nullable) = false]; + uint64 plan = 6; + string denom = 7; + google.protobuf.Timestamp expiry = 8 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; + string free = 9 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + sentinel.types.v1.Status status = 10; + google.protobuf.Timestamp status_at = 11 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; +} diff --git a/x/node/types/v1/events.pb.go b/x/node/types/v1/events.pb.go new file mode 100644 index 00000000..32da153c --- /dev/null +++ b/x/node/types/v1/events.pb.go @@ -0,0 +1,761 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/node/v1/events.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/sentinel-official/hub/v12/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type EventRegister struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty" yaml:"provider"` +} + +func (m *EventRegister) Reset() { *m = EventRegister{} } +func (m *EventRegister) String() string { return proto.CompactTextString(m) } +func (*EventRegister) ProtoMessage() {} +func (*EventRegister) Descriptor() ([]byte, []int) { + return fileDescriptor_5fe9719c295e6061, []int{0} +} +func (m *EventRegister) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventRegister) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventRegister.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventRegister) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventRegister.Merge(m, src) +} +func (m *EventRegister) XXX_Size() int { + return m.Size() +} +func (m *EventRegister) XXX_DiscardUnknown() { + xxx_messageInfo_EventRegister.DiscardUnknown(m) +} + +var xxx_messageInfo_EventRegister proto.InternalMessageInfo + +type EventUpdate struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty" yaml:"provider"` +} + +func (m *EventUpdate) Reset() { *m = EventUpdate{} } +func (m *EventUpdate) String() string { return proto.CompactTextString(m) } +func (*EventUpdate) ProtoMessage() {} +func (*EventUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_5fe9719c295e6061, []int{1} +} +func (m *EventUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUpdate.Merge(m, src) +} +func (m *EventUpdate) XXX_Size() int { + return m.Size() +} +func (m *EventUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_EventUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUpdate proto.InternalMessageInfo + +type EventSetStatus struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + Status types.Status `protobuf:"varint,2,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty" yaml:"status"` +} + +func (m *EventSetStatus) Reset() { *m = EventSetStatus{} } +func (m *EventSetStatus) String() string { return proto.CompactTextString(m) } +func (*EventSetStatus) ProtoMessage() {} +func (*EventSetStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_5fe9719c295e6061, []int{2} +} +func (m *EventSetStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSetStatus.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventSetStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSetStatus.Merge(m, src) +} +func (m *EventSetStatus) XXX_Size() int { + return m.Size() +} +func (m *EventSetStatus) XXX_DiscardUnknown() { + xxx_messageInfo_EventSetStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSetStatus proto.InternalMessageInfo + +func init() { + proto.RegisterType((*EventRegister)(nil), "sentinel.node.v1.EventRegister") + proto.RegisterType((*EventUpdate)(nil), "sentinel.node.v1.EventUpdate") + proto.RegisterType((*EventSetStatus)(nil), "sentinel.node.v1.EventSetStatus") +} + +func init() { proto.RegisterFile("sentinel/node/v1/events.proto", fileDescriptor_5fe9719c295e6061) } + +var fileDescriptor_5fe9719c295e6061 = []byte{ + // 318 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x92, 0x31, 0x4e, 0xc3, 0x30, + 0x14, 0x86, 0x63, 0x86, 0x02, 0x46, 0x2d, 0x10, 0x18, 0x4a, 0x25, 0x5c, 0xe4, 0x89, 0x01, 0x6c, + 0xa5, 0x30, 0x31, 0x56, 0x70, 0x81, 0x54, 0x30, 0xb0, 0xa5, 0xcd, 0x6b, 0x6a, 0x29, 0x8d, 0xa3, + 0xd8, 0xb5, 0xe8, 0xce, 0x01, 0x38, 0x06, 0x47, 0xe9, 0xd8, 0x91, 0xa9, 0x82, 0xf4, 0x06, 0x3d, + 0x01, 0x8a, 0xdd, 0x74, 0x67, 0x60, 0x8b, 0xf4, 0xff, 0xef, 0xfb, 0x94, 0xf7, 0x8c, 0x2f, 0x15, + 0x64, 0x5a, 0x64, 0x90, 0xf2, 0x4c, 0xc6, 0xc0, 0x4d, 0xc0, 0xc1, 0x40, 0xa6, 0x15, 0xcb, 0x0b, + 0xa9, 0xa5, 0x7f, 0x52, 0xc7, 0xac, 0x8a, 0x99, 0x09, 0x3a, 0xe7, 0x89, 0x4c, 0xa4, 0x0d, 0x79, + 0xf5, 0xe5, 0x7a, 0x1d, 0xb2, 0xc3, 0xe8, 0x79, 0x0e, 0xaa, 0xe2, 0x28, 0x1d, 0xe9, 0xd9, 0x96, + 0x43, 0x33, 0xdc, 0x7c, 0xaa, 0xb8, 0x21, 0x24, 0x42, 0x69, 0x28, 0xfc, 0x1b, 0xbc, 0x1f, 0xc5, + 0x71, 0x01, 0x4a, 0xb5, 0xd1, 0x15, 0xba, 0x3e, 0xec, 0xfb, 0x9b, 0x55, 0xb7, 0x35, 0x8f, 0xa6, + 0xe9, 0x03, 0xdd, 0x06, 0x34, 0xac, 0x2b, 0x3e, 0xc7, 0x07, 0x79, 0x21, 0x8d, 0x88, 0xa1, 0x68, + 0xef, 0xd9, 0xfa, 0xd9, 0x66, 0xd5, 0x3d, 0x76, 0xf5, 0x3a, 0xa1, 0xe1, 0xae, 0x44, 0x53, 0x7c, + 0x64, 0x7d, 0xcf, 0x79, 0x1c, 0x69, 0xf8, 0x6f, 0xdb, 0x3b, 0xc2, 0x2d, 0xab, 0x1b, 0x80, 0x1e, + 0xd8, 0xdf, 0xfe, 0xa3, 0xf1, 0x11, 0x37, 0xdc, 0xba, 0xac, 0xaf, 0xd5, 0xbb, 0x60, 0xbb, 0xbd, + 0xdb, 0x7d, 0x32, 0x13, 0x30, 0x07, 0xee, 0x9f, 0x6e, 0x56, 0xdd, 0xa6, 0xe3, 0xb8, 0x11, 0x1a, + 0x6e, 0x67, 0xfb, 0x2f, 0x8b, 0x1f, 0xe2, 0x7d, 0x96, 0xc4, 0x5b, 0x94, 0x04, 0x2d, 0x4b, 0x82, + 0xbe, 0x4b, 0x82, 0x3e, 0xd6, 0xc4, 0x5b, 0xae, 0x89, 0xf7, 0xb5, 0x26, 0xde, 0xeb, 0x7d, 0x22, + 0xf4, 0x64, 0x36, 0x64, 0x23, 0x39, 0xe5, 0xb5, 0xe1, 0x56, 0x8e, 0xc7, 0x62, 0x24, 0xa2, 0x94, + 0x4f, 0x66, 0x43, 0x6e, 0x82, 0x1e, 0x7f, 0x73, 0x6f, 0xa1, 0xbe, 0xe4, 0xb0, 0x61, 0x6f, 0x78, + 0xf7, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x62, 0xc4, 0xe9, 0x7d, 0x2c, 0x02, 0x00, 0x00, +} + +func (m *EventRegister) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventRegister) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventRegister) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventSetStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSetStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Status != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x10 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventRegister) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventSetStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.Status != 0 { + n += 1 + sovEvents(uint64(m.Status)) + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventRegister) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventRegister: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventRegister: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSetStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSetStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSetStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/node/types/v1/genesis.pb.go b/x/node/types/v1/genesis.pb.go new file mode 100644 index 00000000..683b5396 --- /dev/null +++ b/x/node/types/v1/genesis.pb.go @@ -0,0 +1,372 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/node/v1/genesis.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type GenesisState struct { + Nodes []Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"_,omitempty"` + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_87ee72d49f79e537, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func init() { + proto.RegisterType((*GenesisState)(nil), "sentinel.node.v1.GenesisState") +} + +func init() { proto.RegisterFile("sentinel/node/v1/genesis.proto", fileDescriptor_87ee72d49f79e537) } + +var fileDescriptor_87ee72d49f79e537 = []byte{ + // 270 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2b, 0x4e, 0xcd, 0x2b, + 0xc9, 0xcc, 0x4b, 0xcd, 0xd1, 0xcf, 0xcb, 0x4f, 0x49, 0xd5, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, + 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xc9, 0xeb, 0x81, + 0xe4, 0xf5, 0xca, 0x0c, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x92, 0xfa, 0x20, 0x16, 0x44, + 0x9d, 0x94, 0x34, 0x86, 0x39, 0x60, 0xf5, 0x10, 0x49, 0x59, 0x0c, 0xc9, 0x82, 0xc4, 0xa2, 0xc4, + 0x5c, 0xa8, 0x1d, 0x4a, 0x9d, 0x8c, 0x5c, 0x3c, 0xee, 0x10, 0x5b, 0x83, 0x4b, 0x12, 0x4b, 0x52, + 0x85, 0x1c, 0xb9, 0x58, 0x41, 0x0a, 0x8b, 0x25, 0x18, 0x15, 0x98, 0x35, 0xb8, 0x8d, 0xc4, 0xf4, + 0xd0, 0x1d, 0xa1, 0xe7, 0x97, 0x9f, 0x92, 0xea, 0x24, 0x7c, 0xe2, 0x9e, 0x3c, 0xc3, 0xab, 0x7b, + 0xf2, 0xdc, 0xf1, 0x3a, 0xf9, 0xb9, 0x99, 0x25, 0xa9, 0xb9, 0x05, 0x25, 0x95, 0x41, 0x10, 0x9d, + 0x42, 0x66, 0x5c, 0x6c, 0x10, 0x3b, 0x24, 0x98, 0x14, 0x18, 0x35, 0xb8, 0x8d, 0x24, 0x30, 0xcd, + 0x08, 0x00, 0xcb, 0x3b, 0xb1, 0x80, 0x4c, 0x09, 0x82, 0xaa, 0x76, 0x0a, 0x3b, 0xf1, 0x50, 0x8e, + 0x61, 0xc5, 0x23, 0x39, 0x86, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, + 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x32, + 0x49, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x87, 0x99, 0xa9, 0x9b, 0x9f, + 0x96, 0x96, 0x99, 0x9c, 0x99, 0x98, 0xa3, 0x9f, 0x51, 0x9a, 0xa4, 0x5f, 0x66, 0x68, 0xa4, 0x5f, + 0x01, 0xf1, 0x6a, 0x49, 0x65, 0x41, 0x6a, 0xb1, 0x7e, 0x99, 0x61, 0x12, 0x1b, 0xd8, 0xab, 0xc6, + 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x2d, 0xc4, 0xfb, 0x70, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Nodes) > 0 { + for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Nodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Nodes) > 0 { + for _, e := range m.Nodes { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nodes = append(m.Nodes, Node{}) + if err := m.Nodes[len(m.Nodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/node/types/v1/msg.pb.go b/x/node/types/v1/msg.pb.go new file mode 100644 index 00000000..2e7bce59 --- /dev/null +++ b/x/node/types/v1/msg.pb.go @@ -0,0 +1,1493 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/node/v1/msg.proto + +package v1 + +import ( + context "context" + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + types1 "github.com/sentinel-official/hub/v12/types" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgRegisterRequest defines the SDK message for registering a node +type MsgRegisterRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"` + Price github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=price,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"price"` + RemoteURL string `protobuf:"bytes,4,opt,name=remote_url,json=remoteUrl,proto3" json:"remote_url,omitempty"` +} + +func (m *MsgRegisterRequest) Reset() { *m = MsgRegisterRequest{} } +func (m *MsgRegisterRequest) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterRequest) ProtoMessage() {} +func (*MsgRegisterRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_6f2b348927ca90b6, []int{0} +} +func (m *MsgRegisterRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterRequest.Merge(m, src) +} +func (m *MsgRegisterRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterRequest proto.InternalMessageInfo + +// MsgUpdateRequest defines the SDK message for updating a node +type MsgUpdateRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"` + Price github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=price,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"price"` + RemoteURL string `protobuf:"bytes,4,opt,name=remote_url,json=remoteUrl,proto3" json:"remote_url,omitempty"` +} + +func (m *MsgUpdateRequest) Reset() { *m = MsgUpdateRequest{} } +func (m *MsgUpdateRequest) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateRequest) ProtoMessage() {} +func (*MsgUpdateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_6f2b348927ca90b6, []int{1} +} +func (m *MsgUpdateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateRequest.Merge(m, src) +} +func (m *MsgUpdateRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateRequest proto.InternalMessageInfo + +// MsgSetStatusRequest defines the SDK message for modifying the status of a +// node +type MsgSetStatusRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Status types1.Status `protobuf:"varint,2,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` +} + +func (m *MsgSetStatusRequest) Reset() { *m = MsgSetStatusRequest{} } +func (m *MsgSetStatusRequest) String() string { return proto.CompactTextString(m) } +func (*MsgSetStatusRequest) ProtoMessage() {} +func (*MsgSetStatusRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_6f2b348927ca90b6, []int{2} +} +func (m *MsgSetStatusRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetStatusRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSetStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetStatusRequest.Merge(m, src) +} +func (m *MsgSetStatusRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgSetStatusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetStatusRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetStatusRequest proto.InternalMessageInfo + +// MsgRegisterResponse defines the response of message MsgRegisterRequest +type MsgRegisterResponse struct { +} + +func (m *MsgRegisterResponse) Reset() { *m = MsgRegisterResponse{} } +func (m *MsgRegisterResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterResponse) ProtoMessage() {} +func (*MsgRegisterResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_6f2b348927ca90b6, []int{3} +} +func (m *MsgRegisterResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterResponse.Merge(m, src) +} +func (m *MsgRegisterResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterResponse proto.InternalMessageInfo + +// MsgUpdateResponse defines the response of message MsgUpdateRequest +type MsgUpdateResponse struct { +} + +func (m *MsgUpdateResponse) Reset() { *m = MsgUpdateResponse{} } +func (m *MsgUpdateResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateResponse) ProtoMessage() {} +func (*MsgUpdateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_6f2b348927ca90b6, []int{4} +} +func (m *MsgUpdateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateResponse.Merge(m, src) +} +func (m *MsgUpdateResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateResponse proto.InternalMessageInfo + +// MsgSetStatusResponse defines the response of message MsgSetStatusRequest +type MsgSetStatusResponse struct { +} + +func (m *MsgSetStatusResponse) Reset() { *m = MsgSetStatusResponse{} } +func (m *MsgSetStatusResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSetStatusResponse) ProtoMessage() {} +func (*MsgSetStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_6f2b348927ca90b6, []int{5} +} +func (m *MsgSetStatusResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetStatusResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSetStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetStatusResponse.Merge(m, src) +} +func (m *MsgSetStatusResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSetStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetStatusResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgRegisterRequest)(nil), "sentinel.node.v1.MsgRegisterRequest") + proto.RegisterType((*MsgUpdateRequest)(nil), "sentinel.node.v1.MsgUpdateRequest") + proto.RegisterType((*MsgSetStatusRequest)(nil), "sentinel.node.v1.MsgSetStatusRequest") + proto.RegisterType((*MsgRegisterResponse)(nil), "sentinel.node.v1.MsgRegisterResponse") + proto.RegisterType((*MsgUpdateResponse)(nil), "sentinel.node.v1.MsgUpdateResponse") + proto.RegisterType((*MsgSetStatusResponse)(nil), "sentinel.node.v1.MsgSetStatusResponse") +} + +func init() { proto.RegisterFile("sentinel/node/v1/msg.proto", fileDescriptor_6f2b348927ca90b6) } + +var fileDescriptor_6f2b348927ca90b6 = []byte{ + // 488 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x54, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xb6, 0xdb, 0x52, 0x91, 0x2d, 0xa0, 0xb2, 0x2d, 0x28, 0xf5, 0x61, 0x53, 0x85, 0x1f, 0xe5, + 0x40, 0x77, 0x71, 0xe0, 0x09, 0xc2, 0x95, 0x5c, 0x5c, 0xc2, 0xa1, 0x02, 0x21, 0xdb, 0xd9, 0xb8, + 0x2b, 0x62, 0xaf, 0xd9, 0x59, 0x5b, 0xf0, 0x16, 0xbc, 0x00, 0x77, 0xc4, 0x93, 0xe4, 0x58, 0x09, + 0x21, 0x71, 0x2a, 0xe0, 0xbc, 0x08, 0xf2, 0xae, 0x13, 0xd2, 0x52, 0xb5, 0xf7, 0x9e, 0xbc, 0x9e, + 0xf9, 0xe6, 0x9b, 0xef, 0xf3, 0xcc, 0x1a, 0x79, 0xc0, 0x33, 0x2d, 0x32, 0x3e, 0x65, 0x99, 0x1c, + 0x73, 0x56, 0xfa, 0x2c, 0x85, 0x84, 0xe6, 0x4a, 0x6a, 0x89, 0xb7, 0x17, 0x39, 0x5a, 0xe7, 0x68, + 0xe9, 0x7b, 0x24, 0x96, 0x90, 0x4a, 0x60, 0x51, 0x08, 0x35, 0x36, 0xe2, 0x3a, 0xf4, 0x59, 0x2c, + 0x45, 0x66, 0x2b, 0xbc, 0xdd, 0x44, 0x26, 0xd2, 0x1c, 0x59, 0x7d, 0x6a, 0xa2, 0x64, 0xd9, 0x43, + 0x7f, 0xca, 0x39, 0xd4, 0x4d, 0x40, 0x87, 0xba, 0x00, 0x9b, 0xef, 0xfe, 0x70, 0x11, 0x1e, 0x42, + 0x12, 0xf0, 0x44, 0x80, 0xe6, 0x2a, 0xe0, 0x1f, 0x0a, 0x0e, 0x1a, 0x63, 0xb4, 0x31, 0x51, 0x32, + 0x6d, 0xbb, 0xfb, 0x6e, 0xaf, 0x15, 0x98, 0x33, 0xf6, 0xd0, 0xcd, 0x5c, 0xc9, 0x52, 0x8c, 0xb9, + 0x6a, 0xaf, 0x99, 0xf8, 0xf2, 0x1d, 0x87, 0xe8, 0x46, 0xae, 0x44, 0xcc, 0xdb, 0xeb, 0xfb, 0xeb, + 0xbd, 0xad, 0xfe, 0x1e, 0xb5, 0x62, 0x69, 0x2d, 0x96, 0x36, 0x62, 0xe9, 0x0b, 0x29, 0xb2, 0xc1, + 0xd3, 0xd9, 0x69, 0xc7, 0xf9, 0xf6, 0xab, 0xd3, 0x4b, 0x84, 0x3e, 0x2e, 0x22, 0x1a, 0xcb, 0x94, + 0x35, 0xce, 0xec, 0xe3, 0x00, 0xc6, 0xef, 0xad, 0x58, 0x53, 0x00, 0x81, 0x65, 0xc6, 0x4f, 0x10, + 0x52, 0x3c, 0x95, 0x9a, 0xbf, 0x2b, 0xd4, 0xb4, 0xbd, 0x51, 0x0b, 0x18, 0xdc, 0xae, 0x4e, 0x3b, + 0xad, 0xc0, 0x44, 0x47, 0xc1, 0xcb, 0xa0, 0x65, 0x01, 0x23, 0x35, 0xed, 0x7e, 0x77, 0xd1, 0xf6, + 0x10, 0x92, 0x51, 0x3e, 0x0e, 0x35, 0xbf, 0x36, 0xae, 0xde, 0xa0, 0x9d, 0x21, 0x24, 0x87, 0x5c, + 0x1f, 0x9a, 0x19, 0x5e, 0xe6, 0xcb, 0x47, 0x9b, 0x76, 0xd0, 0xc6, 0xd5, 0x9d, 0xfe, 0x1e, 0x5d, + 0x6e, 0x94, 0x95, 0x51, 0xfa, 0xb4, 0x61, 0x69, 0x80, 0xdd, 0x7b, 0x86, 0xfd, 0xdf, 0x2a, 0x40, + 0x2e, 0x33, 0xe0, 0xdd, 0x1d, 0x74, 0x77, 0xe5, 0x4b, 0x36, 0xc1, 0xfb, 0x68, 0xf7, 0xac, 0x12, + 0x1b, 0xef, 0x7f, 0x59, 0x43, 0xc8, 0x24, 0x54, 0x59, 0xdb, 0x3b, 0x42, 0x5b, 0x2b, 0x94, 0xf8, + 0x21, 0x3d, 0xbf, 0xd6, 0xf4, 0xff, 0xe5, 0xf3, 0x1e, 0x5d, 0x81, 0xb2, 0xad, 0xf0, 0x2b, 0xd4, + 0x5a, 0xea, 0xc2, 0xdd, 0x0b, 0x6b, 0xce, 0x8c, 0xdf, 0x7b, 0x70, 0x29, 0xa6, 0x61, 0x7d, 0x8b, + 0x6e, 0xad, 0x1a, 0xc3, 0x17, 0x8b, 0x39, 0x3f, 0x02, 0xef, 0xf1, 0x55, 0x30, 0x4b, 0x3f, 0x78, + 0x3d, 0xfb, 0x43, 0x9c, 0xaf, 0x15, 0x71, 0x66, 0x15, 0x71, 0x4f, 0x2a, 0xe2, 0xfe, 0xae, 0x88, + 0xfb, 0x79, 0x4e, 0x9c, 0x93, 0x39, 0x71, 0x7e, 0xce, 0x89, 0x73, 0xf4, 0x7c, 0x65, 0x85, 0x16, + 0x9c, 0x07, 0x72, 0x32, 0x11, 0xb1, 0x08, 0xa7, 0xec, 0xb8, 0x88, 0x58, 0xe9, 0xf7, 0xd9, 0x47, + 0xfb, 0xcf, 0x58, 0x5c, 0xea, 0x68, 0xd3, 0x5c, 0xe7, 0x67, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, + 0x30, 0x95, 0xc3, 0xf5, 0x54, 0x04, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgServiceClient is the client API for MsgService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgServiceClient interface { + MsgRegister(ctx context.Context, in *MsgRegisterRequest, opts ...grpc.CallOption) (*MsgRegisterResponse, error) + MsgUpdate(ctx context.Context, in *MsgUpdateRequest, opts ...grpc.CallOption) (*MsgUpdateResponse, error) + MsgSetStatus(ctx context.Context, in *MsgSetStatusRequest, opts ...grpc.CallOption) (*MsgSetStatusResponse, error) +} + +type msgServiceClient struct { + cc grpc1.ClientConn +} + +func NewMsgServiceClient(cc grpc1.ClientConn) MsgServiceClient { + return &msgServiceClient{cc} +} + +func (c *msgServiceClient) MsgRegister(ctx context.Context, in *MsgRegisterRequest, opts ...grpc.CallOption) (*MsgRegisterResponse, error) { + out := new(MsgRegisterResponse) + err := c.cc.Invoke(ctx, "/sentinel.node.v1.MsgService/MsgRegister", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgServiceClient) MsgUpdate(ctx context.Context, in *MsgUpdateRequest, opts ...grpc.CallOption) (*MsgUpdateResponse, error) { + out := new(MsgUpdateResponse) + err := c.cc.Invoke(ctx, "/sentinel.node.v1.MsgService/MsgUpdate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgServiceClient) MsgSetStatus(ctx context.Context, in *MsgSetStatusRequest, opts ...grpc.CallOption) (*MsgSetStatusResponse, error) { + out := new(MsgSetStatusResponse) + err := c.cc.Invoke(ctx, "/sentinel.node.v1.MsgService/MsgSetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServiceServer is the server API for MsgService service. +type MsgServiceServer interface { + MsgRegister(context.Context, *MsgRegisterRequest) (*MsgRegisterResponse, error) + MsgUpdate(context.Context, *MsgUpdateRequest) (*MsgUpdateResponse, error) + MsgSetStatus(context.Context, *MsgSetStatusRequest) (*MsgSetStatusResponse, error) +} + +// UnimplementedMsgServiceServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServiceServer struct { +} + +func (*UnimplementedMsgServiceServer) MsgRegister(ctx context.Context, req *MsgRegisterRequest) (*MsgRegisterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgRegister not implemented") +} +func (*UnimplementedMsgServiceServer) MsgUpdate(ctx context.Context, req *MsgUpdateRequest) (*MsgUpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgUpdate not implemented") +} +func (*UnimplementedMsgServiceServer) MsgSetStatus(ctx context.Context, req *MsgSetStatusRequest) (*MsgSetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgSetStatus not implemented") +} + +func RegisterMsgServiceServer(s grpc1.Server, srv MsgServiceServer) { + s.RegisterService(&_MsgService_serviceDesc, srv) +} + +func _MsgService_MsgRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgRegister(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.node.v1.MsgService/MsgRegister", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgRegister(ctx, req.(*MsgRegisterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MsgService_MsgUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgUpdate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.node.v1.MsgService/MsgUpdate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgUpdate(ctx, req.(*MsgUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MsgService_MsgSetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgSetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.node.v1.MsgService/MsgSetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgSetStatus(ctx, req.(*MsgSetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _MsgService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "sentinel.node.v1.MsgService", + HandlerType: (*MsgServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "MsgRegister", + Handler: _MsgService_MsgRegister_Handler, + }, + { + MethodName: "MsgUpdate", + Handler: _MsgService_MsgUpdate_Handler, + }, + { + MethodName: "MsgSetStatus", + Handler: _MsgService_MsgSetStatus_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sentinel/node/v1/msg.proto", +} + +func (m *MsgRegisterRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRegisterRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RemoteURL) > 0 { + i -= len(m.RemoteURL) + copy(dAtA[i:], m.RemoteURL) + i = encodeVarintMsg(dAtA, i, uint64(len(m.RemoteURL))) + i-- + dAtA[i] = 0x22 + } + if len(m.Price) > 0 { + for iNdEx := len(m.Price) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Price[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x12 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RemoteURL) > 0 { + i -= len(m.RemoteURL) + copy(dAtA[i:], m.RemoteURL) + i = encodeVarintMsg(dAtA, i, uint64(len(m.RemoteURL))) + i-- + dAtA[i] = 0x22 + } + if len(m.Price) > 0 { + for iNdEx := len(m.Price) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Price[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x12 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSetStatusRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSetStatusRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Status != 0 { + i = encodeVarintMsg(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRegisterResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRegisterResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSetStatusResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSetStatusResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintMsg(dAtA []byte, offset int, v uint64) int { + offset -= sovMsg(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgRegisterRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if len(m.Price) > 0 { + for _, e := range m.Price { + l = e.Size() + n += 1 + l + sovMsg(uint64(l)) + } + } + l = len(m.RemoteURL) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + return n +} + +func (m *MsgUpdateRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if len(m.Price) > 0 { + for _, e := range m.Price { + l = e.Size() + n += 1 + l + sovMsg(uint64(l)) + } + } + l = len(m.RemoteURL) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + return n +} + +func (m *MsgSetStatusRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if m.Status != 0 { + n += 1 + sovMsg(uint64(m.Status)) + } + return n +} + +func (m *MsgRegisterResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSetStatusResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovMsg(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMsg(x uint64) (n int) { + return sovMsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgRegisterRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Price = append(m.Price, types.Coin{}) + if err := m.Price[len(m.Price)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemoteURL", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RemoteURL = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Price = append(m.Price, types.Coin{}) + if err := m.Price[len(m.Price)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemoteURL", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RemoteURL = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSetStatusRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetStatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types1.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRegisterResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSetStatusResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetStatusResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMsg(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMsg + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMsg + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMsg + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMsg + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMsg + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMsg + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMsg = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/node/types/v1/node.pb.go b/x/node/types/v1/node.pb.go new file mode 100644 index 00000000..cbc0b96f --- /dev/null +++ b/x/node/types/v1/node.pb.go @@ -0,0 +1,546 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/node/v1/node.proto + +package v1 + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + types1 "github.com/sentinel-official/hub/v12/types" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Node struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"` + Price github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=price,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"price"` + RemoteURL string `protobuf:"bytes,4,opt,name=remote_url,json=remoteUrl,proto3" json:"remote_url,omitempty"` + Status types1.Status `protobuf:"varint,5,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + StatusAt time.Time `protobuf:"bytes,6,opt,name=status_at,json=statusAt,proto3,stdtime" json:"status_at"` +} + +func (m *Node) Reset() { *m = Node{} } +func (m *Node) String() string { return proto.CompactTextString(m) } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { + return fileDescriptor_3db436afdcec2fda, []int{0} +} +func (m *Node) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Node.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Node) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node.Merge(m, src) +} +func (m *Node) XXX_Size() int { + return m.Size() +} +func (m *Node) XXX_DiscardUnknown() { + xxx_messageInfo_Node.DiscardUnknown(m) +} + +var xxx_messageInfo_Node proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Node)(nil), "sentinel.node.v1.Node") +} + +func init() { proto.RegisterFile("sentinel/node/v1/node.proto", fileDescriptor_3db436afdcec2fda) } + +var fileDescriptor_3db436afdcec2fda = []byte{ + // 411 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x52, 0xcb, 0x6e, 0xd4, 0x30, + 0x14, 0x8d, 0xfb, 0x18, 0x66, 0x5c, 0x81, 0x50, 0xc4, 0x22, 0x1d, 0x24, 0x67, 0xc4, 0x2a, 0x0b, + 0x6a, 0x93, 0x81, 0x1f, 0xe8, 0xb0, 0x45, 0x2c, 0x02, 0x65, 0xc1, 0xa6, 0x72, 0x12, 0x4f, 0x6a, + 0x91, 0xe4, 0x46, 0xb6, 0x13, 0xc1, 0x5f, 0xf4, 0x33, 0x10, 0xbf, 0xc1, 0x66, 0x96, 0x5d, 0xb2, + 0x6a, 0x21, 0xf3, 0x23, 0x28, 0x76, 0x32, 0xea, 0xea, 0xbe, 0xce, 0xbd, 0x39, 0xe7, 0xc4, 0xf8, + 0xa5, 0x16, 0xb5, 0x91, 0xb5, 0x28, 0x59, 0x0d, 0xb9, 0x60, 0x5d, 0x6c, 0x23, 0x6d, 0x14, 0x18, + 0xf0, 0x9f, 0x4f, 0x43, 0x6a, 0x9b, 0x5d, 0xbc, 0x24, 0x19, 0xe8, 0x0a, 0x34, 0x4b, 0xb9, 0x1e, + 0xc0, 0xa9, 0x30, 0x3c, 0x66, 0x19, 0xc8, 0xda, 0x6d, 0x2c, 0x5f, 0x14, 0x50, 0x80, 0x4d, 0xd9, + 0x90, 0x8d, 0xdd, 0xb0, 0x00, 0x28, 0x4a, 0xc1, 0x6c, 0x95, 0xb6, 0x5b, 0x66, 0x64, 0x25, 0xb4, + 0xe1, 0x55, 0x33, 0x02, 0xc8, 0x81, 0x85, 0xf9, 0xd1, 0x08, 0x3d, 0xd0, 0xd0, 0x86, 0x9b, 0x56, + 0xbb, 0xf9, 0xab, 0xdf, 0x47, 0xf8, 0xe4, 0x23, 0xe4, 0xc2, 0x0f, 0xf0, 0x13, 0x9e, 0xe7, 0x4a, + 0x68, 0x1d, 0xa0, 0x15, 0x8a, 0x16, 0xc9, 0x54, 0xfa, 0x4b, 0x3c, 0x6f, 0x14, 0x74, 0x32, 0x17, + 0x2a, 0x38, 0xb2, 0xa3, 0x43, 0xed, 0x73, 0x7c, 0xda, 0x28, 0x99, 0x89, 0xe0, 0x78, 0x75, 0x1c, + 0x9d, 0xad, 0xcf, 0xa9, 0x53, 0x41, 0x07, 0x15, 0x74, 0x54, 0x41, 0xdf, 0x83, 0xac, 0x37, 0x6f, + 0x76, 0xf7, 0xa1, 0xf7, 0xeb, 0x21, 0x8c, 0x0a, 0x69, 0x6e, 0xda, 0x94, 0x66, 0x50, 0xb1, 0x51, + 0xb2, 0x0b, 0x17, 0x3a, 0xff, 0xe6, 0x48, 0xda, 0x05, 0x9d, 0xb8, 0xcb, 0xfe, 0x6b, 0x8c, 0x95, + 0xa8, 0xc0, 0x88, 0xeb, 0x56, 0x95, 0xc1, 0xc9, 0x40, 0x60, 0xf3, 0xb4, 0xbf, 0x0f, 0x17, 0x89, + 0xed, 0x5e, 0x25, 0x1f, 0x92, 0x85, 0x03, 0x5c, 0xa9, 0xd2, 0x8f, 0xf1, 0xcc, 0xe9, 0x0b, 0x4e, + 0x57, 0x28, 0x7a, 0xb6, 0x3e, 0xa7, 0x07, 0xa7, 0xdd, 0xed, 0x2e, 0xa6, 0x9f, 0x2c, 0x20, 0x19, + 0x81, 0xfe, 0x25, 0x5e, 0xb8, 0xec, 0x9a, 0x9b, 0x60, 0xb6, 0x42, 0xd1, 0xd9, 0x7a, 0x49, 0x9d, + 0xaf, 0x74, 0xf2, 0x95, 0x7e, 0x9e, 0x7c, 0xdd, 0xcc, 0x07, 0x21, 0xb7, 0x0f, 0x21, 0x4a, 0xe6, + 0x6e, 0xed, 0xd2, 0x6c, 0xbe, 0xec, 0xfe, 0x11, 0xef, 0x67, 0x4f, 0xbc, 0x5d, 0x4f, 0xd0, 0x5d, + 0x4f, 0xd0, 0xdf, 0x9e, 0xa0, 0xdb, 0x3d, 0xf1, 0xee, 0xf6, 0xc4, 0xfb, 0xb3, 0x27, 0xde, 0xd7, + 0x77, 0x8f, 0x64, 0x4f, 0x8c, 0x2e, 0x60, 0xbb, 0x95, 0x99, 0xe4, 0x25, 0xbb, 0x69, 0x53, 0xd6, + 0xc5, 0x6b, 0xf6, 0xdd, 0xbd, 0x95, 0xe9, 0x57, 0xa5, 0x33, 0xfb, 0xfd, 0xb7, 0xff, 0x03, 0x00, + 0x00, 0xff, 0xff, 0xf8, 0x2a, 0xb1, 0x5d, 0x4c, 0x02, 0x00, 0x00, +} + +func (m *Node) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Node) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StatusAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StatusAt):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintNode(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x32 + if m.Status != 0 { + i = encodeVarintNode(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x28 + } + if len(m.RemoteURL) > 0 { + i -= len(m.RemoteURL) + copy(dAtA[i:], m.RemoteURL) + i = encodeVarintNode(dAtA, i, uint64(len(m.RemoteURL))) + i-- + dAtA[i] = 0x22 + } + if len(m.Price) > 0 { + for iNdEx := len(m.Price) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Price[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNode(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintNode(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintNode(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintNode(dAtA []byte, offset int, v uint64) int { + offset -= sovNode(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Node) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovNode(uint64(l)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovNode(uint64(l)) + } + if len(m.Price) > 0 { + for _, e := range m.Price { + l = e.Size() + n += 1 + l + sovNode(uint64(l)) + } + } + l = len(m.RemoteURL) + if l > 0 { + n += 1 + l + sovNode(uint64(l)) + } + if m.Status != 0 { + n += 1 + sovNode(uint64(m.Status)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StatusAt) + n += 1 + l + sovNode(uint64(l)) + return n +} + +func sovNode(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozNode(x uint64) (n int) { + return sovNode(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Node) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Node: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthNode + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNode + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthNode + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNode + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthNode + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNode + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Price = append(m.Price, types.Coin{}) + if err := m.Price[len(m.Price)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemoteURL", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthNode + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNode + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RemoteURL = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types1.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StatusAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthNode + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNode + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StatusAt, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNode(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNode + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipNode(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowNode + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowNode + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowNode + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthNode + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupNode + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthNode + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthNode = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowNode = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupNode = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/node/types/v1/params.pb.go b/x/node/types/v1/params.pb.go new file mode 100644 index 00000000..0d8f6046 --- /dev/null +++ b/x/node/types/v1/params.pb.go @@ -0,0 +1,532 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/node/v1/params.proto + +package v1 + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/durationpb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Params struct { + Deposit types.Coin `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit"` + InactiveDuration time.Duration `protobuf:"bytes,2,opt,name=inactive_duration,json=inactiveDuration,proto3,stdduration" json:"inactive_duration"` + MaxPrice github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=max_price,json=maxPrice,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"max_price"` + MinPrice github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=min_price,json=minPrice,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_price"` + StakingShare github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=staking_share,json=stakingShare,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"staking_share"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_56a408d0240644eb, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Params)(nil), "sentinel.node.v1.Params") +} + +func init() { proto.RegisterFile("sentinel/node/v1/params.proto", fileDescriptor_56a408d0240644eb) } + +var fileDescriptor_56a408d0240644eb = []byte{ + // 398 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x92, 0xb1, 0xae, 0xd3, 0x30, + 0x14, 0x86, 0x13, 0x5a, 0x4a, 0x1b, 0x40, 0x2a, 0x11, 0x43, 0xa8, 0x84, 0x53, 0x31, 0xa0, 0x2e, + 0xb5, 0x49, 0x61, 0x61, 0x0d, 0x7d, 0x80, 0x2a, 0x95, 0x18, 0x58, 0x2a, 0x27, 0x71, 0x13, 0xab, + 0x8d, 0x1d, 0xc5, 0x4e, 0x54, 0xde, 0x82, 0x91, 0x47, 0x40, 0x3c, 0x04, 0x73, 0xc7, 0x8e, 0x88, + 0xa1, 0xe5, 0xa6, 0x2f, 0x72, 0xe5, 0xc4, 0x91, 0xee, 0x74, 0x75, 0x97, 0x3b, 0xc5, 0xc9, 0x39, + 0xff, 0xf7, 0x1d, 0xc5, 0xc7, 0x7a, 0x2b, 0x08, 0x93, 0x94, 0x91, 0x3d, 0x62, 0x3c, 0x26, 0xa8, + 0xf2, 0x50, 0x8e, 0x0b, 0x9c, 0x09, 0x98, 0x17, 0x5c, 0x72, 0x7b, 0xdc, 0x95, 0xa1, 0x2a, 0xc3, + 0xca, 0x9b, 0x80, 0x88, 0x8b, 0x8c, 0x0b, 0x14, 0x62, 0xa1, 0xda, 0x43, 0x22, 0xb1, 0x87, 0x22, + 0x4e, 0x59, 0x9b, 0x98, 0xbc, 0x4e, 0x78, 0xc2, 0x9b, 0x23, 0x52, 0x27, 0xfd, 0x15, 0x24, 0x9c, + 0x27, 0x7b, 0x82, 0x9a, 0xb7, 0xb0, 0xdc, 0xa2, 0xb8, 0x2c, 0xb0, 0xa4, 0x5c, 0xa7, 0xde, 0xfd, + 0xe9, 0x59, 0x83, 0x55, 0x23, 0xb6, 0x3f, 0x5b, 0xcf, 0x62, 0x92, 0x73, 0x41, 0xa5, 0x63, 0x4e, + 0xcd, 0xd9, 0xf3, 0xc5, 0x1b, 0xd8, 0x2a, 0xa1, 0x52, 0x42, 0xad, 0x84, 0x5f, 0x38, 0x65, 0x7e, + 0xff, 0x78, 0x76, 0x8d, 0xa0, 0xeb, 0xb7, 0x57, 0xd6, 0x2b, 0xca, 0x70, 0x24, 0x69, 0x45, 0x36, + 0x9d, 0xc0, 0x79, 0xa2, 0x21, 0xed, 0x04, 0xb0, 0x9b, 0x00, 0x2e, 0x75, 0x83, 0x3f, 0x54, 0x90, + 0x9f, 0x17, 0xd7, 0x0c, 0xc6, 0x5d, 0xba, 0xab, 0xd9, 0xa9, 0x35, 0xca, 0xf0, 0x61, 0x93, 0x17, + 0x34, 0x22, 0x4e, 0x6f, 0xda, 0xbb, 0x7f, 0x9c, 0x0f, 0x8a, 0xf4, 0xfb, 0xe2, 0xce, 0x12, 0x2a, + 0xd3, 0x32, 0x84, 0x11, 0xcf, 0x90, 0xfe, 0x5d, 0xed, 0x63, 0x2e, 0xe2, 0x1d, 0x92, 0xdf, 0x73, + 0x22, 0x9a, 0x80, 0x08, 0x86, 0x19, 0x3e, 0xac, 0x14, 0xbc, 0x31, 0x51, 0xa6, 0x4d, 0xfd, 0xc7, + 0x30, 0x51, 0xd6, 0x9a, 0xd6, 0xd6, 0x4b, 0x21, 0xf1, 0x8e, 0xb2, 0x64, 0x23, 0x52, 0x5c, 0x10, + 0xe7, 0xe9, 0xd4, 0x9c, 0x8d, 0x7c, 0xa8, 0x90, 0xff, 0xce, 0xee, 0xfb, 0x07, 0x20, 0x97, 0x24, + 0x0a, 0x5e, 0x68, 0xc8, 0x5a, 0x31, 0xfc, 0xaf, 0xc7, 0x1b, 0x60, 0xfc, 0xaa, 0x81, 0x71, 0xac, + 0x81, 0x79, 0xaa, 0x81, 0xf9, 0xbf, 0x06, 0xe6, 0x8f, 0x2b, 0x30, 0x4e, 0x57, 0x60, 0xfc, 0xbd, + 0x02, 0xe3, 0xdb, 0xa7, 0x3b, 0xdc, 0x6e, 0xab, 0xe6, 0x7c, 0xbb, 0xa5, 0x11, 0xc5, 0x7b, 0x94, + 0x96, 0x21, 0xaa, 0xbc, 0x05, 0x3a, 0xb4, 0x7b, 0xd8, 0x68, 0xd4, 0x7a, 0x0d, 0x9a, 0xfb, 0xfa, + 0x78, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xf6, 0xbf, 0x2c, 0xf6, 0xa8, 0x02, 0x00, 0x00, +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.StakingShare.Size() + i -= size + if _, err := m.StakingShare.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.MinPrice) > 0 { + for iNdEx := len(m.MinPrice) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MinPrice[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.MaxPrice) > 0 { + for iNdEx := len(m.MaxPrice) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MaxPrice[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.InactiveDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.InactiveDuration):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintParams(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x12 + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Deposit.Size() + n += 1 + l + sovParams(uint64(l)) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.InactiveDuration) + n += 1 + l + sovParams(uint64(l)) + if len(m.MaxPrice) > 0 { + for _, e := range m.MaxPrice { + l = e.Size() + n += 1 + l + sovParams(uint64(l)) + } + } + if len(m.MinPrice) > 0 { + for _, e := range m.MinPrice { + l = e.Size() + n += 1 + l + sovParams(uint64(l)) + } + } + l = m.StakingShare.Size() + n += 1 + l + sovParams(uint64(l)) + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InactiveDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.InactiveDuration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxPrice", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaxPrice = append(m.MaxPrice, types.Coin{}) + if err := m.MaxPrice[len(m.MaxPrice)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinPrice", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MinPrice = append(m.MinPrice, types.Coin{}) + if err := m.MinPrice[len(m.MinPrice)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakingShare", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StakingShare.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/node/types/v1/querier.pb.go b/x/node/types/v1/querier.pb.go new file mode 100644 index 00000000..6b94d7f0 --- /dev/null +++ b/x/node/types/v1/querier.pb.go @@ -0,0 +1,1881 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/node/v1/querier.proto + +package v1 + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/sentinel-official/hub/v12/types" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type QueryNodesRequest struct { + Status types.Status `protobuf:"varint,1,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryNodesRequest) Reset() { *m = QueryNodesRequest{} } +func (m *QueryNodesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryNodesRequest) ProtoMessage() {} +func (*QueryNodesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c635c2874902e7a6, []int{0} +} +func (m *QueryNodesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNodesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryNodesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNodesRequest.Merge(m, src) +} +func (m *QueryNodesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryNodesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNodesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNodesRequest proto.InternalMessageInfo + +type QueryNodesForProviderRequest struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Status types.Status `protobuf:"varint,2,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryNodesForProviderRequest) Reset() { *m = QueryNodesForProviderRequest{} } +func (m *QueryNodesForProviderRequest) String() string { return proto.CompactTextString(m) } +func (*QueryNodesForProviderRequest) ProtoMessage() {} +func (*QueryNodesForProviderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c635c2874902e7a6, []int{1} +} +func (m *QueryNodesForProviderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNodesForProviderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNodesForProviderRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryNodesForProviderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNodesForProviderRequest.Merge(m, src) +} +func (m *QueryNodesForProviderRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryNodesForProviderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNodesForProviderRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNodesForProviderRequest proto.InternalMessageInfo + +type QueryNodeRequest struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryNodeRequest) Reset() { *m = QueryNodeRequest{} } +func (m *QueryNodeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryNodeRequest) ProtoMessage() {} +func (*QueryNodeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c635c2874902e7a6, []int{2} +} +func (m *QueryNodeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNodeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryNodeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNodeRequest.Merge(m, src) +} +func (m *QueryNodeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryNodeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNodeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNodeRequest proto.InternalMessageInfo + +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c635c2874902e7a6, []int{3} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +type QueryNodesResponse struct { + Nodes []Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryNodesResponse) Reset() { *m = QueryNodesResponse{} } +func (m *QueryNodesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryNodesResponse) ProtoMessage() {} +func (*QueryNodesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c635c2874902e7a6, []int{4} +} +func (m *QueryNodesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNodesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryNodesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNodesResponse.Merge(m, src) +} +func (m *QueryNodesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryNodesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNodesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNodesResponse proto.InternalMessageInfo + +type QueryNodesForProviderResponse struct { + Nodes []Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryNodesForProviderResponse) Reset() { *m = QueryNodesForProviderResponse{} } +func (m *QueryNodesForProviderResponse) String() string { return proto.CompactTextString(m) } +func (*QueryNodesForProviderResponse) ProtoMessage() {} +func (*QueryNodesForProviderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c635c2874902e7a6, []int{5} +} +func (m *QueryNodesForProviderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNodesForProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNodesForProviderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryNodesForProviderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNodesForProviderResponse.Merge(m, src) +} +func (m *QueryNodesForProviderResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryNodesForProviderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNodesForProviderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNodesForProviderResponse proto.InternalMessageInfo + +type QueryNodeResponse struct { + Node Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node"` +} + +func (m *QueryNodeResponse) Reset() { *m = QueryNodeResponse{} } +func (m *QueryNodeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryNodeResponse) ProtoMessage() {} +func (*QueryNodeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c635c2874902e7a6, []int{6} +} +func (m *QueryNodeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNodeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryNodeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNodeResponse.Merge(m, src) +} +func (m *QueryNodeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryNodeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNodeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNodeResponse proto.InternalMessageInfo + +type QueryParamsResponse struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c635c2874902e7a6, []int{7} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*QueryNodesRequest)(nil), "sentinel.node.v1.QueryNodesRequest") + proto.RegisterType((*QueryNodesForProviderRequest)(nil), "sentinel.node.v1.QueryNodesForProviderRequest") + proto.RegisterType((*QueryNodeRequest)(nil), "sentinel.node.v1.QueryNodeRequest") + proto.RegisterType((*QueryParamsRequest)(nil), "sentinel.node.v1.QueryParamsRequest") + proto.RegisterType((*QueryNodesResponse)(nil), "sentinel.node.v1.QueryNodesResponse") + proto.RegisterType((*QueryNodesForProviderResponse)(nil), "sentinel.node.v1.QueryNodesForProviderResponse") + proto.RegisterType((*QueryNodeResponse)(nil), "sentinel.node.v1.QueryNodeResponse") + proto.RegisterType((*QueryParamsResponse)(nil), "sentinel.node.v1.QueryParamsResponse") +} + +func init() { proto.RegisterFile("sentinel/node/v1/querier.proto", fileDescriptor_c635c2874902e7a6) } + +var fileDescriptor_c635c2874902e7a6 = []byte{ + // 638 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0xcf, 0x6e, 0xd3, 0x40, + 0x10, 0xc6, 0xbd, 0x6d, 0x29, 0xea, 0x16, 0x41, 0xbb, 0x14, 0x48, 0xd3, 0xd6, 0x2d, 0x2e, 0x85, + 0x8a, 0x3f, 0xbb, 0xd8, 0x20, 0x1e, 0xa0, 0x12, 0xe5, 0x04, 0x0a, 0xa9, 0xc4, 0x81, 0xdb, 0x26, + 0xde, 0xba, 0x96, 0x12, 0xaf, 0xeb, 0xb5, 0x0d, 0x15, 0xe2, 0x00, 0x0f, 0x80, 0x40, 0x5c, 0xb9, + 0x56, 0xe2, 0xce, 0x4b, 0xe4, 0x58, 0x89, 0x0b, 0x27, 0x04, 0x09, 0x0f, 0x82, 0xbc, 0xbb, 0x8e, + 0x93, 0xba, 0x4d, 0x50, 0x4f, 0xdc, 0x12, 0xcf, 0xb7, 0xdf, 0xfc, 0x66, 0x66, 0x67, 0xa1, 0x29, + 0x58, 0x10, 0xfb, 0x01, 0x6b, 0x91, 0x80, 0xbb, 0x8c, 0xa4, 0x36, 0xd9, 0x4f, 0x58, 0xe4, 0xb3, + 0x08, 0x87, 0x11, 0x8f, 0x39, 0x9a, 0xcb, 0xe3, 0x38, 0x8b, 0xe3, 0xd4, 0xae, 0xde, 0x6e, 0x72, + 0xd1, 0xe6, 0x82, 0x34, 0xa8, 0x60, 0x52, 0x7c, 0x40, 0x52, 0xbb, 0xc1, 0x62, 0x6a, 0x93, 0x90, + 0x7a, 0x7e, 0x40, 0x63, 0x9f, 0x07, 0xea, 0x74, 0x75, 0xc1, 0xe3, 0x1e, 0x97, 0x3f, 0x49, 0xf6, + 0x4b, 0x7f, 0x5d, 0xf6, 0x38, 0xf7, 0x5a, 0x8c, 0xd0, 0xd0, 0x27, 0x34, 0x08, 0x78, 0x2c, 0x8f, + 0x08, 0x1d, 0x5d, 0x2a, 0x11, 0xc9, 0xcc, 0x2a, 0xb8, 0x52, 0x0a, 0x86, 0x34, 0xa2, 0xed, 0xfc, + 0x6c, 0x51, 0x4d, 0x7c, 0x10, 0x32, 0x91, 0xc5, 0x45, 0x4c, 0xe3, 0x44, 0xc7, 0xad, 0x0f, 0x00, + 0xce, 0x3f, 0xcf, 0x90, 0x9f, 0x71, 0x97, 0x89, 0x3a, 0xdb, 0x4f, 0x98, 0x88, 0x91, 0x0d, 0xa7, + 0x95, 0xaa, 0x02, 0xd6, 0xc0, 0xe6, 0x45, 0x67, 0x11, 0xf7, 0x8b, 0x96, 0x36, 0x38, 0xb5, 0xf1, + 0x8e, 0x14, 0xd4, 0xb5, 0x10, 0x6d, 0x43, 0x58, 0x14, 0x5b, 0x99, 0x58, 0x03, 0x9b, 0xb3, 0xce, + 0x4d, 0xac, 0x3a, 0x83, 0xb3, 0xce, 0x60, 0xd9, 0x19, 0xac, 0x3b, 0x83, 0x6b, 0xd4, 0x63, 0x3a, + 0x5d, 0x7d, 0xe0, 0xa4, 0xf5, 0x0d, 0xc0, 0xe5, 0x02, 0x68, 0x9b, 0x47, 0xb5, 0x88, 0xa7, 0xbe, + 0xcb, 0xa2, 0x9c, 0xad, 0x02, 0xcf, 0x53, 0xd7, 0x8d, 0x98, 0x50, 0x70, 0x33, 0xf5, 0xfc, 0xef, + 0x00, 0xf5, 0xc4, 0xd9, 0xa8, 0x27, 0xcf, 0x4c, 0x7d, 0x17, 0xce, 0xf5, 0xa1, 0xc7, 0x82, 0x5a, + 0x0b, 0x10, 0x49, 0x75, 0x4d, 0x4e, 0x4a, 0xeb, 0xad, 0x4f, 0x40, 0x7f, 0xd6, 0xa3, 0x10, 0x21, + 0x0f, 0x04, 0x43, 0x0e, 0x3c, 0x97, 0x4d, 0x36, 0x33, 0x99, 0xdc, 0x9c, 0x75, 0xae, 0xe2, 0xe3, + 0xf7, 0x0f, 0x67, 0xfa, 0xad, 0xa9, 0xce, 0xcf, 0x55, 0xa3, 0xae, 0xa4, 0xe8, 0xc9, 0x09, 0xc3, + 0xb8, 0x35, 0xb6, 0x2c, 0x95, 0x70, 0xa8, 0xae, 0x2f, 0x00, 0xae, 0x9c, 0x32, 0x8d, 0xff, 0x01, + 0xef, 0xf1, 0xc0, 0xe5, 0xed, 0x13, 0xdd, 0x87, 0x53, 0x59, 0x1a, 0xd9, 0xf4, 0x71, 0x40, 0x52, + 0x69, 0x3d, 0x85, 0x97, 0x87, 0xe6, 0xa1, 0x8d, 0x1e, 0xc1, 0x69, 0xb5, 0x4b, 0xda, 0xaa, 0x52, + 0xb6, 0x52, 0x27, 0xb4, 0x99, 0x56, 0x3b, 0x87, 0x53, 0xf0, 0x82, 0xf4, 0xdb, 0x61, 0x51, 0xea, + 0x37, 0x19, 0x0a, 0x21, 0x2c, 0x9a, 0x88, 0xd6, 0xcb, 0x36, 0xa5, 0x0d, 0xac, 0xde, 0x18, 0x2d, + 0x52, 0x84, 0xd6, 0xb5, 0xf7, 0xdf, 0xff, 0x7c, 0x9e, 0x98, 0x47, 0x97, 0xc8, 0xd0, 0x2b, 0x20, + 0xd0, 0x21, 0x80, 0x57, 0x4e, 0x9c, 0x1b, 0xc2, 0xa3, 0x8c, 0xcb, 0xeb, 0x56, 0x25, 0xff, 0xac, + 0xd7, 0x4c, 0x77, 0x24, 0xd3, 0x06, 0x5a, 0x2f, 0x98, 0x42, 0xad, 0x11, 0xe4, 0x8d, 0x5e, 0x81, + 0xb7, 0x9a, 0xf3, 0x15, 0x9c, 0xe9, 0xbb, 0x21, 0x6b, 0x44, 0xaa, 0x1c, 0x67, 0x7d, 0xa4, 0x46, + 0x23, 0x5c, 0x97, 0x08, 0x4b, 0x68, 0xf1, 0x58, 0x5b, 0x8a, 0xf4, 0xe8, 0x1d, 0x80, 0xb3, 0x03, + 0x33, 0x47, 0xa7, 0xf5, 0x7b, 0x68, 0x45, 0xab, 0x1b, 0x63, 0x54, 0x3a, 0xff, 0x86, 0xcc, 0xbf, + 0x8a, 0x56, 0x8a, 0xfc, 0x6d, 0xee, 0x26, 0x2d, 0x26, 0xd4, 0x23, 0xad, 0xee, 0xc9, 0xd6, 0x8b, + 0xce, 0x6f, 0xd3, 0xf8, 0xda, 0x35, 0x8d, 0x4e, 0xd7, 0x04, 0x47, 0x5d, 0x13, 0xfc, 0xea, 0x9a, + 0xe0, 0x63, 0xcf, 0x34, 0x8e, 0x7a, 0xa6, 0xf1, 0xa3, 0x67, 0x1a, 0x2f, 0x1f, 0x7a, 0x7e, 0xbc, + 0x97, 0x34, 0x70, 0x93, 0xb7, 0xfb, 0x56, 0xf7, 0xf8, 0xee, 0xae, 0xdf, 0xf4, 0x69, 0x8b, 0xec, + 0x25, 0x0d, 0x92, 0xda, 0x0e, 0x79, 0xad, 0x5c, 0xf3, 0x07, 0xbe, 0x31, 0x2d, 0x9f, 0xf6, 0x07, + 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x64, 0x58, 0x16, 0xca, 0x06, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryServiceClient is the client API for QueryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryServiceClient interface { + QueryNodes(ctx context.Context, in *QueryNodesRequest, opts ...grpc.CallOption) (*QueryNodesResponse, error) + QueryNodesForProvider(ctx context.Context, in *QueryNodesForProviderRequest, opts ...grpc.CallOption) (*QueryNodesForProviderResponse, error) + QueryNode(ctx context.Context, in *QueryNodeRequest, opts ...grpc.CallOption) (*QueryNodeResponse, error) + QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryServiceClient struct { + cc grpc1.ClientConn +} + +func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { + return &queryServiceClient{cc} +} + +func (c *queryServiceClient) QueryNodes(ctx context.Context, in *QueryNodesRequest, opts ...grpc.CallOption) (*QueryNodesResponse, error) { + out := new(QueryNodesResponse) + err := c.cc.Invoke(ctx, "/sentinel.node.v1.QueryService/QueryNodes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QueryNodesForProvider(ctx context.Context, in *QueryNodesForProviderRequest, opts ...grpc.CallOption) (*QueryNodesForProviderResponse, error) { + out := new(QueryNodesForProviderResponse) + err := c.cc.Invoke(ctx, "/sentinel.node.v1.QueryService/QueryNodesForProvider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QueryNode(ctx context.Context, in *QueryNodeRequest, opts ...grpc.CallOption) (*QueryNodeResponse, error) { + out := new(QueryNodeResponse) + err := c.cc.Invoke(ctx, "/sentinel.node.v1.QueryService/QueryNode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/sentinel.node.v1.QueryService/QueryParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServiceServer is the server API for QueryService service. +type QueryServiceServer interface { + QueryNodes(context.Context, *QueryNodesRequest) (*QueryNodesResponse, error) + QueryNodesForProvider(context.Context, *QueryNodesForProviderRequest) (*QueryNodesForProviderResponse, error) + QueryNode(context.Context, *QueryNodeRequest) (*QueryNodeResponse, error) + QueryParams(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +} + +// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServiceServer struct { +} + +func (*UnimplementedQueryServiceServer) QueryNodes(ctx context.Context, req *QueryNodesRequest) (*QueryNodesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryNodes not implemented") +} +func (*UnimplementedQueryServiceServer) QueryNodesForProvider(ctx context.Context, req *QueryNodesForProviderRequest) (*QueryNodesForProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryNodesForProvider not implemented") +} +func (*UnimplementedQueryServiceServer) QueryNode(ctx context.Context, req *QueryNodeRequest) (*QueryNodeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryNode not implemented") +} +func (*UnimplementedQueryServiceServer) QueryParams(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryParams not implemented") +} + +func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { + s.RegisterService(&_QueryService_serviceDesc, srv) +} + +func _QueryService_QueryNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryNodesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryNodes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.node.v1.QueryService/QueryNodes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryNodes(ctx, req.(*QueryNodesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QueryNodesForProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryNodesForProviderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryNodesForProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.node.v1.QueryService/QueryNodesForProvider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryNodesForProvider(ctx, req.(*QueryNodesForProviderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QueryNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryNodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryNode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.node.v1.QueryService/QueryNode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryNode(ctx, req.(*QueryNodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QueryParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.node.v1.QueryService/QueryParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryParams(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _QueryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "sentinel.node.v1.QueryService", + HandlerType: (*QueryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QueryNodes", + Handler: _QueryService_QueryNodes_Handler, + }, + { + MethodName: "QueryNodesForProvider", + Handler: _QueryService_QueryNodesForProvider_Handler, + }, + { + MethodName: "QueryNode", + Handler: _QueryService_QueryNode_Handler, + }, + { + MethodName: "QueryParams", + Handler: _QueryService_QueryParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sentinel/node/v1/querier.proto", +} + +func (m *QueryNodesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryNodesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNodesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Status != 0 { + i = encodeVarintQuerier(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryNodesForProviderRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryNodesForProviderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNodesForProviderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Status != 0 { + i = encodeVarintQuerier(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x10 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuerier(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryNodeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryNodeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuerier(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryNodesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryNodesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNodesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Nodes) > 0 { + for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Nodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryNodesForProviderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryNodesForProviderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNodesForProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Nodes) > 0 { + for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Nodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryNodeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryNodeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Node.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuerier(dAtA []byte, offset int, v uint64) int { + offset -= sovQuerier(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryNodesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != 0 { + n += 1 + sovQuerier(uint64(m.Status)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryNodesForProviderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuerier(uint64(l)) + } + if m.Status != 0 { + n += 1 + sovQuerier(uint64(m.Status)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryNodeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryNodesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Nodes) > 0 { + for _, e := range m.Nodes { + l = e.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryNodesForProviderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Nodes) > 0 { + for _, e := range m.Nodes { + l = e.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryNodeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Node.Size() + n += 1 + l + sovQuerier(uint64(l)) + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuerier(uint64(l)) + return n +} + +func sovQuerier(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuerier(x uint64) (n int) { + return sovQuerier(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryNodesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryNodesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNodesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryNodesForProviderRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryNodesForProviderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNodesForProviderRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryNodeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryNodeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNodeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryNodesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryNodesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNodesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nodes = append(m.Nodes, Node{}) + if err := m.Nodes[len(m.Nodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryNodesForProviderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryNodesForProviderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNodesForProviderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nodes = append(m.Nodes, Node{}) + if err := m.Nodes[len(m.Nodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryNodeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryNodeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNodeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuerier(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuerier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuerier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuerier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuerier + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuerier + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuerier + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuerier = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuerier = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuerier = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/node/types/v1/querier.pb.gw.go b/x/node/types/v1/querier.pb.gw.go new file mode 100644 index 00000000..a1ccc465 --- /dev/null +++ b/x/node/types/v1/querier.pb.gw.go @@ -0,0 +1,456 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: sentinel/node/v1/querier.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_QueryService_QueryNodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_QueryService_QueryNodes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNodesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QueryNodes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QueryNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QueryNodes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNodesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QueryNodes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QueryNodes(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_QueryService_QueryNodesForProvider_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_QueryService_QueryNodesForProvider_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNodesForProviderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QueryNodesForProvider_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QueryNodesForProvider(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QueryNodesForProvider_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNodesForProviderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QueryNodesForProvider_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QueryNodesForProvider(ctx, &protoReq) + return msg, metadata, err + +} + +func request_QueryService_QueryNode_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNodeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.QueryNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QueryNode_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNodeRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.QueryNode(ctx, &protoReq) + return msg, metadata, err + +} + +func request_QueryService_QueryParams_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.QueryParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QueryParams_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.QueryParams(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryServiceHandlerServer registers the http handlers for service QueryService to "mux". +// UnaryRPC :call QueryServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryServiceHandlerFromEndpoint instead. +func RegisterQueryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServiceServer) error { + + mux.Handle("GET", pattern_QueryService_QueryNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QueryNodes_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryNodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryNodesForProvider_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QueryNodesForProvider_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryNodesForProvider_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QueryNode_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryNode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QueryParams_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryServiceHandlerFromEndpoint is same as RegisterQueryServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryServiceHandler(ctx, mux, conn) +} + +// RegisterQueryServiceHandler registers the http handlers for service QueryService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryServiceHandlerClient(ctx, mux, NewQueryServiceClient(conn)) +} + +// RegisterQueryServiceHandlerClient registers the http handlers for service QueryService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryServiceClient" to call the correct interceptors. +func RegisterQueryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryServiceClient) error { + + mux.Handle("GET", pattern_QueryService_QueryNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QueryNodes_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryNodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryNodesForProvider_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QueryNodesForProvider_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryNodesForProvider_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QueryNode_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryNode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QueryParams_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_QueryService_QueryNodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"sentinel", "nodes"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QueryNodesForProvider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"sentinel", "providers", "address", "nodes"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QueryNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"sentinel", "nodes", "address"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QueryParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sentinel", "modules", "node", "params"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_QueryService_QueryNodes_0 = runtime.ForwardResponseMessage + + forward_QueryService_QueryNodesForProvider_0 = runtime.ForwardResponseMessage + + forward_QueryService_QueryNode_0 = runtime.ForwardResponseMessage + + forward_QueryService_QueryParams_0 = runtime.ForwardResponseMessage +) diff --git a/x/plan/types/v1/events.pb.go b/x/plan/types/v1/events.pb.go new file mode 100644 index 00000000..56f17724 --- /dev/null +++ b/x/plan/types/v1/events.pb.go @@ -0,0 +1,1039 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/plan/v1/events.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/sentinel-official/hub/v12/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type EventAdd struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty" yaml:"provider"` +} + +func (m *EventAdd) Reset() { *m = EventAdd{} } +func (m *EventAdd) String() string { return proto.CompactTextString(m) } +func (*EventAdd) ProtoMessage() {} +func (*EventAdd) Descriptor() ([]byte, []int) { + return fileDescriptor_fed806c731daf270, []int{0} +} +func (m *EventAdd) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAdd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAdd.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventAdd) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAdd.Merge(m, src) +} +func (m *EventAdd) XXX_Size() int { + return m.Size() +} +func (m *EventAdd) XXX_DiscardUnknown() { + xxx_messageInfo_EventAdd.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAdd proto.InternalMessageInfo + +type EventSetStatus struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty" yaml:"provider"` + Status types.Status `protobuf:"varint,3,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty" yaml:"status"` +} + +func (m *EventSetStatus) Reset() { *m = EventSetStatus{} } +func (m *EventSetStatus) String() string { return proto.CompactTextString(m) } +func (*EventSetStatus) ProtoMessage() {} +func (*EventSetStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_fed806c731daf270, []int{1} +} +func (m *EventSetStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSetStatus.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventSetStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSetStatus.Merge(m, src) +} +func (m *EventSetStatus) XXX_Size() int { + return m.Size() +} +func (m *EventSetStatus) XXX_DiscardUnknown() { + xxx_messageInfo_EventSetStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSetStatus proto.InternalMessageInfo + +type EventAddNode struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + Node string `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty" yaml:"node"` + Provider string `protobuf:"bytes,3,opt,name=provider,proto3" json:"provider,omitempty" yaml:"provider"` +} + +func (m *EventAddNode) Reset() { *m = EventAddNode{} } +func (m *EventAddNode) String() string { return proto.CompactTextString(m) } +func (*EventAddNode) ProtoMessage() {} +func (*EventAddNode) Descriptor() ([]byte, []int) { + return fileDescriptor_fed806c731daf270, []int{2} +} +func (m *EventAddNode) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAddNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAddNode.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventAddNode) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAddNode.Merge(m, src) +} +func (m *EventAddNode) XXX_Size() int { + return m.Size() +} +func (m *EventAddNode) XXX_DiscardUnknown() { + xxx_messageInfo_EventAddNode.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAddNode proto.InternalMessageInfo + +type EventRemoveNode struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + Node string `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty" yaml:"node"` + Provider string `protobuf:"bytes,3,opt,name=provider,proto3" json:"provider,omitempty" yaml:"provider"` +} + +func (m *EventRemoveNode) Reset() { *m = EventRemoveNode{} } +func (m *EventRemoveNode) String() string { return proto.CompactTextString(m) } +func (*EventRemoveNode) ProtoMessage() {} +func (*EventRemoveNode) Descriptor() ([]byte, []int) { + return fileDescriptor_fed806c731daf270, []int{3} +} +func (m *EventRemoveNode) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventRemoveNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventRemoveNode.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventRemoveNode) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventRemoveNode.Merge(m, src) +} +func (m *EventRemoveNode) XXX_Size() int { + return m.Size() +} +func (m *EventRemoveNode) XXX_DiscardUnknown() { + xxx_messageInfo_EventRemoveNode.DiscardUnknown(m) +} + +var xxx_messageInfo_EventRemoveNode proto.InternalMessageInfo + +func init() { + proto.RegisterType((*EventAdd)(nil), "sentinel.plan.v1.EventAdd") + proto.RegisterType((*EventSetStatus)(nil), "sentinel.plan.v1.EventSetStatus") + proto.RegisterType((*EventAddNode)(nil), "sentinel.plan.v1.EventAddNode") + proto.RegisterType((*EventRemoveNode)(nil), "sentinel.plan.v1.EventRemoveNode") +} + +func init() { proto.RegisterFile("sentinel/plan/v1/events.proto", fileDescriptor_fed806c731daf270) } + +var fileDescriptor_fed806c731daf270 = []byte{ + // 363 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x52, 0xb1, 0x6e, 0xea, 0x30, + 0x14, 0x8d, 0x01, 0x21, 0xf0, 0x7b, 0xc0, 0x7b, 0x69, 0x07, 0x8a, 0x84, 0x83, 0xdc, 0x85, 0xa5, + 0xb1, 0x42, 0x3b, 0x75, 0x6b, 0xd4, 0xae, 0x1d, 0x82, 0xd4, 0x81, 0x2d, 0x60, 0x03, 0x96, 0x42, + 0x1c, 0x11, 0x13, 0x95, 0xb9, 0x52, 0xe7, 0x7e, 0x45, 0xd5, 0x4f, 0x61, 0x64, 0xec, 0x14, 0xb5, + 0xe1, 0x0f, 0xf2, 0x05, 0x55, 0x62, 0x82, 0xd4, 0xa9, 0x1d, 0x2a, 0x75, 0xb3, 0x7c, 0xce, 0x3d, + 0xf7, 0xdc, 0xa3, 0x03, 0xbb, 0x21, 0xf3, 0x25, 0xf7, 0x99, 0x47, 0x02, 0xcf, 0xf5, 0x49, 0x64, + 0x11, 0x16, 0x31, 0x5f, 0x86, 0x66, 0xb0, 0x14, 0x52, 0xe8, 0xff, 0x0a, 0xd8, 0xcc, 0x60, 0x33, + 0xb2, 0x3a, 0xc7, 0x33, 0x31, 0x13, 0x39, 0x48, 0xb2, 0x97, 0xe2, 0x75, 0xd0, 0x41, 0x46, 0xae, + 0x03, 0x16, 0x66, 0x3a, 0xa1, 0x74, 0xe5, 0x6a, 0xaf, 0x83, 0x47, 0xb0, 0x76, 0x93, 0xe9, 0x5e, + 0x51, 0xaa, 0x77, 0x61, 0x89, 0xd3, 0x36, 0xe8, 0x81, 0x7e, 0xc5, 0x6e, 0xa4, 0xb1, 0x51, 0x5f, + 0xbb, 0x0b, 0xef, 0x12, 0x73, 0x8a, 0x9d, 0x12, 0xa7, 0x3a, 0x81, 0xb5, 0x60, 0x29, 0x22, 0x4e, + 0xd9, 0xb2, 0x5d, 0xea, 0x81, 0x7e, 0xdd, 0x3e, 0x4a, 0x63, 0xa3, 0xa5, 0x48, 0x05, 0x82, 0x9d, + 0x03, 0x09, 0x3f, 0x03, 0xd8, 0xcc, 0xc5, 0x87, 0x4c, 0x0e, 0xf3, 0xa5, 0x3f, 0xbd, 0x42, 0xbf, + 0x86, 0x55, 0x75, 0x4e, 0xbb, 0xdc, 0x03, 0xfd, 0xe6, 0xe0, 0xc4, 0x3c, 0xe4, 0x92, 0xdf, 0x6b, + 0x46, 0x96, 0xa9, 0x56, 0xdb, 0xff, 0xd3, 0xd8, 0x68, 0x28, 0x25, 0x35, 0x82, 0x9d, 0xfd, 0x2c, + 0x7e, 0x00, 0xf0, 0x6f, 0x91, 0xc2, 0xad, 0xa0, 0xec, 0x2b, 0x9b, 0xa7, 0xb0, 0xe2, 0x0b, 0xca, + 0xf6, 0x16, 0x5b, 0x69, 0x6c, 0xfc, 0x51, 0x84, 0xec, 0x17, 0x3b, 0x39, 0xf8, 0xe9, 0x96, 0xf2, + 0x77, 0xe2, 0x7a, 0x04, 0xb0, 0x95, 0xbb, 0x70, 0xd8, 0x42, 0x44, 0xec, 0xd7, 0x8c, 0xd8, 0x77, + 0x9b, 0x77, 0xa4, 0xbd, 0x24, 0x48, 0xdb, 0x24, 0x08, 0x6c, 0x13, 0x04, 0xde, 0x12, 0x04, 0x9e, + 0x76, 0x48, 0xdb, 0xee, 0x90, 0xf6, 0xba, 0x43, 0xda, 0xe8, 0x62, 0xc6, 0xe5, 0x7c, 0x35, 0x36, + 0x27, 0x62, 0x41, 0x8a, 0xc0, 0xcf, 0xc4, 0x74, 0xca, 0x27, 0xdc, 0xf5, 0xc8, 0x7c, 0x35, 0x26, + 0x91, 0x35, 0x20, 0xf7, 0xaa, 0xba, 0x45, 0xf1, 0xc6, 0xd5, 0xbc, 0x72, 0xe7, 0x1f, 0x01, 0x00, + 0x00, 0xff, 0xff, 0xac, 0x1b, 0xb6, 0x18, 0xdb, 0x02, 0x00, 0x00, +} + +func (m *EventAdd) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventAdd) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAdd) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventSetStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSetStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Status != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x18 + } + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventAddNode) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventAddNode) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAddNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x1a + } + if len(m.Node) > 0 { + i -= len(m.Node) + copy(dAtA[i:], m.Node) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Node))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventRemoveNode) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventRemoveNode) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventRemoveNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x1a + } + if len(m.Node) > 0 { + i -= len(m.Node) + copy(dAtA[i:], m.Node) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Node))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventAdd) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovEvents(uint64(m.Id)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventSetStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovEvents(uint64(m.Id)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.Status != 0 { + n += 1 + sovEvents(uint64(m.Status)) + } + return n +} + +func (m *EventAddNode) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovEvents(uint64(m.Id)) + } + l = len(m.Node) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventRemoveNode) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovEvents(uint64(m.Id)) + } + l = len(m.Node) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventAdd) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventAdd: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventAdd: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSetStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSetStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSetStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventAddNode) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventAddNode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventAddNode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Node = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventRemoveNode) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventRemoveNode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventRemoveNode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Node = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/plan/types/v1/genesis.pb.go b/x/plan/types/v1/genesis.pb.go new file mode 100644 index 00000000..7767a57e --- /dev/null +++ b/x/plan/types/v1/genesis.pb.go @@ -0,0 +1,364 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/plan/v1/genesis.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type GenesisPlan struct { + Plan Plan `protobuf:"bytes,1,opt,name=plan,proto3" json:"_,omitempty"` + Nodes []string `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"` +} + +func (m *GenesisPlan) Reset() { *m = GenesisPlan{} } +func (m *GenesisPlan) String() string { return proto.CompactTextString(m) } +func (*GenesisPlan) ProtoMessage() {} +func (*GenesisPlan) Descriptor() ([]byte, []int) { + return fileDescriptor_12352cbc0b89b5a8, []int{0} +} +func (m *GenesisPlan) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisPlan.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisPlan) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisPlan.Merge(m, src) +} +func (m *GenesisPlan) XXX_Size() int { + return m.Size() +} +func (m *GenesisPlan) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisPlan.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisPlan proto.InternalMessageInfo + +func init() { + proto.RegisterType((*GenesisPlan)(nil), "sentinel.plan.v1.GenesisPlan") +} + +func init() { proto.RegisterFile("sentinel/plan/v1/genesis.proto", fileDescriptor_12352cbc0b89b5a8) } + +var fileDescriptor_12352cbc0b89b5a8 = []byte{ + // 246 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2b, 0x4e, 0xcd, 0x2b, + 0xc9, 0xcc, 0x4b, 0xcd, 0xd1, 0x2f, 0xc8, 0x49, 0xcc, 0xd3, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, + 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xc9, 0xeb, 0x81, + 0xe4, 0xf5, 0xca, 0x0c, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x92, 0xfa, 0x20, 0x16, 0x44, + 0x9d, 0x94, 0x34, 0x86, 0x39, 0x60, 0xf5, 0x60, 0x49, 0xa5, 0x14, 0x2e, 0x6e, 0x77, 0x88, 0xa9, + 0x01, 0x39, 0x89, 0x79, 0x42, 0xf6, 0x5c, 0x2c, 0x20, 0x49, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, + 0x23, 0x31, 0x3d, 0x74, 0x2b, 0xf4, 0x40, 0xaa, 0x9c, 0x84, 0x4f, 0xdc, 0x93, 0x67, 0x78, 0x75, + 0x4f, 0x9e, 0x3b, 0x5e, 0x27, 0x3f, 0x37, 0xb3, 0x24, 0x35, 0xb7, 0xa0, 0xa4, 0x32, 0x08, 0xac, + 0x51, 0x48, 0x84, 0x8b, 0x35, 0x2f, 0x3f, 0x25, 0xb5, 0x58, 0x82, 0x49, 0x81, 0x59, 0x83, 0x33, + 0x08, 0xc2, 0x71, 0x0a, 0x3b, 0xf1, 0x50, 0x8e, 0x61, 0xc5, 0x23, 0x39, 0x86, 0x13, 0x8f, 0xe4, + 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, + 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x32, 0x49, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, + 0xce, 0xcf, 0xd5, 0x87, 0x59, 0xaa, 0x9b, 0x9f, 0x96, 0x96, 0x99, 0x9c, 0x99, 0x98, 0xa3, 0x9f, + 0x51, 0x9a, 0xa4, 0x5f, 0x66, 0x68, 0xa4, 0x5f, 0x01, 0xf1, 0x42, 0x49, 0x65, 0x41, 0x6a, 0xb1, + 0x7e, 0x99, 0x61, 0x12, 0x1b, 0xd8, 0x13, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x92, + 0x58, 0xdc, 0x2b, 0x01, 0x00, 0x00, +} + +func (m *GenesisPlan) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisPlan) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisPlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Nodes) > 0 { + for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Nodes[iNdEx]) + copy(dAtA[i:], m.Nodes[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Nodes[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Plan.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisPlan) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Plan.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.Nodes) > 0 { + for _, s := range m.Nodes { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisPlan) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisPlan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisPlan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Plan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nodes = append(m.Nodes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/plan/types/v1/msg.pb.go b/x/plan/types/v1/msg.pb.go new file mode 100644 index 00000000..e806116d --- /dev/null +++ b/x/plan/types/v1/msg.pb.go @@ -0,0 +1,1855 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/plan/v1/msg.proto + +package v1 + +import ( + context "context" + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + types1 "github.com/sentinel-official/hub/v12/types" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + _ "google.golang.org/protobuf/types/known/durationpb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgAddRequest defines the SDK message for adding a plan +type MsgAddRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Price github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=price,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"price"` + Validity time.Duration `protobuf:"bytes,3,opt,name=validity,proto3,stdduration" json:"validity"` + Bytes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=bytes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bytes"` +} + +func (m *MsgAddRequest) Reset() { *m = MsgAddRequest{} } +func (m *MsgAddRequest) String() string { return proto.CompactTextString(m) } +func (*MsgAddRequest) ProtoMessage() {} +func (*MsgAddRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_50021316f1608f72, []int{0} +} +func (m *MsgAddRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAddRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddRequest.Merge(m, src) +} +func (m *MsgAddRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgAddRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddRequest proto.InternalMessageInfo + +// MsgSetStatusRequest defines the SDK message for modifying the status of a +// plan +type MsgSetStatusRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Status types1.Status `protobuf:"varint,3,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` +} + +func (m *MsgSetStatusRequest) Reset() { *m = MsgSetStatusRequest{} } +func (m *MsgSetStatusRequest) String() string { return proto.CompactTextString(m) } +func (*MsgSetStatusRequest) ProtoMessage() {} +func (*MsgSetStatusRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_50021316f1608f72, []int{1} +} +func (m *MsgSetStatusRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetStatusRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSetStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetStatusRequest.Merge(m, src) +} +func (m *MsgSetStatusRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgSetStatusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetStatusRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetStatusRequest proto.InternalMessageInfo + +// MsgAddNodeRequest defines the SDK message for adding a node to a plan +type MsgAddNodeRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *MsgAddNodeRequest) Reset() { *m = MsgAddNodeRequest{} } +func (m *MsgAddNodeRequest) String() string { return proto.CompactTextString(m) } +func (*MsgAddNodeRequest) ProtoMessage() {} +func (*MsgAddNodeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_50021316f1608f72, []int{2} +} +func (m *MsgAddNodeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddNodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddNodeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAddNodeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddNodeRequest.Merge(m, src) +} +func (m *MsgAddNodeRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgAddNodeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddNodeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddNodeRequest proto.InternalMessageInfo + +// MsgRemoveNodeRequest defines the SDK message for removing a node from a plan +type MsgRemoveNodeRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *MsgRemoveNodeRequest) Reset() { *m = MsgRemoveNodeRequest{} } +func (m *MsgRemoveNodeRequest) String() string { return proto.CompactTextString(m) } +func (*MsgRemoveNodeRequest) ProtoMessage() {} +func (*MsgRemoveNodeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_50021316f1608f72, []int{3} +} +func (m *MsgRemoveNodeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemoveNodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemoveNodeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRemoveNodeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveNodeRequest.Merge(m, src) +} +func (m *MsgRemoveNodeRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgRemoveNodeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveNodeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemoveNodeRequest proto.InternalMessageInfo + +// MsgAddResponse defines the response of message MsgRegisterRequest +type MsgAddResponse struct { +} + +func (m *MsgAddResponse) Reset() { *m = MsgAddResponse{} } +func (m *MsgAddResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAddResponse) ProtoMessage() {} +func (*MsgAddResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_50021316f1608f72, []int{4} +} +func (m *MsgAddResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAddResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddResponse.Merge(m, src) +} +func (m *MsgAddResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAddResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddResponse proto.InternalMessageInfo + +// MsgSetStatusResponse defines the response of message MsgSetStatusRequest +type MsgSetStatusResponse struct { +} + +func (m *MsgSetStatusResponse) Reset() { *m = MsgSetStatusResponse{} } +func (m *MsgSetStatusResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSetStatusResponse) ProtoMessage() {} +func (*MsgSetStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_50021316f1608f72, []int{5} +} +func (m *MsgSetStatusResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetStatusResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSetStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetStatusResponse.Merge(m, src) +} +func (m *MsgSetStatusResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSetStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetStatusResponse proto.InternalMessageInfo + +// MsgAddNodeResponse defines the response of message MsgAddNodeRequest +type MsgAddNodeResponse struct { +} + +func (m *MsgAddNodeResponse) Reset() { *m = MsgAddNodeResponse{} } +func (m *MsgAddNodeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAddNodeResponse) ProtoMessage() {} +func (*MsgAddNodeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_50021316f1608f72, []int{6} +} +func (m *MsgAddNodeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddNodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddNodeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAddNodeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddNodeResponse.Merge(m, src) +} +func (m *MsgAddNodeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAddNodeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddNodeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddNodeResponse proto.InternalMessageInfo + +// MsgRemoveNodeResponse defines the response of message MsgRemoveNodeRequest +type MsgRemoveNodeResponse struct { +} + +func (m *MsgRemoveNodeResponse) Reset() { *m = MsgRemoveNodeResponse{} } +func (m *MsgRemoveNodeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRemoveNodeResponse) ProtoMessage() {} +func (*MsgRemoveNodeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_50021316f1608f72, []int{7} +} +func (m *MsgRemoveNodeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRemoveNodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRemoveNodeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRemoveNodeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRemoveNodeResponse.Merge(m, src) +} +func (m *MsgRemoveNodeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRemoveNodeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRemoveNodeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRemoveNodeResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgAddRequest)(nil), "sentinel.plan.v1.MsgAddRequest") + proto.RegisterType((*MsgSetStatusRequest)(nil), "sentinel.plan.v1.MsgSetStatusRequest") + proto.RegisterType((*MsgAddNodeRequest)(nil), "sentinel.plan.v1.MsgAddNodeRequest") + proto.RegisterType((*MsgRemoveNodeRequest)(nil), "sentinel.plan.v1.MsgRemoveNodeRequest") + proto.RegisterType((*MsgAddResponse)(nil), "sentinel.plan.v1.MsgAddResponse") + proto.RegisterType((*MsgSetStatusResponse)(nil), "sentinel.plan.v1.MsgSetStatusResponse") + proto.RegisterType((*MsgAddNodeResponse)(nil), "sentinel.plan.v1.MsgAddNodeResponse") + proto.RegisterType((*MsgRemoveNodeResponse)(nil), "sentinel.plan.v1.MsgRemoveNodeResponse") +} + +func init() { proto.RegisterFile("sentinel/plan/v1/msg.proto", fileDescriptor_50021316f1608f72) } + +var fileDescriptor_50021316f1608f72 = []byte{ + // 583 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xcf, 0x8e, 0xd3, 0x3e, + 0x10, 0xc7, 0x93, 0xec, 0x9f, 0xdf, 0xae, 0x7f, 0x50, 0x2d, 0xa6, 0x40, 0x36, 0x87, 0xb4, 0x2a, + 0xb0, 0xf4, 0xb2, 0x36, 0x29, 0xdc, 0x11, 0x65, 0x2f, 0x08, 0x15, 0x89, 0x2c, 0x02, 0x09, 0x09, + 0x89, 0xa4, 0x71, 0xb3, 0x16, 0x69, 0x5c, 0x62, 0x27, 0xa2, 0x0f, 0x81, 0xc4, 0x91, 0x47, 0x40, + 0x3c, 0x49, 0x8f, 0x7b, 0x44, 0x1c, 0x76, 0xa1, 0x7d, 0x04, 0x5e, 0x00, 0xc5, 0x76, 0x4a, 0x29, + 0xfb, 0x07, 0x24, 0x4e, 0x71, 0xec, 0x99, 0xef, 0x7c, 0x66, 0xc6, 0x63, 0xe0, 0x70, 0x92, 0x0a, + 0x9a, 0x92, 0x04, 0x8f, 0x92, 0x20, 0xc5, 0x85, 0x87, 0x87, 0x3c, 0x46, 0xa3, 0x8c, 0x09, 0x06, + 0xb7, 0xaa, 0x33, 0x54, 0x9e, 0xa1, 0xc2, 0x73, 0xdc, 0x3e, 0xe3, 0x43, 0xc6, 0x71, 0x18, 0x70, + 0x82, 0x0b, 0x2f, 0x24, 0x22, 0xf0, 0x70, 0x9f, 0xd1, 0x54, 0x79, 0x38, 0xf5, 0x98, 0xc5, 0x4c, + 0x2e, 0x71, 0xb9, 0xd2, 0xbb, 0x6e, 0xcc, 0x58, 0x9c, 0x10, 0x2c, 0xff, 0xc2, 0x7c, 0x80, 0xa3, + 0x3c, 0x0b, 0x04, 0x65, 0x95, 0x97, 0x3b, 0x67, 0x10, 0xe3, 0x11, 0xe1, 0x25, 0x04, 0x17, 0x81, + 0xc8, 0xb9, 0x3a, 0x6f, 0xbd, 0xb3, 0xc0, 0xc5, 0x1e, 0x8f, 0xef, 0x47, 0x91, 0x4f, 0xde, 0xe4, + 0x84, 0x0b, 0x08, 0xc1, 0xea, 0x20, 0x63, 0x43, 0xdb, 0x6c, 0x9a, 0xed, 0x4d, 0x5f, 0xae, 0x61, + 0x00, 0xd6, 0x46, 0x19, 0xed, 0x13, 0xdb, 0x6a, 0xae, 0xb4, 0xff, 0xef, 0x6c, 0x23, 0xc5, 0x8a, + 0x4a, 0x56, 0xa4, 0x59, 0xd1, 0x03, 0x46, 0xd3, 0xee, 0xed, 0xc9, 0x51, 0xc3, 0xf8, 0x74, 0xdc, + 0x68, 0xc7, 0x54, 0x1c, 0xe4, 0x21, 0xea, 0xb3, 0x21, 0xd6, 0x89, 0xa9, 0xcf, 0x2e, 0x8f, 0x5e, + 0x2b, 0x16, 0xe9, 0xc0, 0x7d, 0xa5, 0x0c, 0xef, 0x81, 0x8d, 0x22, 0x48, 0x68, 0x44, 0xc5, 0xd8, + 0x5e, 0x69, 0x9a, 0x32, 0x8a, 0xca, 0x0d, 0x55, 0xb9, 0xa1, 0x3d, 0x9d, 0x5b, 0x77, 0xa3, 0x8c, + 0xf2, 0xe1, 0xb8, 0x61, 0xfa, 0x73, 0x27, 0xb8, 0x07, 0xd6, 0xc2, 0xb1, 0x20, 0xdc, 0x5e, 0x2d, + 0xc1, 0xbb, 0xa8, 0x34, 0xf9, 0x72, 0xd4, 0xd8, 0xf9, 0x03, 0x90, 0x87, 0xa9, 0xf0, 0x95, 0x73, + 0x2b, 0x01, 0x97, 0x7b, 0x3c, 0xde, 0x27, 0x62, 0x5f, 0x56, 0xe9, 0xac, 0xa2, 0xd4, 0x80, 0x45, + 0x23, 0xdb, 0x6a, 0x9a, 0xed, 0x55, 0xdf, 0xa2, 0x11, 0xf4, 0xc0, 0xba, 0x2a, 0xad, 0xe4, 0xaf, + 0x75, 0xb6, 0xd1, 0xbc, 0xc7, 0x2a, 0x4c, 0xe1, 0x21, 0xad, 0xaa, 0x0d, 0x5b, 0x4f, 0xc0, 0x25, + 0x55, 0xfc, 0xc7, 0x2c, 0x22, 0x7f, 0x13, 0xcb, 0x06, 0xff, 0x05, 0x51, 0x94, 0x11, 0xae, 0x82, + 0x6d, 0xfa, 0xd5, 0x6f, 0xeb, 0x29, 0xa8, 0xf7, 0x78, 0xec, 0x93, 0x21, 0x2b, 0xc8, 0xbf, 0x53, + 0xdd, 0x02, 0xb5, 0xea, 0x96, 0xf0, 0x11, 0x4b, 0x39, 0x69, 0x5d, 0x95, 0x71, 0x16, 0x0a, 0xa5, + 0xf7, 0xeb, 0x00, 0x2e, 0xa6, 0xa4, 0x77, 0xaf, 0x81, 0x2b, 0x4b, 0x54, 0xea, 0xa0, 0xf3, 0xdd, + 0x02, 0x40, 0xea, 0x64, 0x45, 0x79, 0x0b, 0x1e, 0x81, 0x75, 0xe5, 0x0d, 0x1b, 0x68, 0x79, 0x42, + 0xd0, 0x2f, 0xf7, 0xd4, 0x69, 0x9e, 0x6e, 0xa0, 0xb4, 0xe1, 0x4b, 0x70, 0x61, 0x11, 0x11, 0xde, + 0x3c, 0xd1, 0x63, 0xb9, 0xd7, 0xce, 0xce, 0x79, 0x66, 0x5a, 0xfe, 0xb9, 0x24, 0xd7, 0x99, 0xc2, + 0xeb, 0xa7, 0xe1, 0x2c, 0x34, 0xc1, 0xb9, 0x71, 0xb6, 0x91, 0x16, 0x7e, 0x25, 0x47, 0xf2, 0x67, + 0xb1, 0xe0, 0xc9, 0x44, 0xbf, 0xf5, 0xd8, 0xb9, 0x75, 0xae, 0x9d, 0x8a, 0xd0, 0x7d, 0x36, 0xf9, + 0xe6, 0x1a, 0x1f, 0xa7, 0xae, 0x31, 0x99, 0xba, 0xe6, 0xe1, 0xd4, 0x35, 0xbf, 0x4e, 0x5d, 0xf3, + 0xfd, 0xcc, 0x35, 0x0e, 0x67, 0xae, 0xf1, 0x79, 0xe6, 0x1a, 0x2f, 0xee, 0x2e, 0x8c, 0x4d, 0x25, + 0xba, 0xcb, 0x06, 0x03, 0xda, 0xa7, 0x41, 0x82, 0x0f, 0xf2, 0x10, 0x17, 0x5e, 0x07, 0xbf, 0x55, + 0x2f, 0x5b, 0xf5, 0xb4, 0x84, 0xeb, 0x72, 0x54, 0xef, 0xfc, 0x08, 0x00, 0x00, 0xff, 0xff, 0x12, + 0xa4, 0x94, 0x42, 0xfa, 0x04, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgServiceClient is the client API for MsgService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgServiceClient interface { + MsgAdd(ctx context.Context, in *MsgAddRequest, opts ...grpc.CallOption) (*MsgAddResponse, error) + MsgSetStatus(ctx context.Context, in *MsgSetStatusRequest, opts ...grpc.CallOption) (*MsgSetStatusResponse, error) + MsgAddNode(ctx context.Context, in *MsgAddNodeRequest, opts ...grpc.CallOption) (*MsgAddNodeResponse, error) + MsgRemoveNode(ctx context.Context, in *MsgRemoveNodeRequest, opts ...grpc.CallOption) (*MsgRemoveNodeResponse, error) +} + +type msgServiceClient struct { + cc grpc1.ClientConn +} + +func NewMsgServiceClient(cc grpc1.ClientConn) MsgServiceClient { + return &msgServiceClient{cc} +} + +func (c *msgServiceClient) MsgAdd(ctx context.Context, in *MsgAddRequest, opts ...grpc.CallOption) (*MsgAddResponse, error) { + out := new(MsgAddResponse) + err := c.cc.Invoke(ctx, "/sentinel.plan.v1.MsgService/MsgAdd", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgServiceClient) MsgSetStatus(ctx context.Context, in *MsgSetStatusRequest, opts ...grpc.CallOption) (*MsgSetStatusResponse, error) { + out := new(MsgSetStatusResponse) + err := c.cc.Invoke(ctx, "/sentinel.plan.v1.MsgService/MsgSetStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgServiceClient) MsgAddNode(ctx context.Context, in *MsgAddNodeRequest, opts ...grpc.CallOption) (*MsgAddNodeResponse, error) { + out := new(MsgAddNodeResponse) + err := c.cc.Invoke(ctx, "/sentinel.plan.v1.MsgService/MsgAddNode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgServiceClient) MsgRemoveNode(ctx context.Context, in *MsgRemoveNodeRequest, opts ...grpc.CallOption) (*MsgRemoveNodeResponse, error) { + out := new(MsgRemoveNodeResponse) + err := c.cc.Invoke(ctx, "/sentinel.plan.v1.MsgService/MsgRemoveNode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServiceServer is the server API for MsgService service. +type MsgServiceServer interface { + MsgAdd(context.Context, *MsgAddRequest) (*MsgAddResponse, error) + MsgSetStatus(context.Context, *MsgSetStatusRequest) (*MsgSetStatusResponse, error) + MsgAddNode(context.Context, *MsgAddNodeRequest) (*MsgAddNodeResponse, error) + MsgRemoveNode(context.Context, *MsgRemoveNodeRequest) (*MsgRemoveNodeResponse, error) +} + +// UnimplementedMsgServiceServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServiceServer struct { +} + +func (*UnimplementedMsgServiceServer) MsgAdd(ctx context.Context, req *MsgAddRequest) (*MsgAddResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgAdd not implemented") +} +func (*UnimplementedMsgServiceServer) MsgSetStatus(ctx context.Context, req *MsgSetStatusRequest) (*MsgSetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgSetStatus not implemented") +} +func (*UnimplementedMsgServiceServer) MsgAddNode(ctx context.Context, req *MsgAddNodeRequest) (*MsgAddNodeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgAddNode not implemented") +} +func (*UnimplementedMsgServiceServer) MsgRemoveNode(ctx context.Context, req *MsgRemoveNodeRequest) (*MsgRemoveNodeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgRemoveNode not implemented") +} + +func RegisterMsgServiceServer(s grpc1.Server, srv MsgServiceServer) { + s.RegisterService(&_MsgService_serviceDesc, srv) +} + +func _MsgService_MsgAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAddRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgAdd(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.plan.v1.MsgService/MsgAdd", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgAdd(ctx, req.(*MsgAddRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MsgService_MsgSetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgSetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.plan.v1.MsgService/MsgSetStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgSetStatus(ctx, req.(*MsgSetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MsgService_MsgAddNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAddNodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgAddNode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.plan.v1.MsgService/MsgAddNode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgAddNode(ctx, req.(*MsgAddNodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MsgService_MsgRemoveNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRemoveNodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgRemoveNode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.plan.v1.MsgService/MsgRemoveNode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgRemoveNode(ctx, req.(*MsgRemoveNodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _MsgService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "sentinel.plan.v1.MsgService", + HandlerType: (*MsgServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "MsgAdd", + Handler: _MsgService_MsgAdd_Handler, + }, + { + MethodName: "MsgSetStatus", + Handler: _MsgService_MsgSetStatus_Handler, + }, + { + MethodName: "MsgAddNode", + Handler: _MsgService_MsgAddNode_Handler, + }, + { + MethodName: "MsgRemoveNode", + Handler: _MsgService_MsgRemoveNode_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sentinel/plan/v1/msg.proto", +} + +func (m *MsgAddRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Bytes.Size() + i -= size + if _, err := m.Bytes.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.Validity, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Validity):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintMsg(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x1a + if len(m.Price) > 0 { + for iNdEx := len(m.Price) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Price[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSetStatusRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSetStatusRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Status != 0 { + i = encodeVarintMsg(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x18 + } + if m.Id != 0 { + i = encodeVarintMsg(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAddNodeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddNodeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddNodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x1a + } + if m.Id != 0 { + i = encodeVarintMsg(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRemoveNodeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRemoveNodeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveNodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x1a + } + if m.Id != 0 { + i = encodeVarintMsg(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAddResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSetStatusResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSetStatusResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgAddNodeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddNodeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddNodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgRemoveNodeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRemoveNodeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRemoveNodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintMsg(dAtA []byte, offset int, v uint64) int { + offset -= sovMsg(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgAddRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if len(m.Price) > 0 { + for _, e := range m.Price { + l = e.Size() + n += 1 + l + sovMsg(uint64(l)) + } + } + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Validity) + n += 1 + l + sovMsg(uint64(l)) + l = m.Bytes.Size() + n += 1 + l + sovMsg(uint64(l)) + return n +} + +func (m *MsgSetStatusRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if m.Id != 0 { + n += 1 + sovMsg(uint64(m.Id)) + } + if m.Status != 0 { + n += 1 + sovMsg(uint64(m.Status)) + } + return n +} + +func (m *MsgAddNodeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if m.Id != 0 { + n += 1 + sovMsg(uint64(m.Id)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + return n +} + +func (m *MsgRemoveNodeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if m.Id != 0 { + n += 1 + sovMsg(uint64(m.Id)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + return n +} + +func (m *MsgAddResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSetStatusResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgAddNodeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgRemoveNodeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovMsg(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMsg(x uint64) (n int) { + return sovMsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgAddRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Price = append(m.Price, types.Coin{}) + if err := m.Price[len(m.Price)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.Validity, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Bytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSetStatusRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetStatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types1.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddNodeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddNodeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddNodeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRemoveNodeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRemoveNodeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRemoveNodeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSetStatusResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetStatusResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddNodeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddNodeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddNodeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRemoveNodeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRemoveNodeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRemoveNodeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMsg(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMsg + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMsg + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMsg + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMsg + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMsg + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMsg + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMsg = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/plan/types/v1/params.pb.go b/x/plan/types/v1/params.pb.go new file mode 100644 index 00000000..4f9e9c3c --- /dev/null +++ b/x/plan/types/v1/params.pb.go @@ -0,0 +1,36 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/plan/v1/params.proto + +package v1 + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func init() { proto.RegisterFile("sentinel/plan/v1/params.proto", fileDescriptor_74763228d612bdc7) } + +var fileDescriptor_74763228d612bdc7 = []byte{ + // 142 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2d, 0x4e, 0xcd, 0x2b, + 0xc9, 0xcc, 0x4b, 0xcd, 0xd1, 0x2f, 0xc8, 0x49, 0xcc, 0xd3, 0x2f, 0x33, 0xd4, 0x2f, 0x48, 0x2c, + 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0x49, 0xeb, 0x81, 0xa4, + 0xf5, 0xca, 0x0c, 0x9d, 0xfc, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, + 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, + 0x24, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0xa6, 0x4d, 0x37, 0x3f, + 0x2d, 0x2d, 0x33, 0x39, 0x33, 0x31, 0x47, 0x3f, 0xa3, 0x34, 0x49, 0xbf, 0xcc, 0xd0, 0x48, 0xbf, + 0x02, 0x62, 0x51, 0x49, 0x65, 0x41, 0x6a, 0xb1, 0x7e, 0x99, 0x61, 0x12, 0x1b, 0xd8, 0x22, 0x63, + 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x80, 0xc9, 0xd6, 0x66, 0x89, 0x00, 0x00, 0x00, +} diff --git a/x/plan/types/v1/plan.pb.go b/x/plan/types/v1/plan.pb.go new file mode 100644 index 00000000..8460bb44 --- /dev/null +++ b/x/plan/types/v1/plan.pb.go @@ -0,0 +1,580 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/plan/v1/plan.proto + +package v1 + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + types1 "github.com/sentinel-official/hub/v12/types" + _ "google.golang.org/protobuf/types/known/durationpb" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Plan struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"` + Price github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=price,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"price"` + Validity time.Duration `protobuf:"bytes,4,opt,name=validity,proto3,stdduration" json:"validity"` + Bytes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=bytes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bytes"` + Status types1.Status `protobuf:"varint,6,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + StatusAt time.Time `protobuf:"bytes,7,opt,name=status_at,json=statusAt,proto3,stdtime" json:"status_at"` +} + +func (m *Plan) Reset() { *m = Plan{} } +func (m *Plan) String() string { return proto.CompactTextString(m) } +func (*Plan) ProtoMessage() {} +func (*Plan) Descriptor() ([]byte, []int) { + return fileDescriptor_b21366ce9b6e0371, []int{0} +} +func (m *Plan) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Plan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Plan.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Plan) XXX_Merge(src proto.Message) { + xxx_messageInfo_Plan.Merge(m, src) +} +func (m *Plan) XXX_Size() int { + return m.Size() +} +func (m *Plan) XXX_DiscardUnknown() { + xxx_messageInfo_Plan.DiscardUnknown(m) +} + +var xxx_messageInfo_Plan proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Plan)(nil), "sentinel.plan.v1.Plan") +} + +func init() { proto.RegisterFile("sentinel/plan/v1/plan.proto", fileDescriptor_b21366ce9b6e0371) } + +var fileDescriptor_b21366ce9b6e0371 = []byte{ + // 442 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbf, 0x8e, 0xd4, 0x30, + 0x10, 0xc6, 0xe3, 0xfd, 0xc7, 0x9e, 0x91, 0x4e, 0xc8, 0xa2, 0xc8, 0x2d, 0x92, 0x13, 0x51, 0xa0, + 0x34, 0x67, 0x93, 0x85, 0x1e, 0xdd, 0x72, 0x0d, 0x1d, 0x0a, 0x88, 0x82, 0x06, 0x39, 0x89, 0x37, + 0x67, 0x91, 0x8d, 0xa3, 0xd8, 0x89, 0xd8, 0xb7, 0x38, 0x51, 0xf1, 0x08, 0x88, 0x27, 0xd9, 0xf2, + 0x4a, 0x44, 0x71, 0x07, 0xd9, 0x17, 0x41, 0xb1, 0x93, 0x08, 0x41, 0x43, 0x95, 0xb1, 0x67, 0x3e, + 0xcf, 0xef, 0x9b, 0x09, 0x7c, 0xa4, 0x78, 0xa1, 0x45, 0xc1, 0x73, 0x5a, 0xe6, 0xac, 0xa0, 0x4d, + 0x68, 0xbe, 0xa4, 0xac, 0xa4, 0x96, 0xe8, 0xc1, 0x90, 0x24, 0xe6, 0xb2, 0x09, 0x57, 0x38, 0x91, + 0x6a, 0x27, 0x15, 0x8d, 0x99, 0xe2, 0xb4, 0x09, 0x63, 0xae, 0x59, 0x48, 0x13, 0x29, 0x7a, 0xc5, + 0xea, 0x61, 0x26, 0x33, 0x69, 0x42, 0xda, 0x45, 0xfd, 0x2d, 0xce, 0xa4, 0xcc, 0x72, 0x4e, 0xcd, + 0x29, 0xae, 0xb7, 0x34, 0xad, 0x2b, 0xa6, 0x85, 0x1c, 0x54, 0xde, 0xdf, 0x79, 0x2d, 0x76, 0x5c, + 0x69, 0xb6, 0x2b, 0x87, 0x07, 0x46, 0x4a, 0xbd, 0x2f, 0xb9, 0xea, 0x30, 0x95, 0x66, 0xba, 0x56, + 0x36, 0xff, 0xf8, 0xf3, 0x14, 0xce, 0x5e, 0xe7, 0xac, 0x40, 0xa7, 0x70, 0x22, 0x52, 0x17, 0xf8, + 0x20, 0x98, 0x45, 0x13, 0x91, 0xa2, 0x15, 0x5c, 0x96, 0x95, 0x6c, 0x44, 0xca, 0x2b, 0x77, 0xe2, + 0x83, 0xe0, 0x24, 0x1a, 0xcf, 0x88, 0xc1, 0x79, 0x59, 0x89, 0x84, 0xbb, 0x53, 0x7f, 0x1a, 0xdc, + 0x5f, 0x9f, 0x11, 0xeb, 0x8d, 0x74, 0xde, 0x48, 0xef, 0x8d, 0xbc, 0x94, 0xa2, 0xd8, 0x3c, 0x3d, + 0xdc, 0x7a, 0xce, 0xb7, 0x3b, 0x2f, 0xc8, 0x84, 0xbe, 0xaa, 0x63, 0x92, 0xc8, 0x1d, 0xed, 0x07, + 0x61, 0x3f, 0xe7, 0x2a, 0xfd, 0x68, 0xd1, 0x8c, 0x40, 0x45, 0xf6, 0x65, 0xf4, 0x02, 0x2e, 0x1b, + 0x96, 0x8b, 0x54, 0xe8, 0xbd, 0x3b, 0xf3, 0x81, 0xe9, 0x62, 0xbd, 0x92, 0xc1, 0x2b, 0xb9, 0xec, + 0x67, 0xb1, 0x59, 0x76, 0x5d, 0xbe, 0xdc, 0x79, 0x20, 0x1a, 0x45, 0xe8, 0x12, 0xce, 0xe3, 0xbd, + 0xe6, 0xca, 0x9d, 0x77, 0xf0, 0x1b, 0xd2, 0x95, 0xfc, 0xb8, 0xf5, 0x9e, 0xfc, 0x07, 0xc8, 0xab, + 0x42, 0x47, 0x56, 0x8c, 0x42, 0xb8, 0xb0, 0xe3, 0x72, 0x17, 0x3e, 0x08, 0x4e, 0xd7, 0x67, 0x64, + 0x5c, 0xac, 0xad, 0x6d, 0x42, 0xf2, 0xc6, 0x14, 0x44, 0x7d, 0x21, 0xba, 0x80, 0x27, 0x36, 0xfa, + 0xc0, 0xb4, 0x7b, 0xcf, 0xa0, 0xaf, 0xfe, 0x41, 0x7f, 0x3b, 0xac, 0xc9, 0xb2, 0x5f, 0x1b, 0x76, + 0x2b, 0xbb, 0xd0, 0x9b, 0x77, 0x87, 0x5f, 0xd8, 0xf9, 0xda, 0x62, 0xe7, 0xd0, 0x62, 0x70, 0xd3, + 0x62, 0xf0, 0xb3, 0xc5, 0xe0, 0xfa, 0x88, 0x9d, 0x9b, 0x23, 0x76, 0xbe, 0x1f, 0xb1, 0xf3, 0xfe, + 0xf9, 0x1f, 0x36, 0x06, 0xa2, 0x73, 0xb9, 0xdd, 0x8a, 0x44, 0xb0, 0x9c, 0x5e, 0xd5, 0x31, 0x6d, + 0xc2, 0x35, 0xfd, 0x64, 0x7f, 0xcd, 0x61, 0xf3, 0xf1, 0xc2, 0xf4, 0x7f, 0xf6, 0x3b, 0x00, 0x00, + 0xff, 0xff, 0x5b, 0x89, 0xac, 0x16, 0xbb, 0x02, 0x00, 0x00, +} + +func (m *Plan) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Plan) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Plan) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StatusAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StatusAt):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintPlan(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x3a + if m.Status != 0 { + i = encodeVarintPlan(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x30 + } + { + size := m.Bytes.Size() + i -= size + if _, err := m.Bytes.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPlan(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.Validity, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Validity):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintPlan(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x22 + if len(m.Price) > 0 { + for iNdEx := len(m.Price) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Price[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlan(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Provider) > 0 { + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintPlan(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintPlan(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintPlan(dAtA []byte, offset int, v uint64) int { + offset -= sovPlan(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Plan) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovPlan(uint64(m.Id)) + } + l = len(m.Provider) + if l > 0 { + n += 1 + l + sovPlan(uint64(l)) + } + if len(m.Price) > 0 { + for _, e := range m.Price { + l = e.Size() + n += 1 + l + sovPlan(uint64(l)) + } + } + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Validity) + n += 1 + l + sovPlan(uint64(l)) + l = m.Bytes.Size() + n += 1 + l + sovPlan(uint64(l)) + if m.Status != 0 { + n += 1 + sovPlan(uint64(m.Status)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StatusAt) + n += 1 + l + sovPlan(uint64(l)) + return n +} + +func sovPlan(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozPlan(x uint64) (n int) { + return sovPlan(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Plan) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Plan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Plan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlan + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlan + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Provider = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPlan + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlan + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Price = append(m.Price, types.Coin{}) + if err := m.Price[len(m.Price)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPlan + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlan + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.Validity, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlan + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlan + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Bytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types1.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StatusAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPlan + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlan + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StatusAt, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPlan(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPlan + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipPlan(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPlan + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPlan + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPlan + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthPlan + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPlan + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthPlan + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthPlan = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPlan = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPlan = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/plan/types/v1/querier.pb.go b/x/plan/types/v1/querier.pb.go new file mode 100644 index 00000000..32993658 --- /dev/null +++ b/x/plan/types/v1/querier.pb.go @@ -0,0 +1,2010 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/plan/v1/querier.proto + +package v1 + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/sentinel-official/hub/v12/types" + v1 "github.com/sentinel-official/hub/v12/x/node/types/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type QueryPlansRequest struct { + Status types.Status `protobuf:"varint,1,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPlansRequest) Reset() { *m = QueryPlansRequest{} } +func (m *QueryPlansRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPlansRequest) ProtoMessage() {} +func (*QueryPlansRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_63578d2f68a06f20, []int{0} +} +func (m *QueryPlansRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPlansRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPlansRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPlansRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPlansRequest.Merge(m, src) +} +func (m *QueryPlansRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPlansRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPlansRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPlansRequest proto.InternalMessageInfo + +type QueryPlansForProviderRequest struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Status types.Status `protobuf:"varint,2,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPlansForProviderRequest) Reset() { *m = QueryPlansForProviderRequest{} } +func (m *QueryPlansForProviderRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPlansForProviderRequest) ProtoMessage() {} +func (*QueryPlansForProviderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_63578d2f68a06f20, []int{1} +} +func (m *QueryPlansForProviderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPlansForProviderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPlansForProviderRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPlansForProviderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPlansForProviderRequest.Merge(m, src) +} +func (m *QueryPlansForProviderRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPlansForProviderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPlansForProviderRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPlansForProviderRequest proto.InternalMessageInfo + +type QueryPlanRequest struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QueryPlanRequest) Reset() { *m = QueryPlanRequest{} } +func (m *QueryPlanRequest) String() string { return proto.CompactTextString(m) } +func (*QueryPlanRequest) ProtoMessage() {} +func (*QueryPlanRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_63578d2f68a06f20, []int{2} +} +func (m *QueryPlanRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPlanRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPlanRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPlanRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPlanRequest.Merge(m, src) +} +func (m *QueryPlanRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryPlanRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPlanRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPlanRequest proto.InternalMessageInfo + +type QueryNodesForPlanRequest struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryNodesForPlanRequest) Reset() { *m = QueryNodesForPlanRequest{} } +func (m *QueryNodesForPlanRequest) String() string { return proto.CompactTextString(m) } +func (*QueryNodesForPlanRequest) ProtoMessage() {} +func (*QueryNodesForPlanRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_63578d2f68a06f20, []int{3} +} +func (m *QueryNodesForPlanRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNodesForPlanRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNodesForPlanRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryNodesForPlanRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNodesForPlanRequest.Merge(m, src) +} +func (m *QueryNodesForPlanRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryNodesForPlanRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNodesForPlanRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNodesForPlanRequest proto.InternalMessageInfo + +type QueryPlansResponse struct { + Plans []Plan `protobuf:"bytes,1,rep,name=plans,proto3" json:"plans"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPlansResponse) Reset() { *m = QueryPlansResponse{} } +func (m *QueryPlansResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPlansResponse) ProtoMessage() {} +func (*QueryPlansResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_63578d2f68a06f20, []int{4} +} +func (m *QueryPlansResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPlansResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPlansResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPlansResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPlansResponse.Merge(m, src) +} +func (m *QueryPlansResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPlansResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPlansResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPlansResponse proto.InternalMessageInfo + +type QueryPlansForProviderResponse struct { + Plans []Plan `protobuf:"bytes,1,rep,name=plans,proto3" json:"plans"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryPlansForProviderResponse) Reset() { *m = QueryPlansForProviderResponse{} } +func (m *QueryPlansForProviderResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPlansForProviderResponse) ProtoMessage() {} +func (*QueryPlansForProviderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_63578d2f68a06f20, []int{5} +} +func (m *QueryPlansForProviderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPlansForProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPlansForProviderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPlansForProviderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPlansForProviderResponse.Merge(m, src) +} +func (m *QueryPlansForProviderResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPlansForProviderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPlansForProviderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPlansForProviderResponse proto.InternalMessageInfo + +type QueryPlanResponse struct { + Plan Plan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan"` +} + +func (m *QueryPlanResponse) Reset() { *m = QueryPlanResponse{} } +func (m *QueryPlanResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPlanResponse) ProtoMessage() {} +func (*QueryPlanResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_63578d2f68a06f20, []int{6} +} +func (m *QueryPlanResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPlanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPlanResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryPlanResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPlanResponse.Merge(m, src) +} +func (m *QueryPlanResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPlanResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPlanResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPlanResponse proto.InternalMessageInfo + +type QueryNodesForPlanResponse struct { + Nodes []v1.Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryNodesForPlanResponse) Reset() { *m = QueryNodesForPlanResponse{} } +func (m *QueryNodesForPlanResponse) String() string { return proto.CompactTextString(m) } +func (*QueryNodesForPlanResponse) ProtoMessage() {} +func (*QueryNodesForPlanResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_63578d2f68a06f20, []int{7} +} +func (m *QueryNodesForPlanResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNodesForPlanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNodesForPlanResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryNodesForPlanResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNodesForPlanResponse.Merge(m, src) +} +func (m *QueryNodesForPlanResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryNodesForPlanResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNodesForPlanResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNodesForPlanResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*QueryPlansRequest)(nil), "sentinel.plan.v1.QueryPlansRequest") + proto.RegisterType((*QueryPlansForProviderRequest)(nil), "sentinel.plan.v1.QueryPlansForProviderRequest") + proto.RegisterType((*QueryPlanRequest)(nil), "sentinel.plan.v1.QueryPlanRequest") + proto.RegisterType((*QueryNodesForPlanRequest)(nil), "sentinel.plan.v1.QueryNodesForPlanRequest") + proto.RegisterType((*QueryPlansResponse)(nil), "sentinel.plan.v1.QueryPlansResponse") + proto.RegisterType((*QueryPlansForProviderResponse)(nil), "sentinel.plan.v1.QueryPlansForProviderResponse") + proto.RegisterType((*QueryPlanResponse)(nil), "sentinel.plan.v1.QueryPlanResponse") + proto.RegisterType((*QueryNodesForPlanResponse)(nil), "sentinel.plan.v1.QueryNodesForPlanResponse") +} + +func init() { proto.RegisterFile("sentinel/plan/v1/querier.proto", fileDescriptor_63578d2f68a06f20) } + +var fileDescriptor_63578d2f68a06f20 = []byte{ + // 656 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x95, 0xcf, 0x4f, 0x14, 0x31, + 0x14, 0xc7, 0xb7, 0xcb, 0x8a, 0xa1, 0x18, 0x84, 0x06, 0x71, 0x59, 0xd7, 0x91, 0x0c, 0xfe, 0x20, + 0x10, 0x5b, 0x67, 0xf5, 0x2f, 0x20, 0x11, 0x6f, 0x06, 0x87, 0xc4, 0x83, 0xb7, 0xee, 0x4e, 0x19, + 0x9a, 0x2c, 0xd3, 0x61, 0x3a, 0x3b, 0x91, 0x10, 0x2e, 0xfe, 0x01, 0x06, 0xe3, 0xc5, 0x83, 0x57, + 0x13, 0x6f, 0x1e, 0xfc, 0x27, 0x38, 0x92, 0x78, 0xf1, 0x64, 0x74, 0xf1, 0x0f, 0x31, 0xed, 0x74, + 0x66, 0x07, 0x76, 0x58, 0x08, 0xe1, 0xe0, 0x69, 0xbb, 0xf3, 0xbe, 0x7d, 0xef, 0xf3, 0xde, 0x6b, + 0x5f, 0xa1, 0x25, 0x59, 0x10, 0xf3, 0x80, 0x75, 0x49, 0xd8, 0xa5, 0x01, 0x49, 0x1c, 0xb2, 0xd3, + 0x63, 0x11, 0x67, 0x11, 0x0e, 0x23, 0x11, 0x0b, 0x34, 0x9d, 0xd9, 0xb1, 0xb2, 0xe3, 0xc4, 0x69, + 0x2c, 0x77, 0x84, 0xdc, 0x16, 0x92, 0xb4, 0xa9, 0x64, 0x5a, 0xbc, 0x4b, 0x12, 0xa7, 0xcd, 0x62, + 0xea, 0x90, 0x90, 0xfa, 0x3c, 0xa0, 0x31, 0x17, 0x41, 0xba, 0xbb, 0x31, 0xeb, 0x0b, 0x5f, 0xe8, + 0x25, 0x51, 0x2b, 0xf3, 0xb5, 0xe9, 0x0b, 0xe1, 0x77, 0x19, 0xa1, 0x21, 0x27, 0x34, 0x08, 0x44, + 0xac, 0xb7, 0x48, 0x63, 0xbd, 0x93, 0x13, 0x05, 0xc2, 0x63, 0x8a, 0x48, 0xfd, 0x0e, 0x19, 0x33, + 0x5c, 0x8d, 0x95, 0x1a, 0x07, 0xb9, 0xc4, 0xbb, 0x21, 0x93, 0xca, 0x2a, 0x63, 0x1a, 0xf7, 0x8c, + 0x67, 0xfb, 0x3d, 0x80, 0x33, 0xaf, 0x14, 0xf0, 0x7a, 0x97, 0x06, 0xd2, 0x65, 0x3b, 0x3d, 0x26, + 0x63, 0xe4, 0xc0, 0xf1, 0x54, 0x55, 0x07, 0x0b, 0x60, 0x69, 0xaa, 0x35, 0x8f, 0xf3, 0x94, 0xb5, + 0x1b, 0x9c, 0x38, 0x78, 0x43, 0x0b, 0x5c, 0x23, 0x44, 0x6b, 0x10, 0x0e, 0x52, 0xad, 0x57, 0x17, + 0xc0, 0xd2, 0x64, 0xeb, 0x21, 0x4e, 0xeb, 0x82, 0x55, 0x5d, 0xb0, 0xae, 0x0b, 0x36, 0x75, 0xc1, + 0xeb, 0xd4, 0x67, 0x26, 0x9c, 0x5b, 0xd8, 0x69, 0x7f, 0x07, 0xb0, 0x39, 0x00, 0x5a, 0x13, 0xd1, + 0x7a, 0x24, 0x12, 0xee, 0xb1, 0x28, 0x63, 0xab, 0xc3, 0xeb, 0xd4, 0xf3, 0x22, 0x26, 0x53, 0xb8, + 0x09, 0x37, 0xfb, 0x5b, 0xa0, 0xae, 0x5e, 0x8e, 0x7a, 0xec, 0xd2, 0xd4, 0x36, 0x9c, 0xce, 0xa1, + 0x33, 0xd0, 0x29, 0x58, 0xe5, 0x9e, 0x66, 0xac, 0xb9, 0x55, 0xee, 0xd9, 0x11, 0xac, 0x6b, 0xcd, + 0x4b, 0xe1, 0x31, 0x9d, 0xd8, 0xd9, 0xda, 0x2b, 0xab, 0xe6, 0x07, 0x00, 0x51, 0xb1, 0xbd, 0x32, + 0x14, 0x81, 0x64, 0xa8, 0x05, 0xaf, 0xa9, 0x33, 0xa2, 0x2a, 0x38, 0xb6, 0x34, 0xd9, 0x9a, 0xc3, + 0xa7, 0x4f, 0x34, 0x56, 0xfa, 0xd5, 0xda, 0xe1, 0xaf, 0x7b, 0x15, 0x37, 0x95, 0xa2, 0x17, 0x25, + 0x48, 0x8f, 0xce, 0x45, 0x4a, 0x03, 0x9e, 0x60, 0xfa, 0x0c, 0xe0, 0xdd, 0x33, 0x3a, 0xfc, 0x3f, + 0xe0, 0x3d, 0x2f, 0x5c, 0x88, 0x9c, 0xe8, 0x09, 0xac, 0xa9, 0x30, 0xba, 0x43, 0xe7, 0x01, 0x69, + 0xa5, 0xfd, 0x09, 0xc0, 0xf9, 0x92, 0x76, 0x0f, 0x32, 0x54, 0x37, 0xb8, 0x24, 0x43, 0x7d, 0xb1, + 0x13, 0x07, 0xab, 0x6d, 0x59, 0x86, 0x5a, 0x7a, 0x65, 0x19, 0xb6, 0xbe, 0xd5, 0xe0, 0x0d, 0x8d, + 0xb6, 0xc1, 0xa2, 0x84, 0x77, 0x18, 0x0a, 0x21, 0x1c, 0x34, 0x04, 0x2d, 0x0e, 0x67, 0x37, 0x34, + 0x21, 0x1a, 0xf7, 0x47, 0x8b, 0xd2, 0xa8, 0xf6, 0xed, 0x77, 0x3f, 0xfe, 0x7e, 0xac, 0xce, 0xa0, + 0x9b, 0xe4, 0xc4, 0x8c, 0x92, 0xe8, 0x0b, 0x80, 0xb7, 0x4a, 0xcf, 0x00, 0xc2, 0xa3, 0x1c, 0x0f, + 0x8f, 0x83, 0x06, 0xb9, 0xb0, 0xde, 0x30, 0xad, 0x68, 0xa6, 0x07, 0x68, 0xb1, 0xc0, 0x64, 0x34, + 0x92, 0xec, 0x99, 0x59, 0xb2, 0x6f, 0x38, 0x23, 0x38, 0x91, 0x7b, 0x43, 0xf6, 0x88, 0x50, 0x19, + 0xce, 0xe2, 0x48, 0x8d, 0x41, 0x68, 0x6a, 0x84, 0x39, 0x34, 0x7b, 0xaa, 0x2c, 0x64, 0x8f, 0x7b, + 0xfb, 0xe8, 0x20, 0x1b, 0xc9, 0xc5, 0x93, 0x83, 0x96, 0xcf, 0x70, 0x5c, 0x32, 0x4d, 0x1a, 0x2b, + 0x17, 0xd2, 0x1a, 0x18, 0x5b, 0xc3, 0x34, 0x51, 0xa3, 0x0c, 0x46, 0xbf, 0x33, 0x72, 0xf5, 0xf5, + 0xe1, 0x1f, 0xab, 0xf2, 0xb5, 0x6f, 0x55, 0x0e, 0xfb, 0x16, 0x38, 0xea, 0x5b, 0xe0, 0x77, 0xdf, + 0x02, 0x07, 0xc7, 0x56, 0xe5, 0xe8, 0xd8, 0xaa, 0xfc, 0x3c, 0xb6, 0x2a, 0x6f, 0x9e, 0xf9, 0x3c, + 0xde, 0xea, 0xb5, 0x71, 0x47, 0x6c, 0xe7, 0x7e, 0x1e, 0x8b, 0xcd, 0x4d, 0xde, 0xe1, 0xb4, 0x4b, + 0xb6, 0x7a, 0x6d, 0x92, 0x38, 0x2d, 0xf2, 0x36, 0x7d, 0xa2, 0xb2, 0xa7, 0xa8, 0x3d, 0xae, 0x1f, + 0xa1, 0xa7, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa4, 0xfe, 0x90, 0x91, 0x72, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryServiceClient is the client API for QueryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryServiceClient interface { + QueryPlans(ctx context.Context, in *QueryPlansRequest, opts ...grpc.CallOption) (*QueryPlansResponse, error) + QueryPlansForProvider(ctx context.Context, in *QueryPlansForProviderRequest, opts ...grpc.CallOption) (*QueryPlansForProviderResponse, error) + QueryPlan(ctx context.Context, in *QueryPlanRequest, opts ...grpc.CallOption) (*QueryPlanResponse, error) + QueryNodesForPlan(ctx context.Context, in *QueryNodesForPlanRequest, opts ...grpc.CallOption) (*QueryNodesForPlanResponse, error) +} + +type queryServiceClient struct { + cc grpc1.ClientConn +} + +func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { + return &queryServiceClient{cc} +} + +func (c *queryServiceClient) QueryPlans(ctx context.Context, in *QueryPlansRequest, opts ...grpc.CallOption) (*QueryPlansResponse, error) { + out := new(QueryPlansResponse) + err := c.cc.Invoke(ctx, "/sentinel.plan.v1.QueryService/QueryPlans", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QueryPlansForProvider(ctx context.Context, in *QueryPlansForProviderRequest, opts ...grpc.CallOption) (*QueryPlansForProviderResponse, error) { + out := new(QueryPlansForProviderResponse) + err := c.cc.Invoke(ctx, "/sentinel.plan.v1.QueryService/QueryPlansForProvider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QueryPlan(ctx context.Context, in *QueryPlanRequest, opts ...grpc.CallOption) (*QueryPlanResponse, error) { + out := new(QueryPlanResponse) + err := c.cc.Invoke(ctx, "/sentinel.plan.v1.QueryService/QueryPlan", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QueryNodesForPlan(ctx context.Context, in *QueryNodesForPlanRequest, opts ...grpc.CallOption) (*QueryNodesForPlanResponse, error) { + out := new(QueryNodesForPlanResponse) + err := c.cc.Invoke(ctx, "/sentinel.plan.v1.QueryService/QueryNodesForPlan", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServiceServer is the server API for QueryService service. +type QueryServiceServer interface { + QueryPlans(context.Context, *QueryPlansRequest) (*QueryPlansResponse, error) + QueryPlansForProvider(context.Context, *QueryPlansForProviderRequest) (*QueryPlansForProviderResponse, error) + QueryPlan(context.Context, *QueryPlanRequest) (*QueryPlanResponse, error) + QueryNodesForPlan(context.Context, *QueryNodesForPlanRequest) (*QueryNodesForPlanResponse, error) +} + +// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServiceServer struct { +} + +func (*UnimplementedQueryServiceServer) QueryPlans(ctx context.Context, req *QueryPlansRequest) (*QueryPlansResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryPlans not implemented") +} +func (*UnimplementedQueryServiceServer) QueryPlansForProvider(ctx context.Context, req *QueryPlansForProviderRequest) (*QueryPlansForProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryPlansForProvider not implemented") +} +func (*UnimplementedQueryServiceServer) QueryPlan(ctx context.Context, req *QueryPlanRequest) (*QueryPlanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryPlan not implemented") +} +func (*UnimplementedQueryServiceServer) QueryNodesForPlan(ctx context.Context, req *QueryNodesForPlanRequest) (*QueryNodesForPlanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryNodesForPlan not implemented") +} + +func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { + s.RegisterService(&_QueryService_serviceDesc, srv) +} + +func _QueryService_QueryPlans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPlansRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryPlans(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.plan.v1.QueryService/QueryPlans", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryPlans(ctx, req.(*QueryPlansRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QueryPlansForProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPlansForProviderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryPlansForProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.plan.v1.QueryService/QueryPlansForProvider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryPlansForProvider(ctx, req.(*QueryPlansForProviderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QueryPlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPlanRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryPlan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.plan.v1.QueryService/QueryPlan", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryPlan(ctx, req.(*QueryPlanRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QueryNodesForPlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryNodesForPlanRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryNodesForPlan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.plan.v1.QueryService/QueryNodesForPlan", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryNodesForPlan(ctx, req.(*QueryNodesForPlanRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _QueryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "sentinel.plan.v1.QueryService", + HandlerType: (*QueryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QueryPlans", + Handler: _QueryService_QueryPlans_Handler, + }, + { + MethodName: "QueryPlansForProvider", + Handler: _QueryService_QueryPlansForProvider_Handler, + }, + { + MethodName: "QueryPlan", + Handler: _QueryService_QueryPlan_Handler, + }, + { + MethodName: "QueryNodesForPlan", + Handler: _QueryService_QueryNodesForPlan_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sentinel/plan/v1/querier.proto", +} + +func (m *QueryPlansRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPlansRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPlansRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Status != 0 { + i = encodeVarintQuerier(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryPlansForProviderRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPlansForProviderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPlansForProviderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Status != 0 { + i = encodeVarintQuerier(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x10 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuerier(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryPlanRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPlanRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPlanRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintQuerier(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryNodesForPlanRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryNodesForPlanRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNodesForPlanRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintQuerier(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryPlansResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPlansResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPlansResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Plans) > 0 { + for iNdEx := len(m.Plans) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Plans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryPlansForProviderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPlansForProviderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPlansForProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Plans) > 0 { + for iNdEx := len(m.Plans) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Plans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryPlanResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryPlanResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPlanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Plan.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryNodesForPlanResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryNodesForPlanResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNodesForPlanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Nodes) > 0 { + for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Nodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuerier(dAtA []byte, offset int, v uint64) int { + offset -= sovQuerier(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryPlansRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != 0 { + n += 1 + sovQuerier(uint64(m.Status)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryPlansForProviderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuerier(uint64(l)) + } + if m.Status != 0 { + n += 1 + sovQuerier(uint64(m.Status)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryPlanRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuerier(uint64(m.Id)) + } + return n +} + +func (m *QueryNodesForPlanRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuerier(uint64(m.Id)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryPlansResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Plans) > 0 { + for _, e := range m.Plans { + l = e.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryPlansForProviderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Plans) > 0 { + for _, e := range m.Plans { + l = e.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryPlanResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Plan.Size() + n += 1 + l + sovQuerier(uint64(l)) + return n +} + +func (m *QueryNodesForPlanResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Nodes) > 0 { + for _, e := range m.Nodes { + l = e.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func sovQuerier(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuerier(x uint64) (n int) { + return sovQuerier(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryPlansRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPlansRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPlansRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPlansForProviderRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPlansForProviderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPlansForProviderRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPlanRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPlanRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPlanRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryNodesForPlanRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryNodesForPlanRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNodesForPlanRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPlansResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPlansResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPlansResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Plans", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Plans = append(m.Plans, Plan{}) + if err := m.Plans[len(m.Plans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPlansForProviderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPlansForProviderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPlansForProviderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Plans", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Plans = append(m.Plans, Plan{}) + if err := m.Plans[len(m.Plans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPlanResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryPlanResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPlanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Plan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryNodesForPlanResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryNodesForPlanResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNodesForPlanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Nodes = append(m.Nodes, v1.Node{}) + if err := m.Nodes[len(m.Nodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuerier(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuerier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuerier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuerier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuerier + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuerier + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuerier + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuerier = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuerier = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuerier = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/plan/types/v1/querier.pb.gw.go b/x/plan/types/v1/querier.pb.gw.go new file mode 100644 index 00000000..7e14b336 --- /dev/null +++ b/x/plan/types/v1/querier.pb.gw.go @@ -0,0 +1,510 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: sentinel/plan/v1/querier.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_QueryService_QueryPlans_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_QueryService_QueryPlans_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPlansRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QueryPlans_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QueryPlans(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QueryPlans_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPlansRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QueryPlans_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QueryPlans(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_QueryService_QueryPlansForProvider_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_QueryService_QueryPlansForProvider_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPlansForProviderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QueryPlansForProvider_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QueryPlansForProvider(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QueryPlansForProvider_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPlansForProviderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QueryPlansForProvider_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QueryPlansForProvider(ctx, &protoReq) + return msg, metadata, err + +} + +func request_QueryService_QueryPlan_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPlanRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.QueryPlan(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QueryPlan_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPlanRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.QueryPlan(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_QueryService_QueryNodesForPlan_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_QueryService_QueryNodesForPlan_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNodesForPlanRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QueryNodesForPlan_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QueryNodesForPlan(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QueryNodesForPlan_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNodesForPlanRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QueryNodesForPlan_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QueryNodesForPlan(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryServiceHandlerServer registers the http handlers for service QueryService to "mux". +// UnaryRPC :call QueryServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryServiceHandlerFromEndpoint instead. +func RegisterQueryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServiceServer) error { + + mux.Handle("GET", pattern_QueryService_QueryPlans_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QueryPlans_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryPlans_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryPlansForProvider_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QueryPlansForProvider_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryPlansForProvider_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QueryPlan_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryPlan_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryNodesForPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QueryNodesForPlan_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryNodesForPlan_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryServiceHandlerFromEndpoint is same as RegisterQueryServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryServiceHandler(ctx, mux, conn) +} + +// RegisterQueryServiceHandler registers the http handlers for service QueryService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryServiceHandlerClient(ctx, mux, NewQueryServiceClient(conn)) +} + +// RegisterQueryServiceHandlerClient registers the http handlers for service QueryService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryServiceClient" to call the correct interceptors. +func RegisterQueryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryServiceClient) error { + + mux.Handle("GET", pattern_QueryService_QueryPlans_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QueryPlans_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryPlans_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryPlansForProvider_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QueryPlansForProvider_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryPlansForProvider_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QueryPlan_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryPlan_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryNodesForPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QueryNodesForPlan_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryNodesForPlan_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_QueryService_QueryPlans_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"sentinel", "plans"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QueryPlansForProvider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"sentinel", "providers", "address", "plans"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QueryPlan_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"sentinel", "plans", "id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QueryNodesForPlan_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"sentinel", "plans", "id", "nodes"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_QueryService_QueryPlans_0 = runtime.ForwardResponseMessage + + forward_QueryService_QueryPlansForProvider_0 = runtime.ForwardResponseMessage + + forward_QueryService_QueryPlan_0 = runtime.ForwardResponseMessage + + forward_QueryService_QueryNodesForPlan_0 = runtime.ForwardResponseMessage +) diff --git a/x/provider/types/v1/events.pb.go b/x/provider/types/v1/events.pb.go new file mode 100644 index 00000000..e4b41bfa --- /dev/null +++ b/x/provider/types/v1/events.pb.go @@ -0,0 +1,476 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/provider/v1/events.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type EventRegister struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` +} + +func (m *EventRegister) Reset() { *m = EventRegister{} } +func (m *EventRegister) String() string { return proto.CompactTextString(m) } +func (*EventRegister) ProtoMessage() {} +func (*EventRegister) Descriptor() ([]byte, []int) { + return fileDescriptor_3ec27b3fe604bfcc, []int{0} +} +func (m *EventRegister) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventRegister) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventRegister.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventRegister) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventRegister.Merge(m, src) +} +func (m *EventRegister) XXX_Size() int { + return m.Size() +} +func (m *EventRegister) XXX_DiscardUnknown() { + xxx_messageInfo_EventRegister.DiscardUnknown(m) +} + +var xxx_messageInfo_EventRegister proto.InternalMessageInfo + +type EventUpdate struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` +} + +func (m *EventUpdate) Reset() { *m = EventUpdate{} } +func (m *EventUpdate) String() string { return proto.CompactTextString(m) } +func (*EventUpdate) ProtoMessage() {} +func (*EventUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_3ec27b3fe604bfcc, []int{1} +} +func (m *EventUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUpdate.Merge(m, src) +} +func (m *EventUpdate) XXX_Size() int { + return m.Size() +} +func (m *EventUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_EventUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUpdate proto.InternalMessageInfo + +func init() { + proto.RegisterType((*EventRegister)(nil), "sentinel.provider.v1.EventRegister") + proto.RegisterType((*EventUpdate)(nil), "sentinel.provider.v1.EventUpdate") +} + +func init() { proto.RegisterFile("sentinel/provider/v1/events.proto", fileDescriptor_3ec27b3fe604bfcc) } + +var fileDescriptor_3ec27b3fe604bfcc = []byte{ + // 232 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0x4e, 0xcd, 0x2b, + 0xc9, 0xcc, 0x4b, 0xcd, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xcb, 0x4c, 0x49, 0x2d, 0xd2, 0x2f, 0x33, + 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x81, + 0x29, 0xd1, 0x83, 0x29, 0xd1, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd0, + 0x07, 0xb1, 0x20, 0x6a, 0x95, 0x6c, 0xb9, 0x78, 0x5d, 0x41, 0x7a, 0x83, 0x52, 0xd3, 0x33, 0x8b, + 0x4b, 0x52, 0x8b, 0x84, 0x74, 0xb8, 0xd8, 0x13, 0x53, 0x52, 0x8a, 0x52, 0x8b, 0x8b, 0x25, 0x18, + 0x15, 0x18, 0x35, 0x38, 0x9d, 0x84, 0x3e, 0xdd, 0x93, 0xe7, 0xab, 0x4c, 0xcc, 0xcd, 0xb1, 0x52, + 0x82, 0x4a, 0x28, 0x05, 0xc1, 0x94, 0x28, 0x59, 0x73, 0x71, 0x83, 0xb5, 0x87, 0x16, 0xa4, 0x24, + 0x96, 0xa4, 0x92, 0xa6, 0xd9, 0x29, 0xea, 0xc4, 0x43, 0x39, 0x86, 0x15, 0x8f, 0xe4, 0x18, 0x4e, + 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, + 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x22, 0x3d, 0xb3, 0x24, 0xa3, 0x34, + 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0xe6, 0x29, 0xdd, 0xfc, 0xb4, 0xb4, 0xcc, 0xe4, 0xcc, 0xc4, + 0x1c, 0xfd, 0x8c, 0xd2, 0x24, 0xfd, 0x32, 0x43, 0x23, 0xfd, 0x0a, 0x44, 0x50, 0x94, 0x54, 0x16, + 0xa4, 0x16, 0xeb, 0x97, 0x19, 0x26, 0xb1, 0x81, 0xbd, 0x67, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, + 0x7c, 0x2b, 0x42, 0x24, 0x2f, 0x01, 0x00, 0x00, +} + +func (m *EventRegister) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventRegister) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventRegister) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventRegister) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventRegister) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventRegister: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventRegister: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/provider/types/v1/genesis.pb.go b/x/provider/types/v1/genesis.pb.go new file mode 100644 index 00000000..37b3440d --- /dev/null +++ b/x/provider/types/v1/genesis.pb.go @@ -0,0 +1,375 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/provider/v1/genesis.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type GenesisState struct { + Providers []Provider `protobuf:"bytes,1,rep,name=providers,proto3" json:"_,omitempty"` + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_a6c00f7d1f3d4723, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func init() { + proto.RegisterType((*GenesisState)(nil), "sentinel.provider.v1.GenesisState") +} + +func init() { + proto.RegisterFile("sentinel/provider/v1/genesis.proto", fileDescriptor_a6c00f7d1f3d4723) +} + +var fileDescriptor_a6c00f7d1f3d4723 = []byte{ + // 275 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2a, 0x4e, 0xcd, 0x2b, + 0xc9, 0xcc, 0x4b, 0xcd, 0xd1, 0x2f, 0x28, 0xca, 0x2f, 0xcb, 0x4c, 0x49, 0x2d, 0xd2, 0x2f, 0x33, + 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, + 0x81, 0xa9, 0xd1, 0x83, 0xa9, 0xd1, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, + 0xd0, 0x07, 0xb1, 0x20, 0x6a, 0xa5, 0x14, 0xb1, 0x9a, 0x57, 0x90, 0x58, 0x94, 0x98, 0x0b, 0x35, + 0x4e, 0x4a, 0x19, 0xbb, 0x12, 0x98, 0xd1, 0x60, 0x45, 0x4a, 0x73, 0x19, 0xb9, 0x78, 0xdc, 0x21, + 0xae, 0x08, 0x2e, 0x49, 0x2c, 0x49, 0x15, 0x0a, 0xe4, 0xe2, 0x84, 0x29, 0x29, 0x96, 0x60, 0x54, + 0x60, 0xd6, 0xe0, 0x36, 0x92, 0xd3, 0xc3, 0xe6, 0x30, 0xbd, 0x00, 0x28, 0xdb, 0x49, 0xf8, 0xc4, + 0x3d, 0x79, 0x86, 0x57, 0xf7, 0xe4, 0xb9, 0xe3, 0x75, 0xf2, 0x73, 0x33, 0x4b, 0x52, 0x73, 0x0b, + 0x4a, 0x2a, 0x83, 0x10, 0xa6, 0x08, 0x59, 0x71, 0xb1, 0x41, 0x1c, 0x26, 0xc1, 0xa4, 0xc0, 0xa8, + 0xc1, 0x6d, 0x24, 0x83, 0xc3, 0x3c, 0xb0, 0x1a, 0x27, 0x16, 0x90, 0x69, 0x41, 0x50, 0x1d, 0x4e, + 0x51, 0x27, 0x1e, 0xca, 0x31, 0xac, 0x78, 0x24, 0xc7, 0x70, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, + 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, + 0xc7, 0x72, 0x0c, 0x51, 0x16, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, + 0x30, 0x73, 0x75, 0xf3, 0xd3, 0xd2, 0x32, 0x93, 0x33, 0x13, 0x73, 0xf4, 0x33, 0x4a, 0x93, 0xf4, + 0xcb, 0x0c, 0x8d, 0xf4, 0x2b, 0x10, 0x81, 0x50, 0x52, 0x59, 0x90, 0x5a, 0xac, 0x5f, 0x66, 0x98, + 0xc4, 0x06, 0x0e, 0x02, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xde, 0xf7, 0xe8, 0xae, 0x9c, + 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Providers) > 0 { + for iNdEx := len(m.Providers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Providers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Providers) > 0 { + for _, e := range m.Providers { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Providers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Providers = append(m.Providers, Provider{}) + if err := m.Providers[len(m.Providers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/provider/types/v1/msg.pb.go b/x/provider/types/v1/msg.pb.go new file mode 100644 index 00000000..8b9a2928 --- /dev/null +++ b/x/provider/types/v1/msg.pb.go @@ -0,0 +1,1198 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/provider/v1/msg.proto + +package v1 + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgRegisterRequest defines the SDK message for registering a provider +type MsgRegisterRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` + Website string `protobuf:"bytes,4,opt,name=website,proto3" json:"website,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *MsgRegisterRequest) Reset() { *m = MsgRegisterRequest{} } +func (m *MsgRegisterRequest) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterRequest) ProtoMessage() {} +func (*MsgRegisterRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2442a7fa65172482, []int{0} +} +func (m *MsgRegisterRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterRequest.Merge(m, src) +} +func (m *MsgRegisterRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterRequest proto.InternalMessageInfo + +// MsgUpdateRequest defines the SDK message for updating a provider +type MsgUpdateRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` + Website string `protobuf:"bytes,4,opt,name=website,proto3" json:"website,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *MsgUpdateRequest) Reset() { *m = MsgUpdateRequest{} } +func (m *MsgUpdateRequest) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateRequest) ProtoMessage() {} +func (*MsgUpdateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2442a7fa65172482, []int{1} +} +func (m *MsgUpdateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateRequest.Merge(m, src) +} +func (m *MsgUpdateRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateRequest proto.InternalMessageInfo + +// MsgRegisterResponse defines the response of message MsgRegisterRequest +type MsgRegisterResponse struct { +} + +func (m *MsgRegisterResponse) Reset() { *m = MsgRegisterResponse{} } +func (m *MsgRegisterResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterResponse) ProtoMessage() {} +func (*MsgRegisterResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2442a7fa65172482, []int{2} +} +func (m *MsgRegisterResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterResponse.Merge(m, src) +} +func (m *MsgRegisterResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterResponse proto.InternalMessageInfo + +// MsgUpdateResponse defines the response of message MsgUpdateRequest +type MsgUpdateResponse struct { +} + +func (m *MsgUpdateResponse) Reset() { *m = MsgUpdateResponse{} } +func (m *MsgUpdateResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateResponse) ProtoMessage() {} +func (*MsgUpdateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2442a7fa65172482, []int{3} +} +func (m *MsgUpdateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateResponse.Merge(m, src) +} +func (m *MsgUpdateResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgRegisterRequest)(nil), "sentinel.provider.v1.MsgRegisterRequest") + proto.RegisterType((*MsgUpdateRequest)(nil), "sentinel.provider.v1.MsgUpdateRequest") + proto.RegisterType((*MsgRegisterResponse)(nil), "sentinel.provider.v1.MsgRegisterResponse") + proto.RegisterType((*MsgUpdateResponse)(nil), "sentinel.provider.v1.MsgUpdateResponse") +} + +func init() { proto.RegisterFile("sentinel/provider/v1/msg.proto", fileDescriptor_2442a7fa65172482) } + +var fileDescriptor_2442a7fa65172482 = []byte{ + // 352 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x52, 0x31, 0x4e, 0xeb, 0x40, + 0x10, 0xf5, 0xfe, 0x9f, 0xff, 0x21, 0x9b, 0x06, 0x36, 0x41, 0xb2, 0x5c, 0xac, 0xa2, 0x14, 0x10, + 0x0a, 0xbc, 0x72, 0x68, 0xa8, 0xe9, 0xd3, 0x04, 0xd1, 0x44, 0x34, 0xb1, 0x3d, 0xd9, 0xac, 0x14, + 0x7b, 0xcd, 0xee, 0xc6, 0x90, 0x5b, 0x20, 0xc4, 0x21, 0x38, 0x4a, 0x2a, 0x94, 0x92, 0x12, 0x9c, + 0x8b, 0x20, 0xdb, 0x72, 0x48, 0x04, 0x08, 0x4a, 0xba, 0x99, 0xf7, 0xde, 0xcc, 0x3c, 0xcd, 0x0c, + 0xa6, 0x1a, 0x62, 0x23, 0x62, 0x98, 0xb2, 0x44, 0xc9, 0x54, 0x84, 0xa0, 0x58, 0xea, 0xb1, 0x48, + 0x73, 0x37, 0x51, 0xd2, 0x48, 0xd2, 0xaa, 0x78, 0xb7, 0xe2, 0xdd, 0xd4, 0x73, 0x5a, 0x5c, 0x72, + 0x59, 0x08, 0x58, 0x1e, 0x95, 0xda, 0xce, 0x03, 0xc2, 0xa4, 0xaf, 0xf9, 0x00, 0xb8, 0xd0, 0x06, + 0xd4, 0x00, 0xae, 0x67, 0xa0, 0x0d, 0x21, 0xb8, 0x36, 0x56, 0x32, 0xb2, 0x51, 0x1b, 0x75, 0xeb, + 0x83, 0x22, 0xce, 0xb1, 0x78, 0x14, 0x81, 0xfd, 0xa7, 0xc4, 0xf2, 0x98, 0x38, 0x78, 0x57, 0x84, + 0xf9, 0x34, 0x33, 0xb7, 0xff, 0x16, 0xf8, 0x3a, 0x27, 0x36, 0xde, 0xb9, 0x01, 0x5f, 0x0b, 0x03, + 0x76, 0xad, 0xa0, 0xaa, 0x94, 0xb4, 0x71, 0x23, 0x04, 0x1d, 0x28, 0x91, 0x18, 0x21, 0x63, 0xfb, + 0x5f, 0xc1, 0x6e, 0x42, 0x9d, 0x7b, 0x84, 0xf7, 0xfa, 0x9a, 0x5f, 0x26, 0xe1, 0xc8, 0xc0, 0x6f, + 0x31, 0x75, 0x80, 0x9b, 0x5b, 0xab, 0xd2, 0x89, 0x8c, 0x35, 0x74, 0x9a, 0x78, 0x7f, 0xc3, 0x6a, + 0x09, 0xf6, 0x9e, 0x10, 0xc6, 0x7d, 0xcd, 0x2f, 0x40, 0xa5, 0x22, 0x00, 0xe2, 0xe3, 0xc6, 0x46, + 0x29, 0xe9, 0xba, 0x9f, 0x9d, 0xc8, 0xfd, 0x78, 0x08, 0xe7, 0xf8, 0x07, 0xca, 0x72, 0x24, 0xb9, + 0xc2, 0xf5, 0xb5, 0x0f, 0x72, 0xf8, 0x65, 0xdd, 0xd6, 0x4e, 0x9d, 0xa3, 0x6f, 0x75, 0x65, 0xf7, + 0xf3, 0xe1, 0xe2, 0x95, 0x5a, 0x8f, 0x19, 0xb5, 0x16, 0x19, 0x45, 0xcb, 0x8c, 0xa2, 0x97, 0x8c, + 0xa2, 0xbb, 0x15, 0xb5, 0x96, 0x2b, 0x6a, 0x3d, 0xaf, 0xa8, 0x35, 0x3c, 0xe3, 0xc2, 0x4c, 0x66, + 0xbe, 0x1b, 0xc8, 0x88, 0x55, 0x4d, 0x4f, 0xe4, 0x78, 0x2c, 0x02, 0x31, 0x9a, 0xb2, 0xc9, 0xcc, + 0x67, 0xa9, 0xd7, 0x63, 0xb7, 0xef, 0x4f, 0x6b, 0xe6, 0x09, 0x68, 0x96, 0x7a, 0xfe, 0xff, 0xe2, + 0x17, 0x4f, 0xdf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x54, 0xb2, 0x95, 0x6d, 0xd9, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgServiceClient is the client API for MsgService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgServiceClient interface { + MsgRegister(ctx context.Context, in *MsgRegisterRequest, opts ...grpc.CallOption) (*MsgRegisterResponse, error) + MsgUpdate(ctx context.Context, in *MsgUpdateRequest, opts ...grpc.CallOption) (*MsgUpdateResponse, error) +} + +type msgServiceClient struct { + cc grpc1.ClientConn +} + +func NewMsgServiceClient(cc grpc1.ClientConn) MsgServiceClient { + return &msgServiceClient{cc} +} + +func (c *msgServiceClient) MsgRegister(ctx context.Context, in *MsgRegisterRequest, opts ...grpc.CallOption) (*MsgRegisterResponse, error) { + out := new(MsgRegisterResponse) + err := c.cc.Invoke(ctx, "/sentinel.provider.v1.MsgService/MsgRegister", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgServiceClient) MsgUpdate(ctx context.Context, in *MsgUpdateRequest, opts ...grpc.CallOption) (*MsgUpdateResponse, error) { + out := new(MsgUpdateResponse) + err := c.cc.Invoke(ctx, "/sentinel.provider.v1.MsgService/MsgUpdate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServiceServer is the server API for MsgService service. +type MsgServiceServer interface { + MsgRegister(context.Context, *MsgRegisterRequest) (*MsgRegisterResponse, error) + MsgUpdate(context.Context, *MsgUpdateRequest) (*MsgUpdateResponse, error) +} + +// UnimplementedMsgServiceServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServiceServer struct { +} + +func (*UnimplementedMsgServiceServer) MsgRegister(ctx context.Context, req *MsgRegisterRequest) (*MsgRegisterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgRegister not implemented") +} +func (*UnimplementedMsgServiceServer) MsgUpdate(ctx context.Context, req *MsgUpdateRequest) (*MsgUpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgUpdate not implemented") +} + +func RegisterMsgServiceServer(s grpc1.Server, srv MsgServiceServer) { + s.RegisterService(&_MsgService_serviceDesc, srv) +} + +func _MsgService_MsgRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgRegister(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.provider.v1.MsgService/MsgRegister", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgRegister(ctx, req.(*MsgRegisterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MsgService_MsgUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgUpdate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.provider.v1.MsgService/MsgUpdate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgUpdate(ctx, req.(*MsgUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _MsgService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "sentinel.provider.v1.MsgService", + HandlerType: (*MsgServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "MsgRegister", + Handler: _MsgService_MsgRegister_Handler, + }, + { + MethodName: "MsgUpdate", + Handler: _MsgService_MsgUpdate_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sentinel/provider/v1/msg.proto", +} + +func (m *MsgRegisterRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRegisterRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x2a + } + if len(m.Website) > 0 { + i -= len(m.Website) + copy(dAtA[i:], m.Website) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Website))) + i-- + dAtA[i] = 0x22 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x1a + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x2a + } + if len(m.Website) > 0 { + i -= len(m.Website) + copy(dAtA[i:], m.Website) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Website))) + i-- + dAtA[i] = 0x22 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x1a + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRegisterResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgRegisterResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintMsg(dAtA []byte, offset int, v uint64) int { + offset -= sovMsg(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgRegisterRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = len(m.Website) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + return n +} + +func (m *MsgUpdateRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = len(m.Website) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + return n +} + +func (m *MsgRegisterResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovMsg(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMsg(x uint64) (n int) { + return sovMsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgRegisterRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRegisterResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMsg(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMsg + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMsg + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMsg + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMsg + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMsg + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMsg + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMsg = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/provider/types/v1/params.pb.go b/x/provider/types/v1/params.pb.go new file mode 100644 index 00000000..95487963 --- /dev/null +++ b/x/provider/types/v1/params.pb.go @@ -0,0 +1,368 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/provider/v1/params.proto + +package v1 + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Params struct { + Deposit types.Coin `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit"` + StakingShare github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=staking_share,json=stakingShare,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"staking_share"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_f4f14af8b7b64362, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Params)(nil), "sentinel.provider.v1.Params") +} + +func init() { proto.RegisterFile("sentinel/provider/v1/params.proto", fileDescriptor_f4f14af8b7b64362) } + +var fileDescriptor_f4f14af8b7b64362 = []byte{ + // 294 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0x3f, 0x4e, 0xc3, 0x30, + 0x14, 0xc6, 0x6d, 0x84, 0x8a, 0x08, 0xb0, 0x54, 0x1d, 0x4a, 0x07, 0xb7, 0x30, 0xa0, 0x2e, 0xf5, + 0x53, 0xca, 0x02, 0x6b, 0xe0, 0x00, 0xa8, 0xdd, 0xba, 0x20, 0x27, 0x71, 0x13, 0xab, 0x4d, 0x5e, + 0x14, 0xbb, 0x11, 0xdc, 0x82, 0x91, 0x23, 0x70, 0x94, 0x8c, 0x1d, 0x11, 0x43, 0x05, 0xc9, 0x45, + 0x50, 0xfe, 0x09, 0x26, 0x7f, 0xb2, 0x7e, 0xfe, 0xf9, 0xbd, 0xcf, 0xba, 0xd2, 0x32, 0x36, 0x2a, + 0x96, 0x5b, 0x48, 0x52, 0xcc, 0x94, 0x2f, 0x53, 0xc8, 0x6c, 0x48, 0x44, 0x2a, 0x22, 0xcd, 0x93, + 0x14, 0x0d, 0xf6, 0x07, 0x1d, 0xc2, 0x3b, 0x84, 0x67, 0xf6, 0x88, 0x79, 0xa8, 0x23, 0xd4, 0xe0, + 0x0a, 0x2d, 0x21, 0xb3, 0x5d, 0x69, 0x84, 0x0d, 0x1e, 0xaa, 0xb8, 0x79, 0x35, 0x1a, 0x04, 0x18, + 0x60, 0x1d, 0xa1, 0x4a, 0xcd, 0xed, 0xf5, 0x3b, 0xb5, 0x7a, 0x4f, 0xb5, 0xbc, 0x7f, 0x6f, 0x9d, + 0xf8, 0x32, 0x41, 0xad, 0xcc, 0x90, 0x4e, 0xe8, 0xf4, 0x6c, 0x7e, 0xc9, 0x1b, 0x25, 0xaf, 0x94, + 0xbc, 0x55, 0xf2, 0x07, 0x54, 0xb1, 0x73, 0x9c, 0x1f, 0xc6, 0x64, 0xd1, 0xf1, 0xfd, 0xa5, 0x75, + 0xa1, 0x8d, 0xd8, 0xa8, 0x38, 0x78, 0xd6, 0xa1, 0x48, 0xe5, 0xf0, 0x68, 0x42, 0xa7, 0xa7, 0x0e, + 0xaf, 0xa8, 0xaf, 0xc3, 0xf8, 0x26, 0x50, 0x26, 0xdc, 0xb9, 0xdc, 0xc3, 0x08, 0xda, 0x29, 0x9b, + 0x63, 0xa6, 0xfd, 0x0d, 0x98, 0xd7, 0x44, 0x6a, 0xfe, 0x28, 0xbd, 0xc5, 0x79, 0x2b, 0x59, 0x56, + 0x0e, 0x67, 0x95, 0xff, 0x30, 0xf2, 0x51, 0x30, 0x92, 0x17, 0x8c, 0xee, 0x0b, 0x46, 0xbf, 0x0b, + 0x46, 0xdf, 0x4a, 0x46, 0xf6, 0x25, 0x23, 0x9f, 0x25, 0x23, 0xab, 0xbb, 0x7f, 0xde, 0xae, 0x93, + 0x19, 0xae, 0xd7, 0xca, 0x53, 0x62, 0x0b, 0xe1, 0xce, 0x85, 0xcc, 0x9e, 0xc3, 0xcb, 0x5f, 0x93, + 0xf5, 0x57, 0x55, 0x39, 0xbd, 0x7a, 0xfb, 0xdb, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x0a, + 0xcb, 0xba, 0x6e, 0x01, 0x00, 0x00, +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.StakingShare.Size() + i -= size + if _, err := m.StakingShare.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Deposit.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.StakingShare.Size() + n += 1 + l + sovParams(uint64(l)) + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakingShare", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StakingShare.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/provider/types/v1/provider.pb.go b/x/provider/types/v1/provider.pb.go new file mode 100644 index 00000000..f6959052 --- /dev/null +++ b/x/provider/types/v1/provider.pb.go @@ -0,0 +1,492 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/provider/v1/provider.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Provider struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` + Website string `protobuf:"bytes,4,opt,name=website,proto3" json:"website,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *Provider) Reset() { *m = Provider{} } +func (m *Provider) String() string { return proto.CompactTextString(m) } +func (*Provider) ProtoMessage() {} +func (*Provider) Descriptor() ([]byte, []int) { + return fileDescriptor_384ab79ee3fa9e6d, []int{0} +} +func (m *Provider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Provider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Provider.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Provider) XXX_Merge(src proto.Message) { + xxx_messageInfo_Provider.Merge(m, src) +} +func (m *Provider) XXX_Size() int { + return m.Size() +} +func (m *Provider) XXX_DiscardUnknown() { + xxx_messageInfo_Provider.DiscardUnknown(m) +} + +var xxx_messageInfo_Provider proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Provider)(nil), "sentinel.provider.v1.Provider") +} + +func init() { + proto.RegisterFile("sentinel/provider/v1/provider.proto", fileDescriptor_384ab79ee3fa9e6d) +} + +var fileDescriptor_384ab79ee3fa9e6d = []byte{ + // 252 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0x31, 0x4e, 0xc3, 0x30, + 0x18, 0x85, 0x6d, 0x28, 0x50, 0xcc, 0x66, 0x75, 0xb0, 0x3a, 0x58, 0x15, 0x2c, 0x2c, 0xc4, 0x0a, + 0x2c, 0xcc, 0x9c, 0x00, 0x31, 0x76, 0x4b, 0xe2, 0xbf, 0xe9, 0x2f, 0xb5, 0x71, 0x64, 0xbb, 0x86, + 0xde, 0xa2, 0xc7, 0xe0, 0x28, 0x1d, 0x3b, 0x32, 0x42, 0x72, 0x11, 0x14, 0xb7, 0x09, 0x6c, 0xef, + 0xbd, 0xff, 0xd3, 0xb3, 0x9e, 0xd9, 0x9d, 0x83, 0xca, 0x63, 0x05, 0x2b, 0x55, 0x5b, 0x13, 0x50, + 0x83, 0x55, 0x21, 0x1d, 0x74, 0x52, 0x5b, 0xe3, 0x0d, 0x9f, 0xf4, 0x50, 0x32, 0x1c, 0x42, 0x3a, + 0x9d, 0x94, 0xa6, 0x34, 0x11, 0x50, 0x9d, 0x3a, 0xb2, 0xb7, 0x3b, 0xca, 0xc6, 0xaf, 0x27, 0x8a, + 0x0b, 0x76, 0x95, 0x69, 0x6d, 0xc1, 0x39, 0x41, 0x67, 0xf4, 0xfe, 0xfa, 0xad, 0xb7, 0x9c, 0xb3, + 0x51, 0x95, 0xad, 0x41, 0x9c, 0xc5, 0x38, 0x6a, 0x3e, 0x65, 0x63, 0xd4, 0xdd, 0x4b, 0x7e, 0x2b, + 0xce, 0x63, 0x3e, 0xf8, 0xae, 0xe9, 0x1d, 0x72, 0x87, 0x1e, 0xc4, 0xe8, 0xd8, 0x74, 0xb2, 0x7c, + 0xc6, 0x6e, 0x34, 0xb8, 0xc2, 0x62, 0xed, 0xd1, 0x54, 0xe2, 0x22, 0x5e, 0xff, 0x47, 0x2f, 0xf3, + 0xfd, 0x8f, 0x24, 0x9f, 0x8d, 0x24, 0xfb, 0x46, 0xd2, 0x43, 0x23, 0xe9, 0x77, 0x23, 0xe9, 0xae, + 0x95, 0xe4, 0xd0, 0x4a, 0xf2, 0xd5, 0x4a, 0x32, 0x7f, 0x2e, 0xd1, 0x2f, 0x37, 0x79, 0x52, 0x98, + 0xb5, 0xea, 0xb7, 0x3e, 0x98, 0xc5, 0x02, 0x0b, 0xcc, 0x56, 0x6a, 0xb9, 0xc9, 0x55, 0x48, 0x1f, + 0xd5, 0xc7, 0xdf, 0x1f, 0xf9, 0x6d, 0x0d, 0x4e, 0x85, 0x34, 0xbf, 0x8c, 0xab, 0x9f, 0x7e, 0x03, + 0x00, 0x00, 0xff, 0xff, 0xca, 0x13, 0xd4, 0x61, 0x48, 0x01, 0x00, 0x00, +} + +func (m *Provider) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Provider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Provider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x2a + } + if len(m.Website) > 0 { + i -= len(m.Website) + copy(dAtA[i:], m.Website) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Website))) + i-- + dAtA[i] = 0x22 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x1a + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintProvider(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintProvider(dAtA []byte, offset int, v uint64) int { + offset -= sovProvider(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Provider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.Website) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProvider(uint64(l)) + } + return n +} + +func sovProvider(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozProvider(x uint64) (n int) { + return sovProvider(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Provider) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Provider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Provider: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProvider(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProvider + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProvider + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProvider + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthProvider + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupProvider + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthProvider + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthProvider = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProvider = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProvider = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/provider/types/v1/querier.pb.go b/x/provider/types/v1/querier.pb.go new file mode 100644 index 00000000..96ab40e3 --- /dev/null +++ b/x/provider/types/v1/querier.pb.go @@ -0,0 +1,1341 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/provider/v1/querier.proto + +package v1 + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type QueryProvidersRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryProvidersRequest) Reset() { *m = QueryProvidersRequest{} } +func (m *QueryProvidersRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProvidersRequest) ProtoMessage() {} +func (*QueryProvidersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5ac7e485f7dd533b, []int{0} +} +func (m *QueryProvidersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProvidersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProvidersRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryProvidersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProvidersRequest.Merge(m, src) +} +func (m *QueryProvidersRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProvidersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProvidersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProvidersRequest proto.InternalMessageInfo + +type QueryProviderRequest struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryProviderRequest) Reset() { *m = QueryProviderRequest{} } +func (m *QueryProviderRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProviderRequest) ProtoMessage() {} +func (*QueryProviderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5ac7e485f7dd533b, []int{1} +} +func (m *QueryProviderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProviderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProviderRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryProviderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProviderRequest.Merge(m, src) +} +func (m *QueryProviderRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProviderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProviderRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProviderRequest proto.InternalMessageInfo + +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5ac7e485f7dd533b, []int{2} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +type QueryProvidersResponse struct { + Providers []Provider `protobuf:"bytes,1,rep,name=providers,proto3" json:"providers"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryProvidersResponse) Reset() { *m = QueryProvidersResponse{} } +func (m *QueryProvidersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProvidersResponse) ProtoMessage() {} +func (*QueryProvidersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ac7e485f7dd533b, []int{3} +} +func (m *QueryProvidersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProvidersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProvidersResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryProvidersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProvidersResponse.Merge(m, src) +} +func (m *QueryProvidersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProvidersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProvidersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProvidersResponse proto.InternalMessageInfo + +type QueryProviderResponse struct { + Provider Provider `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider"` +} + +func (m *QueryProviderResponse) Reset() { *m = QueryProviderResponse{} } +func (m *QueryProviderResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProviderResponse) ProtoMessage() {} +func (*QueryProviderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ac7e485f7dd533b, []int{4} +} +func (m *QueryProviderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProviderResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryProviderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProviderResponse.Merge(m, src) +} +func (m *QueryProviderResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProviderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProviderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryProviderResponse proto.InternalMessageInfo + +type QueryParamsResponse struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5ac7e485f7dd533b, []int{5} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*QueryProvidersRequest)(nil), "sentinel.provider.v1.QueryProvidersRequest") + proto.RegisterType((*QueryProviderRequest)(nil), "sentinel.provider.v1.QueryProviderRequest") + proto.RegisterType((*QueryParamsRequest)(nil), "sentinel.provider.v1.QueryParamsRequest") + proto.RegisterType((*QueryProvidersResponse)(nil), "sentinel.provider.v1.QueryProvidersResponse") + proto.RegisterType((*QueryProviderResponse)(nil), "sentinel.provider.v1.QueryProviderResponse") + proto.RegisterType((*QueryParamsResponse)(nil), "sentinel.provider.v1.QueryParamsResponse") +} + +func init() { + proto.RegisterFile("sentinel/provider/v1/querier.proto", fileDescriptor_5ac7e485f7dd533b) +} + +var fileDescriptor_5ac7e485f7dd533b = []byte{ + // 540 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xc1, 0x6e, 0xd3, 0x30, + 0x1c, 0xc6, 0xe3, 0x0d, 0x0d, 0xe6, 0x01, 0x07, 0xaf, 0x43, 0x53, 0x19, 0x1e, 0xcb, 0x04, 0x74, + 0x1b, 0xd8, 0xa4, 0x5c, 0x10, 0x27, 0xd4, 0x03, 0x5c, 0xb7, 0x72, 0x62, 0x17, 0xe4, 0xb6, 0x5e, + 0x66, 0xa9, 0x8d, 0xb3, 0x38, 0x89, 0x98, 0x10, 0x17, 0x4e, 0x5c, 0x10, 0x48, 0x3c, 0x03, 0x12, + 0xef, 0xc0, 0x0b, 0xf4, 0x38, 0x89, 0x0b, 0x27, 0x04, 0x2d, 0x0f, 0x82, 0xe2, 0xd8, 0x4d, 0x33, + 0x02, 0xe4, 0x96, 0xa6, 0xdf, 0xf7, 0xf9, 0xf7, 0xd9, 0xff, 0x18, 0xba, 0x8a, 0x07, 0xb1, 0x08, + 0xf8, 0x90, 0x86, 0x91, 0x4c, 0xc5, 0x80, 0x47, 0x34, 0xf5, 0xe8, 0x49, 0xc2, 0x23, 0xc1, 0x23, + 0x12, 0x46, 0x32, 0x96, 0xa8, 0x61, 0x35, 0xc4, 0x6a, 0x48, 0xea, 0x35, 0x77, 0xfb, 0x52, 0x8d, + 0xa4, 0xa2, 0x3d, 0xa6, 0xb8, 0x36, 0x9c, 0xd2, 0xd4, 0xeb, 0xf1, 0x98, 0x79, 0x34, 0x64, 0xbe, + 0x08, 0x58, 0x2c, 0x64, 0x90, 0x27, 0x34, 0x1b, 0xbe, 0xf4, 0xa5, 0x7e, 0xa4, 0xd9, 0x93, 0x79, + 0xbb, 0xe1, 0x4b, 0xe9, 0x0f, 0x39, 0x65, 0xa1, 0xa0, 0x2c, 0x08, 0x64, 0xac, 0x2d, 0xca, 0xfc, + 0xbb, 0x55, 0x49, 0x16, 0xb2, 0x88, 0x8d, 0xac, 0x64, 0xbb, 0x5a, 0x62, 0x21, 0xb5, 0xc8, 0x7d, + 0x01, 0xd7, 0x0e, 0x32, 0xba, 0x7d, 0xf3, 0x5a, 0x75, 0xf9, 0x49, 0xc2, 0x55, 0x8c, 0x9e, 0x40, + 0x58, 0x80, 0xae, 0x83, 0x9b, 0xa0, 0xb5, 0xd2, 0xbe, 0x4d, 0xf2, 0x56, 0x24, 0x6b, 0x45, 0x74, + 0x2b, 0x62, 0x5a, 0x91, 0x7d, 0xe6, 0x73, 0xe3, 0xed, 0xce, 0x39, 0xdd, 0xfb, 0xb0, 0x51, 0x5a, + 0xc0, 0xe6, 0xaf, 0xc3, 0x8b, 0x6c, 0x30, 0x88, 0xb8, 0x52, 0x3a, 0x7c, 0xb9, 0x6b, 0x7f, 0xba, + 0x0d, 0x88, 0x72, 0x87, 0x2e, 0x63, 0xf4, 0xee, 0x27, 0x00, 0xaf, 0x9d, 0x27, 0x55, 0xa1, 0x0c, + 0x14, 0x47, 0x1d, 0xb8, 0x6c, 0x5b, 0x65, 0x61, 0x8b, 0xad, 0x95, 0x36, 0x26, 0x55, 0xa7, 0x42, + 0xac, 0xb7, 0x73, 0x61, 0xfc, 0x7d, 0xd3, 0xe9, 0x16, 0x36, 0xf4, 0xb4, 0x54, 0x77, 0x41, 0xd7, + 0xbd, 0xf3, 0xdf, 0xba, 0x39, 0x40, 0xa9, 0xef, 0xf3, 0x73, 0x1b, 0x3a, 0xa3, 0x7c, 0x0c, 0x2f, + 0xd9, 0xe5, 0xcc, 0x76, 0xd6, 0x83, 0x9c, 0xb9, 0xdc, 0x03, 0xb8, 0x5a, 0xda, 0x18, 0x13, 0xfc, + 0x08, 0x2e, 0xe5, 0xe7, 0x6e, 0x62, 0x37, 0xfe, 0x12, 0xab, 0x35, 0x26, 0xd4, 0x38, 0xda, 0x5f, + 0x16, 0xe1, 0x65, 0x9d, 0xf9, 0x8c, 0x47, 0xa9, 0xe8, 0x73, 0xf4, 0x16, 0xc0, 0xab, 0xe5, 0x6d, + 0x46, 0x7b, 0xd5, 0x79, 0x95, 0x63, 0xd3, 0xbc, 0x5b, 0x4f, 0x9c, 0xa3, 0xbb, 0xd7, 0xdf, 0x7c, + 0xfd, 0xf5, 0x71, 0x61, 0x0d, 0xad, 0xd2, 0x3f, 0x66, 0x55, 0xa1, 0xf7, 0x00, 0x5e, 0x29, 0xf9, + 0xd0, 0x6e, 0x8d, 0x70, 0x0b, 0xb2, 0x57, 0x4b, 0x6b, 0x38, 0x6e, 0x69, 0x8e, 0x4d, 0x74, 0xa3, + 0x82, 0x83, 0xbe, 0x32, 0x83, 0xf9, 0x1a, 0xbd, 0x03, 0x70, 0x65, 0xee, 0x04, 0x50, 0xeb, 0x5f, + 0x6b, 0xcc, 0x4f, 0x6f, 0x73, 0xa7, 0x86, 0xd2, 0xb0, 0xec, 0x68, 0x96, 0x6d, 0xb4, 0x55, 0xb0, + 0x8c, 0xe4, 0x20, 0x19, 0x72, 0x55, 0x7c, 0xc7, 0xf9, 0xe9, 0x75, 0x0e, 0xc7, 0x3f, 0xb1, 0xf3, + 0x79, 0x82, 0x9d, 0xf1, 0x04, 0x83, 0xb3, 0x09, 0x06, 0x3f, 0x26, 0x18, 0x7c, 0x98, 0x62, 0xe7, + 0x6c, 0x8a, 0x9d, 0x6f, 0x53, 0xec, 0x1c, 0x3e, 0xf4, 0x45, 0x7c, 0x9c, 0xf4, 0x48, 0x5f, 0x8e, + 0x66, 0x71, 0xf7, 0xe4, 0xd1, 0x91, 0xe8, 0x0b, 0x36, 0xa4, 0xc7, 0x49, 0x8f, 0xa6, 0x5e, 0x9b, + 0xbe, 0x2c, 0x92, 0xe3, 0xd3, 0x90, 0xab, 0xec, 0xaa, 0x5a, 0xd2, 0xf7, 0xc3, 0x83, 0xdf, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x40, 0x7a, 0xde, 0xd5, 0x03, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryServiceClient is the client API for QueryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryServiceClient interface { + QueryProviders(ctx context.Context, in *QueryProvidersRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) + QueryProvider(ctx context.Context, in *QueryProviderRequest, opts ...grpc.CallOption) (*QueryProviderResponse, error) + QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryServiceClient struct { + cc grpc1.ClientConn +} + +func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { + return &queryServiceClient{cc} +} + +func (c *queryServiceClient) QueryProviders(ctx context.Context, in *QueryProvidersRequest, opts ...grpc.CallOption) (*QueryProvidersResponse, error) { + out := new(QueryProvidersResponse) + err := c.cc.Invoke(ctx, "/sentinel.provider.v1.QueryService/QueryProviders", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QueryProvider(ctx context.Context, in *QueryProviderRequest, opts ...grpc.CallOption) (*QueryProviderResponse, error) { + out := new(QueryProviderResponse) + err := c.cc.Invoke(ctx, "/sentinel.provider.v1.QueryService/QueryProvider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/sentinel.provider.v1.QueryService/QueryParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServiceServer is the server API for QueryService service. +type QueryServiceServer interface { + QueryProviders(context.Context, *QueryProvidersRequest) (*QueryProvidersResponse, error) + QueryProvider(context.Context, *QueryProviderRequest) (*QueryProviderResponse, error) + QueryParams(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +} + +// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServiceServer struct { +} + +func (*UnimplementedQueryServiceServer) QueryProviders(ctx context.Context, req *QueryProvidersRequest) (*QueryProvidersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryProviders not implemented") +} +func (*UnimplementedQueryServiceServer) QueryProvider(ctx context.Context, req *QueryProviderRequest) (*QueryProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryProvider not implemented") +} +func (*UnimplementedQueryServiceServer) QueryParams(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryParams not implemented") +} + +func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { + s.RegisterService(&_QueryService_serviceDesc, srv) +} + +func _QueryService_QueryProviders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProvidersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryProviders(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.provider.v1.QueryService/QueryProviders", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryProviders(ctx, req.(*QueryProvidersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QueryProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProviderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.provider.v1.QueryService/QueryProvider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryProvider(ctx, req.(*QueryProviderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QueryParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.provider.v1.QueryService/QueryParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryParams(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _QueryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "sentinel.provider.v1.QueryService", + HandlerType: (*QueryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QueryProviders", + Handler: _QueryService_QueryProviders_Handler, + }, + { + MethodName: "QueryProvider", + Handler: _QueryService_QueryProvider_Handler, + }, + { + MethodName: "QueryParams", + Handler: _QueryService_QueryParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sentinel/provider/v1/querier.proto", +} + +func (m *QueryProvidersRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryProvidersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProvidersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryProviderRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryProviderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProviderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuerier(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryProvidersResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryProvidersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProvidersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Providers) > 0 { + for iNdEx := len(m.Providers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Providers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryProviderResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryProviderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProviderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Provider.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuerier(dAtA []byte, offset int, v uint64) int { + offset -= sovQuerier(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryProvidersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryProviderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryProvidersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Providers) > 0 { + for _, e := range m.Providers { + l = e.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryProviderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Provider.Size() + n += 1 + l + sovQuerier(uint64(l)) + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuerier(uint64(l)) + return n +} + +func sovQuerier(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuerier(x uint64) (n int) { + return sovQuerier(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryProvidersRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryProvidersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProvidersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProviderRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryProviderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProviderRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProvidersResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryProvidersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProvidersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Providers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Providers = append(m.Providers, Provider{}) + if err := m.Providers[len(m.Providers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProviderResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryProviderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProviderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Provider.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuerier(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuerier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuerier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuerier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuerier + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuerier + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuerier + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuerier = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuerier = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuerier = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/provider/types/v1/querier.pb.gw.go b/x/provider/types/v1/querier.pb.gw.go new file mode 100644 index 00000000..16240fd1 --- /dev/null +++ b/x/provider/types/v1/querier.pb.gw.go @@ -0,0 +1,337 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: sentinel/provider/v1/querier.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_QueryService_QueryProviders_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_QueryService_QueryProviders_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProvidersRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QueryProviders_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QueryProviders(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QueryProviders_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProvidersRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QueryProviders_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QueryProviders(ctx, &protoReq) + return msg, metadata, err + +} + +func request_QueryService_QueryProvider_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProviderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := client.QueryProvider(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QueryProvider_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProviderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + msg, err := server.QueryProvider(ctx, &protoReq) + return msg, metadata, err + +} + +func request_QueryService_QueryParams_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.QueryParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QueryParams_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.QueryParams(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryServiceHandlerServer registers the http handlers for service QueryService to "mux". +// UnaryRPC :call QueryServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryServiceHandlerFromEndpoint instead. +func RegisterQueryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServiceServer) error { + + mux.Handle("GET", pattern_QueryService_QueryProviders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QueryProviders_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryProviders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryProvider_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QueryProvider_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryProvider_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QueryParams_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryServiceHandlerFromEndpoint is same as RegisterQueryServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryServiceHandler(ctx, mux, conn) +} + +// RegisterQueryServiceHandler registers the http handlers for service QueryService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryServiceHandlerClient(ctx, mux, NewQueryServiceClient(conn)) +} + +// RegisterQueryServiceHandlerClient registers the http handlers for service QueryService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryServiceClient" to call the correct interceptors. +func RegisterQueryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryServiceClient) error { + + mux.Handle("GET", pattern_QueryService_QueryProviders_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QueryProviders_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryProviders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryProvider_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QueryProvider_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryProvider_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QueryParams_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_QueryService_QueryProviders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"sentinel", "providers"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QueryProvider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"sentinel", "providers", "address"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QueryParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sentinel", "modules", "provider", "params"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_QueryService_QueryProviders_0 = runtime.ForwardResponseMessage + + forward_QueryService_QueryProvider_0 = runtime.ForwardResponseMessage + + forward_QueryService_QueryParams_0 = runtime.ForwardResponseMessage +) diff --git a/x/session/types/v1/events.pb.go b/x/session/types/v1/events.pb.go new file mode 100644 index 00000000..547f6deb --- /dev/null +++ b/x/session/types/v1/events.pb.go @@ -0,0 +1,1114 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/session/v1/events.proto + +package v1 + +import ( + fmt "fmt" + types1 "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/sentinel-official/hub/v12/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type EventStart struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + Node string `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty" yaml:"node"` + Subscription uint64 `protobuf:"varint,3,opt,name=subscription,proto3" json:"subscription,omitempty" yaml:"subscription"` +} + +func (m *EventStart) Reset() { *m = EventStart{} } +func (m *EventStart) String() string { return proto.CompactTextString(m) } +func (*EventStart) ProtoMessage() {} +func (*EventStart) Descriptor() ([]byte, []int) { + return fileDescriptor_e34d43b21999bd7a, []int{0} +} +func (m *EventStart) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventStart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventStart.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventStart) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventStart.Merge(m, src) +} +func (m *EventStart) XXX_Size() int { + return m.Size() +} +func (m *EventStart) XXX_DiscardUnknown() { + xxx_messageInfo_EventStart.DiscardUnknown(m) +} + +var xxx_messageInfo_EventStart proto.InternalMessageInfo + +type EventUpdate struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + Node string `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty" yaml:"node"` + Subscription uint64 `protobuf:"varint,3,opt,name=subscription,proto3" json:"subscription,omitempty" yaml:"subscription"` +} + +func (m *EventUpdate) Reset() { *m = EventUpdate{} } +func (m *EventUpdate) String() string { return proto.CompactTextString(m) } +func (*EventUpdate) ProtoMessage() {} +func (*EventUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_e34d43b21999bd7a, []int{1} +} +func (m *EventUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUpdate.Merge(m, src) +} +func (m *EventUpdate) XXX_Size() int { + return m.Size() +} +func (m *EventUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_EventUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUpdate proto.InternalMessageInfo + +type EventSetStatus struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + Node string `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty" yaml:"node"` + Subscription uint64 `protobuf:"varint,3,opt,name=subscription,proto3" json:"subscription,omitempty" yaml:"subscription"` + Status types.Status `protobuf:"varint,4,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty" yaml:"status"` +} + +func (m *EventSetStatus) Reset() { *m = EventSetStatus{} } +func (m *EventSetStatus) String() string { return proto.CompactTextString(m) } +func (*EventSetStatus) ProtoMessage() {} +func (*EventSetStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_e34d43b21999bd7a, []int{2} +} +func (m *EventSetStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSetStatus.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventSetStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSetStatus.Merge(m, src) +} +func (m *EventSetStatus) XXX_Size() int { + return m.Size() +} +func (m *EventSetStatus) XXX_DiscardUnknown() { + xxx_messageInfo_EventSetStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSetStatus proto.InternalMessageInfo + +type EventPay struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + Node string `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty" yaml:"node"` + Subscription uint64 `protobuf:"varint,3,opt,name=subscription,proto3" json:"subscription,omitempty" yaml:"subscription"` + Amount types1.Coin `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount" yaml:"amount"` +} + +func (m *EventPay) Reset() { *m = EventPay{} } +func (m *EventPay) String() string { return proto.CompactTextString(m) } +func (*EventPay) ProtoMessage() {} +func (*EventPay) Descriptor() ([]byte, []int) { + return fileDescriptor_e34d43b21999bd7a, []int{3} +} +func (m *EventPay) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventPay) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventPay.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventPay) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventPay.Merge(m, src) +} +func (m *EventPay) XXX_Size() int { + return m.Size() +} +func (m *EventPay) XXX_DiscardUnknown() { + xxx_messageInfo_EventPay.DiscardUnknown(m) +} + +var xxx_messageInfo_EventPay proto.InternalMessageInfo + +func init() { + proto.RegisterType((*EventStart)(nil), "sentinel.session.v1.EventStart") + proto.RegisterType((*EventUpdate)(nil), "sentinel.session.v1.EventUpdate") + proto.RegisterType((*EventSetStatus)(nil), "sentinel.session.v1.EventSetStatus") + proto.RegisterType((*EventPay)(nil), "sentinel.session.v1.EventPay") +} + +func init() { proto.RegisterFile("sentinel/session/v1/events.proto", fileDescriptor_e34d43b21999bd7a) } + +var fileDescriptor_e34d43b21999bd7a = []byte{ + // 424 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x53, 0x41, 0x8e, 0xd3, 0x30, + 0x14, 0x8d, 0x4b, 0x55, 0x31, 0x2e, 0x33, 0x88, 0x0c, 0x88, 0xce, 0x48, 0x38, 0x91, 0xd9, 0x74, + 0x83, 0xad, 0x94, 0x05, 0x12, 0xec, 0x02, 0x48, 0x2c, 0x51, 0x10, 0x0b, 0xd8, 0x39, 0x89, 0xa7, + 0x63, 0xa9, 0xb1, 0xa3, 0xda, 0x89, 0xe8, 0x21, 0x40, 0x1c, 0x83, 0xa3, 0x74, 0x39, 0x1b, 0x04, + 0xab, 0x08, 0xd2, 0x1b, 0xe4, 0x04, 0x28, 0x76, 0x5a, 0xe0, 0x04, 0xdd, 0x59, 0xdf, 0xef, 0xfb, + 0xbd, 0xf7, 0xfd, 0x3e, 0x0c, 0x35, 0x97, 0x46, 0x48, 0xbe, 0xa2, 0x9a, 0x6b, 0x2d, 0x94, 0xa4, + 0x75, 0x44, 0x79, 0xcd, 0xa5, 0xd1, 0xa4, 0x5c, 0x2b, 0xa3, 0xfc, 0xf3, 0x3d, 0x82, 0x0c, 0x08, + 0x52, 0x47, 0x97, 0x28, 0x53, 0xba, 0x50, 0x9a, 0xa6, 0x4c, 0x73, 0x5a, 0x47, 0x29, 0x37, 0x2c, + 0xa2, 0x99, 0x12, 0xd2, 0x35, 0x5d, 0xde, 0x5f, 0xaa, 0xa5, 0xb2, 0x47, 0xda, 0x9f, 0x86, 0x2a, + 0x3a, 0x90, 0x99, 0x4d, 0xc9, 0x75, 0x4f, 0xa5, 0x0d, 0x33, 0xd5, 0x40, 0x85, 0x3f, 0x03, 0x08, + 0x5f, 0xf7, 0xdc, 0xef, 0x0c, 0x5b, 0x1b, 0xff, 0x11, 0x1c, 0x89, 0x7c, 0x06, 0x42, 0x30, 0x1f, + 0xc7, 0xa7, 0x5d, 0x13, 0x9c, 0x6c, 0x58, 0xb1, 0x7a, 0x8e, 0x45, 0x8e, 0x93, 0x91, 0xc8, 0xfd, + 0xc7, 0x70, 0x2c, 0x55, 0xce, 0x67, 0xa3, 0x10, 0xcc, 0x4f, 0xe2, 0xbb, 0x5d, 0x13, 0x4c, 0x1d, + 0xa0, 0xaf, 0xe2, 0xc4, 0x5e, 0xfa, 0x2f, 0xe0, 0x1d, 0x5d, 0xa5, 0x3a, 0x5b, 0x8b, 0xd2, 0x08, + 0x25, 0x67, 0xb7, 0xec, 0x6b, 0x0f, 0xbb, 0x26, 0x38, 0x77, 0xe0, 0x7f, 0x6f, 0x71, 0xf2, 0x1f, + 0x18, 0x7f, 0x01, 0x70, 0x6a, 0xf5, 0xbc, 0x2f, 0x73, 0x66, 0xf8, 0xf1, 0x05, 0xfd, 0x00, 0xf0, + 0xcc, 0x0d, 0x88, 0xf7, 0x33, 0x32, 0x95, 0x3e, 0xba, 0x26, 0xff, 0x15, 0x9c, 0xb8, 0x4f, 0x9c, + 0x8d, 0x43, 0x30, 0x3f, 0x5b, 0x5c, 0x90, 0x43, 0x60, 0xec, 0x2f, 0x93, 0x3a, 0x22, 0x4e, 0x6b, + 0x7c, 0xaf, 0x6b, 0x82, 0xd3, 0xe1, 0x45, 0x5b, 0xc1, 0xc9, 0xd0, 0x8b, 0xbf, 0x03, 0x78, 0xdb, + 0x3a, 0x7b, 0xcb, 0x36, 0xc7, 0xf7, 0xf4, 0x06, 0x4e, 0x58, 0xa1, 0x2a, 0x69, 0xac, 0xa7, 0xe9, + 0xe2, 0x82, 0xb8, 0xbc, 0x93, 0x3e, 0xef, 0x64, 0xc8, 0x3b, 0x79, 0xa9, 0x84, 0x8c, 0x1f, 0x6c, + 0x9b, 0xc0, 0xfb, 0xeb, 0xcb, 0xb5, 0xe1, 0x64, 0xe8, 0x8f, 0x3f, 0x6c, 0x7f, 0x23, 0xef, 0x5b, + 0x8b, 0xbc, 0x6d, 0x8b, 0xc0, 0x4d, 0x8b, 0xc0, 0xaf, 0x16, 0x81, 0xaf, 0x3b, 0xe4, 0xdd, 0xec, + 0x90, 0xf7, 0x73, 0x87, 0xbc, 0x8f, 0xcf, 0x96, 0xc2, 0x5c, 0x57, 0x29, 0xc9, 0x54, 0x41, 0xf7, + 0x93, 0x7b, 0xa2, 0xae, 0xae, 0x44, 0x26, 0xd8, 0x8a, 0x5e, 0x57, 0x29, 0xad, 0xa3, 0x05, 0xfd, + 0x74, 0xd8, 0xcf, 0xfd, 0xea, 0xa4, 0x13, 0xbb, 0x34, 0x4f, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, + 0xfa, 0xa3, 0xc0, 0xff, 0xc3, 0x03, 0x00, 0x00, +} + +func (m *EventStart) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventStart) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventStart) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Subscription != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Subscription)) + i-- + dAtA[i] = 0x18 + } + if len(m.Node) > 0 { + i -= len(m.Node) + copy(dAtA[i:], m.Node) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Node))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Subscription != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Subscription)) + i-- + dAtA[i] = 0x18 + } + if len(m.Node) > 0 { + i -= len(m.Node) + copy(dAtA[i:], m.Node) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Node))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventSetStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSetStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Status != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x20 + } + if m.Subscription != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Subscription)) + i-- + dAtA[i] = 0x18 + } + if len(m.Node) > 0 { + i -= len(m.Node) + copy(dAtA[i:], m.Node) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Node))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventPay) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventPay) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventPay) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvents(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.Subscription != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Subscription)) + i-- + dAtA[i] = 0x18 + } + if len(m.Node) > 0 { + i -= len(m.Node) + copy(dAtA[i:], m.Node) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Node))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventStart) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovEvents(uint64(m.Id)) + } + l = len(m.Node) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.Subscription != 0 { + n += 1 + sovEvents(uint64(m.Subscription)) + } + return n +} + +func (m *EventUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovEvents(uint64(m.Id)) + } + l = len(m.Node) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.Subscription != 0 { + n += 1 + sovEvents(uint64(m.Subscription)) + } + return n +} + +func (m *EventSetStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovEvents(uint64(m.Id)) + } + l = len(m.Node) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.Subscription != 0 { + n += 1 + sovEvents(uint64(m.Subscription)) + } + if m.Status != 0 { + n += 1 + sovEvents(uint64(m.Status)) + } + return n +} + +func (m *EventPay) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovEvents(uint64(m.Id)) + } + l = len(m.Node) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.Subscription != 0 { + n += 1 + sovEvents(uint64(m.Subscription)) + } + l = m.Amount.Size() + n += 1 + l + sovEvents(uint64(l)) + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventStart) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventStart: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventStart: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Node = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Subscription", wireType) + } + m.Subscription = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Subscription |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Node = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Subscription", wireType) + } + m.Subscription = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Subscription |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSetStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSetStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSetStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Node = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Subscription", wireType) + } + m.Subscription = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Subscription |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventPay) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventPay: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventPay: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Node = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Subscription", wireType) + } + m.Subscription = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Subscription |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/session/types/v1/genesis.pb.go b/x/session/types/v1/genesis.pb.go new file mode 100644 index 00000000..24a63c82 --- /dev/null +++ b/x/session/types/v1/genesis.pb.go @@ -0,0 +1,373 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/session/v1/genesis.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type GenesisState struct { + Sessions []Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"_,omitempty"` + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_1e09c791f2bd16c3, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func init() { + proto.RegisterType((*GenesisState)(nil), "sentinel.session.v1.GenesisState") +} + +func init() { proto.RegisterFile("sentinel/session/v1/genesis.proto", fileDescriptor_1e09c791f2bd16c3) } + +var fileDescriptor_1e09c791f2bd16c3 = []byte{ + // 273 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0x4e, 0xcd, 0x2b, + 0xc9, 0xcc, 0x4b, 0xcd, 0xd1, 0x2f, 0x4e, 0x2d, 0x2e, 0xce, 0xcc, 0xcf, 0xd3, 0x2f, 0x33, 0xd4, + 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, + 0x29, 0xd1, 0x83, 0x2a, 0xd1, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xeb, + 0x83, 0x58, 0x10, 0xa5, 0x52, 0x0a, 0xd8, 0x4c, 0x2b, 0x48, 0x2c, 0x4a, 0xcc, 0x85, 0x1a, 0x26, + 0x85, 0xd5, 0x3e, 0x98, 0xb9, 0x60, 0x25, 0x4a, 0x33, 0x18, 0xb9, 0x78, 0xdc, 0x21, 0x2e, 0x08, + 0x2e, 0x49, 0x2c, 0x49, 0x15, 0xf2, 0xe5, 0xe2, 0x80, 0xaa, 0x28, 0x96, 0x60, 0x54, 0x60, 0xd6, + 0xe0, 0x36, 0x92, 0xd1, 0xc3, 0xe2, 0x26, 0xbd, 0x60, 0x08, 0xd3, 0x49, 0xf8, 0xc4, 0x3d, 0x79, + 0x86, 0x57, 0xf7, 0xe4, 0xb9, 0xe3, 0x75, 0xf2, 0x73, 0x33, 0x4b, 0x52, 0x73, 0x0b, 0x4a, 0x2a, + 0x83, 0xe0, 0x46, 0x08, 0x59, 0x72, 0xb1, 0x41, 0x9c, 0x24, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x6d, + 0x24, 0x8d, 0xd5, 0xb0, 0x00, 0xb0, 0x12, 0x27, 0x16, 0x90, 0x59, 0x41, 0x50, 0x0d, 0x4e, 0x91, + 0x27, 0x1e, 0xca, 0x31, 0xac, 0x78, 0x24, 0xc7, 0x70, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, + 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, + 0x72, 0x0c, 0x51, 0xe6, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x30, + 0x63, 0x75, 0xf3, 0xd3, 0xd2, 0x32, 0x93, 0x33, 0x13, 0x73, 0xf4, 0x33, 0x4a, 0x93, 0xf4, 0xcb, + 0x0c, 0x8d, 0xf4, 0x2b, 0xe0, 0xbe, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0x4c, 0x62, + 0x03, 0x7b, 0xde, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x2e, 0xa2, 0x98, 0x91, 0x01, 0x00, + 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Sessions) > 0 { + for iNdEx := len(m.Sessions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Sessions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Sessions) > 0 { + for _, e := range m.Sessions { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sessions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sessions = append(m.Sessions, Session{}) + if err := m.Sessions[len(m.Sessions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/session/types/v1/msg.pb.go b/x/session/types/v1/msg.pb.go new file mode 100644 index 00000000..5fc3a58e --- /dev/null +++ b/x/session/types/v1/msg.pb.go @@ -0,0 +1,1390 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/session/v1/msg.proto + +package v1 + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgStartRequest defines the SDK message for starting a session +type MsgStartRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Node string `protobuf:"bytes,3,opt,name=node,proto3" json:"node,omitempty"` +} + +func (m *MsgStartRequest) Reset() { *m = MsgStartRequest{} } +func (m *MsgStartRequest) String() string { return proto.CompactTextString(m) } +func (*MsgStartRequest) ProtoMessage() {} +func (*MsgStartRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1cfac64e08a3e319, []int{0} +} +func (m *MsgStartRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStartRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgStartRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStartRequest.Merge(m, src) +} +func (m *MsgStartRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgStartRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStartRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStartRequest proto.InternalMessageInfo + +// MsgUpdateRequest defines the SDK message for updating a session +type MsgUpdateRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Proof Proof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof"` + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *MsgUpdateRequest) Reset() { *m = MsgUpdateRequest{} } +func (m *MsgUpdateRequest) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateRequest) ProtoMessage() {} +func (*MsgUpdateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1cfac64e08a3e319, []int{1} +} +func (m *MsgUpdateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateRequest.Merge(m, src) +} +func (m *MsgUpdateRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateRequest proto.InternalMessageInfo + +// MsgEndRequest defines the SDK message for ending a session +type MsgEndRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Rating uint64 `protobuf:"varint,3,opt,name=rating,proto3" json:"rating,omitempty"` +} + +func (m *MsgEndRequest) Reset() { *m = MsgEndRequest{} } +func (m *MsgEndRequest) String() string { return proto.CompactTextString(m) } +func (*MsgEndRequest) ProtoMessage() {} +func (*MsgEndRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1cfac64e08a3e319, []int{2} +} +func (m *MsgEndRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEndRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEndRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgEndRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEndRequest.Merge(m, src) +} +func (m *MsgEndRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgEndRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEndRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEndRequest proto.InternalMessageInfo + +// MsgStartResponse defines the response of message MsgStartRequest +type MsgStartResponse struct { +} + +func (m *MsgStartResponse) Reset() { *m = MsgStartResponse{} } +func (m *MsgStartResponse) String() string { return proto.CompactTextString(m) } +func (*MsgStartResponse) ProtoMessage() {} +func (*MsgStartResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1cfac64e08a3e319, []int{3} +} +func (m *MsgStartResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgStartResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgStartResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgStartResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgStartResponse.Merge(m, src) +} +func (m *MsgStartResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgStartResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgStartResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgStartResponse proto.InternalMessageInfo + +// MsgUpdateResponse defines the response of message MsgUpdateRequest +type MsgUpdateResponse struct { +} + +func (m *MsgUpdateResponse) Reset() { *m = MsgUpdateResponse{} } +func (m *MsgUpdateResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateResponse) ProtoMessage() {} +func (*MsgUpdateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1cfac64e08a3e319, []int{4} +} +func (m *MsgUpdateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateResponse.Merge(m, src) +} +func (m *MsgUpdateResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateResponse proto.InternalMessageInfo + +// MsgEndResponse defines the response of message MsgEndRequest +type MsgEndResponse struct { +} + +func (m *MsgEndResponse) Reset() { *m = MsgEndResponse{} } +func (m *MsgEndResponse) String() string { return proto.CompactTextString(m) } +func (*MsgEndResponse) ProtoMessage() {} +func (*MsgEndResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1cfac64e08a3e319, []int{5} +} +func (m *MsgEndResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEndResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEndResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgEndResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEndResponse.Merge(m, src) +} +func (m *MsgEndResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgEndResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEndResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEndResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgStartRequest)(nil), "sentinel.session.v1.MsgStartRequest") + proto.RegisterType((*MsgUpdateRequest)(nil), "sentinel.session.v1.MsgUpdateRequest") + proto.RegisterType((*MsgEndRequest)(nil), "sentinel.session.v1.MsgEndRequest") + proto.RegisterType((*MsgStartResponse)(nil), "sentinel.session.v1.MsgStartResponse") + proto.RegisterType((*MsgUpdateResponse)(nil), "sentinel.session.v1.MsgUpdateResponse") + proto.RegisterType((*MsgEndResponse)(nil), "sentinel.session.v1.MsgEndResponse") +} + +func init() { proto.RegisterFile("sentinel/session/v1/msg.proto", fileDescriptor_1cfac64e08a3e319) } + +var fileDescriptor_1cfac64e08a3e319 = []byte{ + // 416 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcd, 0x8a, 0xd4, 0x40, + 0x10, 0xc7, 0x93, 0x18, 0x07, 0xa7, 0xd4, 0x75, 0xed, 0x15, 0x19, 0x82, 0xf6, 0x2e, 0xf1, 0x83, + 0xbd, 0x98, 0x26, 0x23, 0xe8, 0x7d, 0xc1, 0x83, 0xc8, 0x80, 0x46, 0x44, 0xdc, 0x5b, 0x66, 0xd2, + 0xe9, 0x6d, 0x98, 0xe9, 0x8e, 0xe9, 0x4e, 0x50, 0xf0, 0x21, 0x3c, 0xf8, 0x10, 0x3e, 0xca, 0x1c, + 0xe7, 0xe8, 0x49, 0x34, 0xf3, 0x22, 0x92, 0x74, 0x32, 0xa3, 0x32, 0x1f, 0xec, 0xad, 0x52, 0xf5, + 0xab, 0x7f, 0xf5, 0xbf, 0x52, 0x70, 0x5f, 0x51, 0xa1, 0xb9, 0xa0, 0x53, 0xa2, 0xa8, 0x52, 0x5c, + 0x0a, 0x52, 0x86, 0x64, 0xa6, 0x58, 0x90, 0xe5, 0x52, 0x4b, 0x74, 0xd4, 0x95, 0x83, 0xb6, 0x1c, + 0x94, 0xa1, 0x77, 0x87, 0x49, 0x26, 0x9b, 0x3a, 0xa9, 0x23, 0x83, 0x7a, 0xc7, 0x9b, 0x94, 0xb2, + 0x5c, 0xca, 0xd4, 0x00, 0xfe, 0x4b, 0xb8, 0x35, 0x52, 0xec, 0xad, 0x8e, 0x73, 0x1d, 0xd1, 0x8f, + 0x05, 0x55, 0x1a, 0x21, 0x70, 0xd3, 0x5c, 0xce, 0x06, 0xf6, 0x89, 0x7d, 0xda, 0x8f, 0x9a, 0x18, + 0x1d, 0x80, 0xc3, 0x93, 0x81, 0x73, 0x62, 0x9f, 0xba, 0x91, 0xc3, 0x93, 0x9a, 0x11, 0x32, 0xa1, + 0x83, 0x2b, 0x86, 0xa9, 0x63, 0xff, 0x0b, 0x1c, 0x8e, 0x14, 0x7b, 0x97, 0x25, 0xb1, 0xa6, 0xbb, + 0xb4, 0x9e, 0xc1, 0xd5, 0xe6, 0x05, 0x8d, 0xdc, 0xf5, 0xa1, 0x17, 0x6c, 0xb0, 0x13, 0xbc, 0xae, + 0x89, 0x33, 0x77, 0xfe, 0xf3, 0xd8, 0x8a, 0x0c, 0x8e, 0xee, 0x41, 0x5f, 0x71, 0x26, 0x62, 0x5d, + 0xe4, 0x66, 0xf0, 0x8d, 0x68, 0x9d, 0xf0, 0x5f, 0xc1, 0xcd, 0x91, 0x62, 0x2f, 0x44, 0x72, 0x19, + 0x1b, 0x77, 0xa1, 0x97, 0xc7, 0x9a, 0x0b, 0xd6, 0xe8, 0xb9, 0x51, 0xfb, 0xe5, 0xa3, 0xc6, 0x4a, + 0xbb, 0x15, 0x95, 0x49, 0xa1, 0xa8, 0x7f, 0x04, 0xb7, 0xff, 0xb2, 0xd7, 0x26, 0x0f, 0xe1, 0xa0, + 0x9b, 0x6a, 0x32, 0xc3, 0x6f, 0x0e, 0x40, 0xdd, 0x4b, 0xf3, 0x92, 0x4f, 0x28, 0x7a, 0x0f, 0xd7, + 0x3a, 0x25, 0xf4, 0x70, 0xa3, 0xd3, 0xff, 0xd6, 0xef, 0x3d, 0xda, 0x43, 0x99, 0x39, 0xe8, 0x1c, + 0xfa, 0xab, 0xe7, 0xa0, 0xad, 0x3d, 0xff, 0xfc, 0x0d, 0xef, 0xf1, 0x3e, 0xac, 0xd5, 0x7e, 0x03, + 0x3d, 0xe3, 0x0a, 0xf9, 0xdb, 0x3a, 0xd6, 0x8b, 0xf6, 0x1e, 0xec, 0x64, 0x8c, 0xe4, 0xd9, 0x87, + 0xf9, 0x6f, 0x6c, 0x7d, 0xaf, 0xb0, 0x35, 0xaf, 0xb0, 0xbd, 0xa8, 0xb0, 0xfd, 0xab, 0xc2, 0xf6, + 0xd7, 0x25, 0xb6, 0x16, 0x4b, 0x6c, 0xfd, 0x58, 0x62, 0xeb, 0xfc, 0x39, 0xe3, 0xfa, 0xa2, 0x18, + 0x07, 0x13, 0x39, 0x23, 0x9d, 0xe0, 0x13, 0x99, 0xa6, 0x7c, 0xc2, 0xe3, 0x29, 0xb9, 0x28, 0xc6, + 0xa4, 0x0c, 0x87, 0xe4, 0xd3, 0xea, 0x90, 0xf5, 0xe7, 0x8c, 0x2a, 0x52, 0x86, 0xe3, 0x5e, 0x73, + 0xc9, 0x4f, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x37, 0x24, 0xd0, 0x59, 0x36, 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgServiceClient is the client API for MsgService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgServiceClient interface { + MsgStart(ctx context.Context, in *MsgStartRequest, opts ...grpc.CallOption) (*MsgStartResponse, error) + MsgUpdate(ctx context.Context, in *MsgUpdateRequest, opts ...grpc.CallOption) (*MsgUpdateResponse, error) + MsgEnd(ctx context.Context, in *MsgEndRequest, opts ...grpc.CallOption) (*MsgEndResponse, error) +} + +type msgServiceClient struct { + cc grpc1.ClientConn +} + +func NewMsgServiceClient(cc grpc1.ClientConn) MsgServiceClient { + return &msgServiceClient{cc} +} + +func (c *msgServiceClient) MsgStart(ctx context.Context, in *MsgStartRequest, opts ...grpc.CallOption) (*MsgStartResponse, error) { + out := new(MsgStartResponse) + err := c.cc.Invoke(ctx, "/sentinel.session.v1.MsgService/MsgStart", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgServiceClient) MsgUpdate(ctx context.Context, in *MsgUpdateRequest, opts ...grpc.CallOption) (*MsgUpdateResponse, error) { + out := new(MsgUpdateResponse) + err := c.cc.Invoke(ctx, "/sentinel.session.v1.MsgService/MsgUpdate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgServiceClient) MsgEnd(ctx context.Context, in *MsgEndRequest, opts ...grpc.CallOption) (*MsgEndResponse, error) { + out := new(MsgEndResponse) + err := c.cc.Invoke(ctx, "/sentinel.session.v1.MsgService/MsgEnd", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServiceServer is the server API for MsgService service. +type MsgServiceServer interface { + MsgStart(context.Context, *MsgStartRequest) (*MsgStartResponse, error) + MsgUpdate(context.Context, *MsgUpdateRequest) (*MsgUpdateResponse, error) + MsgEnd(context.Context, *MsgEndRequest) (*MsgEndResponse, error) +} + +// UnimplementedMsgServiceServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServiceServer struct { +} + +func (*UnimplementedMsgServiceServer) MsgStart(ctx context.Context, req *MsgStartRequest) (*MsgStartResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgStart not implemented") +} +func (*UnimplementedMsgServiceServer) MsgUpdate(ctx context.Context, req *MsgUpdateRequest) (*MsgUpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgUpdate not implemented") +} +func (*UnimplementedMsgServiceServer) MsgEnd(ctx context.Context, req *MsgEndRequest) (*MsgEndResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgEnd not implemented") +} + +func RegisterMsgServiceServer(s grpc1.Server, srv MsgServiceServer) { + s.RegisterService(&_MsgService_serviceDesc, srv) +} + +func _MsgService_MsgStart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgStartRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgStart(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.session.v1.MsgService/MsgStart", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgStart(ctx, req.(*MsgStartRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MsgService_MsgUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgUpdate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.session.v1.MsgService/MsgUpdate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgUpdate(ctx, req.(*MsgUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MsgService_MsgEnd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEndRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgEnd(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.session.v1.MsgService/MsgEnd", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgEnd(ctx, req.(*MsgEndRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _MsgService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "sentinel.session.v1.MsgService", + HandlerType: (*MsgServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "MsgStart", + Handler: _MsgService_MsgStart_Handler, + }, + { + MethodName: "MsgUpdate", + Handler: _MsgService_MsgUpdate_Handler, + }, + { + MethodName: "MsgEnd", + Handler: _MsgService_MsgEnd_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sentinel/session/v1/msg.proto", +} + +func (m *MsgStartRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgStartRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStartRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Node) > 0 { + i -= len(m.Node) + copy(dAtA[i:], m.Node) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Node))) + i-- + dAtA[i] = 0x1a + } + if m.Id != 0 { + i = encodeVarintMsg(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x1a + } + { + size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgEndRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgEndRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEndRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Rating != 0 { + i = encodeVarintMsg(dAtA, i, uint64(m.Rating)) + i-- + dAtA[i] = 0x18 + } + if m.Id != 0 { + i = encodeVarintMsg(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgStartResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgStartResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgStartResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgEndResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgEndResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgEndResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintMsg(dAtA []byte, offset int, v uint64) int { + offset -= sovMsg(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgStartRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if m.Id != 0 { + n += 1 + sovMsg(uint64(m.Id)) + } + l = len(m.Node) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + return n +} + +func (m *MsgUpdateRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = m.Proof.Size() + n += 1 + l + sovMsg(uint64(l)) + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + return n +} + +func (m *MsgEndRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if m.Id != 0 { + n += 1 + sovMsg(uint64(m.Id)) + } + if m.Rating != 0 { + n += 1 + sovMsg(uint64(m.Rating)) + } + return n +} + +func (m *MsgStartResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgEndResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovMsg(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMsg(x uint64) (n int) { + return sovMsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgStartRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgStartRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStartRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Node = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgEndRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgEndRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEndRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Rating", wireType) + } + m.Rating = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Rating |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgStartResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgStartResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgStartResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgEndResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgEndResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEndResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMsg(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMsg + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMsg + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMsg + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMsg + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMsg + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMsg + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMsg = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/session/types/v1/params.pb.go b/x/session/types/v1/params.pb.go new file mode 100644 index 00000000..2f0db514 --- /dev/null +++ b/x/session/types/v1/params.pb.go @@ -0,0 +1,354 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/session/v1/params.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/durationpb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Params struct { + InactiveDuration time.Duration `protobuf:"bytes,1,opt,name=inactive_duration,json=inactiveDuration,proto3,stdduration" json:"inactive_duration"` + ProofVerificationEnabled bool `protobuf:"varint,2,opt,name=proof_verification_enabled,json=proofVerificationEnabled,proto3" json:"proof_verification_enabled,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_6b86e8f1be7738cd, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Params)(nil), "sentinel.session.v1.Params") +} + +func init() { proto.RegisterFile("sentinel/session/v1/params.proto", fileDescriptor_6b86e8f1be7738cd) } + +var fileDescriptor_6b86e8f1be7738cd = []byte{ + // 287 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0xbf, 0x4e, 0xeb, 0x30, + 0x18, 0xc5, 0xed, 0x3b, 0x54, 0x55, 0xee, 0x02, 0x85, 0x21, 0x64, 0x70, 0x23, 0xa6, 0x2e, 0xd8, + 0x4a, 0x19, 0x58, 0x98, 0x2a, 0xd8, 0xab, 0x0e, 0x48, 0xb0, 0x44, 0x4e, 0xea, 0xa4, 0x96, 0xd2, + 0x7c, 0x51, 0xec, 0x58, 0xf0, 0x16, 0x8c, 0x7d, 0x04, 0x1e, 0x25, 0x63, 0x47, 0x26, 0xfe, 0x24, + 0x2f, 0x82, 0xea, 0xd4, 0x88, 0xcd, 0x3e, 0xe7, 0x77, 0x8e, 0xf4, 0x1d, 0x2f, 0x54, 0xa2, 0xd4, + 0xb2, 0x14, 0x05, 0x53, 0x42, 0x29, 0x09, 0x25, 0x33, 0x11, 0xab, 0x78, 0xcd, 0xb7, 0x8a, 0x56, + 0x35, 0x68, 0x98, 0x9c, 0x39, 0x82, 0x1e, 0x09, 0x6a, 0xa2, 0xe0, 0x3c, 0x87, 0x1c, 0xac, 0xcf, + 0x0e, 0xaf, 0x01, 0x0d, 0x48, 0x0e, 0x90, 0x17, 0x82, 0xd9, 0x5f, 0xd2, 0x64, 0x6c, 0xdd, 0xd4, + 0x5c, 0x1f, 0x22, 0x56, 0xb9, 0xdc, 0x61, 0x6f, 0xb4, 0xb4, 0xdd, 0x93, 0xa5, 0x77, 0x2a, 0x4b, + 0x9e, 0x6a, 0x69, 0x44, 0xec, 0x28, 0x1f, 0x87, 0x78, 0xf6, 0x7f, 0x7e, 0x41, 0x87, 0x1a, 0xea, + 0x6a, 0xe8, 0xdd, 0x11, 0x58, 0x8c, 0xdb, 0x8f, 0x29, 0xda, 0x7d, 0x4e, 0xf1, 0xea, 0xc4, 0xa5, + 0x9d, 0x37, 0xb9, 0xf5, 0x82, 0xaa, 0x06, 0xc8, 0x62, 0x23, 0x6a, 0x99, 0xc9, 0xd4, 0xaa, 0xb1, + 0x28, 0x79, 0x52, 0x88, 0xb5, 0xff, 0x2f, 0xc4, 0xb3, 0xf1, 0xca, 0xb7, 0xc4, 0xc3, 0x1f, 0xe0, + 0x7e, 0xf0, 0x17, 0x8f, 0xed, 0x37, 0x41, 0x6f, 0x1d, 0x41, 0x6d, 0x47, 0xf0, 0xbe, 0x23, 0xf8, + 0xab, 0x23, 0xf8, 0xb5, 0x27, 0x68, 0xdf, 0x13, 0xf4, 0xde, 0x13, 0xf4, 0x74, 0x93, 0x4b, 0xbd, + 0x69, 0x12, 0x9a, 0xc2, 0x96, 0xb9, 0x49, 0xae, 0x20, 0xcb, 0x64, 0x2a, 0x79, 0xc1, 0x36, 0x4d, + 0xc2, 0x4c, 0x34, 0x67, 0xcf, 0xbf, 0x3b, 0xea, 0x97, 0x4a, 0x28, 0x66, 0xa2, 0x64, 0x64, 0xef, + 0xb8, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x3a, 0x60, 0x9c, 0x78, 0x6b, 0x01, 0x00, 0x00, +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProofVerificationEnabled { + i-- + if m.ProofVerificationEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.InactiveDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.InactiveDuration):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintParams(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.InactiveDuration) + n += 1 + l + sovParams(uint64(l)) + if m.ProofVerificationEnabled { + n += 2 + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InactiveDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.InactiveDuration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProofVerificationEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ProofVerificationEnabled = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/session/types/v1/proof.pb.go b/x/session/types/v1/proof.pb.go new file mode 100644 index 00000000..9f732369 --- /dev/null +++ b/x/session/types/v1/proof.pb.go @@ -0,0 +1,396 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/session/v1/proof.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + types "github.com/sentinel-official/hub/v12/types" + _ "google.golang.org/protobuf/types/known/durationpb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Proof struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Duration time.Duration `protobuf:"bytes,2,opt,name=duration,proto3,stdduration" json:"duration"` + Bandwidth types.Bandwidth `protobuf:"bytes,3,opt,name=bandwidth,proto3" json:"bandwidth"` +} + +func (m *Proof) Reset() { *m = Proof{} } +func (m *Proof) String() string { return proto.CompactTextString(m) } +func (*Proof) ProtoMessage() {} +func (*Proof) Descriptor() ([]byte, []int) { + return fileDescriptor_5c7e6824be930eaf, []int{0} +} +func (m *Proof) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Proof.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Proof) XXX_Merge(src proto.Message) { + xxx_messageInfo_Proof.Merge(m, src) +} +func (m *Proof) XXX_Size() int { + return m.Size() +} +func (m *Proof) XXX_DiscardUnknown() { + xxx_messageInfo_Proof.DiscardUnknown(m) +} + +var xxx_messageInfo_Proof proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Proof)(nil), "sentinel.session.v1.Proof") +} + +func init() { proto.RegisterFile("sentinel/session/v1/proof.proto", fileDescriptor_5c7e6824be930eaf) } + +var fileDescriptor_5c7e6824be930eaf = []byte{ + // 293 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x90, 0xbb, 0x4e, 0x84, 0x40, + 0x14, 0x86, 0x67, 0xd6, 0xd5, 0xac, 0x98, 0x58, 0xa0, 0x05, 0x6e, 0xcc, 0xb0, 0x5a, 0x6d, 0xe3, + 0x9c, 0xb0, 0x16, 0x96, 0x1a, 0xe2, 0x03, 0x18, 0x3a, 0xed, 0x60, 0xb9, 0x4d, 0x82, 0x1c, 0x02, + 0x03, 0xea, 0x5b, 0x58, 0x1a, 0x9f, 0xc0, 0x47, 0xa1, 0xdc, 0xd2, 0xca, 0x0b, 0xbc, 0x88, 0x01, + 0x76, 0xb0, 0x83, 0x9c, 0xef, 0xff, 0xbf, 0x39, 0x47, 0x33, 0x8b, 0x20, 0x95, 0x22, 0x0d, 0x12, + 0x28, 0x82, 0xa2, 0x10, 0x98, 0x42, 0x65, 0x41, 0x96, 0x23, 0x86, 0x3c, 0xcb, 0x51, 0xa2, 0x7e, + 0xa4, 0x00, 0xbe, 0x05, 0x78, 0x65, 0xcd, 0x8f, 0x23, 0x8c, 0xb0, 0x9f, 0x43, 0xf7, 0x35, 0xa0, + 0x73, 0x16, 0x21, 0x46, 0x49, 0x00, 0xfd, 0x9f, 0x57, 0x86, 0xe0, 0x97, 0xb9, 0x2b, 0xbb, 0xc8, + 0x30, 0x3f, 0x1b, 0x5d, 0xf2, 0x25, 0x0b, 0x8a, 0xce, 0xe4, 0xb9, 0xa9, 0xff, 0x24, 0x7c, 0x19, + 0x0f, 0xc8, 0xf9, 0x3b, 0xd5, 0x76, 0xef, 0x3a, 0xbb, 0x7e, 0xa8, 0x4d, 0x84, 0x6f, 0xd0, 0x05, + 0x5d, 0x4e, 0x9d, 0x89, 0xf0, 0xf5, 0x6b, 0x6d, 0xa6, 0xea, 0x8c, 0xc9, 0x82, 0x2e, 0x0f, 0x56, + 0x27, 0x7c, 0xf0, 0x71, 0xe5, 0xe3, 0xb7, 0x5b, 0xc0, 0x9e, 0xd5, 0x5f, 0x26, 0x79, 0xfb, 0x36, + 0xa9, 0x33, 0x86, 0xf4, 0x1b, 0x6d, 0x7f, 0xb4, 0x19, 0x3b, 0x7d, 0xc3, 0x29, 0x1f, 0x97, 0xeb, + 0x5f, 0xc4, 0x2b, 0x8b, 0xdb, 0x8a, 0xb1, 0xa7, 0x5d, 0x89, 0xf3, 0x1f, 0xb2, 0xef, 0xeb, 0x5f, + 0x46, 0x3e, 0x1a, 0x46, 0xea, 0x86, 0xd1, 0x4d, 0xc3, 0xe8, 0x4f, 0xc3, 0xe8, 0x6b, 0xcb, 0xc8, + 0xa6, 0x65, 0xe4, 0xb3, 0x65, 0xe4, 0xe1, 0x2a, 0x12, 0x32, 0x2e, 0x3d, 0xbe, 0xc6, 0x47, 0x50, + 0xd5, 0x17, 0x18, 0x86, 0x62, 0x2d, 0xdc, 0x04, 0xe2, 0xd2, 0x83, 0xca, 0x5a, 0xc1, 0xf3, 0x78, + 0x6b, 0x75, 0x07, 0x6f, 0xaf, 0xdf, 0xe1, 0xf2, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x9b, 0x23, + 0x97, 0x8f, 0x01, 0x00, 0x00, +} + +func (m *Proof) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Proof) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Proof) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Bandwidth.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProof(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintProof(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x12 + if m.Id != 0 { + i = encodeVarintProof(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintProof(dAtA []byte, offset int, v uint64) int { + offset -= sovProof(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Proof) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovProof(uint64(m.Id)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration) + n += 1 + l + sovProof(uint64(l)) + l = m.Bandwidth.Size() + n += 1 + l + sovProof(uint64(l)) + return n +} + +func sovProof(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozProof(x uint64) (n int) { + return sovProof(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Proof) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProof + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Proof: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Proof: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProof + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProof + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProof + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProof + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bandwidth", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProof + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProof + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProof + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Bandwidth.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProof(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProof + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProof(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProof + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProof + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProof + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthProof + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupProof + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthProof + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthProof = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProof = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProof = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/session/types/v1/querier.pb.go b/x/session/types/v1/querier.pb.go new file mode 100644 index 00000000..fd09a363 --- /dev/null +++ b/x/session/types/v1/querier.pb.go @@ -0,0 +1,1838 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/session/v1/querier.proto + +package v1 + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/sentinel-official/hub/v12/types" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type QuerySessionsRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QuerySessionsRequest) Reset() { *m = QuerySessionsRequest{} } +func (m *QuerySessionsRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySessionsRequest) ProtoMessage() {} +func (*QuerySessionsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b1b8fd13f8c99462, []int{0} +} +func (m *QuerySessionsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySessionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySessionsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySessionsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySessionsRequest.Merge(m, src) +} +func (m *QuerySessionsRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySessionsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySessionsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySessionsRequest proto.InternalMessageInfo + +type QuerySessionsForAddressRequest struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Status types.Status `protobuf:"varint,2,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QuerySessionsForAddressRequest) Reset() { *m = QuerySessionsForAddressRequest{} } +func (m *QuerySessionsForAddressRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySessionsForAddressRequest) ProtoMessage() {} +func (*QuerySessionsForAddressRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b1b8fd13f8c99462, []int{1} +} +func (m *QuerySessionsForAddressRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySessionsForAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySessionsForAddressRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySessionsForAddressRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySessionsForAddressRequest.Merge(m, src) +} +func (m *QuerySessionsForAddressRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySessionsForAddressRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySessionsForAddressRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySessionsForAddressRequest proto.InternalMessageInfo + +type QuerySessionRequest struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QuerySessionRequest) Reset() { *m = QuerySessionRequest{} } +func (m *QuerySessionRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySessionRequest) ProtoMessage() {} +func (*QuerySessionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b1b8fd13f8c99462, []int{2} +} +func (m *QuerySessionRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySessionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySessionRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySessionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySessionRequest.Merge(m, src) +} +func (m *QuerySessionRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySessionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySessionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySessionRequest proto.InternalMessageInfo + +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b1b8fd13f8c99462, []int{3} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +type QuerySessionsResponse struct { + Sessions []Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QuerySessionsResponse) Reset() { *m = QuerySessionsResponse{} } +func (m *QuerySessionsResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySessionsResponse) ProtoMessage() {} +func (*QuerySessionsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b1b8fd13f8c99462, []int{4} +} +func (m *QuerySessionsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySessionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySessionsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySessionsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySessionsResponse.Merge(m, src) +} +func (m *QuerySessionsResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySessionsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySessionsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySessionsResponse proto.InternalMessageInfo + +type QuerySessionsForAddressResponse struct { + Sessions []Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QuerySessionsForAddressResponse) Reset() { *m = QuerySessionsForAddressResponse{} } +func (m *QuerySessionsForAddressResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySessionsForAddressResponse) ProtoMessage() {} +func (*QuerySessionsForAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b1b8fd13f8c99462, []int{5} +} +func (m *QuerySessionsForAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySessionsForAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySessionsForAddressResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySessionsForAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySessionsForAddressResponse.Merge(m, src) +} +func (m *QuerySessionsForAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySessionsForAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySessionsForAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySessionsForAddressResponse proto.InternalMessageInfo + +type QuerySessionResponse struct { + Session Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session"` +} + +func (m *QuerySessionResponse) Reset() { *m = QuerySessionResponse{} } +func (m *QuerySessionResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySessionResponse) ProtoMessage() {} +func (*QuerySessionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b1b8fd13f8c99462, []int{6} +} +func (m *QuerySessionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySessionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySessionResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySessionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySessionResponse.Merge(m, src) +} +func (m *QuerySessionResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySessionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySessionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySessionResponse proto.InternalMessageInfo + +type QueryParamsResponse struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b1b8fd13f8c99462, []int{7} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*QuerySessionsRequest)(nil), "sentinel.session.v1.QuerySessionsRequest") + proto.RegisterType((*QuerySessionsForAddressRequest)(nil), "sentinel.session.v1.QuerySessionsForAddressRequest") + proto.RegisterType((*QuerySessionRequest)(nil), "sentinel.session.v1.QuerySessionRequest") + proto.RegisterType((*QueryParamsRequest)(nil), "sentinel.session.v1.QueryParamsRequest") + proto.RegisterType((*QuerySessionsResponse)(nil), "sentinel.session.v1.QuerySessionsResponse") + proto.RegisterType((*QuerySessionsForAddressResponse)(nil), "sentinel.session.v1.QuerySessionsForAddressResponse") + proto.RegisterType((*QuerySessionResponse)(nil), "sentinel.session.v1.QuerySessionResponse") + proto.RegisterType((*QueryParamsResponse)(nil), "sentinel.session.v1.QueryParamsResponse") +} + +func init() { proto.RegisterFile("sentinel/session/v1/querier.proto", fileDescriptor_b1b8fd13f8c99462) } + +var fileDescriptor_b1b8fd13f8c99462 = []byte{ + // 655 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x95, 0x41, 0x4f, 0xd4, 0x4e, + 0x18, 0xc6, 0x77, 0x16, 0x02, 0xff, 0xff, 0xa0, 0x1c, 0x86, 0x35, 0xc0, 0x4a, 0xca, 0xda, 0x04, + 0x29, 0x24, 0xcc, 0xa4, 0x8b, 0x89, 0x31, 0x31, 0x26, 0x72, 0xc0, 0x2b, 0x16, 0x2f, 0x7a, 0x30, + 0x99, 0x6d, 0x87, 0x32, 0xc9, 0x6e, 0xa7, 0x74, 0xda, 0x46, 0x42, 0xb8, 0x10, 0x4f, 0x9e, 0x4c, + 0xfc, 0x02, 0x1e, 0x8d, 0x57, 0xe3, 0x77, 0xe0, 0x48, 0xe2, 0xc5, 0x8b, 0x46, 0x17, 0x3f, 0x88, + 0xd9, 0xe9, 0xb4, 0x4b, 0xa1, 0x64, 0x57, 0x4f, 0xde, 0xba, 0xdd, 0xe7, 0x7d, 0xde, 0xdf, 0x33, + 0xef, 0xcc, 0x14, 0xde, 0x91, 0x2c, 0x88, 0x79, 0xc0, 0xba, 0x44, 0x32, 0x29, 0xb9, 0x08, 0x48, + 0x6a, 0x93, 0x83, 0x84, 0x45, 0x9c, 0x45, 0x38, 0x8c, 0x44, 0x2c, 0xd0, 0x5c, 0x2e, 0xc1, 0x5a, + 0x82, 0x53, 0xbb, 0xb9, 0xee, 0x0a, 0xd9, 0x13, 0x92, 0x74, 0xa8, 0x64, 0x4a, 0x7f, 0x48, 0x52, + 0xbb, 0xc3, 0x62, 0x6a, 0x93, 0x90, 0xfa, 0x3c, 0xa0, 0xf1, 0x40, 0xa8, 0x0c, 0x9a, 0x0d, 0x5f, + 0xf8, 0x42, 0x3d, 0x92, 0xc1, 0x93, 0x7e, 0xbb, 0xe4, 0x0b, 0xe1, 0x77, 0x19, 0xa1, 0x21, 0x27, + 0x34, 0x08, 0x44, 0xac, 0x4a, 0xa4, 0xfe, 0xb7, 0x55, 0xc5, 0x15, 0xd2, 0x88, 0xf6, 0x72, 0x45, + 0x25, 0x79, 0x4e, 0x98, 0x49, 0x8c, 0x42, 0x12, 0x1f, 0x86, 0x4c, 0x2a, 0x41, 0x4c, 0xe3, 0x44, + 0x5b, 0x98, 0x2f, 0x61, 0xe3, 0xe9, 0x00, 0x7d, 0x37, 0xab, 0x92, 0x0e, 0x3b, 0x48, 0x98, 0x8c, + 0xd1, 0x36, 0x84, 0xc3, 0x10, 0x0b, 0xa0, 0x05, 0xac, 0x99, 0xf6, 0x5d, 0x9c, 0x25, 0xc6, 0x83, + 0xc4, 0x58, 0x25, 0xc6, 0x3a, 0x31, 0xde, 0xa1, 0x3e, 0xd3, 0xb5, 0xce, 0x85, 0x4a, 0xf3, 0x33, + 0x80, 0x46, 0xa9, 0xc1, 0xb6, 0x88, 0x1e, 0x7b, 0x5e, 0xc4, 0x64, 0xd1, 0x6a, 0x01, 0x4e, 0xd3, + 0xec, 0x8d, 0xea, 0xf3, 0xbf, 0x93, 0xff, 0x44, 0x36, 0x9c, 0xca, 0x60, 0x17, 0xea, 0x2d, 0x60, + 0xcd, 0xb6, 0x17, 0x71, 0x31, 0x07, 0x95, 0x06, 0xa7, 0x36, 0xde, 0x55, 0x02, 0x47, 0x0b, 0x2f, + 0x71, 0x4f, 0xfc, 0x35, 0xf7, 0x0a, 0x9c, 0xbb, 0x88, 0x9d, 0xb3, 0xce, 0xc2, 0x3a, 0xf7, 0x14, + 0xe6, 0xa4, 0x53, 0xe7, 0x9e, 0xd9, 0x80, 0x48, 0xc9, 0x76, 0xd4, 0x58, 0xb4, 0xca, 0x7c, 0x0f, + 0xe0, 0xad, 0x4b, 0xab, 0x2a, 0x43, 0x11, 0x48, 0x86, 0x1e, 0xc1, 0xff, 0xf4, 0x7c, 0x06, 0x61, + 0x27, 0xac, 0x99, 0xf6, 0x12, 0xae, 0xd8, 0x5b, 0x58, 0x17, 0x6e, 0x4d, 0x9e, 0x7e, 0x5f, 0xae, + 0x39, 0x45, 0x0d, 0x7a, 0x52, 0x8a, 0x57, 0x57, 0xf1, 0x56, 0x47, 0xc6, 0xcb, 0x9a, 0x97, 0xf2, + 0x7d, 0x04, 0x70, 0xf9, 0xda, 0xb9, 0xfc, 0x6b, 0xb0, 0xcf, 0xca, 0x9b, 0xb4, 0x00, 0x7c, 0x08, + 0xa7, 0x75, 0x33, 0xbd, 0x43, 0xc7, 0xe1, 0xcb, 0x4b, 0xcc, 0x1d, 0x3d, 0xe2, 0x7c, 0x76, 0xda, + 0xf4, 0x01, 0x9c, 0xca, 0x0e, 0x99, 0xf6, 0xbc, 0x5d, 0xe9, 0x99, 0x15, 0x69, 0x4b, 0x5d, 0xd0, + 0xfe, 0x36, 0x09, 0x6f, 0x68, 0xd0, 0x28, 0xe5, 0x2e, 0x43, 0x27, 0x00, 0xde, 0x2c, 0xad, 0x32, + 0x5a, 0xab, 0x74, 0xab, 0x3a, 0x82, 0xcd, 0xf5, 0x71, 0xa4, 0x19, 0xb4, 0xd9, 0x3c, 0xf9, 0xf2, + 0xeb, 0x5d, 0xbd, 0x81, 0x10, 0xb9, 0x7c, 0x25, 0x48, 0xf4, 0x09, 0xc0, 0xf9, 0x6b, 0x46, 0x8d, + 0x36, 0x47, 0xf7, 0xb8, 0x72, 0x60, 0x9b, 0xf7, 0xfe, 0xac, 0x48, 0x23, 0x6e, 0x28, 0xc4, 0x55, + 0xb4, 0x32, 0x44, 0xa4, 0xae, 0x2b, 0x92, 0x20, 0x96, 0xe4, 0x48, 0x9f, 0xf8, 0xe3, 0x21, 0xf5, + 0x6b, 0x50, 0xac, 0xa5, 0x7a, 0x83, 0xac, 0x91, 0x5d, 0x73, 0xbe, 0xb5, 0x31, 0x94, 0x1a, 0x6a, + 0x59, 0x41, 0x2d, 0xa2, 0xf9, 0xab, 0xeb, 0x46, 0x8e, 0xb8, 0x77, 0x8c, 0xde, 0x00, 0x38, 0x73, + 0x61, 0x97, 0xa0, 0xd5, 0xeb, 0xbd, 0x4b, 0x77, 0x40, 0xd3, 0x1a, 0x2d, 0xd4, 0x0c, 0x96, 0x62, + 0x30, 0x51, 0x6b, 0xc8, 0xd0, 0x13, 0x5e, 0xd2, 0x65, 0xb2, 0xb8, 0xd6, 0xb3, 0xfd, 0xb5, 0xf5, + 0xfc, 0xf4, 0xa7, 0x51, 0xfb, 0xd0, 0x37, 0x6a, 0xa7, 0x7d, 0x03, 0x9c, 0xf5, 0x0d, 0xf0, 0xa3, + 0x6f, 0x80, 0xb7, 0xe7, 0x46, 0xed, 0xec, 0xdc, 0xa8, 0x7d, 0x3d, 0x37, 0x6a, 0x2f, 0xee, 0xfb, + 0x3c, 0xde, 0x4f, 0x3a, 0xd8, 0x15, 0xbd, 0xc2, 0x6d, 0x43, 0xec, 0xed, 0x71, 0x97, 0xd3, 0x2e, + 0xd9, 0x4f, 0x3a, 0x24, 0xb5, 0xdb, 0xe4, 0x55, 0x61, 0x9c, 0x7f, 0x14, 0x3a, 0x53, 0xea, 0x73, + 0xb0, 0xf9, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x7c, 0xf9, 0x6e, 0x84, 0x0d, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryServiceClient is the client API for QueryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryServiceClient interface { + QuerySessions(ctx context.Context, in *QuerySessionsRequest, opts ...grpc.CallOption) (*QuerySessionsResponse, error) + QuerySessionsForAddress(ctx context.Context, in *QuerySessionsForAddressRequest, opts ...grpc.CallOption) (*QuerySessionsForAddressResponse, error) + QuerySession(ctx context.Context, in *QuerySessionRequest, opts ...grpc.CallOption) (*QuerySessionResponse, error) + QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryServiceClient struct { + cc grpc1.ClientConn +} + +func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { + return &queryServiceClient{cc} +} + +func (c *queryServiceClient) QuerySessions(ctx context.Context, in *QuerySessionsRequest, opts ...grpc.CallOption) (*QuerySessionsResponse, error) { + out := new(QuerySessionsResponse) + err := c.cc.Invoke(ctx, "/sentinel.session.v1.QueryService/QuerySessions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QuerySessionsForAddress(ctx context.Context, in *QuerySessionsForAddressRequest, opts ...grpc.CallOption) (*QuerySessionsForAddressResponse, error) { + out := new(QuerySessionsForAddressResponse) + err := c.cc.Invoke(ctx, "/sentinel.session.v1.QueryService/QuerySessionsForAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QuerySession(ctx context.Context, in *QuerySessionRequest, opts ...grpc.CallOption) (*QuerySessionResponse, error) { + out := new(QuerySessionResponse) + err := c.cc.Invoke(ctx, "/sentinel.session.v1.QueryService/QuerySession", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/sentinel.session.v1.QueryService/QueryParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServiceServer is the server API for QueryService service. +type QueryServiceServer interface { + QuerySessions(context.Context, *QuerySessionsRequest) (*QuerySessionsResponse, error) + QuerySessionsForAddress(context.Context, *QuerySessionsForAddressRequest) (*QuerySessionsForAddressResponse, error) + QuerySession(context.Context, *QuerySessionRequest) (*QuerySessionResponse, error) + QueryParams(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +} + +// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServiceServer struct { +} + +func (*UnimplementedQueryServiceServer) QuerySessions(ctx context.Context, req *QuerySessionsRequest) (*QuerySessionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QuerySessions not implemented") +} +func (*UnimplementedQueryServiceServer) QuerySessionsForAddress(ctx context.Context, req *QuerySessionsForAddressRequest) (*QuerySessionsForAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QuerySessionsForAddress not implemented") +} +func (*UnimplementedQueryServiceServer) QuerySession(ctx context.Context, req *QuerySessionRequest) (*QuerySessionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QuerySession not implemented") +} +func (*UnimplementedQueryServiceServer) QueryParams(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryParams not implemented") +} + +func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { + s.RegisterService(&_QueryService_serviceDesc, srv) +} + +func _QueryService_QuerySessions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySessionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QuerySessions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.session.v1.QueryService/QuerySessions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QuerySessions(ctx, req.(*QuerySessionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QuerySessionsForAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySessionsForAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QuerySessionsForAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.session.v1.QueryService/QuerySessionsForAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QuerySessionsForAddress(ctx, req.(*QuerySessionsForAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QuerySession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QuerySession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.session.v1.QueryService/QuerySession", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QuerySession(ctx, req.(*QuerySessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QueryParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.session.v1.QueryService/QueryParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryParams(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _QueryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "sentinel.session.v1.QueryService", + HandlerType: (*QueryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QuerySessions", + Handler: _QueryService_QuerySessions_Handler, + }, + { + MethodName: "QuerySessionsForAddress", + Handler: _QueryService_QuerySessionsForAddress_Handler, + }, + { + MethodName: "QuerySession", + Handler: _QueryService_QuerySession_Handler, + }, + { + MethodName: "QueryParams", + Handler: _QueryService_QueryParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sentinel/session/v1/querier.proto", +} + +func (m *QuerySessionsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySessionsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySessionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySessionsForAddressRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySessionsForAddressRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySessionsForAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Status != 0 { + i = encodeVarintQuerier(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x10 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuerier(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySessionRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySessionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySessionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintQuerier(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QuerySessionsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySessionsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySessionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Sessions) > 0 { + for iNdEx := len(m.Sessions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Sessions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QuerySessionsForAddressResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySessionsForAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySessionsForAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Sessions) > 0 { + for iNdEx := len(m.Sessions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Sessions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QuerySessionResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySessionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySessionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Session.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuerier(dAtA []byte, offset int, v uint64) int { + offset -= sovQuerier(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QuerySessionsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QuerySessionsForAddressRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuerier(uint64(l)) + } + if m.Status != 0 { + n += 1 + sovQuerier(uint64(m.Status)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QuerySessionRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuerier(uint64(m.Id)) + } + return n +} + +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QuerySessionsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Sessions) > 0 { + for _, e := range m.Sessions { + l = e.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QuerySessionsForAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Sessions) > 0 { + for _, e := range m.Sessions { + l = e.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QuerySessionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Session.Size() + n += 1 + l + sovQuerier(uint64(l)) + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuerier(uint64(l)) + return n +} + +func sovQuerier(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuerier(x uint64) (n int) { + return sovQuerier(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QuerySessionsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySessionsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySessionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySessionsForAddressRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySessionsForAddressRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySessionsForAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySessionRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySessionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySessionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySessionsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySessionsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySessionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sessions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sessions = append(m.Sessions, Session{}) + if err := m.Sessions[len(m.Sessions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySessionsForAddressResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySessionsForAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySessionsForAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sessions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sessions = append(m.Sessions, Session{}) + if err := m.Sessions[len(m.Sessions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySessionResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySessionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySessionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Session", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Session.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuerier(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuerier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuerier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuerier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuerier + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuerier + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuerier + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuerier = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuerier = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuerier = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/session/types/v1/querier.pb.gw.go b/x/session/types/v1/querier.pb.gw.go new file mode 100644 index 00000000..85a9a1f5 --- /dev/null +++ b/x/session/types/v1/querier.pb.gw.go @@ -0,0 +1,456 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: sentinel/session/v1/querier.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_QueryService_QuerySessions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_QueryService_QuerySessions_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySessionsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QuerySessions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QuerySessions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QuerySessions_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySessionsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QuerySessions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QuerySessions(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_QueryService_QuerySessionsForAddress_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_QueryService_QuerySessionsForAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySessionsForAddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QuerySessionsForAddress_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QuerySessionsForAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QuerySessionsForAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySessionsForAddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QuerySessionsForAddress_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QuerySessionsForAddress(ctx, &protoReq) + return msg, metadata, err + +} + +func request_QueryService_QuerySession_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySessionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.QuerySession(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QuerySession_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySessionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.QuerySession(ctx, &protoReq) + return msg, metadata, err + +} + +func request_QueryService_QueryParams_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.QueryParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QueryParams_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.QueryParams(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryServiceHandlerServer registers the http handlers for service QueryService to "mux". +// UnaryRPC :call QueryServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryServiceHandlerFromEndpoint instead. +func RegisterQueryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServiceServer) error { + + mux.Handle("GET", pattern_QueryService_QuerySessions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QuerySessions_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QuerySessions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QuerySessionsForAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QuerySessionsForAddress_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QuerySessionsForAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QuerySession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QuerySession_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QuerySession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QueryParams_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryServiceHandlerFromEndpoint is same as RegisterQueryServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryServiceHandler(ctx, mux, conn) +} + +// RegisterQueryServiceHandler registers the http handlers for service QueryService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryServiceHandlerClient(ctx, mux, NewQueryServiceClient(conn)) +} + +// RegisterQueryServiceHandlerClient registers the http handlers for service QueryService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryServiceClient" to call the correct interceptors. +func RegisterQueryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryServiceClient) error { + + mux.Handle("GET", pattern_QueryService_QuerySessions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QuerySessions_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QuerySessions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QuerySessionsForAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QuerySessionsForAddress_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QuerySessionsForAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QuerySession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QuerySession_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QuerySession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QueryParams_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_QueryService_QuerySessions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"sentinel", "sessions"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QuerySessionsForAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"sentinel", "accounts", "address", "sessions"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QuerySession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"sentinel", "sessions", "id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QueryParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sentinel", "modules", "session", "params"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_QueryService_QuerySessions_0 = runtime.ForwardResponseMessage + + forward_QueryService_QuerySessionsForAddress_0 = runtime.ForwardResponseMessage + + forward_QueryService_QuerySession_0 = runtime.ForwardResponseMessage + + forward_QueryService_QueryParams_0 = runtime.ForwardResponseMessage +) diff --git a/x/session/types/v1/session.pb.go b/x/session/types/v1/session.pb.go new file mode 100644 index 00000000..d3452acf --- /dev/null +++ b/x/session/types/v1/session.pb.go @@ -0,0 +1,592 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/session/v1/session.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + types "github.com/sentinel-official/hub/v12/types" + _ "google.golang.org/protobuf/types/known/durationpb" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Session struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Subscription uint64 `protobuf:"varint,2,opt,name=subscription,proto3" json:"subscription,omitempty"` + Node string `protobuf:"bytes,3,opt,name=node,proto3" json:"node,omitempty"` + Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` + Duration time.Duration `protobuf:"bytes,5,opt,name=duration,proto3,stdduration" json:"duration"` + Bandwidth types.Bandwidth `protobuf:"bytes,6,opt,name=bandwidth,proto3" json:"bandwidth"` + Status types.Status `protobuf:"varint,7,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + StatusAt time.Time `protobuf:"bytes,8,opt,name=status_at,json=statusAt,proto3,stdtime" json:"status_at"` +} + +func (m *Session) Reset() { *m = Session{} } +func (m *Session) String() string { return proto.CompactTextString(m) } +func (*Session) ProtoMessage() {} +func (*Session) Descriptor() ([]byte, []int) { + return fileDescriptor_8b6692acc1d7206a, []int{0} +} +func (m *Session) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Session) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Session.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Session) XXX_Merge(src proto.Message) { + xxx_messageInfo_Session.Merge(m, src) +} +func (m *Session) XXX_Size() int { + return m.Size() +} +func (m *Session) XXX_DiscardUnknown() { + xxx_messageInfo_Session.DiscardUnknown(m) +} + +var xxx_messageInfo_Session proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Session)(nil), "sentinel.session.v1.Session") +} + +func init() { proto.RegisterFile("sentinel/session/v1/session.proto", fileDescriptor_8b6692acc1d7206a) } + +var fileDescriptor_8b6692acc1d7206a = []byte{ + // 404 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xbd, 0x92, 0xd3, 0x30, + 0x10, 0xc7, 0xad, 0x10, 0xf2, 0x21, 0x98, 0x2b, 0x04, 0x85, 0x2e, 0xc3, 0x28, 0xe6, 0x2a, 0x37, + 0x48, 0xe3, 0x50, 0x50, 0xc2, 0x79, 0x78, 0x02, 0x1f, 0x0d, 0x34, 0x8c, 0x1d, 0x29, 0x8e, 0x66, + 0x12, 0xcb, 0x63, 0xc9, 0x06, 0xde, 0xe2, 0x4a, 0x1e, 0x81, 0x47, 0x49, 0x79, 0x25, 0x15, 0x1f, + 0x0e, 0x0f, 0xc2, 0x58, 0x8a, 0x7c, 0x03, 0x77, 0xdd, 0x6a, 0xf7, 0xbf, 0xab, 0xdf, 0x5f, 0x2b, + 0xf8, 0x5c, 0x8b, 0xd2, 0xc8, 0x52, 0xec, 0x98, 0x16, 0x5a, 0x4b, 0x55, 0xb2, 0x36, 0xf6, 0x21, + 0xad, 0x6a, 0x65, 0x14, 0x7a, 0xe2, 0x25, 0xd4, 0xe7, 0xdb, 0x78, 0xf1, 0xb4, 0x50, 0x85, 0xb2, + 0x75, 0xd6, 0x47, 0x4e, 0xba, 0x20, 0x85, 0x52, 0xc5, 0x4e, 0x30, 0x7b, 0xca, 0x9b, 0x0d, 0xe3, + 0x4d, 0x9d, 0x99, 0x61, 0xd4, 0x62, 0xf9, 0x7f, 0xdd, 0xc8, 0xbd, 0xd0, 0x26, 0xdb, 0x57, 0x27, + 0xc1, 0x2d, 0x8e, 0xf9, 0x52, 0x09, 0xdd, 0xc3, 0xe4, 0x59, 0xc9, 0x3f, 0x49, 0x6e, 0xb6, 0xfe, + 0x8e, 0xbb, 0x12, 0x6d, 0x32, 0xd3, 0x68, 0x57, 0xbf, 0xf8, 0x33, 0x82, 0xd3, 0x2b, 0x07, 0x8a, + 0xce, 0xe0, 0x48, 0x72, 0x0c, 0x42, 0x10, 0x8d, 0xd3, 0x91, 0xe4, 0xe8, 0x02, 0x3e, 0xd6, 0x4d, + 0xae, 0xd7, 0xb5, 0xac, 0x7a, 0x2a, 0x3c, 0xb2, 0x95, 0x7f, 0x72, 0x08, 0xc1, 0x71, 0xa9, 0xb8, + 0xc0, 0x0f, 0x42, 0x10, 0xcd, 0x53, 0x1b, 0x23, 0x0c, 0xa7, 0x19, 0xe7, 0xb5, 0xd0, 0x1a, 0x8f, + 0x6d, 0xda, 0x1f, 0xd1, 0x6b, 0x38, 0xf3, 0x1e, 0xf1, 0xc3, 0x10, 0x44, 0x8f, 0x56, 0xe7, 0xd4, + 0x99, 0xa4, 0xde, 0x24, 0x7d, 0x7b, 0x12, 0x24, 0xb3, 0xc3, 0x8f, 0x65, 0xf0, 0xf5, 0xe7, 0x12, + 0xa4, 0x43, 0x13, 0x7a, 0x03, 0xe7, 0x83, 0x43, 0x3c, 0xb1, 0x13, 0x9e, 0xd1, 0xe1, 0xc5, 0xad, + 0x45, 0xda, 0xc6, 0x34, 0xf1, 0x9a, 0x64, 0xdc, 0x0f, 0x49, 0x6f, 0x9b, 0x50, 0x0c, 0x27, 0xee, + 0x01, 0xf0, 0x34, 0x04, 0xd1, 0xd9, 0xea, 0xfc, 0x9e, 0xf6, 0x2b, 0x2b, 0x48, 0x4f, 0x42, 0x74, + 0x09, 0xe7, 0x2e, 0xfa, 0x98, 0x19, 0x3c, 0xb3, 0x97, 0x2e, 0xee, 0x60, 0xbf, 0xf3, 0xbb, 0x71, + 0xdc, 0xd7, 0x96, 0xdb, 0xb5, 0x5d, 0x9a, 0xe4, 0xfd, 0xe1, 0x37, 0x09, 0xbe, 0x75, 0x24, 0x38, + 0x74, 0x04, 0xdc, 0x74, 0x04, 0xfc, 0xea, 0x08, 0xb8, 0x3e, 0x92, 0xe0, 0xe6, 0x48, 0x82, 0xef, + 0x47, 0x12, 0x7c, 0x78, 0x55, 0x48, 0xb3, 0x6d, 0x72, 0xba, 0x56, 0x7b, 0xe6, 0x89, 0x5e, 0xa8, + 0xcd, 0x46, 0xae, 0x65, 0xb6, 0x63, 0xdb, 0x26, 0x67, 0x6d, 0xbc, 0x62, 0x9f, 0x87, 0x8f, 0xe7, + 0xd7, 0x99, 0x4f, 0x2c, 0xc2, 0xcb, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x2b, 0xd7, 0x57, 0x8f, + 0x9c, 0x02, 0x00, 0x00, +} + +func (m *Session) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Session) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Session) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StatusAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StatusAt):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintSession(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x42 + if m.Status != 0 { + i = encodeVarintSession(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x38 + } + { + size, err := m.Bandwidth.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSession(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + n3, err3 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintSession(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x2a + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintSession(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x22 + } + if len(m.Node) > 0 { + i -= len(m.Node) + copy(dAtA[i:], m.Node) + i = encodeVarintSession(dAtA, i, uint64(len(m.Node))) + i-- + dAtA[i] = 0x1a + } + if m.Subscription != 0 { + i = encodeVarintSession(dAtA, i, uint64(m.Subscription)) + i-- + dAtA[i] = 0x10 + } + if m.Id != 0 { + i = encodeVarintSession(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintSession(dAtA []byte, offset int, v uint64) int { + offset -= sovSession(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Session) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovSession(uint64(m.Id)) + } + if m.Subscription != 0 { + n += 1 + sovSession(uint64(m.Subscription)) + } + l = len(m.Node) + if l > 0 { + n += 1 + l + sovSession(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovSession(uint64(l)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration) + n += 1 + l + sovSession(uint64(l)) + l = m.Bandwidth.Size() + n += 1 + l + sovSession(uint64(l)) + if m.Status != 0 { + n += 1 + sovSession(uint64(m.Status)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StatusAt) + n += 1 + l + sovSession(uint64(l)) + return n +} + +func sovSession(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozSession(x uint64) (n int) { + return sovSession(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Session) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSession + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Session: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Session: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSession + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Subscription", wireType) + } + m.Subscription = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSession + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Subscription |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSession + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSession + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSession + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Node = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSession + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSession + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSession + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSession + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSession + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSession + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bandwidth", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSession + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSession + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSession + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Bandwidth.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSession + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StatusAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSession + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSession + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSession + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StatusAt, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSession(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSession + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSession(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSession + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSession + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSession + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthSession + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSession + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthSession + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthSession = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSession = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSession = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/subscription/types/v1/events.pb.go b/x/subscription/types/v1/events.pb.go new file mode 100644 index 00000000..39a7f71c --- /dev/null +++ b/x/subscription/types/v1/events.pb.go @@ -0,0 +1,938 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/subscription/v1/events.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/sentinel-official/hub/v12/types" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type EventSubscribe struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + Node string `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty" yaml:"node"` + Plan uint64 `protobuf:"varint,3,opt,name=plan,proto3" json:"plan,omitempty" yaml:"plan"` +} + +func (m *EventSubscribe) Reset() { *m = EventSubscribe{} } +func (m *EventSubscribe) String() string { return proto.CompactTextString(m) } +func (*EventSubscribe) ProtoMessage() {} +func (*EventSubscribe) Descriptor() ([]byte, []int) { + return fileDescriptor_11d3264879ff947c, []int{0} +} +func (m *EventSubscribe) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSubscribe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSubscribe.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventSubscribe) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSubscribe.Merge(m, src) +} +func (m *EventSubscribe) XXX_Size() int { + return m.Size() +} +func (m *EventSubscribe) XXX_DiscardUnknown() { + xxx_messageInfo_EventSubscribe.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSubscribe proto.InternalMessageInfo + +type EventSetStatus struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + Status types.Status `protobuf:"varint,2,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty" yaml:"status"` +} + +func (m *EventSetStatus) Reset() { *m = EventSetStatus{} } +func (m *EventSetStatus) String() string { return proto.CompactTextString(m) } +func (*EventSetStatus) ProtoMessage() {} +func (*EventSetStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_11d3264879ff947c, []int{1} +} +func (m *EventSetStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSetStatus.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventSetStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSetStatus.Merge(m, src) +} +func (m *EventSetStatus) XXX_Size() int { + return m.Size() +} +func (m *EventSetStatus) XXX_DiscardUnknown() { + xxx_messageInfo_EventSetStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSetStatus proto.InternalMessageInfo + +type EventAddQuota struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` +} + +func (m *EventAddQuota) Reset() { *m = EventAddQuota{} } +func (m *EventAddQuota) String() string { return proto.CompactTextString(m) } +func (*EventAddQuota) ProtoMessage() {} +func (*EventAddQuota) Descriptor() ([]byte, []int) { + return fileDescriptor_11d3264879ff947c, []int{2} +} +func (m *EventAddQuota) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAddQuota) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAddQuota.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventAddQuota) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAddQuota.Merge(m, src) +} +func (m *EventAddQuota) XXX_Size() int { + return m.Size() +} +func (m *EventAddQuota) XXX_DiscardUnknown() { + xxx_messageInfo_EventAddQuota.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAddQuota proto.InternalMessageInfo + +type EventUpdateQuota struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` +} + +func (m *EventUpdateQuota) Reset() { *m = EventUpdateQuota{} } +func (m *EventUpdateQuota) String() string { return proto.CompactTextString(m) } +func (*EventUpdateQuota) ProtoMessage() {} +func (*EventUpdateQuota) Descriptor() ([]byte, []int) { + return fileDescriptor_11d3264879ff947c, []int{3} +} +func (m *EventUpdateQuota) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUpdateQuota) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUpdateQuota.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventUpdateQuota) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUpdateQuota.Merge(m, src) +} +func (m *EventUpdateQuota) XXX_Size() int { + return m.Size() +} +func (m *EventUpdateQuota) XXX_DiscardUnknown() { + xxx_messageInfo_EventUpdateQuota.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUpdateQuota proto.InternalMessageInfo + +func init() { + proto.RegisterType((*EventSubscribe)(nil), "sentinel.subscription.v1.EventSubscribe") + proto.RegisterType((*EventSetStatus)(nil), "sentinel.subscription.v1.EventSetStatus") + proto.RegisterType((*EventAddQuota)(nil), "sentinel.subscription.v1.EventAddQuota") + proto.RegisterType((*EventUpdateQuota)(nil), "sentinel.subscription.v1.EventUpdateQuota") +} + +func init() { + proto.RegisterFile("sentinel/subscription/v1/events.proto", fileDescriptor_11d3264879ff947c) +} + +var fileDescriptor_11d3264879ff947c = []byte{ + // 375 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xc1, 0x6a, 0xdb, 0x30, + 0x18, 0xc7, 0xed, 0x2c, 0x64, 0x44, 0x23, 0xd9, 0x66, 0x76, 0xf0, 0x02, 0x93, 0x83, 0xc6, 0x20, + 0x87, 0xcd, 0xc2, 0xd9, 0x6d, 0xec, 0x32, 0xb3, 0x3d, 0xc0, 0x1c, 0x7a, 0x29, 0xa5, 0xc5, 0x8e, + 0x94, 0x44, 0xe0, 0x58, 0x26, 0x92, 0x4d, 0xf3, 0x16, 0x7d, 0x8c, 0x3e, 0x4a, 0x8e, 0x39, 0xf6, + 0x64, 0x5a, 0xe7, 0x0d, 0xfc, 0x04, 0xc5, 0x92, 0x1d, 0xd2, 0x53, 0x2e, 0xbd, 0x09, 0x7d, 0xbf, + 0xef, 0xf7, 0x97, 0x3e, 0x3e, 0xf0, 0x4d, 0xd0, 0x44, 0xb2, 0x84, 0xc6, 0x58, 0x64, 0x91, 0x98, + 0x6f, 0x58, 0x2a, 0x19, 0x4f, 0x70, 0xee, 0x61, 0x9a, 0xd3, 0x44, 0x0a, 0x37, 0xdd, 0x70, 0xc9, + 0x2d, 0xbb, 0xc5, 0xdc, 0x53, 0xcc, 0xcd, 0xbd, 0xd1, 0xa7, 0x25, 0x5f, 0x72, 0x05, 0xe1, 0xfa, + 0xa4, 0xf9, 0x11, 0x3c, 0x6a, 0xe5, 0x36, 0xa5, 0xa2, 0xf6, 0x09, 0x19, 0xca, 0xac, 0xf1, 0xa1, + 0x2d, 0x18, 0xfe, 0xab, 0xfd, 0x33, 0x6d, 0x8b, 0xa8, 0xf5, 0x05, 0x74, 0x18, 0xb1, 0xcd, 0xb1, + 0x39, 0xe9, 0xfa, 0x83, 0xaa, 0x70, 0xfa, 0xdb, 0x70, 0x1d, 0xff, 0x42, 0x8c, 0xa0, 0xa0, 0xc3, + 0x88, 0xf5, 0x15, 0x74, 0x13, 0x4e, 0xa8, 0xdd, 0x19, 0x9b, 0x93, 0xbe, 0xff, 0xbe, 0x2a, 0x9c, + 0x77, 0x1a, 0xa8, 0x6f, 0x51, 0xa0, 0x8a, 0x35, 0x94, 0xc6, 0x61, 0x62, 0xbf, 0x51, 0x96, 0x13, + 0xa8, 0xbe, 0x45, 0x81, 0x2a, 0xa2, 0xac, 0x8d, 0xa6, 0x72, 0xa6, 0x9e, 0x74, 0x2e, 0xfa, 0x2f, + 0xe8, 0xe9, 0xb7, 0xab, 0xf0, 0xe1, 0xf4, 0xb3, 0x7b, 0x1c, 0x86, 0xfa, 0x9c, 0x9b, 0x7b, 0xae, + 0x36, 0xf9, 0x1f, 0xab, 0xc2, 0x19, 0xe8, 0x6e, 0xdd, 0x82, 0x82, 0xa6, 0x17, 0x5d, 0x81, 0x81, + 0x8a, 0xfd, 0x43, 0xc8, 0xff, 0x8c, 0xcb, 0xf0, 0x5c, 0xea, 0x77, 0xf0, 0x36, 0x24, 0x64, 0x43, + 0x85, 0x68, 0xfe, 0x6c, 0x55, 0x85, 0x33, 0xd4, 0x4c, 0x53, 0x40, 0x41, 0x8b, 0xa0, 0x1b, 0xf0, + 0x41, 0xd9, 0x2f, 0x52, 0x12, 0x4a, 0xfa, 0xfa, 0x01, 0xfe, 0xf5, 0xee, 0x09, 0x1a, 0xf7, 0x25, + 0x34, 0x76, 0x25, 0x34, 0xf7, 0x25, 0x34, 0x1f, 0x4b, 0x68, 0xde, 0x1d, 0xa0, 0xb1, 0x3f, 0x40, + 0xe3, 0xe1, 0x00, 0x8d, 0xcb, 0xdf, 0x4b, 0x26, 0x57, 0x59, 0xe4, 0xce, 0xf9, 0x1a, 0xb7, 0x03, + 0xfa, 0xc1, 0x17, 0x0b, 0x36, 0x67, 0x61, 0x8c, 0x57, 0x59, 0x84, 0x73, 0x6f, 0x8a, 0x6f, 0x5f, + 0xee, 0x59, 0xbb, 0x1d, 0x51, 0x4f, 0xed, 0xc5, 0xcf, 0xe7, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1a, + 0x82, 0x0b, 0x5a, 0x90, 0x02, 0x00, 0x00, +} + +func (m *EventSubscribe) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSubscribe) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSubscribe) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Plan != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Plan)) + i-- + dAtA[i] = 0x18 + } + if len(m.Node) > 0 { + i -= len(m.Node) + copy(dAtA[i:], m.Node) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Node))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventSetStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventSetStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Status != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x10 + } + if m.Id != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventAddQuota) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventAddQuota) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAddQuota) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EventUpdateQuota) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventUpdateQuota) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUpdateQuota) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { + offset -= sovEvents(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EventSubscribe) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovEvents(uint64(m.Id)) + } + l = len(m.Node) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.Plan != 0 { + n += 1 + sovEvents(uint64(m.Plan)) + } + return n +} + +func (m *EventSetStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovEvents(uint64(m.Id)) + } + if m.Status != 0 { + n += 1 + sovEvents(uint64(m.Status)) + } + return n +} + +func (m *EventAddQuota) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovEvents(uint64(m.Id)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func (m *EventUpdateQuota) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovEvents(uint64(m.Id)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + return n +} + +func sovEvents(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozEvents(x uint64) (n int) { + return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EventSubscribe) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSubscribe: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSubscribe: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Node = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType) + } + m.Plan = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Plan |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSetStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSetStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSetStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventAddQuota) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventAddQuota: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventAddQuota: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventUpdateQuota) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventUpdateQuota: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventUpdateQuota: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEvents(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEvents + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthEvents + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupEvents + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthEvents + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/subscription/types/v1/genesis.pb.go b/x/subscription/types/v1/genesis.pb.go new file mode 100644 index 00000000..a742fc3a --- /dev/null +++ b/x/subscription/types/v1/genesis.pb.go @@ -0,0 +1,599 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/subscription/v1/genesis.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type GenesisSubscription struct { + Subscription Subscription `protobuf:"bytes,1,opt,name=subscription,proto3" json:"_"` + Quotas []Quota `protobuf:"bytes,2,rep,name=quotas,proto3" json:"quotas"` +} + +func (m *GenesisSubscription) Reset() { *m = GenesisSubscription{} } +func (m *GenesisSubscription) String() string { return proto.CompactTextString(m) } +func (*GenesisSubscription) ProtoMessage() {} +func (*GenesisSubscription) Descriptor() ([]byte, []int) { + return fileDescriptor_81eef651065d2972, []int{0} +} +func (m *GenesisSubscription) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisSubscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisSubscription.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisSubscription) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisSubscription.Merge(m, src) +} +func (m *GenesisSubscription) XXX_Size() int { + return m.Size() +} +func (m *GenesisSubscription) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisSubscription.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisSubscription proto.InternalMessageInfo + +type GenesisState struct { + Subscriptions []GenesisSubscription `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"_,omitempty"` + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_81eef651065d2972, []int{1} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func init() { + proto.RegisterType((*GenesisSubscription)(nil), "sentinel.subscription.v1.GenesisSubscription") + proto.RegisterType((*GenesisState)(nil), "sentinel.subscription.v1.GenesisState") +} + +func init() { + proto.RegisterFile("sentinel/subscription/v1/genesis.proto", fileDescriptor_81eef651065d2972) +} + +var fileDescriptor_81eef651065d2972 = []byte{ + // 344 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x4e, 0xc2, 0x30, + 0x18, 0xc7, 0x57, 0x34, 0x24, 0x16, 0xbc, 0x0c, 0x0f, 0x0b, 0x87, 0x42, 0x88, 0x12, 0x12, 0xa5, + 0xcd, 0xf0, 0xaa, 0x1e, 0x76, 0xf1, 0xaa, 0x18, 0x2f, 0x1e, 0x24, 0x1b, 0x29, 0xa3, 0x09, 0x5b, + 0x27, 0xed, 0x16, 0x79, 0x0b, 0x1f, 0xc3, 0xc4, 0x17, 0xf0, 0x11, 0x38, 0x72, 0xf4, 0x44, 0x74, + 0xdc, 0x7c, 0x0a, 0x43, 0xb7, 0x25, 0x5b, 0x62, 0x6f, 0x4d, 0xfa, 0xfb, 0xff, 0xfa, 0xff, 0xfa, + 0xc1, 0xbe, 0xa0, 0xa1, 0x64, 0x21, 0x5d, 0x10, 0x11, 0x7b, 0x62, 0xba, 0x64, 0x91, 0x64, 0x3c, + 0x24, 0x89, 0x4d, 0x7c, 0x1a, 0x52, 0xc1, 0x04, 0x8e, 0x96, 0x5c, 0x72, 0xd3, 0x2a, 0x38, 0x5c, + 0xe6, 0x70, 0x62, 0xb7, 0x4f, 0x7c, 0xee, 0x73, 0x05, 0x91, 0xfd, 0x29, 0xe3, 0xdb, 0x67, 0x5a, + 0x6f, 0xe4, 0x2e, 0xdd, 0x20, 0xd7, 0xb6, 0x4f, 0xb5, 0xd8, 0x4b, 0xcc, 0xa5, 0x9b, 0x53, 0xe7, + 0x5a, 0xaa, 0x52, 0x46, 0xc1, 0xbd, 0x0f, 0x00, 0x5b, 0xb7, 0x59, 0xf7, 0x87, 0xd2, 0xad, 0xf9, + 0x08, 0x9b, 0x65, 0xda, 0x02, 0x5d, 0x30, 0x68, 0x8c, 0xfa, 0x58, 0x37, 0x18, 0x2e, 0xa7, 0x9d, + 0xa3, 0xf5, 0xb6, 0x63, 0xfc, 0x6e, 0x3b, 0x60, 0x32, 0xae, 0x68, 0xcc, 0x6b, 0x58, 0x57, 0x55, + 0x85, 0x55, 0xeb, 0x1e, 0x0c, 0x1a, 0xa3, 0x8e, 0x5e, 0x78, 0xbf, 0xe7, 0x9c, 0xc3, 0xbd, 0x69, + 0x9c, 0x87, 0x7a, 0x9f, 0x00, 0x36, 0x8b, 0xb6, 0xd2, 0x95, 0xd4, 0x9c, 0xc3, 0xe3, 0x72, 0x4e, + 0x58, 0x40, 0x69, 0x87, 0x7a, 0xed, 0x3f, 0xc3, 0x3a, 0xad, 0xbc, 0x6e, 0x63, 0x72, 0xc1, 0x03, + 0x26, 0x69, 0x10, 0xc9, 0xd5, 0xb8, 0x2a, 0x36, 0x6f, 0x60, 0x3d, 0xdb, 0x85, 0x55, 0x53, 0x5f, + 0xd1, 0xd5, 0x3f, 0x71, 0xa7, 0xb8, 0xa2, 0x7a, 0x96, 0x72, 0x9e, 0xd7, 0x3f, 0xc8, 0x78, 0x4f, + 0x91, 0xb1, 0x4e, 0x11, 0xd8, 0xa4, 0x08, 0x7c, 0xa7, 0x08, 0xbc, 0xed, 0x90, 0xb1, 0xd9, 0x21, + 0xe3, 0x6b, 0x87, 0x8c, 0xa7, 0x2b, 0x9f, 0xc9, 0x79, 0xec, 0xe1, 0x29, 0x0f, 0x48, 0xe1, 0x1e, + 0xf2, 0xd9, 0x8c, 0x4d, 0x99, 0xbb, 0x20, 0xf3, 0xd8, 0x23, 0x89, 0x3d, 0x22, 0xaf, 0xd5, 0xad, + 0xca, 0x55, 0x44, 0x05, 0x49, 0x6c, 0xaf, 0xae, 0xf6, 0x79, 0xf9, 0x17, 0x00, 0x00, 0xff, 0xff, + 0xaa, 0x80, 0x03, 0x77, 0xa3, 0x02, 0x00, 0x00, +} + +func (m *GenesisSubscription) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisSubscription) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisSubscription) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Quotas) > 0 { + for iNdEx := len(m.Quotas) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Quotas[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Subscription.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Subscriptions) > 0 { + for iNdEx := len(m.Subscriptions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Subscriptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisSubscription) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Subscription.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.Quotas) > 0 { + for _, e := range m.Quotas { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Subscriptions) > 0 { + for _, e := range m.Subscriptions { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisSubscription) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisSubscription: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisSubscription: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subscription", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Subscription.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quotas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Quotas = append(m.Quotas, Quota{}) + if err := m.Quotas[len(m.Quotas)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subscriptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subscriptions = append(m.Subscriptions, GenesisSubscription{}) + if err := m.Subscriptions[len(m.Subscriptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/subscription/types/v1/msg.pb.go b/x/subscription/types/v1/msg.pb.go new file mode 100644 index 00000000..12afb37e --- /dev/null +++ b/x/subscription/types/v1/msg.pb.go @@ -0,0 +1,2255 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/subscription/v1/msg.proto + +package v1 + +import ( + context "context" + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgSubscribeToNodeRequest defines the SDK message for subscribing to a node +type MsgSubscribeToNodeRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + Deposit types.Coin `protobuf:"bytes,3,opt,name=deposit,proto3" json:"deposit"` +} + +func (m *MsgSubscribeToNodeRequest) Reset() { *m = MsgSubscribeToNodeRequest{} } +func (m *MsgSubscribeToNodeRequest) String() string { return proto.CompactTextString(m) } +func (*MsgSubscribeToNodeRequest) ProtoMessage() {} +func (*MsgSubscribeToNodeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b1c58e5012fc0b75, []int{0} +} +func (m *MsgSubscribeToNodeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubscribeToNodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubscribeToNodeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSubscribeToNodeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubscribeToNodeRequest.Merge(m, src) +} +func (m *MsgSubscribeToNodeRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgSubscribeToNodeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubscribeToNodeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubscribeToNodeRequest proto.InternalMessageInfo + +// MsgSubscribeToPlanRequest defines the SDK message for subscribing to a plan +type MsgSubscribeToPlanRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *MsgSubscribeToPlanRequest) Reset() { *m = MsgSubscribeToPlanRequest{} } +func (m *MsgSubscribeToPlanRequest) String() string { return proto.CompactTextString(m) } +func (*MsgSubscribeToPlanRequest) ProtoMessage() {} +func (*MsgSubscribeToPlanRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b1c58e5012fc0b75, []int{1} +} +func (m *MsgSubscribeToPlanRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubscribeToPlanRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubscribeToPlanRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSubscribeToPlanRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubscribeToPlanRequest.Merge(m, src) +} +func (m *MsgSubscribeToPlanRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgSubscribeToPlanRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubscribeToPlanRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubscribeToPlanRequest proto.InternalMessageInfo + +// MsgCancelRequest defines the SDK message for cancelling a subscription +type MsgCancelRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *MsgCancelRequest) Reset() { *m = MsgCancelRequest{} } +func (m *MsgCancelRequest) String() string { return proto.CompactTextString(m) } +func (*MsgCancelRequest) ProtoMessage() {} +func (*MsgCancelRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b1c58e5012fc0b75, []int{2} +} +func (m *MsgCancelRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCancelRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelRequest.Merge(m, src) +} +func (m *MsgCancelRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelRequest proto.InternalMessageInfo + +// MsgAddQuotaRequest defines the SDK message for adding the quota to an address +type MsgAddQuotaRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + Bytes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=bytes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bytes"` +} + +func (m *MsgAddQuotaRequest) Reset() { *m = MsgAddQuotaRequest{} } +func (m *MsgAddQuotaRequest) String() string { return proto.CompactTextString(m) } +func (*MsgAddQuotaRequest) ProtoMessage() {} +func (*MsgAddQuotaRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b1c58e5012fc0b75, []int{3} +} +func (m *MsgAddQuotaRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddQuotaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddQuotaRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAddQuotaRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddQuotaRequest.Merge(m, src) +} +func (m *MsgAddQuotaRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgAddQuotaRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddQuotaRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddQuotaRequest proto.InternalMessageInfo + +// MsgUpdateQuotaRequest defines the SDK message for updating the quota of an +// address +type MsgUpdateQuotaRequest struct { + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + Bytes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=bytes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bytes"` +} + +func (m *MsgUpdateQuotaRequest) Reset() { *m = MsgUpdateQuotaRequest{} } +func (m *MsgUpdateQuotaRequest) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateQuotaRequest) ProtoMessage() {} +func (*MsgUpdateQuotaRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b1c58e5012fc0b75, []int{4} +} +func (m *MsgUpdateQuotaRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateQuotaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateQuotaRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateQuotaRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateQuotaRequest.Merge(m, src) +} +func (m *MsgUpdateQuotaRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateQuotaRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateQuotaRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateQuotaRequest proto.InternalMessageInfo + +// MsgSubscribeToNodeResponse defines the response of message +// MsgSubscribeToNodeRequest +type MsgSubscribeToNodeResponse struct { +} + +func (m *MsgSubscribeToNodeResponse) Reset() { *m = MsgSubscribeToNodeResponse{} } +func (m *MsgSubscribeToNodeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSubscribeToNodeResponse) ProtoMessage() {} +func (*MsgSubscribeToNodeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b1c58e5012fc0b75, []int{5} +} +func (m *MsgSubscribeToNodeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubscribeToNodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubscribeToNodeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSubscribeToNodeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubscribeToNodeResponse.Merge(m, src) +} +func (m *MsgSubscribeToNodeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSubscribeToNodeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubscribeToNodeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubscribeToNodeResponse proto.InternalMessageInfo + +// MsgSubscribeToPlanResponse defines the response of message +// MsgSubscribeToPlanRequest +type MsgSubscribeToPlanResponse struct { +} + +func (m *MsgSubscribeToPlanResponse) Reset() { *m = MsgSubscribeToPlanResponse{} } +func (m *MsgSubscribeToPlanResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSubscribeToPlanResponse) ProtoMessage() {} +func (*MsgSubscribeToPlanResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b1c58e5012fc0b75, []int{6} +} +func (m *MsgSubscribeToPlanResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubscribeToPlanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubscribeToPlanResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSubscribeToPlanResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubscribeToPlanResponse.Merge(m, src) +} +func (m *MsgSubscribeToPlanResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSubscribeToPlanResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubscribeToPlanResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubscribeToPlanResponse proto.InternalMessageInfo + +// MsgCancelResponse defines the response of message MsgCancelRequest +type MsgCancelResponse struct { +} + +func (m *MsgCancelResponse) Reset() { *m = MsgCancelResponse{} } +func (m *MsgCancelResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCancelResponse) ProtoMessage() {} +func (*MsgCancelResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b1c58e5012fc0b75, []int{7} +} +func (m *MsgCancelResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCancelResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelResponse.Merge(m, src) +} +func (m *MsgCancelResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelResponse proto.InternalMessageInfo + +// MsgAddQuotaResponse defines the response of message MsgAddQuotaRequest +type MsgAddQuotaResponse struct { +} + +func (m *MsgAddQuotaResponse) Reset() { *m = MsgAddQuotaResponse{} } +func (m *MsgAddQuotaResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAddQuotaResponse) ProtoMessage() {} +func (*MsgAddQuotaResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b1c58e5012fc0b75, []int{8} +} +func (m *MsgAddQuotaResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddQuotaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddQuotaResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAddQuotaResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddQuotaResponse.Merge(m, src) +} +func (m *MsgAddQuotaResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAddQuotaResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddQuotaResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddQuotaResponse proto.InternalMessageInfo + +// MsgUpdateQuotaResponse defines the response of message MsgUpdateQuotaRequest +type MsgUpdateQuotaResponse struct { +} + +func (m *MsgUpdateQuotaResponse) Reset() { *m = MsgUpdateQuotaResponse{} } +func (m *MsgUpdateQuotaResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateQuotaResponse) ProtoMessage() {} +func (*MsgUpdateQuotaResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b1c58e5012fc0b75, []int{9} +} +func (m *MsgUpdateQuotaResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateQuotaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateQuotaResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateQuotaResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateQuotaResponse.Merge(m, src) +} +func (m *MsgUpdateQuotaResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateQuotaResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateQuotaResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateQuotaResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgSubscribeToNodeRequest)(nil), "sentinel.subscription.v1.MsgSubscribeToNodeRequest") + proto.RegisterType((*MsgSubscribeToPlanRequest)(nil), "sentinel.subscription.v1.MsgSubscribeToPlanRequest") + proto.RegisterType((*MsgCancelRequest)(nil), "sentinel.subscription.v1.MsgCancelRequest") + proto.RegisterType((*MsgAddQuotaRequest)(nil), "sentinel.subscription.v1.MsgAddQuotaRequest") + proto.RegisterType((*MsgUpdateQuotaRequest)(nil), "sentinel.subscription.v1.MsgUpdateQuotaRequest") + proto.RegisterType((*MsgSubscribeToNodeResponse)(nil), "sentinel.subscription.v1.MsgSubscribeToNodeResponse") + proto.RegisterType((*MsgSubscribeToPlanResponse)(nil), "sentinel.subscription.v1.MsgSubscribeToPlanResponse") + proto.RegisterType((*MsgCancelResponse)(nil), "sentinel.subscription.v1.MsgCancelResponse") + proto.RegisterType((*MsgAddQuotaResponse)(nil), "sentinel.subscription.v1.MsgAddQuotaResponse") + proto.RegisterType((*MsgUpdateQuotaResponse)(nil), "sentinel.subscription.v1.MsgUpdateQuotaResponse") +} + +func init() { + proto.RegisterFile("sentinel/subscription/v1/msg.proto", fileDescriptor_b1c58e5012fc0b75) +} + +var fileDescriptor_b1c58e5012fc0b75 = []byte{ + // 561 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xc7, 0xed, 0x34, 0xa5, 0xca, 0x56, 0xaa, 0x60, 0xdb, 0x22, 0xd7, 0x42, 0x6e, 0xe5, 0x03, + 0xaa, 0x80, 0xec, 0x92, 0x14, 0x21, 0x21, 0x71, 0x21, 0xe5, 0xc2, 0x21, 0x08, 0x0c, 0xbd, 0x70, + 0x40, 0xb2, 0xbd, 0x1b, 0x77, 0x21, 0xf1, 0x9a, 0xcc, 0x26, 0xa2, 0x27, 0x2e, 0x3c, 0x00, 0x47, + 0x24, 0x5e, 0x80, 0x47, 0xc9, 0xb1, 0x17, 0x24, 0xc4, 0xa1, 0x82, 0xe4, 0x45, 0x90, 0xbd, 0x0e, + 0x72, 0x12, 0x1a, 0x39, 0xb7, 0x9e, 0xb2, 0x3b, 0x3b, 0x1f, 0xbf, 0xcc, 0xf8, 0x3f, 0xc8, 0x05, + 0x1e, 0x2b, 0x11, 0xf3, 0x2e, 0x85, 0x41, 0x00, 0x61, 0x5f, 0x24, 0x4a, 0xc8, 0x98, 0x0e, 0x1b, + 0xb4, 0x07, 0x11, 0x49, 0xfa, 0x52, 0x49, 0x6c, 0x4d, 0x7d, 0x48, 0xd1, 0x87, 0x0c, 0x1b, 0xb6, + 0x13, 0x4a, 0xe8, 0x49, 0xa0, 0x81, 0x0f, 0x9c, 0x0e, 0x1b, 0x01, 0x57, 0x7e, 0x83, 0x86, 0x52, + 0xc4, 0x3a, 0xd2, 0xde, 0x89, 0x64, 0x24, 0xb3, 0x23, 0x4d, 0x4f, 0xda, 0xea, 0x7e, 0x36, 0xd1, + 0x5e, 0x1b, 0xa2, 0x57, 0x3a, 0x59, 0xc0, 0x5f, 0xcb, 0xe7, 0x92, 0x71, 0x8f, 0x7f, 0x18, 0x70, + 0x50, 0x18, 0xa3, 0x6a, 0xa7, 0x2f, 0x7b, 0x96, 0x79, 0x60, 0x1e, 0xd6, 0xbc, 0xec, 0x8c, 0x2d, + 0xb4, 0xe1, 0x33, 0xd6, 0xe7, 0x00, 0x56, 0x25, 0x33, 0x4f, 0xaf, 0xf8, 0x11, 0xda, 0x60, 0x3c, + 0x91, 0x20, 0x94, 0xb5, 0x76, 0x60, 0x1e, 0x6e, 0x36, 0xf7, 0x88, 0x66, 0x22, 0x29, 0x13, 0xc9, + 0x99, 0xc8, 0xb1, 0x14, 0x71, 0xab, 0x3a, 0xba, 0xd8, 0x37, 0xbc, 0xa9, 0xbf, 0x7b, 0x32, 0x4f, + 0xf1, 0xa2, 0xeb, 0xc7, 0xcb, 0x28, 0xb6, 0x50, 0x45, 0xb0, 0x0c, 0xa0, 0xea, 0x55, 0x04, 0xc3, + 0x3b, 0x68, 0x9d, 0xf1, 0x58, 0xf6, 0xb2, 0xca, 0x35, 0x4f, 0x5f, 0xdc, 0x87, 0xe8, 0x7a, 0x1b, + 0xa2, 0x63, 0x3f, 0x0e, 0x79, 0x77, 0x85, 0x6c, 0xee, 0x57, 0x13, 0xe1, 0x36, 0x44, 0x4f, 0x18, + 0x7b, 0x39, 0x90, 0xca, 0x5f, 0x05, 0xa4, 0xd0, 0x9e, 0xb5, 0xd9, 0xf6, 0x3c, 0x45, 0xeb, 0xc1, + 0x99, 0xe2, 0x60, 0x55, 0x53, 0x7b, 0x8b, 0xa4, 0x1d, 0xf8, 0x75, 0xb1, 0x7f, 0x3b, 0x12, 0xea, + 0x74, 0x10, 0x90, 0x50, 0xf6, 0x68, 0x3e, 0x42, 0xfd, 0x53, 0x07, 0xf6, 0x9e, 0xaa, 0xb3, 0x84, + 0x03, 0x79, 0x16, 0x2b, 0x4f, 0x07, 0xbb, 0xdf, 0x4c, 0xb4, 0xdb, 0x86, 0xe8, 0x24, 0x61, 0xbe, + 0xe2, 0x57, 0x8e, 0xee, 0x16, 0xb2, 0xff, 0xf7, 0x35, 0x41, 0x22, 0x63, 0xe0, 0x8b, 0xaf, 0x7a, + 0xca, 0xf9, 0xeb, 0x36, 0xba, 0x51, 0x18, 0x56, 0x6e, 0xdc, 0x45, 0xdb, 0x33, 0x83, 0xc8, 0xcd, + 0x16, 0xba, 0x39, 0xdf, 0x04, 0xfd, 0xd2, 0xfc, 0x51, 0x45, 0x28, 0x2d, 0xc2, 0xfb, 0x43, 0x11, + 0x72, 0xfc, 0x29, 0x1b, 0xe4, 0x1c, 0x10, 0x3e, 0x22, 0x97, 0xc9, 0x88, 0x5c, 0x2a, 0x06, 0xfb, + 0xc1, 0x6a, 0x41, 0x9a, 0x67, 0x11, 0x20, 0xfd, 0xcf, 0xe5, 0x01, 0x0a, 0x3a, 0x28, 0x0f, 0x50, + 0x6c, 0x2b, 0x66, 0xa8, 0xf6, 0xaf, 0xad, 0xf8, 0xce, 0xd2, 0x14, 0x33, 0x42, 0xb1, 0xef, 0x96, + 0xf2, 0xcd, 0xab, 0xbc, 0x43, 0x9b, 0x85, 0x39, 0xe1, 0x7b, 0x4b, 0x63, 0xe7, 0x74, 0x65, 0xd7, + 0x4b, 0x7a, 0xe7, 0xb5, 0x00, 0x6d, 0xcd, 0x0e, 0x1f, 0xd3, 0xa5, 0x09, 0x16, 0xb5, 0x62, 0xdf, + 0x2f, 0x1f, 0xa0, 0x8b, 0xb6, 0xde, 0x8e, 0xfe, 0x38, 0xc6, 0xf7, 0xb1, 0x63, 0x8c, 0xc6, 0x8e, + 0x79, 0x3e, 0x76, 0xcc, 0xdf, 0x63, 0xc7, 0xfc, 0x32, 0x71, 0x8c, 0xf3, 0x89, 0x63, 0xfc, 0x9c, + 0x38, 0xc6, 0x9b, 0xc7, 0x05, 0xa9, 0x4c, 0xb3, 0xd7, 0x65, 0xa7, 0x23, 0x42, 0xe1, 0x77, 0xe9, + 0xe9, 0x20, 0xa0, 0xc3, 0x46, 0x93, 0x7e, 0x9c, 0x5d, 0xee, 0x99, 0x82, 0xd2, 0x75, 0x7d, 0x2d, + 0xdb, 0xc7, 0x47, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x01, 0x4f, 0xb1, 0x05, 0x06, 0x00, + 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgServiceClient is the client API for MsgService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgServiceClient interface { + MsgSubscribeToNode(ctx context.Context, in *MsgSubscribeToNodeRequest, opts ...grpc.CallOption) (*MsgSubscribeToNodeResponse, error) + MsgSubscribeToPlan(ctx context.Context, in *MsgSubscribeToPlanRequest, opts ...grpc.CallOption) (*MsgSubscribeToPlanResponse, error) + MsgCancel(ctx context.Context, in *MsgCancelRequest, opts ...grpc.CallOption) (*MsgCancelResponse, error) + MsgAddQuota(ctx context.Context, in *MsgAddQuotaRequest, opts ...grpc.CallOption) (*MsgAddQuotaResponse, error) + MsgUpdateQuota(ctx context.Context, in *MsgUpdateQuotaRequest, opts ...grpc.CallOption) (*MsgUpdateQuotaResponse, error) +} + +type msgServiceClient struct { + cc grpc1.ClientConn +} + +func NewMsgServiceClient(cc grpc1.ClientConn) MsgServiceClient { + return &msgServiceClient{cc} +} + +func (c *msgServiceClient) MsgSubscribeToNode(ctx context.Context, in *MsgSubscribeToNodeRequest, opts ...grpc.CallOption) (*MsgSubscribeToNodeResponse, error) { + out := new(MsgSubscribeToNodeResponse) + err := c.cc.Invoke(ctx, "/sentinel.subscription.v1.MsgService/MsgSubscribeToNode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgServiceClient) MsgSubscribeToPlan(ctx context.Context, in *MsgSubscribeToPlanRequest, opts ...grpc.CallOption) (*MsgSubscribeToPlanResponse, error) { + out := new(MsgSubscribeToPlanResponse) + err := c.cc.Invoke(ctx, "/sentinel.subscription.v1.MsgService/MsgSubscribeToPlan", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgServiceClient) MsgCancel(ctx context.Context, in *MsgCancelRequest, opts ...grpc.CallOption) (*MsgCancelResponse, error) { + out := new(MsgCancelResponse) + err := c.cc.Invoke(ctx, "/sentinel.subscription.v1.MsgService/MsgCancel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgServiceClient) MsgAddQuota(ctx context.Context, in *MsgAddQuotaRequest, opts ...grpc.CallOption) (*MsgAddQuotaResponse, error) { + out := new(MsgAddQuotaResponse) + err := c.cc.Invoke(ctx, "/sentinel.subscription.v1.MsgService/MsgAddQuota", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgServiceClient) MsgUpdateQuota(ctx context.Context, in *MsgUpdateQuotaRequest, opts ...grpc.CallOption) (*MsgUpdateQuotaResponse, error) { + out := new(MsgUpdateQuotaResponse) + err := c.cc.Invoke(ctx, "/sentinel.subscription.v1.MsgService/MsgUpdateQuota", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServiceServer is the server API for MsgService service. +type MsgServiceServer interface { + MsgSubscribeToNode(context.Context, *MsgSubscribeToNodeRequest) (*MsgSubscribeToNodeResponse, error) + MsgSubscribeToPlan(context.Context, *MsgSubscribeToPlanRequest) (*MsgSubscribeToPlanResponse, error) + MsgCancel(context.Context, *MsgCancelRequest) (*MsgCancelResponse, error) + MsgAddQuota(context.Context, *MsgAddQuotaRequest) (*MsgAddQuotaResponse, error) + MsgUpdateQuota(context.Context, *MsgUpdateQuotaRequest) (*MsgUpdateQuotaResponse, error) +} + +// UnimplementedMsgServiceServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServiceServer struct { +} + +func (*UnimplementedMsgServiceServer) MsgSubscribeToNode(ctx context.Context, req *MsgSubscribeToNodeRequest) (*MsgSubscribeToNodeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgSubscribeToNode not implemented") +} +func (*UnimplementedMsgServiceServer) MsgSubscribeToPlan(ctx context.Context, req *MsgSubscribeToPlanRequest) (*MsgSubscribeToPlanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgSubscribeToPlan not implemented") +} +func (*UnimplementedMsgServiceServer) MsgCancel(ctx context.Context, req *MsgCancelRequest) (*MsgCancelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgCancel not implemented") +} +func (*UnimplementedMsgServiceServer) MsgAddQuota(ctx context.Context, req *MsgAddQuotaRequest) (*MsgAddQuotaResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgAddQuota not implemented") +} +func (*UnimplementedMsgServiceServer) MsgUpdateQuota(ctx context.Context, req *MsgUpdateQuotaRequest) (*MsgUpdateQuotaResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MsgUpdateQuota not implemented") +} + +func RegisterMsgServiceServer(s grpc1.Server, srv MsgServiceServer) { + s.RegisterService(&_MsgService_serviceDesc, srv) +} + +func _MsgService_MsgSubscribeToNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSubscribeToNodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgSubscribeToNode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.subscription.v1.MsgService/MsgSubscribeToNode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgSubscribeToNode(ctx, req.(*MsgSubscribeToNodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MsgService_MsgSubscribeToPlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSubscribeToPlanRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgSubscribeToPlan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.subscription.v1.MsgService/MsgSubscribeToPlan", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgSubscribeToPlan(ctx, req.(*MsgSubscribeToPlanRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MsgService_MsgCancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCancelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgCancel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.subscription.v1.MsgService/MsgCancel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgCancel(ctx, req.(*MsgCancelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MsgService_MsgAddQuota_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAddQuotaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgAddQuota(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.subscription.v1.MsgService/MsgAddQuota", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgAddQuota(ctx, req.(*MsgAddQuotaRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MsgService_MsgUpdateQuota_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateQuotaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServiceServer).MsgUpdateQuota(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.subscription.v1.MsgService/MsgUpdateQuota", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServiceServer).MsgUpdateQuota(ctx, req.(*MsgUpdateQuotaRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _MsgService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "sentinel.subscription.v1.MsgService", + HandlerType: (*MsgServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "MsgSubscribeToNode", + Handler: _MsgService_MsgSubscribeToNode_Handler, + }, + { + MethodName: "MsgSubscribeToPlan", + Handler: _MsgService_MsgSubscribeToPlan_Handler, + }, + { + MethodName: "MsgCancel", + Handler: _MsgService_MsgCancel_Handler, + }, + { + MethodName: "MsgAddQuota", + Handler: _MsgService_MsgAddQuota_Handler, + }, + { + MethodName: "MsgUpdateQuota", + Handler: _MsgService_MsgUpdateQuota_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sentinel/subscription/v1/msg.proto", +} + +func (m *MsgSubscribeToNodeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSubscribeToNodeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubscribeToNodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSubscribeToPlanRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSubscribeToPlanRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubscribeToPlanRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x1a + } + if m.Id != 0 { + i = encodeVarintMsg(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCancelRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCancelRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintMsg(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAddQuotaRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddQuotaRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddQuotaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Bytes.Size() + i -= size + if _, err := m.Bytes.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x1a + } + if m.Id != 0 { + i = encodeVarintMsg(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateQuotaRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateQuotaRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateQuotaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Bytes.Size() + i -= size + if _, err := m.Bytes.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintMsg(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintMsg(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x1a + } + if m.Id != 0 { + i = encodeVarintMsg(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 + } + if len(m.From) > 0 { + i -= len(m.From) + copy(dAtA[i:], m.From) + i = encodeVarintMsg(dAtA, i, uint64(len(m.From))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSubscribeToNodeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSubscribeToNodeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubscribeToNodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSubscribeToPlanResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSubscribeToPlanResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubscribeToPlanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCancelResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCancelResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgAddQuotaResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddQuotaResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddQuotaResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateQuotaResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateQuotaResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateQuotaResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintMsg(dAtA []byte, offset int, v uint64) int { + offset -= sovMsg(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgSubscribeToNodeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = m.Deposit.Size() + n += 1 + l + sovMsg(uint64(l)) + return n +} + +func (m *MsgSubscribeToPlanRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if m.Id != 0 { + n += 1 + sovMsg(uint64(m.Id)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + return n +} + +func (m *MsgCancelRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if m.Id != 0 { + n += 1 + sovMsg(uint64(m.Id)) + } + return n +} + +func (m *MsgAddQuotaRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if m.Id != 0 { + n += 1 + sovMsg(uint64(m.Id)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = m.Bytes.Size() + n += 1 + l + sovMsg(uint64(l)) + return n +} + +func (m *MsgUpdateQuotaRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.From) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + if m.Id != 0 { + n += 1 + sovMsg(uint64(m.Id)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovMsg(uint64(l)) + } + l = m.Bytes.Size() + n += 1 + l + sovMsg(uint64(l)) + return n +} + +func (m *MsgSubscribeToNodeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSubscribeToPlanResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCancelResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgAddQuotaResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateQuotaResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovMsg(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMsg(x uint64) (n int) { + return sovMsg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgSubscribeToNodeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubscribeToNodeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubscribeToNodeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubscribeToPlanRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubscribeToPlanRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubscribeToPlanRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCancelRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCancelRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCancelRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddQuotaRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddQuotaRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddQuotaRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Bytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateQuotaRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateQuotaRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateQuotaRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.From = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMsg + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMsg + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Bytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubscribeToNodeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubscribeToNodeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubscribeToNodeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubscribeToPlanResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubscribeToPlanResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubscribeToPlanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCancelResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCancelResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCancelResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddQuotaResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddQuotaResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddQuotaResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateQuotaResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMsg + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateQuotaResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateQuotaResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMsg(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMsg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMsg(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMsg + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMsg + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMsg + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMsg + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMsg + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMsg + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMsg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMsg = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMsg = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/subscription/types/v1/params.pb.go b/x/subscription/types/v1/params.pb.go new file mode 100644 index 00000000..552f1f40 --- /dev/null +++ b/x/subscription/types/v1/params.pb.go @@ -0,0 +1,320 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/subscription/v1/params.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/durationpb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Params struct { + InactiveDuration time.Duration `protobuf:"bytes,1,opt,name=inactive_duration,json=inactiveDuration,proto3,stdduration" json:"inactive_duration"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_e34bed6a7ea2a96d, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Params)(nil), "sentinel.subscription.v1.Params") +} + +func init() { + proto.RegisterFile("sentinel/subscription/v1/params.proto", fileDescriptor_e34bed6a7ea2a96d) +} + +var fileDescriptor_e34bed6a7ea2a96d = []byte{ + // 250 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2d, 0x4e, 0xcd, 0x2b, + 0xc9, 0xcc, 0x4b, 0xcd, 0xd1, 0x2f, 0x2e, 0x4d, 0x2a, 0x4e, 0x2e, 0xca, 0x2c, 0x28, 0xc9, 0xcc, + 0xcf, 0xd3, 0x2f, 0x33, 0xd4, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x92, 0x80, 0x29, 0xd3, 0x43, 0x56, 0xa6, 0x57, 0x66, 0x28, 0x25, 0x92, 0x9e, 0x9f, + 0x9e, 0x0f, 0x56, 0xa4, 0x0f, 0x62, 0x41, 0xd4, 0x4b, 0xc9, 0xa5, 0xe7, 0xe7, 0xa7, 0xe7, 0xa4, + 0xea, 0x83, 0x79, 0x49, 0xa5, 0x69, 0xfa, 0x29, 0xa5, 0x45, 0x89, 0x60, 0x2d, 0x60, 0x11, 0xa5, + 0x28, 0x2e, 0xb6, 0x00, 0xb0, 0xf9, 0x42, 0x01, 0x5c, 0x82, 0x99, 0x79, 0x89, 0xc9, 0x25, 0x99, + 0x65, 0xa9, 0xf1, 0x30, 0x45, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0x92, 0x7a, 0x10, 0x53, + 0xf4, 0x60, 0xa6, 0xe8, 0xb9, 0x40, 0x15, 0x38, 0x71, 0x9c, 0xb8, 0x27, 0xcf, 0x30, 0xe3, 0xbe, + 0x3c, 0x63, 0x90, 0x00, 0x4c, 0x37, 0x5c, 0x2e, 0xee, 0xc4, 0x43, 0x39, 0x86, 0x15, 0x8f, 0xe4, + 0x18, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, + 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x26, 0x3d, 0xb3, 0x24, + 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0xe6, 0x31, 0xdd, 0xfc, 0xb4, 0xb4, 0xcc, 0xe4, + 0xcc, 0xc4, 0x1c, 0xfd, 0x8c, 0xd2, 0x24, 0xfd, 0x32, 0x43, 0x23, 0xfd, 0x0a, 0xd4, 0x20, 0x29, + 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0x4c, 0x62, 0x03, 0x3b, 0xc7, 0x18, 0x10, 0x00, 0x00, + 0xff, 0xff, 0x2d, 0x56, 0x2a, 0xc7, 0x3b, 0x01, 0x00, 0x00, +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.InactiveDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.InactiveDuration):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintParams(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.InactiveDuration) + n += 1 + l + sovParams(uint64(l)) + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InactiveDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.InactiveDuration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/subscription/types/v1/querier.pb.go b/x/subscription/types/v1/querier.pb.go new file mode 100644 index 00000000..d36e64c0 --- /dev/null +++ b/x/subscription/types/v1/querier.pb.go @@ -0,0 +1,2704 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/subscription/v1/querier.proto + +package v1 + +import ( + context "context" + fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/sentinel-official/hub/v12/types" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type QuerySubscriptionsRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QuerySubscriptionsRequest) Reset() { *m = QuerySubscriptionsRequest{} } +func (m *QuerySubscriptionsRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySubscriptionsRequest) ProtoMessage() {} +func (*QuerySubscriptionsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_23fa27db0d260c69, []int{0} +} +func (m *QuerySubscriptionsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubscriptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubscriptionsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubscriptionsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubscriptionsRequest.Merge(m, src) +} +func (m *QuerySubscriptionsRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySubscriptionsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubscriptionsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubscriptionsRequest proto.InternalMessageInfo + +type QuerySubscriptionsForAddressRequest struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Status types.Status `protobuf:"varint,2,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QuerySubscriptionsForAddressRequest) Reset() { *m = QuerySubscriptionsForAddressRequest{} } +func (m *QuerySubscriptionsForAddressRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySubscriptionsForAddressRequest) ProtoMessage() {} +func (*QuerySubscriptionsForAddressRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_23fa27db0d260c69, []int{1} +} +func (m *QuerySubscriptionsForAddressRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubscriptionsForAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubscriptionsForAddressRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubscriptionsForAddressRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubscriptionsForAddressRequest.Merge(m, src) +} +func (m *QuerySubscriptionsForAddressRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySubscriptionsForAddressRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubscriptionsForAddressRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubscriptionsForAddressRequest proto.InternalMessageInfo + +type QuerySubscriptionRequest struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QuerySubscriptionRequest) Reset() { *m = QuerySubscriptionRequest{} } +func (m *QuerySubscriptionRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySubscriptionRequest) ProtoMessage() {} +func (*QuerySubscriptionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_23fa27db0d260c69, []int{2} +} +func (m *QuerySubscriptionRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubscriptionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubscriptionRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubscriptionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubscriptionRequest.Merge(m, src) +} +func (m *QuerySubscriptionRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySubscriptionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubscriptionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubscriptionRequest proto.InternalMessageInfo + +type QueryQuotaRequest struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryQuotaRequest) Reset() { *m = QueryQuotaRequest{} } +func (m *QueryQuotaRequest) String() string { return proto.CompactTextString(m) } +func (*QueryQuotaRequest) ProtoMessage() {} +func (*QueryQuotaRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_23fa27db0d260c69, []int{3} +} +func (m *QueryQuotaRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryQuotaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryQuotaRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryQuotaRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryQuotaRequest.Merge(m, src) +} +func (m *QueryQuotaRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryQuotaRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryQuotaRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryQuotaRequest proto.InternalMessageInfo + +type QueryQuotasRequest struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryQuotasRequest) Reset() { *m = QueryQuotasRequest{} } +func (m *QueryQuotasRequest) String() string { return proto.CompactTextString(m) } +func (*QueryQuotasRequest) ProtoMessage() {} +func (*QueryQuotasRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_23fa27db0d260c69, []int{4} +} +func (m *QueryQuotasRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryQuotasRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryQuotasRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryQuotasRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryQuotasRequest.Merge(m, src) +} +func (m *QueryQuotasRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryQuotasRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryQuotasRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryQuotasRequest proto.InternalMessageInfo + +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_23fa27db0d260c69, []int{5} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +type QuerySubscriptionsResponse struct { + Subscriptions []Subscription `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QuerySubscriptionsResponse) Reset() { *m = QuerySubscriptionsResponse{} } +func (m *QuerySubscriptionsResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySubscriptionsResponse) ProtoMessage() {} +func (*QuerySubscriptionsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_23fa27db0d260c69, []int{6} +} +func (m *QuerySubscriptionsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubscriptionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubscriptionsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubscriptionsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubscriptionsResponse.Merge(m, src) +} +func (m *QuerySubscriptionsResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySubscriptionsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubscriptionsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubscriptionsResponse proto.InternalMessageInfo + +type QuerySubscriptionsForAddressResponse struct { + Subscriptions []Subscription `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QuerySubscriptionsForAddressResponse) Reset() { *m = QuerySubscriptionsForAddressResponse{} } +func (m *QuerySubscriptionsForAddressResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySubscriptionsForAddressResponse) ProtoMessage() {} +func (*QuerySubscriptionsForAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_23fa27db0d260c69, []int{7} +} +func (m *QuerySubscriptionsForAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubscriptionsForAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubscriptionsForAddressResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubscriptionsForAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubscriptionsForAddressResponse.Merge(m, src) +} +func (m *QuerySubscriptionsForAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySubscriptionsForAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubscriptionsForAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubscriptionsForAddressResponse proto.InternalMessageInfo + +type QuerySubscriptionResponse struct { + Subscription Subscription `protobuf:"bytes,1,opt,name=subscription,proto3" json:"subscription"` +} + +func (m *QuerySubscriptionResponse) Reset() { *m = QuerySubscriptionResponse{} } +func (m *QuerySubscriptionResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySubscriptionResponse) ProtoMessage() {} +func (*QuerySubscriptionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_23fa27db0d260c69, []int{8} +} +func (m *QuerySubscriptionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySubscriptionResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySubscriptionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySubscriptionResponse.Merge(m, src) +} +func (m *QuerySubscriptionResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySubscriptionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySubscriptionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySubscriptionResponse proto.InternalMessageInfo + +type QueryQuotaResponse struct { + Quota Quota `protobuf:"bytes,1,opt,name=quota,proto3" json:"quota"` +} + +func (m *QueryQuotaResponse) Reset() { *m = QueryQuotaResponse{} } +func (m *QueryQuotaResponse) String() string { return proto.CompactTextString(m) } +func (*QueryQuotaResponse) ProtoMessage() {} +func (*QueryQuotaResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_23fa27db0d260c69, []int{9} +} +func (m *QueryQuotaResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryQuotaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryQuotaResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryQuotaResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryQuotaResponse.Merge(m, src) +} +func (m *QueryQuotaResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryQuotaResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryQuotaResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryQuotaResponse proto.InternalMessageInfo + +type QueryQuotasResponse struct { + Quotas []Quota `protobuf:"bytes,1,rep,name=quotas,proto3" json:"quotas"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryQuotasResponse) Reset() { *m = QueryQuotasResponse{} } +func (m *QueryQuotasResponse) String() string { return proto.CompactTextString(m) } +func (*QueryQuotasResponse) ProtoMessage() {} +func (*QueryQuotasResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_23fa27db0d260c69, []int{10} +} +func (m *QueryQuotasResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryQuotasResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryQuotasResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryQuotasResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryQuotasResponse.Merge(m, src) +} +func (m *QueryQuotasResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryQuotasResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryQuotasResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryQuotasResponse proto.InternalMessageInfo + +type QueryParamsResponse struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_23fa27db0d260c69, []int{11} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*QuerySubscriptionsRequest)(nil), "sentinel.subscription.v1.QuerySubscriptionsRequest") + proto.RegisterType((*QuerySubscriptionsForAddressRequest)(nil), "sentinel.subscription.v1.QuerySubscriptionsForAddressRequest") + proto.RegisterType((*QuerySubscriptionRequest)(nil), "sentinel.subscription.v1.QuerySubscriptionRequest") + proto.RegisterType((*QueryQuotaRequest)(nil), "sentinel.subscription.v1.QueryQuotaRequest") + proto.RegisterType((*QueryQuotasRequest)(nil), "sentinel.subscription.v1.QueryQuotasRequest") + proto.RegisterType((*QueryParamsRequest)(nil), "sentinel.subscription.v1.QueryParamsRequest") + proto.RegisterType((*QuerySubscriptionsResponse)(nil), "sentinel.subscription.v1.QuerySubscriptionsResponse") + proto.RegisterType((*QuerySubscriptionsForAddressResponse)(nil), "sentinel.subscription.v1.QuerySubscriptionsForAddressResponse") + proto.RegisterType((*QuerySubscriptionResponse)(nil), "sentinel.subscription.v1.QuerySubscriptionResponse") + proto.RegisterType((*QueryQuotaResponse)(nil), "sentinel.subscription.v1.QueryQuotaResponse") + proto.RegisterType((*QueryQuotasResponse)(nil), "sentinel.subscription.v1.QueryQuotasResponse") + proto.RegisterType((*QueryParamsResponse)(nil), "sentinel.subscription.v1.QueryParamsResponse") +} + +func init() { + proto.RegisterFile("sentinel/subscription/v1/querier.proto", fileDescriptor_23fa27db0d260c69) +} + +var fileDescriptor_23fa27db0d260c69 = []byte{ + // 795 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xce, 0xa5, 0x25, 0xc0, 0xb5, 0x54, 0xe2, 0xa8, 0x44, 0x1a, 0x55, 0x6e, 0xe5, 0xfe, 0x54, + 0xdb, 0xf8, 0xe4, 0x14, 0x26, 0x68, 0x25, 0x3a, 0x94, 0xb5, 0x75, 0xc5, 0xc2, 0x80, 0x74, 0x71, + 0xae, 0xae, 0xa5, 0xc4, 0xe7, 0xfa, 0xec, 0x88, 0xaa, 0xea, 0x00, 0x7f, 0x01, 0x12, 0x03, 0x62, + 0x00, 0x21, 0x26, 0xfe, 0x05, 0x58, 0x59, 0x3a, 0x16, 0xb1, 0x30, 0x21, 0x48, 0xf9, 0x43, 0x50, + 0xce, 0x67, 0xc7, 0x6e, 0xe3, 0xfc, 0xa8, 0x58, 0xd8, 0x1c, 0xe7, 0xfb, 0xde, 0xfb, 0xbe, 0x77, + 0xef, 0x3d, 0x1f, 0x5c, 0xe4, 0xd4, 0xf1, 0x6d, 0x87, 0xd6, 0x31, 0x0f, 0xaa, 0xdc, 0xf4, 0x6c, + 0xd7, 0xb7, 0x99, 0x83, 0x9b, 0x3a, 0x3e, 0x0c, 0xa8, 0x67, 0x53, 0x4f, 0x73, 0x3d, 0xe6, 0x33, + 0x54, 0x8c, 0x70, 0x5a, 0x12, 0xa7, 0x35, 0xf5, 0xd2, 0x8a, 0xc9, 0x78, 0x83, 0x71, 0x5c, 0x25, + 0x9c, 0x0a, 0xd2, 0x11, 0x6e, 0xea, 0x55, 0xea, 0x13, 0x1d, 0xbb, 0xc4, 0xb2, 0x1d, 0x22, 0x80, + 0x22, 0x4a, 0x69, 0xd2, 0x62, 0x16, 0x13, 0x8f, 0xb8, 0xfd, 0x24, 0xdf, 0x4e, 0x5b, 0x8c, 0x59, + 0x75, 0x8a, 0x89, 0x6b, 0x63, 0xe2, 0x38, 0xcc, 0x17, 0x14, 0x2e, 0xff, 0x5d, 0xc8, 0x54, 0xe8, + 0x12, 0x8f, 0x34, 0x22, 0xd8, 0x7c, 0x0f, 0x23, 0xcc, 0x27, 0x12, 0xb5, 0x9a, 0x89, 0x4a, 0xd9, + 0x0a, 0xc1, 0x4a, 0x0c, 0xf6, 0x8f, 0x5c, 0xca, 0x05, 0xca, 0x27, 0x7e, 0x20, 0x53, 0xaa, 0x26, + 0x9c, 0xda, 0x6d, 0xfb, 0xdd, 0x4b, 0x50, 0xb9, 0x41, 0x0f, 0x03, 0xca, 0x7d, 0xb4, 0x0d, 0x61, + 0xc7, 0x7e, 0x11, 0xcc, 0x82, 0xe5, 0xb1, 0xca, 0xa2, 0x16, 0xd6, 0x4a, 0x6b, 0xd7, 0x4a, 0x13, + 0xb5, 0xd2, 0x64, 0xad, 0xb4, 0x1d, 0x62, 0x51, 0xc9, 0x35, 0x12, 0x4c, 0xf5, 0x0b, 0x80, 0x73, + 0x97, 0xb3, 0x6c, 0x33, 0xef, 0x51, 0xad, 0xe6, 0x51, 0x1e, 0xe7, 0x2b, 0xc2, 0xeb, 0x24, 0x7c, + 0x23, 0x92, 0xdd, 0x34, 0xa2, 0x9f, 0x48, 0x87, 0x85, 0x50, 0x76, 0x31, 0x3f, 0x0b, 0x96, 0x27, + 0x2a, 0x53, 0x5a, 0x7c, 0x96, 0xc2, 0x97, 0xd6, 0xd4, 0xb5, 0x3d, 0x01, 0x30, 0x24, 0xf0, 0x82, + 0xf8, 0x91, 0x2b, 0x8b, 0x5f, 0x81, 0xc5, 0x4b, 0xda, 0x23, 0xc1, 0x13, 0x30, 0x6f, 0xd7, 0x84, + 0xd6, 0x51, 0x23, 0x6f, 0xd7, 0xd4, 0x0d, 0x78, 0x5b, 0x60, 0x77, 0xdb, 0xc7, 0x95, 0x01, 0x4a, + 0xba, 0xcc, 0xa7, 0x5c, 0xaa, 0x75, 0x88, 0x3a, 0x74, 0x9e, 0xc5, 0x4f, 0x1b, 0xcb, 0x5f, 0xd9, + 0xd8, 0xa4, 0xcc, 0xb6, 0x23, 0x5a, 0x50, 0x22, 0xd4, 0xcf, 0x00, 0x96, 0xba, 0x75, 0x04, 0x77, + 0x99, 0xc3, 0x29, 0x32, 0xe0, 0xad, 0x64, 0x97, 0xb5, 0x0f, 0x6a, 0x44, 0xe4, 0xcf, 0x9a, 0x2d, + 0x2d, 0x19, 0x67, 0x6b, 0xf4, 0xf4, 0xe7, 0x4c, 0xce, 0x48, 0x87, 0x40, 0x8f, 0xbb, 0x18, 0x5a, + 0xea, 0x6b, 0x28, 0x14, 0x94, 0x72, 0xf4, 0x15, 0xc0, 0xf9, 0xde, 0x7d, 0xf6, 0x3f, 0xb8, 0x68, + 0x74, 0x19, 0xc9, 0x58, 0xf9, 0x0e, 0x1c, 0x4f, 0xa6, 0x8d, 0x87, 0x72, 0x18, 0xe1, 0xa9, 0x08, + 0xea, 0x6e, 0xb2, 0xe9, 0xe2, 0x3c, 0x0f, 0xe0, 0x35, 0xb1, 0x73, 0x64, 0x82, 0x99, 0xec, 0x04, + 0x82, 0x27, 0x23, 0x87, 0x1c, 0xf5, 0x1d, 0x80, 0x77, 0x52, 0x8d, 0x2c, 0x83, 0x6e, 0xc0, 0x82, + 0x00, 0x44, 0xf5, 0x1e, 0x30, 0xaa, 0x24, 0xfd, 0xbb, 0x0a, 0x3f, 0x91, 0xf2, 0xa2, 0xce, 0x97, + 0xf2, 0x36, 0x61, 0x21, 0x5c, 0xc7, 0xd2, 0xf4, 0x6c, 0xb6, 0xbc, 0x90, 0x19, 0xe9, 0x0b, 0x59, + 0x95, 0x17, 0x37, 0xe0, 0x78, 0x78, 0x72, 0xd4, 0x6b, 0xda, 0x26, 0x45, 0x1f, 0x80, 0xac, 0x6d, + 0xaa, 0x1f, 0xd1, 0x7a, 0x2f, 0xdb, 0x19, 0xbb, 0xb8, 0x74, 0x6f, 0x38, 0x52, 0x68, 0x49, 0x9d, + 0x79, 0xf9, 0xfd, 0xcf, 0xeb, 0xfc, 0x14, 0xba, 0x8b, 0xbb, 0x7e, 0x34, 0x38, 0xfa, 0x06, 0xe0, + 0x74, 0xaf, 0x91, 0x41, 0x1b, 0xc3, 0xe4, 0xbd, 0xb4, 0xd2, 0x4b, 0x9b, 0x57, 0xa5, 0x4b, 0x03, + 0x15, 0x61, 0x60, 0x0d, 0xad, 0x74, 0x0c, 0x10, 0xd3, 0x64, 0x81, 0xe3, 0x73, 0x7c, 0x2c, 0xf7, + 0xe6, 0xc9, 0x05, 0x4f, 0x1f, 0x81, 0x5c, 0xc3, 0xc9, 0xe0, 0xa8, 0x32, 0x84, 0x92, 0x48, 0xfd, + 0xfa, 0x50, 0x1c, 0x29, 0x79, 0x5e, 0x48, 0x56, 0xd0, 0x74, 0x46, 0xcd, 0xf1, 0xb1, 0x5d, 0x3b, + 0x41, 0xef, 0x01, 0x84, 0x9d, 0x19, 0x41, 0xab, 0x7d, 0x32, 0x25, 0xbf, 0x28, 0xa5, 0xb5, 0xc1, + 0xc0, 0x52, 0xcf, 0x7d, 0xa1, 0x07, 0xa3, 0x72, 0xdf, 0xca, 0x09, 0x65, 0x58, 0x4e, 0xdb, 0x1b, + 0x00, 0xc7, 0x12, 0x43, 0x8c, 0x06, 0x4a, 0x1a, 0x9f, 0x7b, 0x79, 0x40, 0xb4, 0xd4, 0xb8, 0x2a, + 0x34, 0x2e, 0xa0, 0xb9, 0x5e, 0x35, 0x8b, 0x94, 0xbd, 0x8d, 0x94, 0x85, 0x53, 0xd8, 0x57, 0x59, + 0xea, 0x03, 0xd7, 0x57, 0x59, 0x7a, 0x29, 0xa8, 0x65, 0xa1, 0x6c, 0x09, 0x2d, 0x74, 0x94, 0x35, + 0x58, 0x2d, 0xa8, 0x53, 0x9e, 0xbe, 0x7e, 0x85, 0x3b, 0x60, 0xeb, 0xd9, 0xe9, 0x6f, 0x25, 0xf7, + 0xa9, 0xa5, 0xe4, 0x4e, 0x5b, 0x0a, 0x38, 0x6b, 0x29, 0xe0, 0x57, 0x4b, 0x01, 0xaf, 0xce, 0x95, + 0xdc, 0xd9, 0xb9, 0x92, 0xfb, 0x71, 0xae, 0xe4, 0x9e, 0x3e, 0xb4, 0x6c, 0xff, 0x20, 0xa8, 0x6a, + 0x26, 0x6b, 0xc4, 0x21, 0xcb, 0x6c, 0x7f, 0xdf, 0x36, 0x6d, 0x52, 0xc7, 0x07, 0x41, 0x15, 0x37, + 0xf5, 0x0a, 0x7e, 0x9e, 0x8e, 0x1e, 0x5d, 0xde, 0xaa, 0x05, 0x71, 0x6d, 0x5b, 0xff, 0x1b, 0x00, + 0x00, 0xff, 0xff, 0x46, 0x0f, 0xb9, 0xb8, 0xf4, 0x0a, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryServiceClient is the client API for QueryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryServiceClient interface { + QuerySubscriptions(ctx context.Context, in *QuerySubscriptionsRequest, opts ...grpc.CallOption) (*QuerySubscriptionsResponse, error) + QuerySubscriptionsForAddress(ctx context.Context, in *QuerySubscriptionsForAddressRequest, opts ...grpc.CallOption) (*QuerySubscriptionsForAddressResponse, error) + QuerySubscription(ctx context.Context, in *QuerySubscriptionRequest, opts ...grpc.CallOption) (*QuerySubscriptionResponse, error) + QueryQuota(ctx context.Context, in *QueryQuotaRequest, opts ...grpc.CallOption) (*QueryQuotaResponse, error) + QueryQuotas(ctx context.Context, in *QueryQuotasRequest, opts ...grpc.CallOption) (*QueryQuotasResponse, error) + QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryServiceClient struct { + cc grpc1.ClientConn +} + +func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { + return &queryServiceClient{cc} +} + +func (c *queryServiceClient) QuerySubscriptions(ctx context.Context, in *QuerySubscriptionsRequest, opts ...grpc.CallOption) (*QuerySubscriptionsResponse, error) { + out := new(QuerySubscriptionsResponse) + err := c.cc.Invoke(ctx, "/sentinel.subscription.v1.QueryService/QuerySubscriptions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QuerySubscriptionsForAddress(ctx context.Context, in *QuerySubscriptionsForAddressRequest, opts ...grpc.CallOption) (*QuerySubscriptionsForAddressResponse, error) { + out := new(QuerySubscriptionsForAddressResponse) + err := c.cc.Invoke(ctx, "/sentinel.subscription.v1.QueryService/QuerySubscriptionsForAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QuerySubscription(ctx context.Context, in *QuerySubscriptionRequest, opts ...grpc.CallOption) (*QuerySubscriptionResponse, error) { + out := new(QuerySubscriptionResponse) + err := c.cc.Invoke(ctx, "/sentinel.subscription.v1.QueryService/QuerySubscription", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QueryQuota(ctx context.Context, in *QueryQuotaRequest, opts ...grpc.CallOption) (*QueryQuotaResponse, error) { + out := new(QueryQuotaResponse) + err := c.cc.Invoke(ctx, "/sentinel.subscription.v1.QueryService/QueryQuota", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QueryQuotas(ctx context.Context, in *QueryQuotasRequest, opts ...grpc.CallOption) (*QueryQuotasResponse, error) { + out := new(QueryQuotasResponse) + err := c.cc.Invoke(ctx, "/sentinel.subscription.v1.QueryService/QueryQuotas", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryServiceClient) QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/sentinel.subscription.v1.QueryService/QueryParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServiceServer is the server API for QueryService service. +type QueryServiceServer interface { + QuerySubscriptions(context.Context, *QuerySubscriptionsRequest) (*QuerySubscriptionsResponse, error) + QuerySubscriptionsForAddress(context.Context, *QuerySubscriptionsForAddressRequest) (*QuerySubscriptionsForAddressResponse, error) + QuerySubscription(context.Context, *QuerySubscriptionRequest) (*QuerySubscriptionResponse, error) + QueryQuota(context.Context, *QueryQuotaRequest) (*QueryQuotaResponse, error) + QueryQuotas(context.Context, *QueryQuotasRequest) (*QueryQuotasResponse, error) + QueryParams(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +} + +// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServiceServer struct { +} + +func (*UnimplementedQueryServiceServer) QuerySubscriptions(ctx context.Context, req *QuerySubscriptionsRequest) (*QuerySubscriptionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QuerySubscriptions not implemented") +} +func (*UnimplementedQueryServiceServer) QuerySubscriptionsForAddress(ctx context.Context, req *QuerySubscriptionsForAddressRequest) (*QuerySubscriptionsForAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QuerySubscriptionsForAddress not implemented") +} +func (*UnimplementedQueryServiceServer) QuerySubscription(ctx context.Context, req *QuerySubscriptionRequest) (*QuerySubscriptionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QuerySubscription not implemented") +} +func (*UnimplementedQueryServiceServer) QueryQuota(ctx context.Context, req *QueryQuotaRequest) (*QueryQuotaResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryQuota not implemented") +} +func (*UnimplementedQueryServiceServer) QueryQuotas(ctx context.Context, req *QueryQuotasRequest) (*QueryQuotasResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryQuotas not implemented") +} +func (*UnimplementedQueryServiceServer) QueryParams(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryParams not implemented") +} + +func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { + s.RegisterService(&_QueryService_serviceDesc, srv) +} + +func _QueryService_QuerySubscriptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySubscriptionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QuerySubscriptions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.subscription.v1.QueryService/QuerySubscriptions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QuerySubscriptions(ctx, req.(*QuerySubscriptionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QuerySubscriptionsForAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySubscriptionsForAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QuerySubscriptionsForAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.subscription.v1.QueryService/QuerySubscriptionsForAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QuerySubscriptionsForAddress(ctx, req.(*QuerySubscriptionsForAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QuerySubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySubscriptionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QuerySubscription(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.subscription.v1.QueryService/QuerySubscription", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QuerySubscription(ctx, req.(*QuerySubscriptionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QueryQuota_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryQuotaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryQuota(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.subscription.v1.QueryService/QueryQuota", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryQuota(ctx, req.(*QueryQuotaRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QueryQuotas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryQuotasRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryQuotas(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.subscription.v1.QueryService/QueryQuotas", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryQuotas(ctx, req.(*QueryQuotasRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _QueryService_QueryParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServiceServer).QueryParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/sentinel.subscription.v1.QueryService/QueryParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServiceServer).QueryParams(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _QueryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "sentinel.subscription.v1.QueryService", + HandlerType: (*QueryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QuerySubscriptions", + Handler: _QueryService_QuerySubscriptions_Handler, + }, + { + MethodName: "QuerySubscriptionsForAddress", + Handler: _QueryService_QuerySubscriptionsForAddress_Handler, + }, + { + MethodName: "QuerySubscription", + Handler: _QueryService_QuerySubscription_Handler, + }, + { + MethodName: "QueryQuota", + Handler: _QueryService_QueryQuota_Handler, + }, + { + MethodName: "QueryQuotas", + Handler: _QueryService_QueryQuotas_Handler, + }, + { + MethodName: "QueryParams", + Handler: _QueryService_QueryParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "sentinel/subscription/v1/querier.proto", +} + +func (m *QuerySubscriptionsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubscriptionsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubscriptionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySubscriptionsForAddressRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubscriptionsForAddressRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubscriptionsForAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Status != 0 { + i = encodeVarintQuerier(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x10 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuerier(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QuerySubscriptionRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubscriptionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintQuerier(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryQuotaRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryQuotaRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryQuotaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuerier(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintQuerier(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryQuotasRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryQuotasRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryQuotasRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintQuerier(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QuerySubscriptionsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubscriptionsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubscriptionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Subscriptions) > 0 { + for iNdEx := len(m.Subscriptions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Subscriptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QuerySubscriptionsForAddressResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubscriptionsForAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubscriptionsForAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Subscriptions) > 0 { + for iNdEx := len(m.Subscriptions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Subscriptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QuerySubscriptionResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySubscriptionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Subscription.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryQuotaResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryQuotaResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryQuotaResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Quota.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryQuotasResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryQuotasResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryQuotasResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Quotas) > 0 { + for iNdEx := len(m.Quotas) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Quotas[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuerier(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuerier(dAtA []byte, offset int, v uint64) int { + offset -= sovQuerier(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QuerySubscriptionsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QuerySubscriptionsForAddressRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuerier(uint64(l)) + } + if m.Status != 0 { + n += 1 + sovQuerier(uint64(m.Status)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QuerySubscriptionRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuerier(uint64(m.Id)) + } + return n +} + +func (m *QueryQuotaRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuerier(uint64(m.Id)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryQuotasRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuerier(uint64(m.Id)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QuerySubscriptionsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Subscriptions) > 0 { + for _, e := range m.Subscriptions { + l = e.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QuerySubscriptionsForAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Subscriptions) > 0 { + for _, e := range m.Subscriptions { + l = e.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QuerySubscriptionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Subscription.Size() + n += 1 + l + sovQuerier(uint64(l)) + return n +} + +func (m *QueryQuotaResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Quota.Size() + n += 1 + l + sovQuerier(uint64(l)) + return n +} + +func (m *QueryQuotasResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Quotas) > 0 { + for _, e := range m.Quotas { + l = e.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuerier(uint64(l)) + } + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuerier(uint64(l)) + return n +} + +func sovQuerier(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuerier(x uint64) (n int) { + return sovQuerier(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QuerySubscriptionsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubscriptionsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubscriptionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubscriptionsForAddressRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubscriptionsForAddressRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubscriptionsForAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubscriptionRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubscriptionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubscriptionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryQuotaRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryQuotaRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryQuotaRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryQuotasRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryQuotasRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryQuotasRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubscriptionsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubscriptionsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubscriptionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subscriptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subscriptions = append(m.Subscriptions, Subscription{}) + if err := m.Subscriptions[len(m.Subscriptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubscriptionsForAddressResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubscriptionsForAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubscriptionsForAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subscriptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subscriptions = append(m.Subscriptions, Subscription{}) + if err := m.Subscriptions[len(m.Subscriptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySubscriptionResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySubscriptionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySubscriptionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subscription", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Subscription.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryQuotaResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryQuotaResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryQuotaResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quota", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Quota.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryQuotasResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryQuotasResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryQuotasResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Quotas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Quotas = append(m.Quotas, Quota{}) + if err := m.Quotas[len(m.Quotas)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuerier + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuerier + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuerier + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuerier(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuerier + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuerier(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuerier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuerier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuerier + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuerier + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuerier + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuerier + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuerier = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuerier = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuerier = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/subscription/types/v1/querier.pb.gw.go b/x/subscription/types/v1/querier.pb.gw.go new file mode 100644 index 00000000..74133348 --- /dev/null +++ b/x/subscription/types/v1/querier.pb.gw.go @@ -0,0 +1,698 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: sentinel/subscription/v1/querier.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_QueryService_QuerySubscriptions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_QueryService_QuerySubscriptions_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySubscriptionsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QuerySubscriptions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QuerySubscriptions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QuerySubscriptions_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySubscriptionsRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QuerySubscriptions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QuerySubscriptions(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_QueryService_QuerySubscriptionsForAddress_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_QueryService_QuerySubscriptionsForAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySubscriptionsForAddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QuerySubscriptionsForAddress_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QuerySubscriptionsForAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QuerySubscriptionsForAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySubscriptionsForAddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QuerySubscriptionsForAddress_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QuerySubscriptionsForAddress(ctx, &protoReq) + return msg, metadata, err + +} + +func request_QueryService_QuerySubscription_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySubscriptionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.QuerySubscription(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QuerySubscription_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySubscriptionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.QuerySubscription(ctx, &protoReq) + return msg, metadata, err + +} + +func request_QueryService_QueryQuota_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryQuotaRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.QueryQuota(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QueryQuota_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryQuotaRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.QueryQuota(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_QueryService_QueryQuotas_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_QueryService_QueryQuotas_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryQuotasRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QueryQuotas_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QueryQuotas(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QueryQuotas_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryQuotasRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_QueryService_QueryQuotas_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QueryQuotas(ctx, &protoReq) + return msg, metadata, err + +} + +func request_QueryService_QueryParams_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.QueryParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_QueryService_QueryParams_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.QueryParams(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryServiceHandlerServer registers the http handlers for service QueryService to "mux". +// UnaryRPC :call QueryServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryServiceHandlerFromEndpoint instead. +func RegisterQueryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServiceServer) error { + + mux.Handle("GET", pattern_QueryService_QuerySubscriptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QuerySubscriptions_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QuerySubscriptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QuerySubscriptionsForAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QuerySubscriptionsForAddress_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QuerySubscriptionsForAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QuerySubscription_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QuerySubscription_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QuerySubscription_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryQuota_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QueryQuota_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryQuota_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryQuotas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QueryQuotas_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryQuotas_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_QueryService_QueryParams_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryServiceHandlerFromEndpoint is same as RegisterQueryServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryServiceHandler(ctx, mux, conn) +} + +// RegisterQueryServiceHandler registers the http handlers for service QueryService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryServiceHandlerClient(ctx, mux, NewQueryServiceClient(conn)) +} + +// RegisterQueryServiceHandlerClient registers the http handlers for service QueryService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryServiceClient" to call the correct interceptors. +func RegisterQueryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryServiceClient) error { + + mux.Handle("GET", pattern_QueryService_QuerySubscriptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QuerySubscriptions_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QuerySubscriptions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QuerySubscriptionsForAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QuerySubscriptionsForAddress_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QuerySubscriptionsForAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QuerySubscription_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QuerySubscription_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QuerySubscription_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryQuota_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QueryQuota_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryQuota_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryQuotas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QueryQuotas_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryQuotas_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_QueryService_QueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_QueryService_QueryParams_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_QueryService_QueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_QueryService_QuerySubscriptions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"sentinel", "subscriptions"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QuerySubscriptionsForAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"sentinel", "accounts", "address", "subscriptions"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QuerySubscription_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"sentinel", "subscriptions", "id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QueryQuota_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"accounts", "address", "subscriptions", "id", "quotas"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QueryQuotas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"sentinel", "subscriptions", "id", "quotas"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_QueryService_QueryParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sentinel", "modules", "subscription", "params"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_QueryService_QuerySubscriptions_0 = runtime.ForwardResponseMessage + + forward_QueryService_QuerySubscriptionsForAddress_0 = runtime.ForwardResponseMessage + + forward_QueryService_QuerySubscription_0 = runtime.ForwardResponseMessage + + forward_QueryService_QueryQuota_0 = runtime.ForwardResponseMessage + + forward_QueryService_QueryQuotas_0 = runtime.ForwardResponseMessage + + forward_QueryService_QueryParams_0 = runtime.ForwardResponseMessage +) diff --git a/x/subscription/types/v1/quota.pb.go b/x/subscription/types/v1/quota.pb.go new file mode 100644 index 00000000..a8ebb728 --- /dev/null +++ b/x/subscription/types/v1/quota.pb.go @@ -0,0 +1,412 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/subscription/v1/quota.proto + +package v1 + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Quota struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Allocated github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=allocated,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"allocated"` + Consumed github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=consumed,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"consumed"` +} + +func (m *Quota) Reset() { *m = Quota{} } +func (m *Quota) String() string { return proto.CompactTextString(m) } +func (*Quota) ProtoMessage() {} +func (*Quota) Descriptor() ([]byte, []int) { + return fileDescriptor_3e59de24126e6d2e, []int{0} +} +func (m *Quota) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Quota) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Quota.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Quota) XXX_Merge(src proto.Message) { + xxx_messageInfo_Quota.Merge(m, src) +} +func (m *Quota) XXX_Size() int { + return m.Size() +} +func (m *Quota) XXX_DiscardUnknown() { + xxx_messageInfo_Quota.DiscardUnknown(m) +} + +var xxx_messageInfo_Quota proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Quota)(nil), "sentinel.subscription.v1.Quota") +} + +func init() { + proto.RegisterFile("sentinel/subscription/v1/quota.proto", fileDescriptor_3e59de24126e6d2e) +} + +var fileDescriptor_3e59de24126e6d2e = []byte{ + // 269 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x29, 0x4e, 0xcd, 0x2b, + 0xc9, 0xcc, 0x4b, 0xcd, 0xd1, 0x2f, 0x2e, 0x4d, 0x2a, 0x4e, 0x2e, 0xca, 0x2c, 0x28, 0xc9, 0xcc, + 0xcf, 0xd3, 0x2f, 0x33, 0xd4, 0x2f, 0x2c, 0xcd, 0x2f, 0x49, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x92, 0x80, 0xa9, 0xd2, 0x43, 0x56, 0xa5, 0x57, 0x66, 0x28, 0x25, 0x92, 0x9e, 0x9f, 0x9e, + 0x0f, 0x56, 0xa4, 0x0f, 0x62, 0x41, 0xd4, 0x2b, 0xed, 0x66, 0xe4, 0x62, 0x0d, 0x04, 0xe9, 0x17, + 0x92, 0xe0, 0x62, 0x4f, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x96, 0x60, 0x54, 0x60, 0xd4, 0xe0, + 0x0c, 0x82, 0x71, 0x85, 0x7c, 0xb8, 0x38, 0x13, 0x73, 0x72, 0xf2, 0x93, 0x13, 0x4b, 0x52, 0x53, + 0x24, 0x98, 0x40, 0x72, 0x4e, 0x7a, 0x27, 0xee, 0xc9, 0x33, 0xdc, 0xba, 0x27, 0xaf, 0x96, 0x9e, + 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9c, 0x5f, 0x9c, 0x9b, 0x5f, 0x0c, + 0xa5, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0xf5, 0x3c, 0xf3, 0x4a, 0x82, + 0x10, 0x06, 0x08, 0x79, 0x71, 0x71, 0x24, 0xe7, 0xe7, 0x15, 0x97, 0xe6, 0xa6, 0xa6, 0x48, 0x30, + 0x93, 0x65, 0x18, 0x5c, 0xbf, 0x53, 0xdc, 0x89, 0x87, 0x72, 0x0c, 0x2b, 0x1e, 0xc9, 0x31, 0x9c, + 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, + 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x0d, 0x92, 0x99, 0xb0, 0xa0, 0xd1, + 0xcd, 0x4f, 0x4b, 0xcb, 0x4c, 0xce, 0x4c, 0xcc, 0xd1, 0xcf, 0x28, 0x4d, 0xd2, 0x2f, 0x33, 0x34, + 0xd2, 0xaf, 0x40, 0x0d, 0x53, 0xb0, 0x55, 0xfa, 0x65, 0x86, 0x49, 0x6c, 0xe0, 0x40, 0x32, 0x06, + 0x04, 0x00, 0x00, 0xff, 0xff, 0x38, 0x11, 0x79, 0x5e, 0x7c, 0x01, 0x00, 0x00, +} + +func (m *Quota) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Quota) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Quota) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Consumed.Size() + i -= size + if _, err := m.Consumed.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuota(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.Allocated.Size() + i -= size + if _, err := m.Allocated.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuota(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuota(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuota(dAtA []byte, offset int, v uint64) int { + offset -= sovQuota(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Quota) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuota(uint64(l)) + } + l = m.Allocated.Size() + n += 1 + l + sovQuota(uint64(l)) + l = m.Consumed.Size() + n += 1 + l + sovQuota(uint64(l)) + return n +} + +func sovQuota(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuota(x uint64) (n int) { + return sovQuota(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Quota) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuota + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Quota: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Quota: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuota + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuota + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuota + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Allocated", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuota + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuota + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuota + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Allocated.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Consumed", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuota + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuota + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuota + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Consumed.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuota(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuota + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuota(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuota + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuota + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuota + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuota + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuota + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuota + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuota = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuota = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuota = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/subscription/types/v1/subscription.pb.go b/x/subscription/types/v1/subscription.pb.go new file mode 100644 index 00000000..949a6c1d --- /dev/null +++ b/x/subscription/types/v1/subscription.pb.go @@ -0,0 +1,735 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sentinel/subscription/v1/subscription.proto + +package v1 + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + types1 "github.com/sentinel-official/hub/v12/types" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Subscription struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + Node string `protobuf:"bytes,3,opt,name=node,proto3" json:"node,omitempty"` + Price types.Coin `protobuf:"bytes,4,opt,name=price,proto3" json:"price"` + Deposit types.Coin `protobuf:"bytes,5,opt,name=deposit,proto3" json:"deposit"` + Plan uint64 `protobuf:"varint,6,opt,name=plan,proto3" json:"plan,omitempty"` + Denom string `protobuf:"bytes,7,opt,name=denom,proto3" json:"denom,omitempty"` + Expiry time.Time `protobuf:"bytes,8,opt,name=expiry,proto3,stdtime" json:"expiry"` + Free github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,9,opt,name=free,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"free"` + Status types1.Status `protobuf:"varint,10,opt,name=status,proto3,enum=sentinel.types.v1.Status" json:"status,omitempty"` + StatusAt time.Time `protobuf:"bytes,11,opt,name=status_at,json=statusAt,proto3,stdtime" json:"status_at"` +} + +func (m *Subscription) Reset() { *m = Subscription{} } +func (m *Subscription) String() string { return proto.CompactTextString(m) } +func (*Subscription) ProtoMessage() {} +func (*Subscription) Descriptor() ([]byte, []int) { + return fileDescriptor_b78eb34e2701abfc, []int{0} +} +func (m *Subscription) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Subscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Subscription.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Subscription) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subscription.Merge(m, src) +} +func (m *Subscription) XXX_Size() int { + return m.Size() +} +func (m *Subscription) XXX_DiscardUnknown() { + xxx_messageInfo_Subscription.DiscardUnknown(m) +} + +var xxx_messageInfo_Subscription proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Subscription)(nil), "sentinel.subscription.v1.Subscription") +} + +func init() { + proto.RegisterFile("sentinel/subscription/v1/subscription.proto", fileDescriptor_b78eb34e2701abfc) +} + +var fileDescriptor_b78eb34e2701abfc = []byte{ + // 461 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xbf, 0x6e, 0xdb, 0x30, + 0x10, 0xc6, 0x45, 0x47, 0x76, 0x6c, 0xa6, 0xc8, 0x40, 0x64, 0x60, 0x3c, 0xd0, 0x46, 0x87, 0xc2, + 0x40, 0x11, 0x12, 0x72, 0xd1, 0xa1, 0x40, 0x96, 0xa8, 0x53, 0x57, 0xa5, 0x53, 0x87, 0x16, 0xfa, + 0x43, 0x2b, 0x44, 0x2d, 0x52, 0x10, 0x29, 0x35, 0x79, 0x8b, 0x3c, 0x46, 0x1f, 0xc5, 0x63, 0xc6, + 0xa2, 0x28, 0xd2, 0xd6, 0x7e, 0x91, 0x42, 0xa4, 0x14, 0xd8, 0x5b, 0x33, 0xe9, 0x8e, 0xf7, 0x9d, + 0xf8, 0xbb, 0x8f, 0x07, 0x5f, 0x6b, 0x2e, 0x8d, 0x90, 0x7c, 0xcd, 0x74, 0x9d, 0xe8, 0xb4, 0x12, + 0xa5, 0x11, 0x4a, 0xb2, 0x26, 0x38, 0xc8, 0x69, 0x59, 0x29, 0xa3, 0x10, 0xee, 0xc5, 0xf4, 0xa0, + 0xd8, 0x04, 0x53, 0x92, 0x2a, 0x5d, 0x28, 0xcd, 0x92, 0x58, 0x73, 0xd6, 0x04, 0x09, 0x37, 0x71, + 0xc0, 0x52, 0x25, 0xba, 0xce, 0xe9, 0x59, 0xae, 0x72, 0x65, 0x43, 0xd6, 0x46, 0xdd, 0xe9, 0x2c, + 0x57, 0x2a, 0x5f, 0x73, 0x66, 0xb3, 0xa4, 0x5e, 0x31, 0x23, 0x0a, 0xae, 0x4d, 0x5c, 0x94, 0x9d, + 0x80, 0x3c, 0xd1, 0x99, 0xbb, 0x92, 0x6b, 0x8b, 0x65, 0x62, 0x53, 0x6b, 0x57, 0x7f, 0xf9, 0xeb, + 0x08, 0xbe, 0xb8, 0xde, 0x43, 0x41, 0xa7, 0x70, 0x20, 0x32, 0x0c, 0xe6, 0x60, 0xe1, 0x47, 0x03, + 0x91, 0xa1, 0x33, 0x38, 0x54, 0xdf, 0x24, 0xaf, 0xf0, 0x60, 0x0e, 0x16, 0x93, 0xc8, 0x25, 0x08, + 0x41, 0x5f, 0xaa, 0x8c, 0xe3, 0x23, 0x7b, 0x68, 0x63, 0xf4, 0x16, 0x0e, 0xcb, 0x4a, 0xa4, 0x1c, + 0xfb, 0x73, 0xb0, 0x38, 0x59, 0x9e, 0x53, 0x37, 0x11, 0x6d, 0x27, 0xa2, 0xdd, 0x44, 0xf4, 0xbd, + 0x12, 0x32, 0xf4, 0x37, 0x8f, 0x33, 0x2f, 0x72, 0x6a, 0xf4, 0x0e, 0x1e, 0x67, 0xbc, 0x54, 0x5a, + 0x18, 0x3c, 0xfc, 0xbf, 0xc6, 0x5e, 0xdf, 0x52, 0x94, 0xeb, 0x58, 0xe2, 0x91, 0xa5, 0xb5, 0x71, + 0xcb, 0x9b, 0x71, 0xa9, 0x0a, 0x7c, 0xec, 0x78, 0x6d, 0x82, 0x2e, 0xe1, 0x88, 0xdf, 0x96, 0xa2, + 0xba, 0xc3, 0x63, 0x7b, 0xc7, 0x94, 0x3a, 0xe3, 0x68, 0x6f, 0x1c, 0xfd, 0xd8, 0x1b, 0x17, 0x8e, + 0xdb, 0x4b, 0xee, 0x7f, 0xcf, 0x40, 0xd4, 0xf5, 0xa0, 0x10, 0xfa, 0xab, 0x8a, 0x73, 0x3c, 0x69, + 0x7f, 0x19, 0xd2, 0xb6, 0xfe, 0xf3, 0x71, 0xf6, 0x2a, 0x17, 0xe6, 0xa6, 0x4e, 0x68, 0xaa, 0x0a, + 0xd6, 0x3d, 0x9e, 0xfb, 0x5c, 0xe8, 0xec, 0xab, 0xb3, 0x9b, 0x7e, 0x90, 0x26, 0xb2, 0xbd, 0x28, + 0x80, 0x23, 0x67, 0x3c, 0x86, 0x73, 0xb0, 0x38, 0x5d, 0x9e, 0xd3, 0xa7, 0x55, 0x70, 0xd2, 0x26, + 0xa0, 0xd7, 0x56, 0x10, 0x75, 0x42, 0x74, 0x05, 0x27, 0x2e, 0xfa, 0x12, 0x1b, 0x7c, 0xf2, 0x0c, + 0xee, 0xb1, 0x6b, 0xbb, 0x32, 0xe1, 0xe7, 0xcd, 0x5f, 0xe2, 0x7d, 0xdf, 0x12, 0x6f, 0xb3, 0x25, + 0xe0, 0x61, 0x4b, 0xc0, 0x9f, 0x2d, 0x01, 0xf7, 0x3b, 0xe2, 0x3d, 0xec, 0x88, 0xf7, 0x63, 0x47, + 0xbc, 0x4f, 0x97, 0x7b, 0x53, 0xf4, 0x44, 0x17, 0x6a, 0xb5, 0x12, 0xa9, 0x88, 0xd7, 0xec, 0xa6, + 0x4e, 0x58, 0x13, 0x2c, 0xd9, 0xed, 0xe1, 0x72, 0xf7, 0xbb, 0x94, 0x8c, 0x2c, 0xc7, 0x9b, 0x7f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xbb, 0xe0, 0xcd, 0x21, 0x05, 0x03, 0x00, 0x00, +} + +func (m *Subscription) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Subscription) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Subscription) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StatusAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StatusAt):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintSubscription(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x5a + if m.Status != 0 { + i = encodeVarintSubscription(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x50 + } + { + size := m.Free.Size() + i -= size + if _, err := m.Free.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintSubscription(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Expiry, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Expiry):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintSubscription(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x42 + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintSubscription(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x3a + } + if m.Plan != 0 { + i = encodeVarintSubscription(dAtA, i, uint64(m.Plan)) + i-- + dAtA[i] = 0x30 + } + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubscription(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size, err := m.Price.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSubscription(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Node) > 0 { + i -= len(m.Node) + copy(dAtA[i:], m.Node) + i = encodeVarintSubscription(dAtA, i, uint64(len(m.Node))) + i-- + dAtA[i] = 0x1a + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintSubscription(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintSubscription(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintSubscription(dAtA []byte, offset int, v uint64) int { + offset -= sovSubscription(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Subscription) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovSubscription(uint64(m.Id)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovSubscription(uint64(l)) + } + l = len(m.Node) + if l > 0 { + n += 1 + l + sovSubscription(uint64(l)) + } + l = m.Price.Size() + n += 1 + l + sovSubscription(uint64(l)) + l = m.Deposit.Size() + n += 1 + l + sovSubscription(uint64(l)) + if m.Plan != 0 { + n += 1 + sovSubscription(uint64(m.Plan)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovSubscription(uint64(l)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Expiry) + n += 1 + l + sovSubscription(uint64(l)) + l = m.Free.Size() + n += 1 + l + sovSubscription(uint64(l)) + if m.Status != 0 { + n += 1 + sovSubscription(uint64(m.Status)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StatusAt) + n += 1 + l + sovSubscription(uint64(l)) + return n +} + +func sovSubscription(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozSubscription(x uint64) (n int) { + return sovSubscription(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Subscription) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubscription + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Subscription: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subscription: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubscription + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubscription + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSubscription + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSubscription + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubscription + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSubscription + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSubscription + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Node = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubscription + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSubscription + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubscription + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubscription + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSubscription + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubscription + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Plan", wireType) + } + m.Plan = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubscription + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Plan |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubscription + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSubscription + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSubscription + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Expiry", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubscription + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSubscription + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubscription + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Expiry, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Free", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubscription + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSubscription + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSubscription + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Free.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubscription + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types1.Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StatusAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubscription + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSubscription + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSubscription + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StatusAt, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSubscription(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSubscription + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSubscription(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSubscription + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSubscription + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSubscription + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthSubscription + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSubscription + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthSubscription + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthSubscription = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSubscription = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSubscription = fmt.Errorf("proto: unexpected end of group") +)