This commit is contained in:
+1
-1
@@ -7,8 +7,8 @@ import "base/v1/msg.proto";
|
||||
|
||||
service AlertSrv {
|
||||
rpc NotificationSrvHealth(base.v1.Empty) returns (base.v1.StatusRes);
|
||||
rpc NotificationSMTPHealth(base.v1.Empty) returns (base.v1.StatusRes);
|
||||
rpc Emit(LogEvent) returns (base.v1.StatusRes) {}
|
||||
// rpc Update(LogEvent) returns (base.v1.StatusRes) {}
|
||||
// rpc Get(AlertFilter) returns (base.v1.StatusRes) {}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,4 +15,9 @@ service InternalAuthorizationService {
|
||||
rpc InitPermissionsForRoutes(InternalInitRoutesReq) returns (base.v1.StatusRes) {}
|
||||
rpc GetUserIdentityBasic(GetUserReq) returns (UserIdentityBasic) {}
|
||||
rpc GetUserIAM(GetUserReq) returns (InternalIAM) {}
|
||||
rpc ListRoles(InternalRoleListReq) returns (RoleList) {}
|
||||
rpc ListPermissions(InternalPermissionListReq) returns (PermissionList) {}
|
||||
rpc CreateRoleAndAssign(CreateRoleAndAssignReq) returns (InternalIAM) {}
|
||||
rpc AssignRoleToUser(AssignRoleToUserReq) returns (InternalIAM) {}
|
||||
rpc AssignPermissionToUser(AssignPermissionToUserReq) returns (InternalIAM) {}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,44 @@ message PermissionList {
|
||||
uint32 total_count = 4;
|
||||
}
|
||||
|
||||
message RoleList {
|
||||
repeated Role list = 1;
|
||||
uint32 total_count = 2;
|
||||
}
|
||||
|
||||
message InternalRoleListReq {
|
||||
string type = 1;
|
||||
}
|
||||
|
||||
message InternalPermissionListReq {
|
||||
int64 role_id = 1;
|
||||
}
|
||||
|
||||
message CreateRoleAndAssignReq {
|
||||
int64 user_id = 1;
|
||||
string title = 2;
|
||||
string key = 3;
|
||||
string type = 4;
|
||||
int64 parent_id = 5;
|
||||
repeated int64 permission_ids = 6;
|
||||
}
|
||||
|
||||
message AssignRoleToUserReq {
|
||||
int64 user_id = 1;
|
||||
int64 role_id = 2;
|
||||
bool assigned = 3;
|
||||
}
|
||||
|
||||
// Users only carry role IDs in the authorization schema. When role_id is
|
||||
// omitted, the service creates a private role for this user and grants the
|
||||
// requested permission through that role.
|
||||
message AssignPermissionToUserReq {
|
||||
int64 user_id = 1;
|
||||
int64 permission_id = 2;
|
||||
int64 role_id = 3;
|
||||
bool assigned = 4;
|
||||
}
|
||||
|
||||
/*
|
||||
UserSendOtp
|
||||
*/
|
||||
@@ -132,6 +170,7 @@ message User {
|
||||
UserStatus status = 5;
|
||||
repeated int64 roles = 6;
|
||||
int64 referrer_user_id = 7;
|
||||
string referral_code = 8;
|
||||
}
|
||||
|
||||
message UserAddress {
|
||||
|
||||
+25
-21
@@ -6,26 +6,26 @@ managed:
|
||||
override:
|
||||
- file_option: go_package_prefix
|
||||
# FIXME: Change this to you're go.mod package name
|
||||
value: github.com/nfel
|
||||
value: github.com/nfel
|
||||
plugins:
|
||||
# NOTE: golang
|
||||
# NOTE: golang
|
||||
# - remote: buf.build/grpc/go
|
||||
# NOTE: grpc
|
||||
# NOTE: grpc
|
||||
# go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||
- local: protoc-gen-go-grpc
|
||||
out: stub/go
|
||||
# NOTE: PB files
|
||||
# go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
||||
- local: protoc-gen-go
|
||||
# - remote: buf.build/protocolbuffers/go:v1.30.0
|
||||
# - remote: buf.build/protocolbuffers/go:v1.30.0
|
||||
out: stub/go
|
||||
# NOTE: doc
|
||||
- local: protoc-gen-doc
|
||||
opt: html,index.html,source_relative
|
||||
out: stub/doc/html
|
||||
- local: protoc-gen-doc
|
||||
opt: markdown,index.md,source_relative
|
||||
out: stub/doc/md
|
||||
# # NOTE: doc
|
||||
# - local: protoc-gen-doc
|
||||
# opt: html,index.html,source_relative
|
||||
# out: stub/doc/html
|
||||
# - local: protoc-gen-doc
|
||||
# opt: markdown,index.md,source_relative
|
||||
# out: stub/doc/md
|
||||
# # NOTE: Gateway
|
||||
# # - remote: buf.build/grpc-ecosystem/gateway:v2.16.2
|
||||
- local: protoc-gen-grpc-gateway
|
||||
@@ -36,27 +36,31 @@ plugins:
|
||||
# # NOTE: SWAGGER json files
|
||||
# # - remote: buf.build/grpc-ecosystem/openapiv2:v2.16.2
|
||||
# - local: protoc-gen-openapiv2
|
||||
# opt: import_prefix=github.com/nfel
|
||||
# opt: import_prefix=github.com/nfel
|
||||
# out: stub/go
|
||||
# - local: protoc-gen-go-gin
|
||||
# opt:
|
||||
# opt:
|
||||
# # - plugin=handler
|
||||
# # - plugin=service
|
||||
# # - plugin=mix
|
||||
# out: stub/go
|
||||
# NOTE: Typescript
|
||||
# NOTE: Typescript
|
||||
# - remote: buf.build/bufbuild/es:v2.2.2
|
||||
# # opt: import_prefix=github.com/nfel
|
||||
# # opt: import_prefix=github.com/nfel
|
||||
# out: stub/ts
|
||||
- local: protoc-gen-es
|
||||
out: stub/ts
|
||||
opt: target=ts
|
||||
|
||||
# - local: protoc-gen-es
|
||||
# out: stub/ts
|
||||
# opt: target=ts
|
||||
#
|
||||
# - local: protobuf-ts
|
||||
# # opt: import_prefix=github.com/nfel
|
||||
# # opt: import_prefix=github.com/nfel
|
||||
# out: stub/ts
|
||||
- local: protoc-gen-prost
|
||||
out: stub/rs
|
||||
|
||||
- local: protoc-gen-tonic
|
||||
out: stub/rs
|
||||
inputs:
|
||||
- directory: ./
|
||||
# - git_repo: ssh://git@5.34.204.11/Kahroba/proto
|
||||
# branch: v2
|
||||
|
||||
|
||||
@@ -15,9 +15,13 @@ service InternalWalletSrv {
|
||||
rpc CollectCommission(CommissionReq) returns (CommissionRes);
|
||||
rpc RefundCommission(RefundCommissionReq) returns (CommissionRes);
|
||||
|
||||
// Calculate stellar pub-priv key based on national id
|
||||
// Deterministically derive the Stellar public key. This operation is local
|
||||
// and has no database, Horizon, or GL side effects.
|
||||
rpc GetPublicKeyByNationalID(NationalIDReq) returns (PubKeyRes);
|
||||
|
||||
// Create and enqueue the on-chain account activation transaction.
|
||||
rpc ActivateAccount(NationalIDReq) returns (base.v1.StatusRes);
|
||||
|
||||
// Commission Logs
|
||||
rpc InitReferrerCommissionLog(InitReferrerCommissionLogIn) returns (base.v1.Empty);
|
||||
|
||||
|
||||
@@ -9,6 +9,15 @@ import "base/v1/msg.proto";
|
||||
INTERNAL DATA;
|
||||
*/
|
||||
|
||||
message Foo {
|
||||
string first = 1;
|
||||
oneof some_oneof {
|
||||
string second = 2;
|
||||
string third = 3;
|
||||
}
|
||||
string d = 4;
|
||||
}
|
||||
|
||||
message InternalTransactionData {
|
||||
int64 transaction_id = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user