Merge branch 'gRPC-endpoints'

This commit is contained in:
itsscb 2023-10-05 21:19:40 +02:00
commit c9d7067aaa
22 changed files with 1232 additions and 233 deletions

View File

@ -97,6 +97,85 @@
]
}
},
"/v1/get_account": {
"get": {
"operationId": "df_GetAccount",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbGetAccountResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"in": "query",
"required": true,
"type": "string",
"format": "int64"
}
],
"tags": [
"df"
],
"security": [
{
"BearerAuth": []
}
]
}
},
"/v1/list_accounts": {
"get": {
"operationId": "df_ListAccounts",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/pbListAccountsResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "pageId",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "pageSize",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"df"
],
"security": [
{
"BearerAuth": []
}
]
}
},
"/v1/login": {
"post": {
"operationId": "df_Login",
@ -244,7 +323,7 @@
"pbAccount": {
"type": "object",
"example": {
"id": 185,
"id": "1",
"email": "john.doe@example.com",
"firstname": "John",
"lastname": "Doe",
@ -289,7 +368,8 @@
},
"birthday": {
"type": "string",
"format": "date-time"
"format": "date-time",
"example": "1990-10-05T00:00:00Z"
},
"phone": {
"type": "string"
@ -299,25 +379,29 @@
},
"privacyAcceptedDate": {
"type": "string",
"format": "date-time"
"format": "date-time",
"example": "2023-10-05T00:00:00Z"
},
"permissionLevel": {
"type": "integer",
"format": "int32"
"format": "int32",
"description": "Default is 0 (non-priviledged)"
},
"creator": {
"type": "string"
},
"created": {
"type": "string",
"format": "date-time"
"format": "date-time",
"example": "2023-10-05T00:00:00Z"
},
"changer": {
"type": "string"
},
"changed": {
"type": "string",
"format": "date-time"
"format": "date-time",
"example": "2023-10-05T00:00:00Z"
}
},
"title": "Account"
@ -434,6 +518,30 @@
"description": "Returns the created Account",
"title": "Created Account"
},
"pbGetAccountResponse": {
"type": "object",
"properties": {
"account": {
"$ref": "#/definitions/pbAccount"
}
},
"description": "Returns the Account",
"title": "GetAccount Response"
},
"pbListAccountsResponse": {
"type": "object",
"properties": {
"account": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/pbAccount"
}
}
},
"description": "Returns the Account",
"title": "ListAccounts Response"
},
"pbLoginRequest": {
"type": "object",
"example": {
@ -511,6 +619,9 @@
},
"pbRefreshTokenResponse": {
"type": "object",
"example": {
"access_token": "v4.public.eyJlbWFpbCI6ImEyQGIuZGUiLCJleHAiOiIyMDIzLTEwLTA1VDAxOjE3OjA5KzAyOjAwIiwiaWF0IjoiMjAyMy0xMC0wNVQwMTowMjowOSswMjowMCIsImlkIjoiZjlhMjE2OWQtMWYxYS00YThiLTgzZWEtNzkxMzY5YjY3ZmYxIiwibmJmIjoiMjAyMy0xMC0wNVQwMTowMjowOSswMjowMCJ9Ah0bVbx9S1LR-pf8hLWVRQPUfK9zrHZvA7ApJ5aZXwhA7H1j-kHhccBjOAGYXZQT-ts7Jq3SJlzo5vtUjGBtDg"
},
"properties": {
"accessToken": {
"type": "string",
@ -527,14 +638,14 @@
"pbUpdateAccountPrivacyRequest": {
"type": "object",
"example": {
"id": 185,
"id": "1",
"privacy_accepted": true
},
"properties": {
"id": {
"type": "string",
"format": "int64",
"example": 185
"example": 1
},
"privacyAccepted": {
"type": "boolean",
@ -561,7 +672,7 @@
"pbUpdateAccountRequest": {
"type": "object",
"example": {
"id": 195,
"id": "195",
"street": "Death Star 2"
},
"properties": {
@ -599,7 +710,7 @@
"birthday": {
"type": "string",
"format": "date-time",
"example": "1990-10-05T00:00:0Z"
"example": "1990-10-05T00:00:00Z"
}
},
"description": "Update an Account",
@ -649,7 +760,9 @@
},
"securityDefinitions": {
"BearerAuth": {
"type": "apiKey"
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}

View File

@ -31,6 +31,7 @@ func (server *Server) UpdateAccount(ctx context.Context, req *pb.UpdateAccountRe
}
arg := db.UpdateAccountTxParams{
ID: req.GetId(),
Changer: authPayload.Email,
Email: sql.NullString{
Valid: req.GetEmail() != "",
@ -95,32 +96,40 @@ func (server *Server) UpdateAccount(ctx context.Context, req *pb.UpdateAccountRe
}
func validateUpdateAccountRequest(req *pb.UpdateAccountRequest) (violations []*errdetails.BadRequest_FieldViolation) {
if err := val.ValidateEmail(req.GetEmail()); err != nil {
violations = append(violations, fieldViolation("email", err))
if req.GetEmail() != "" {
if err := val.ValidateEmail(req.GetEmail()); err != nil {
violations = append(violations, fieldViolation("email", err))
}
}
if err := val.ValidatePassword(req.GetPassword()); err != nil {
violations = append(violations, fieldViolation("password", err))
if req.GetPassword() != "" {
if err := val.ValidatePassword(req.GetPassword()); err != nil {
violations = append(violations, fieldViolation("password", err))
}
}
if err := val.ValidateName(req.GetFirstname()); err != nil {
violations = append(violations, fieldViolation("first_name", err))
if req.GetFirstname() != "" {
if err := val.ValidateName(req.GetFirstname()); err != nil {
violations = append(violations, fieldViolation("first_name", err))
}
}
if err := val.ValidateName(req.GetLastname()); err != nil {
violations = append(violations, fieldViolation("last_name", err))
if req.GetLastname() != "" {
if err := val.ValidateName(req.GetLastname()); err != nil {
violations = append(violations, fieldViolation("last_name", err))
}
}
if err := val.ValidateName(req.GetCity()); err != nil {
violations = append(violations, fieldViolation("city", err))
if req.GetCity() != "" {
if err := val.ValidateName(req.GetCity()); err != nil {
violations = append(violations, fieldViolation("city", err))
}
}
if err := val.ValidateName(req.GetZip()); err != nil {
violations = append(violations, fieldViolation("zip", err))
if req.GetZip() != "" {
if err := val.ValidateName(req.GetZip()); err != nil {
violations = append(violations, fieldViolation("zip", err))
}
}
if err := val.ValidateName(req.GetStreet()); err != nil {
violations = append(violations, fieldViolation("street", err))
if req.GetStreet() != "" {
if err := val.ValidateStreet(req.GetStreet()); err != nil {
violations = append(violations, fieldViolation("street", err))
}
}
return violations

View File

@ -4,11 +4,9 @@ import (
"context"
"database/sql"
"errors"
"fmt"
db "github.com/itsscb/df/bff/db/sqlc"
"github.com/itsscb/df/bff/pb"
"github.com/itsscb/df/bff/val"
"google.golang.org/genproto/googleapis/rpc/errdetails"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
@ -59,8 +57,8 @@ func (server *Server) UpdateAccountPrivacy(ctx context.Context, req *pb.UpdateAc
}
func validateUpdateAccountPrivacyRequest(req *pb.UpdateAccountPrivacyRequest) (violations []*errdetails.BadRequest_FieldViolation) {
if err := val.ValidateString(fmt.Sprint(req.GetId()), 30, 70); err != nil {
violations = append(violations, fieldViolation("id", err))
if req.GetId() < 1 {
violations = append(violations, fieldViolation("id", errors.New("must be greater than 0")))
}
return violations
}

View File

@ -206,7 +206,7 @@ var file_account_proto_rawDesc = []byte{
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e,
0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x08, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x09, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64,
0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e,
@ -218,62 +218,72 @@ var file_account_proto_rawDesc = []byte{
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x7a, 0x69, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x7a, 0x69, 0x70, 0x12, 0x18,
0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x69, 0x72, 0x74,
0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x53, 0x0a, 0x08, 0x62, 0x69, 0x72, 0x74,
0x68, 0x64, 0x61, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79,
0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63,
0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65,
0x64, 0x12, 0x4e, 0x0a, 0x15, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63,
0x65, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x13, 0x70, 0x72,
0x69, 0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74,
0x65, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f,
0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x70, 0x65, 0x72,
0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07,
0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x34, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07,
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
0x68, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x3a, 0xbd, 0x03, 0x92,
0x41, 0xb9, 0x03, 0x0a, 0x09, 0x2a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xab,
0x03, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x31, 0x38, 0x35, 0x2c, 0x22, 0x65, 0x6d, 0x61,
0x69, 0x6c, 0x22, 0x3a, 0x20, 0x22, 0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x66, 0x69,
0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x4a, 0x6f, 0x68, 0x6e, 0x22,
0x2c, 0x20, 0x22, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x44,
0x6f, 0x65, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x22,
0x2c, 0x20, 0x22, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x65, 0x61,
0x74, 0x68, 0x20, 0x53, 0x74, 0x61, 0x72, 0x20, 0x32, 0x22, 0x2c, 0x20, 0x22, 0x7a, 0x69, 0x70,
0x22, 0x3a, 0x20, 0x22, 0x30, 0x38, 0x31, 0x35, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x69, 0x74, 0x79,
0x22, 0x3a, 0x20, 0x22, 0x4e, 0x65, 0x77, 0x20, 0x59, 0x6f, 0x72, 0x6b, 0x22, 0x2c, 0x20, 0x22,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x55, 0x53, 0x41, 0x22, 0x2c,
0x20, 0x22, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x39,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x31, 0x39,
0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30,
0x30, 0x5a, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63,
0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x20,
0x22, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65,
0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30,
0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c,
0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x3a, 0x20, 0x22, 0x6a, 0x6f, 0x68,
0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f,
0x6d, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x22,
0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x32, 0x3a, 0x33, 0x30,
0x3a, 0x35, 0x33, 0x5a, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x22,
0x3a, 0x20, 0x22, 0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d,
0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x68, 0x61, 0x6e, 0x67,
0x65, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35,
0x54, 0x30, 0x32, 0x3a, 0x33, 0x30, 0x3a, 0x35, 0x33, 0x5a, 0x22, 0x7d, 0x42, 0x19, 0x5a, 0x17,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63,
0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x30, 0x5a, 0x22, 0x52, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x12, 0x14, 0x0a,
0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68,
0x6f, 0x6e, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61,
0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x70,
0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x12, 0x6b,
0x0a, 0x15, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74,
0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16,
0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30,
0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x13, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x41,
0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x70,
0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18,
0x0d, 0x20, 0x01, 0x28, 0x05, 0x42, 0x23, 0x92, 0x41, 0x20, 0x32, 0x1e, 0x44, 0x65, 0x66, 0x61,
0x75, 0x6c, 0x74, 0x20, 0x69, 0x73, 0x20, 0x30, 0x20, 0x28, 0x6e, 0x6f, 0x6e, 0x2d, 0x70, 0x72,
0x69, 0x76, 0x69, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x64, 0x29, 0x52, 0x0f, 0x70, 0x65, 0x72, 0x6d,
0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63,
0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72,
0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31,
0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52,
0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e,
0x67, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67,
0x65, 0x72, 0x12, 0x51, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x11, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42,
0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30,
0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x07, 0x63, 0x68,
0x61, 0x6e, 0x67, 0x65, 0x64, 0x3a, 0xbd, 0x03, 0x92, 0x41, 0xb9, 0x03, 0x0a, 0x09, 0x2a, 0x07,
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xab, 0x03, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a,
0x20, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x3a, 0x20, 0x22, 0x6a,
0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e,
0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0x3a, 0x20, 0x22, 0x4a, 0x6f, 0x68, 0x6e, 0x22, 0x2c, 0x20, 0x22, 0x6c, 0x61, 0x73, 0x74,
0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x6f, 0x65, 0x22, 0x2c, 0x20, 0x22, 0x70,
0x68, 0x6f, 0x6e, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x74, 0x72, 0x65,
0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x65, 0x61, 0x74, 0x68, 0x20, 0x53, 0x74, 0x61, 0x72,
0x20, 0x32, 0x22, 0x2c, 0x20, 0x22, 0x7a, 0x69, 0x70, 0x22, 0x3a, 0x20, 0x22, 0x30, 0x38, 0x31,
0x35, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x4e, 0x65, 0x77,
0x20, 0x59, 0x6f, 0x72, 0x6b, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79,
0x22, 0x3a, 0x20, 0x22, 0x55, 0x53, 0x41, 0x22, 0x2c, 0x20, 0x22, 0x62, 0x69, 0x72, 0x74, 0x68,
0x64, 0x61, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30,
0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x20, 0x22, 0x70,
0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22,
0x3a, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x20, 0x22, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63,
0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x22,
0x3a, 0x20, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30,
0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74,
0x6f, 0x72, 0x22, 0x3a, 0x20, 0x22, 0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x72,
0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30,
0x2d, 0x30, 0x35, 0x54, 0x30, 0x32, 0x3a, 0x33, 0x30, 0x3a, 0x35, 0x33, 0x5a, 0x22, 0x2c, 0x20,
0x22, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x22, 0x3a, 0x20, 0x22, 0x6a, 0x6f, 0x68, 0x6e,
0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d,
0x22, 0x2c, 0x20, 0x22, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x32,
0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x32, 0x3a, 0x33, 0x30, 0x3a,
0x35, 0x33, 0x5a, 0x22, 0x7d, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -0,0 +1,222 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.19.6
// source: rpc_get_account.proto
package pb
import (
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GetAccountRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetAccountRequest) Reset() {
*x = GetAccountRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_rpc_get_account_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetAccountRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetAccountRequest) ProtoMessage() {}
func (x *GetAccountRequest) ProtoReflect() protoreflect.Message {
mi := &file_rpc_get_account_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetAccountRequest.ProtoReflect.Descriptor instead.
func (*GetAccountRequest) Descriptor() ([]byte, []int) {
return file_rpc_get_account_proto_rawDescGZIP(), []int{0}
}
func (x *GetAccountRequest) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
type GetAccountResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
}
func (x *GetAccountResponse) Reset() {
*x = GetAccountResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_rpc_get_account_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetAccountResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetAccountResponse) ProtoMessage() {}
func (x *GetAccountResponse) ProtoReflect() protoreflect.Message {
mi := &file_rpc_get_account_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetAccountResponse.ProtoReflect.Descriptor instead.
func (*GetAccountResponse) Descriptor() ([]byte, []int) {
return file_rpc_get_account_proto_rawDescGZIP(), []int{1}
}
func (x *GetAccountResponse) GetAccount() *Account {
if x != nil {
return x.Account
}
return nil
}
var File_rpc_get_account_proto protoreflect.FileDescriptor
var file_rpc_get_account_proto_rawDesc = []byte{
0x0a, 0x15, 0x72, 0x70, 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a, 0x11, 0x47, 0x65,
0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x3a,
0x3a, 0x92, 0x41, 0x37, 0x0a, 0x27, 0x2a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x32, 0x14, 0x47, 0x65, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x0c, 0x7b,
0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x20, 0x7d, 0x22, 0x71, 0x0a, 0x12, 0x47,
0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42,
0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x2f, 0x92,
0x41, 0x2c, 0x0a, 0x2a, 0x2a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x13, 0x52, 0x65, 0x74, 0x75, 0x72,
0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x19,
0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73,
0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_rpc_get_account_proto_rawDescOnce sync.Once
file_rpc_get_account_proto_rawDescData = file_rpc_get_account_proto_rawDesc
)
func file_rpc_get_account_proto_rawDescGZIP() []byte {
file_rpc_get_account_proto_rawDescOnce.Do(func() {
file_rpc_get_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_get_account_proto_rawDescData)
})
return file_rpc_get_account_proto_rawDescData
}
var file_rpc_get_account_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_rpc_get_account_proto_goTypes = []interface{}{
(*GetAccountRequest)(nil), // 0: pb.GetAccountRequest
(*GetAccountResponse)(nil), // 1: pb.GetAccountResponse
(*Account)(nil), // 2: pb.Account
}
var file_rpc_get_account_proto_depIdxs = []int32{
2, // 0: pb.GetAccountResponse.account:type_name -> pb.Account
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_rpc_get_account_proto_init() }
func file_rpc_get_account_proto_init() {
if File_rpc_get_account_proto != nil {
return
}
file_account_proto_init()
if !protoimpl.UnsafeEnabled {
file_rpc_get_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccountRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_rpc_get_account_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccountResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_rpc_get_account_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_rpc_get_account_proto_goTypes,
DependencyIndexes: file_rpc_get_account_proto_depIdxs,
MessageInfos: file_rpc_get_account_proto_msgTypes,
}.Build()
File_rpc_get_account_proto = out.File
file_rpc_get_account_proto_rawDesc = nil
file_rpc_get_account_proto_goTypes = nil
file_rpc_get_account_proto_depIdxs = nil
}

View File

@ -0,0 +1,234 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.19.6
// source: rpc_list_accounts.proto
package pb
import (
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ListAccountsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PageId int32 `protobuf:"varint,1,opt,name=page_id,json=pageId,proto3" json:"page_id,omitempty"`
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
}
func (x *ListAccountsRequest) Reset() {
*x = ListAccountsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_rpc_list_accounts_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListAccountsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListAccountsRequest) ProtoMessage() {}
func (x *ListAccountsRequest) ProtoReflect() protoreflect.Message {
mi := &file_rpc_list_accounts_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListAccountsRequest.ProtoReflect.Descriptor instead.
func (*ListAccountsRequest) Descriptor() ([]byte, []int) {
return file_rpc_list_accounts_proto_rawDescGZIP(), []int{0}
}
func (x *ListAccountsRequest) GetPageId() int32 {
if x != nil {
return x.PageId
}
return 0
}
func (x *ListAccountsRequest) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
type ListAccountsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Account []*Account `protobuf:"bytes,1,rep,name=account,proto3" json:"account,omitempty"`
}
func (x *ListAccountsResponse) Reset() {
*x = ListAccountsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_rpc_list_accounts_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListAccountsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListAccountsResponse) ProtoMessage() {}
func (x *ListAccountsResponse) ProtoReflect() protoreflect.Message {
mi := &file_rpc_list_accounts_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListAccountsResponse.ProtoReflect.Descriptor instead.
func (*ListAccountsResponse) Descriptor() ([]byte, []int) {
return file_rpc_list_accounts_proto_rawDescGZIP(), []int{1}
}
func (x *ListAccountsResponse) GetAccount() []*Account {
if x != nil {
return x.Account
}
return nil
}
var File_rpc_list_accounts_proto protoreflect.FileDescriptor
var file_rpc_list_accounts_proto_rawDesc = []byte{
0x0a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x61,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x01, 0x0a,
0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a,
0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x3a, 0x56, 0x92, 0x41, 0x53, 0x0a,
0x2f, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x32,
0x1a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x20,
0x6f, 0x66, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0xd2, 0x01, 0x02, 0x69, 0x64,
0x32, 0x20, 0x7b, 0x22, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x31, 0x2c,
0x20, 0x22, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3a, 0x20, 0x31, 0x30,
0x20, 0x7d, 0x22, 0x75, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62,
0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x61,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x31, 0x92, 0x41, 0x2e, 0x0a, 0x2c, 0x2a, 0x15, 0x4c,
0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x20, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x32, 0x13, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68,
0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64,
0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_rpc_list_accounts_proto_rawDescOnce sync.Once
file_rpc_list_accounts_proto_rawDescData = file_rpc_list_accounts_proto_rawDesc
)
func file_rpc_list_accounts_proto_rawDescGZIP() []byte {
file_rpc_list_accounts_proto_rawDescOnce.Do(func() {
file_rpc_list_accounts_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_list_accounts_proto_rawDescData)
})
return file_rpc_list_accounts_proto_rawDescData
}
var file_rpc_list_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_rpc_list_accounts_proto_goTypes = []interface{}{
(*ListAccountsRequest)(nil), // 0: pb.ListAccountsRequest
(*ListAccountsResponse)(nil), // 1: pb.ListAccountsResponse
(*Account)(nil), // 2: pb.Account
}
var file_rpc_list_accounts_proto_depIdxs = []int32{
2, // 0: pb.ListAccountsResponse.account:type_name -> pb.Account
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_rpc_list_accounts_proto_init() }
func file_rpc_list_accounts_proto_init() {
if File_rpc_list_accounts_proto != nil {
return
}
file_account_proto_init()
if !protoimpl.UnsafeEnabled {
file_rpc_list_accounts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListAccountsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_rpc_list_accounts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListAccountsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_rpc_list_accounts_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_rpc_list_accounts_proto_goTypes,
DependencyIndexes: file_rpc_list_accounts_proto_depIdxs,
MessageInfos: file_rpc_list_accounts_proto_msgTypes,
}.Build()
File_rpc_list_accounts_proto = out.File
file_rpc_list_accounts_proto_rawDesc = nil
file_rpc_list_accounts_proto_goTypes = nil
file_rpc_list_accounts_proto_depIdxs = nil
}

View File

@ -187,7 +187,7 @@ var file_rpc_refresh_token_proto_rawDesc = []byte{
0x4b, 0x71, 0x79, 0x31, 0x42, 0x74, 0x32, 0x52, 0x6f, 0x48, 0x79, 0x4a, 0x62, 0x4c, 0x6f, 0x43,
0x45, 0x4f, 0x31, 0x35, 0x43, 0x52, 0x54, 0x35, 0x44, 0x6e, 0x51, 0x36, 0x50, 0x30, 0x41, 0x48,
0x6c, 0x42, 0x7a, 0x6a, 0x73, 0x58, 0x74, 0x36, 0x31, 0x61, 0x44, 0x44, 0x77, 0x22, 0x7d, 0x22,
0x82, 0x04, 0x0a, 0x14, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
0xd7, 0x06, 0x0a, 0x14, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xf7, 0x02, 0x0a, 0x0c, 0x61, 0x63, 0x63,
0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
0xd3, 0x02, 0x92, 0x41, 0xcf, 0x02, 0x2a, 0x0c, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x54,
@ -217,11 +217,32 @@ var file_rpc_refresh_token_proto_rawDesc = []byte{
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
0x14, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x70, 0x69,
0x72, 0x65, 0x73, 0x41, 0x74, 0x3a, 0x1d, 0x92, 0x41, 0x1a, 0x0a, 0x18, 0x2a, 0x16, 0x52, 0x65,
0x66, 0x72, 0x65, 0x73, 0x68, 0x20, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x20, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x65, 0x73, 0x41, 0x74, 0x3a, 0xf1, 0x02, 0x92, 0x41, 0xed, 0x02, 0x0a, 0x18, 0x2a, 0x16,
0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x20, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x20, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd0, 0x02, 0x7b, 0x22, 0x61, 0x63, 0x63, 0x65, 0x73,
0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x76, 0x34, 0x2e, 0x70, 0x75,
0x62, 0x6c, 0x69, 0x63, 0x2e, 0x65, 0x79, 0x4a, 0x6c, 0x62, 0x57, 0x46, 0x70, 0x62, 0x43, 0x49,
0x36, 0x49, 0x6d, 0x45, 0x79, 0x51, 0x47, 0x49, 0x75, 0x5a, 0x47, 0x55, 0x69, 0x4c, 0x43, 0x4a,
0x6c, 0x65, 0x48, 0x41, 0x69, 0x4f, 0x69, 0x49, 0x79, 0x4d, 0x44, 0x49, 0x7a, 0x4c, 0x54, 0x45,
0x77, 0x4c, 0x54, 0x41, 0x31, 0x56, 0x44, 0x41, 0x78, 0x4f, 0x6a, 0x45, 0x33, 0x4f, 0x6a, 0x41,
0x35, 0x4b, 0x7a, 0x41, 0x79, 0x4f, 0x6a, 0x41, 0x77, 0x49, 0x69, 0x77, 0x69, 0x61, 0x57, 0x46,
0x30, 0x49, 0x6a, 0x6f, 0x69, 0x4d, 0x6a, 0x41, 0x79, 0x4d, 0x79, 0x30, 0x78, 0x4d, 0x43, 0x30,
0x77, 0x4e, 0x56, 0x51, 0x77, 0x4d, 0x54, 0x6f, 0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4f, 0x53, 0x73,
0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4d, 0x43, 0x49, 0x73, 0x49, 0x6d, 0x6c, 0x6b, 0x49, 0x6a, 0x6f,
0x69, 0x5a, 0x6a, 0x6c, 0x68, 0x4d, 0x6a, 0x45, 0x32, 0x4f, 0x57, 0x51, 0x74, 0x4d, 0x57, 0x59,
0x78, 0x59, 0x53, 0x30, 0x30, 0x59, 0x54, 0x68, 0x69, 0x4c, 0x54, 0x67, 0x7a, 0x5a, 0x57, 0x45,
0x74, 0x4e, 0x7a, 0x6b, 0x78, 0x4d, 0x7a, 0x59, 0x35, 0x59, 0x6a, 0x59, 0x33, 0x5a, 0x6d, 0x59,
0x78, 0x49, 0x69, 0x77, 0x69, 0x62, 0x6d, 0x4a, 0x6d, 0x49, 0x6a, 0x6f, 0x69, 0x4d, 0x6a, 0x41,
0x79, 0x4d, 0x79, 0x30, 0x78, 0x4d, 0x43, 0x30, 0x77, 0x4e, 0x56, 0x51, 0x77, 0x4d, 0x54, 0x6f,
0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4f, 0x53, 0x73, 0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4d, 0x43, 0x4a,
0x39, 0x41, 0x68, 0x30, 0x62, 0x56, 0x62, 0x78, 0x39, 0x53, 0x31, 0x4c, 0x52, 0x2d, 0x70, 0x66,
0x38, 0x68, 0x4c, 0x57, 0x56, 0x52, 0x51, 0x50, 0x55, 0x66, 0x4b, 0x39, 0x7a, 0x72, 0x48, 0x5a,
0x76, 0x41, 0x37, 0x41, 0x70, 0x4a, 0x35, 0x61, 0x5a, 0x58, 0x77, 0x68, 0x41, 0x37, 0x48, 0x31,
0x6a, 0x2d, 0x6b, 0x48, 0x68, 0x63, 0x63, 0x42, 0x6a, 0x4f, 0x41, 0x47, 0x59, 0x58, 0x5a, 0x51,
0x54, 0x2d, 0x74, 0x73, 0x37, 0x4a, 0x71, 0x33, 0x53, 0x4a, 0x6c, 0x7a, 0x6f, 0x35, 0x76, 0x74,
0x55, 0x6a, 0x47, 0x42, 0x74, 0x44, 0x67, 0x22, 0x7d, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64,
0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -206,7 +206,7 @@ var file_rpc_update_account_proto_rawDesc = []byte{
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e,
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd,
0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd0,
0x04, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
@ -225,35 +225,35 @@ var file_rpc_update_account_proto_rawDesc = []byte{
0x70, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18,
0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x07, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79,
0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x0a, 0x20, 0x01,
0x28, 0x09, 0x48, 0x08, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x12, 0x57,
0x28, 0x09, 0x48, 0x08, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x12, 0x58,
0x0a, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1a, 0x92, 0x41,
0x17, 0x4a, 0x15, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30,
0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x5a, 0x22, 0x48, 0x09, 0x52, 0x08, 0x62, 0x69, 0x72, 0x74,
0x68, 0x64, 0x61, 0x79, 0x88, 0x01, 0x01, 0x3a, 0x54, 0x92, 0x41, 0x51, 0x0a, 0x28, 0x2a, 0x0e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x11,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x25, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x31,
0x39, 0x35, 0x2c, 0x20, 0x22, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x44,
0x65, 0x61, 0x74, 0x68, 0x20, 0x53, 0x74, 0x61, 0x72, 0x20, 0x32, 0x22, 0x7d, 0x42, 0x08, 0x0a,
0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x73, 0x73,
0x77, 0x6f, 0x72, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61,
0x6d, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x42,
0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x63,
0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x7a, 0x69, 0x70, 0x42, 0x0a, 0x0a, 0x08, 0x5f,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x70, 0x68, 0x6f, 0x6e,
0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x22, 0x78,
0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x0f, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x64, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x1b, 0x52, 0x65, 0x74,
0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64,
0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66,
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41,
0x18, 0x4a, 0x16, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30,
0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x48, 0x09, 0x52, 0x08, 0x62, 0x69, 0x72,
0x74, 0x68, 0x64, 0x61, 0x79, 0x88, 0x01, 0x01, 0x3a, 0x56, 0x92, 0x41, 0x53, 0x0a, 0x28, 0x2a,
0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32,
0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x27, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20,
0x22, 0x31, 0x39, 0x35, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x22, 0x3a,
0x20, 0x22, 0x44, 0x65, 0x61, 0x74, 0x68, 0x20, 0x53, 0x74, 0x61, 0x72, 0x20, 0x32, 0x22, 0x7d,
0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70,
0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x69, 0x72, 0x73,
0x74, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61,
0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x42, 0x07, 0x0a,
0x05, 0x5f, 0x63, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x7a, 0x69, 0x70, 0x42, 0x0a,
0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x70,
0x68, 0x6f, 0x6e, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61,
0x79, 0x22, 0x78, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62,
0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x61,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x0f, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x1b,
0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x70, 0x64, 0x61,
0x74, 0x65, 0x64, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62,
0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -132,36 +132,36 @@ var file_rpc_update_account_privacy_proto_rawDesc = []byte{
0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x02, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa1, 0x02, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x03, 0x42, 0x10, 0x92, 0x41, 0x0d, 0x4a, 0x03, 0x31, 0x38, 0x35, 0xa2, 0x02, 0x05, 0x69, 0x6e,
0x74, 0x36, 0x34, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61,
0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x08, 0x42, 0x0a, 0x92, 0x41, 0x07, 0x4a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x48, 0x00, 0x52,
0x0f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64,
0x88, 0x01, 0x01, 0x3a, 0x90, 0x01, 0x92, 0x41, 0x8c, 0x01, 0x0a, 0x62, 0x2a, 0x1e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x69,
0x76, 0x61, 0x63, 0x79, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x32, 0x28, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79,
0x20, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x41,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0xd2, 0x01, 0x02, 0x69, 0x64, 0xd2, 0x01, 0x10, 0x70, 0x72,
0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x32, 0x26,
0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x31, 0x38, 0x35, 0x2c, 0x20, 0x22, 0x70, 0x72, 0x69,
0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20,
0x74, 0x72, 0x75, 0x65, 0x20, 0x7d, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61,
0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x1c,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69,
0x76, 0x61, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x07,
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e,
0x70, 0x62, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x14, 0x92, 0x41, 0x11, 0x2a,
0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x26, 0x92, 0x41, 0x23, 0x0a, 0x21,
0x2a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x20, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x03, 0x42, 0x0e, 0x92, 0x41, 0x0b, 0x4a, 0x01, 0x31, 0xa2, 0x02, 0x05, 0x69, 0x6e, 0x74, 0x36,
0x34, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79,
0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42,
0x0a, 0x92, 0x41, 0x07, 0x4a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x70,
0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x88, 0x01,
0x01, 0x3a, 0x90, 0x01, 0x92, 0x41, 0x8c, 0x01, 0x0a, 0x62, 0x2a, 0x1e, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61,
0x63, 0x79, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x32, 0x28, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x43,
0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0xd2, 0x01, 0x02, 0x69, 0x64, 0xd2, 0x01, 0x10, 0x70, 0x72, 0x69, 0x76,
0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x32, 0x26, 0x7b, 0x22,
0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x72, 0x69, 0x76, 0x61,
0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72,
0x75, 0x65, 0x20, 0x7d, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79,
0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x1c, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61,
0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62,
0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x14, 0x92, 0x41, 0x11, 0x2a, 0x0f, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07,
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x26, 0x92, 0x41, 0x23, 0x0a, 0x21, 0x2a, 0x1f,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x50,
0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74,
0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (

View File

@ -33,13 +33,16 @@ var file_service_df_proto_rawDesc = []byte{
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18,
0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x6c,
0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x72, 0x70, 0x63, 0x5f, 0x67, 0x65,
0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x17, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x6c,
0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x20, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73,
0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x9f, 0x05,
0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xfd, 0x06,
0x0a, 0x02, 0x64, 0x66, 0x12, 0x42, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x2e,
0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x11, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
@ -58,72 +61,95 @@ var file_service_df_proto_rawDesc = []byte{
0x12, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74,
0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x32, 0x11, 0x2f, 0x76,
0x31, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x63, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a,
0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x78, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x92, 0x41, 0x12, 0x62,
0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12,
0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x32, 0x12, 0x2f, 0x76, 0x31, 0x2f,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x95,
0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63,
0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61,
0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x92, 0x41, 0x12, 0x62,
0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12,
0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x32, 0x1a, 0x2f, 0x76, 0x31, 0x2f,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70,
0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x1a, 0x07, 0x92, 0x41, 0x04, 0x12, 0x02, 0x64, 0x66, 0x42,
0x9f, 0x01, 0x92, 0x41, 0x82, 0x01, 0x12, 0x44, 0x0a, 0x06, 0x64, 0x66, 0x20, 0x41, 0x50, 0x49,
0x22, 0x35, 0x0a, 0x06, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x12, 0x1c, 0x68, 0x74, 0x74, 0x70,
0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69,
0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x1a, 0x0d, 0x64, 0x65, 0x76, 0x40, 0x69, 0x74,
0x73, 0x73, 0x63, 0x62, 0x2e, 0x64, 0x65, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02,
0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73,
0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,
0x6a, 0x73, 0x6f, 0x6e, 0x5a, 0x12, 0x0a, 0x10, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72,
0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x02, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x69, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x15, 0x2e,
0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x92, 0x41,
0x12, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74,
0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x67,
0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x71, 0x0a, 0x0c, 0x4c, 0x69,
0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x92,
0x41, 0x12, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75,
0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f,
0x6c, 0x69, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x63, 0x0a,
0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18,
0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12,
0x2f, 0x76, 0x31, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x12, 0x78, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e,
0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x92, 0x41, 0x12, 0x62, 0x10, 0x0a,
0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x32, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70,
0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x95, 0x01, 0x0a,
0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72,
0x69, 0x76, 0x61, 0x63, 0x79, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x92, 0x41, 0x12, 0x62, 0x10, 0x0a,
0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x32, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70,
0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x69,
0x76, 0x61, 0x63, 0x79, 0x1a, 0x07, 0x92, 0x41, 0x04, 0x12, 0x02, 0x64, 0x66, 0x42, 0xb0, 0x01,
0x92, 0x41, 0x93, 0x01, 0x12, 0x44, 0x0a, 0x06, 0x64, 0x66, 0x20, 0x41, 0x50, 0x49, 0x22, 0x35,
0x0a, 0x06, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x12, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a,
0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73,
0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x1a, 0x0d, 0x64, 0x65, 0x76, 0x40, 0x69, 0x74, 0x73, 0x73,
0x63, 0x62, 0x2e, 0x64, 0x65, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10,
0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e,
0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73,
0x6f, 0x6e, 0x5a, 0x23, 0x0a, 0x21, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75,
0x74, 0x68, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var file_service_df_proto_goTypes = []interface{}{
(*LoginRequest)(nil), // 0: pb.LoginRequest
(*RefreshTokenRequest)(nil), // 1: pb.RefreshTokenRequest
(*BlockSessionRequest)(nil), // 2: pb.BlockSessionRequest
(*CreateAccountRequest)(nil), // 3: pb.CreateAccountRequest
(*UpdateAccountRequest)(nil), // 4: pb.UpdateAccountRequest
(*UpdateAccountPrivacyRequest)(nil), // 5: pb.UpdateAccountPrivacyRequest
(*LoginResponse)(nil), // 6: pb.LoginResponse
(*RefreshTokenResponse)(nil), // 7: pb.RefreshTokenResponse
(*BlockSessionResponse)(nil), // 8: pb.BlockSessionResponse
(*CreateAccountResponse)(nil), // 9: pb.CreateAccountResponse
(*UpdateAccountResponse)(nil), // 10: pb.UpdateAccountResponse
(*UpdateAccountPrivacyResponse)(nil), // 11: pb.UpdateAccountPrivacyResponse
(*GetAccountRequest)(nil), // 3: pb.GetAccountRequest
(*ListAccountsRequest)(nil), // 4: pb.ListAccountsRequest
(*CreateAccountRequest)(nil), // 5: pb.CreateAccountRequest
(*UpdateAccountRequest)(nil), // 6: pb.UpdateAccountRequest
(*UpdateAccountPrivacyRequest)(nil), // 7: pb.UpdateAccountPrivacyRequest
(*LoginResponse)(nil), // 8: pb.LoginResponse
(*RefreshTokenResponse)(nil), // 9: pb.RefreshTokenResponse
(*BlockSessionResponse)(nil), // 10: pb.BlockSessionResponse
(*GetAccountResponse)(nil), // 11: pb.GetAccountResponse
(*ListAccountsResponse)(nil), // 12: pb.ListAccountsResponse
(*CreateAccountResponse)(nil), // 13: pb.CreateAccountResponse
(*UpdateAccountResponse)(nil), // 14: pb.UpdateAccountResponse
(*UpdateAccountPrivacyResponse)(nil), // 15: pb.UpdateAccountPrivacyResponse
}
var file_service_df_proto_depIdxs = []int32{
0, // 0: pb.df.Login:input_type -> pb.LoginRequest
1, // 1: pb.df.RefreshToken:input_type -> pb.RefreshTokenRequest
2, // 2: pb.df.BlockSession:input_type -> pb.BlockSessionRequest
3, // 3: pb.df.CreateAccount:input_type -> pb.CreateAccountRequest
4, // 4: pb.df.UpdateAccount:input_type -> pb.UpdateAccountRequest
5, // 5: pb.df.UpdateAccountPrivacy:input_type -> pb.UpdateAccountPrivacyRequest
6, // 6: pb.df.Login:output_type -> pb.LoginResponse
7, // 7: pb.df.RefreshToken:output_type -> pb.RefreshTokenResponse
8, // 8: pb.df.BlockSession:output_type -> pb.BlockSessionResponse
9, // 9: pb.df.CreateAccount:output_type -> pb.CreateAccountResponse
10, // 10: pb.df.UpdateAccount:output_type -> pb.UpdateAccountResponse
11, // 11: pb.df.UpdateAccountPrivacy:output_type -> pb.UpdateAccountPrivacyResponse
6, // [6:12] is the sub-list for method output_type
0, // [0:6] is the sub-list for method input_type
3, // 3: pb.df.GetAccount:input_type -> pb.GetAccountRequest
4, // 4: pb.df.ListAccounts:input_type -> pb.ListAccountsRequest
5, // 5: pb.df.CreateAccount:input_type -> pb.CreateAccountRequest
6, // 6: pb.df.UpdateAccount:input_type -> pb.UpdateAccountRequest
7, // 7: pb.df.UpdateAccountPrivacy:input_type -> pb.UpdateAccountPrivacyRequest
8, // 8: pb.df.Login:output_type -> pb.LoginResponse
9, // 9: pb.df.RefreshToken:output_type -> pb.RefreshTokenResponse
10, // 10: pb.df.BlockSession:output_type -> pb.BlockSessionResponse
11, // 11: pb.df.GetAccount:output_type -> pb.GetAccountResponse
12, // 12: pb.df.ListAccounts:output_type -> pb.ListAccountsResponse
13, // 13: pb.df.CreateAccount:output_type -> pb.CreateAccountResponse
14, // 14: pb.df.UpdateAccount:output_type -> pb.UpdateAccountResponse
15, // 15: pb.df.UpdateAccountPrivacy:output_type -> pb.UpdateAccountPrivacyResponse
8, // [8:16] is the sub-list for method output_type
0, // [0:8] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
@ -136,6 +162,8 @@ func file_service_df_proto_init() {
}
file_rpc_create_account_proto_init()
file_rpc_update_account_proto_init()
file_rpc_get_account_proto_init()
file_rpc_list_accounts_proto_init()
file_rpc_block_session_proto_init()
file_rpc_update_account_privacy_proto_init()
file_rpc_login_proto_init()

View File

@ -133,6 +133,78 @@ func local_request_Df_BlockSession_0(ctx context.Context, marshaler runtime.Mars
}
var (
filter_Df_GetAccount_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_Df_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, client DfClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetAccountRequest
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_Df_GetAccount_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Df_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, server DfServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetAccountRequest
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_Df_GetAccount_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetAccount(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_Df_ListAccounts_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_Df_ListAccounts_0(ctx context.Context, marshaler runtime.Marshaler, client DfClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListAccountsRequest
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_Df_ListAccounts_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ListAccounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Df_ListAccounts_0(ctx context.Context, marshaler runtime.Marshaler, server DfServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListAccountsRequest
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_Df_ListAccounts_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ListAccounts(ctx, &protoReq)
return msg, metadata, err
}
func request_Df_CreateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client DfClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CreateAccountRequest
var metadata runtime.ServerMetadata
@ -316,6 +388,56 @@ func RegisterDfHandlerServer(ctx context.Context, mux *runtime.ServeMux, server
})
mux.Handle("GET", pattern_Df_GetAccount_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)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pb.Df/GetAccount", runtime.WithHTTPPathPattern("/v1/get_account"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Df_GetAccount_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_Df_GetAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Df_ListAccounts_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)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pb.Df/ListAccounts", runtime.WithHTTPPathPattern("/v1/list_accounts"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Df_ListAccounts_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_Df_ListAccounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Df_CreateAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -498,6 +620,50 @@ func RegisterDfHandlerClient(ctx context.Context, mux *runtime.ServeMux, client
})
mux.Handle("GET", pattern_Df_GetAccount_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)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pb.Df/GetAccount", runtime.WithHTTPPathPattern("/v1/get_account"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Df_GetAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_Df_GetAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_Df_ListAccounts_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)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pb.Df/ListAccounts", runtime.WithHTTPPathPattern("/v1/list_accounts"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Df_ListAccounts_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_Df_ListAccounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Df_CreateAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -574,6 +740,10 @@ var (
pattern_Df_BlockSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "block_session"}, ""))
pattern_Df_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "get_account"}, ""))
pattern_Df_ListAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "list_accounts"}, ""))
pattern_Df_CreateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "create_account"}, ""))
pattern_Df_UpdateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "update_account"}, ""))
@ -588,6 +758,10 @@ var (
forward_Df_BlockSession_0 = runtime.ForwardResponseMessage
forward_Df_GetAccount_0 = runtime.ForwardResponseMessage
forward_Df_ListAccounts_0 = runtime.ForwardResponseMessage
forward_Df_CreateAccount_0 = runtime.ForwardResponseMessage
forward_Df_UpdateAccount_0 = runtime.ForwardResponseMessage

View File

@ -22,6 +22,8 @@ const (
Df_Login_FullMethodName = "/pb.df/Login"
Df_RefreshToken_FullMethodName = "/pb.df/RefreshToken"
Df_BlockSession_FullMethodName = "/pb.df/BlockSession"
Df_GetAccount_FullMethodName = "/pb.df/GetAccount"
Df_ListAccounts_FullMethodName = "/pb.df/ListAccounts"
Df_CreateAccount_FullMethodName = "/pb.df/CreateAccount"
Df_UpdateAccount_FullMethodName = "/pb.df/UpdateAccount"
Df_UpdateAccountPrivacy_FullMethodName = "/pb.df/UpdateAccountPrivacy"
@ -34,6 +36,8 @@ type DfClient interface {
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*RefreshTokenResponse, error)
BlockSession(ctx context.Context, in *BlockSessionRequest, opts ...grpc.CallOption) (*BlockSessionResponse, error)
GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error)
ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error)
CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error)
UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error)
UpdateAccountPrivacy(ctx context.Context, in *UpdateAccountPrivacyRequest, opts ...grpc.CallOption) (*UpdateAccountPrivacyResponse, error)
@ -74,6 +78,24 @@ func (c *dfClient) BlockSession(ctx context.Context, in *BlockSessionRequest, op
return out, nil
}
func (c *dfClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) {
out := new(GetAccountResponse)
err := c.cc.Invoke(ctx, Df_GetAccount_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dfClient) ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error) {
out := new(ListAccountsResponse)
err := c.cc.Invoke(ctx, Df_ListAccounts_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dfClient) CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error) {
out := new(CreateAccountResponse)
err := c.cc.Invoke(ctx, Df_CreateAccount_FullMethodName, in, out, opts...)
@ -108,6 +130,8 @@ type DfServer interface {
Login(context.Context, *LoginRequest) (*LoginResponse, error)
RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenResponse, error)
BlockSession(context.Context, *BlockSessionRequest) (*BlockSessionResponse, error)
GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error)
ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error)
CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error)
UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error)
UpdateAccountPrivacy(context.Context, *UpdateAccountPrivacyRequest) (*UpdateAccountPrivacyResponse, error)
@ -127,6 +151,12 @@ func (UnimplementedDfServer) RefreshToken(context.Context, *RefreshTokenRequest)
func (UnimplementedDfServer) BlockSession(context.Context, *BlockSessionRequest) (*BlockSessionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method BlockSession not implemented")
}
func (UnimplementedDfServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented")
}
func (UnimplementedDfServer) ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListAccounts not implemented")
}
func (UnimplementedDfServer) CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateAccount not implemented")
}
@ -203,6 +233,42 @@ func _Df_BlockSession_Handler(srv interface{}, ctx context.Context, dec func(int
return interceptor(ctx, in, info, handler)
}
func _Df_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DfServer).GetAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Df_GetAccount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DfServer).GetAccount(ctx, req.(*GetAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Df_ListAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListAccountsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DfServer).ListAccounts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Df_ListAccounts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DfServer).ListAccounts(ctx, req.(*ListAccountsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Df_CreateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateAccountRequest)
if err := dec(in); err != nil {
@ -276,6 +342,14 @@ var Df_ServiceDesc = grpc.ServiceDesc{
MethodName: "BlockSession",
Handler: _Df_BlockSession_Handler,
},
{
MethodName: "GetAccount",
Handler: _Df_GetAccount_Handler,
},
{
MethodName: "ListAccounts",
Handler: _Df_ListAccounts_Handler,
},
{
MethodName: "CreateAccount",
Handler: _Df_CreateAccount_Handler,

View File

@ -12,7 +12,7 @@ message Account {
json_schema: {
title: "Account";
};
example: "{\"id\": 185,\"email\": \"john.doe@example.com\", \"firstname\": \"John\", \"lastname\": \"Doe\", \"phone\": \"\", \"street\": \"Death Star 2\", \"zip\": \"0815\", \"city\": \"New York\", \"country\": \"USA\", \"birthday\": \"1990-10-05T00:00:00Z\", \"privacy_accepted\": false, \"privacy_accepted_date\": \"0001-01-01T00:00:00Z\", \"creator\": \"john.doe@example.com\", \"created\": \"2023-10-05T02:30:53Z\", \"changer\": \"john.doe@example.com\", \"changed\": \"2023-10-05T02:30:53Z\"}";
example: "{\"id\": \"1\",\"email\": \"john.doe@example.com\", \"firstname\": \"John\", \"lastname\": \"Doe\", \"phone\": \"\", \"street\": \"Death Star 2\", \"zip\": \"0815\", \"city\": \"New York\", \"country\": \"USA\", \"birthday\": \"1990-10-05T00:00:00Z\", \"privacy_accepted\": false, \"privacy_accepted_date\": \"0001-01-01T00:00:00Z\", \"creator\": \"john.doe@example.com\", \"created\": \"2023-10-05T02:30:53Z\", \"changer\": \"john.doe@example.com\", \"changed\": \"2023-10-05T02:30:53Z\"}";
};
int64 id = 1;
string email = 2;
@ -22,13 +22,23 @@ message Account {
string city = 6;
string zip = 7;
string country = 8;
google.protobuf.Timestamp birthday = 9;
google.protobuf.Timestamp birthday = 9 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"1990-10-05T00:00:00Z\""
}];
string phone = 10;
bool privacy_accepted = 11;
google.protobuf.Timestamp privacy_accepted_date = 12;
int32 permission_level = 13;
google.protobuf.Timestamp privacy_accepted_date = 12 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2023-10-05T00:00:00Z\""
}];
int32 permission_level = 13 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Default is 0 (non-priviledged)"
}];
string creator = 14;
google.protobuf.Timestamp created = 15;
google.protobuf.Timestamp created = 15 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2023-10-05T00:00:00Z\""
}];
string changer = 16;
google.protobuf.Timestamp changed = 17;
google.protobuf.Timestamp changed = 17 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2023-10-05T00:00:00Z\""
}];
}

View File

@ -18,7 +18,6 @@ message BlockSessionRequest {
example: "{\"session_id\": \"5e1d67da-7c9b-4365-a4d5-3cc0a051241e\"}"
};
string session_id = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
// title: "Session ID",
format: "uuid",
example: "\"5e1d67da-7c9b-4365-a4d5-3cc0a051241e\""
}];
@ -32,12 +31,10 @@ message BlockSessionResponse {
example: "{\"session_id\": \"5e1d67da-7c9b-4365-a4d5-3cc0a051241e\", \"blocked\": true}"
};
string session_id = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
// title: "Session ID",
format: "uuid",
example: "\"5e1d67da-7c9b-4365-a4d5-3cc0a051241e\""
}];
bool blocked = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
// title: "Session blocked",
example: "true"
}];
}

View File

@ -0,0 +1,34 @@
syntax = "proto3";
package pb;
import "protoc-gen-openapiv2/options/annotations.proto";
import "account.proto";
option go_package = "github.com/itsscb/df/pb";
message GetAccountRequest {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
json_schema: {
title: "GetAccount";
description: "Get an Account by ID";
required: [
"id"
];
};
example: "{\"id\": \"1\" }";
};
int64 id = 1;
}
message GetAccountResponse {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
json_schema: {
title: "GetAccount Response";
description: "Returns the Account";
};
};
Account account = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
}];
}

View File

@ -0,0 +1,35 @@
syntax = "proto3";
package pb;
import "protoc-gen-openapiv2/options/annotations.proto";
import "account.proto";
option go_package = "github.com/itsscb/df/pb";
message ListAccountsRequest {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
json_schema: {
title: "ListAccounts";
description: "Returns a List of Accounts";
required: [
"id"
];
};
example: "{\"page_id\": 1, \"page_size\": 10 }";
};
int32 page_id = 1;
int32 page_size = 2;
}
message ListAccountsResponse {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
json_schema: {
title: "ListAccounts Response";
description: "Returns the Account";
};
};
repeated Account account = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
}];
}

View File

@ -20,12 +20,10 @@ message LoginRequest {
example: "{\"email\": \"john.doe@example.com\", \"password\": \"MayTheForceBeWithYou!\"}";
};
string email = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
// title: "Email Address",
format: "email",
example: "\"john.doe@example.com\""
}];
string password = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
// title: "Password",
format: "password",
example: "\"MayTheForceBeWithYou!\""
}];
@ -36,25 +34,20 @@ message LoginResponse {
json_schema: {
title: "Login Response";
};
// example: "{\"email\": \"john.doe@example.com\", \"password\": \"MayTheForceBeWithYou!\"}";
};
string session_id = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
// title: "Session ID",
format: "uuid",
example: "\"5e1d67da-7c9b-4365-a4d5-3cc0a051241e\""
}];
string access_token = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
// title: "Access Token",
example: "\"v4.public.eyJlbWFpbCI6ImEyQGIuZGUiLCJleHAiOiIyMDIzLTEwLTA1VDAxOjE3OjA5KzAyOjAwIiwiaWF0IjoiMjAyMy0xMC0wNVQwMTowMjowOSswMjowMCIsImlkIjoiZjlhMjE2OWQtMWYxYS00YThiLTgzZWEtNzkxMzY5YjY3ZmYxIiwibmJmIjoiMjAyMy0xMC0wNVQwMTowMjowOSswMjowMCJ9Ah0bVbx9S1LR-pf8hLWVRQPUfK9zrHZvA7ApJ5aZXwhA7H1j-kHhccBjOAGYXZQT-ts7Jq3SJlzo5vtUjGBtDg\""
}];
google.protobuf.Timestamp access_token_expires_at = 3;
string refresh_token = 4 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
// title: "Refresh Token",
example: "\"v4.public.eyJlbWFpbCI6ImEyQGIuZGUiLCJleHAiOiIyMDIzLTEwLTA2VDAxOjAyOjA5KzAyOjAwIiwiaWF0IjoiMjAyMy0xMC0wNVQwMTowMjowOSswMjowMCIsImlkIjoiNWUxZDY3ZGEtN2M5Yi00MzY1LWE0ZDUtM2NjMGEwNTEyNDFlIiwibmJmIjoiMjAyMy0xMC0wNVQwMTowMjowOSswMjowMCJ9BoX36w0po1vvHSjsBP_KWeFxV1xRbQayqbJuIoK2jKqy1Bt2RoHyJbLoCEO15CRT5DnQ6P0AHlBzjsXt61aDDw\""
}];
google.protobuf.Timestamp refresh_token_expires_at = 5;
string email = 6 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
// title: "Email Address",
format: "email",
example: "\"john.doe@example.com\""
}];

View File

@ -29,7 +29,7 @@ message RefreshTokenResponse {
json_schema: {
title: "Refresh Token Response";
};
// example: "{\"email\": \"john.doe@example.com\", \"password\": \"MayTheForceBeWithYou!\"}";
example: "{\"access_token\": \"v4.public.eyJlbWFpbCI6ImEyQGIuZGUiLCJleHAiOiIyMDIzLTEwLTA1VDAxOjE3OjA5KzAyOjAwIiwiaWF0IjoiMjAyMy0xMC0wNVQwMTowMjowOSswMjowMCIsImlkIjoiZjlhMjE2OWQtMWYxYS00YThiLTgzZWEtNzkxMzY5YjY3ZmYxIiwibmJmIjoiMjAyMy0xMC0wNVQwMTowMjowOSswMjowMCJ9Ah0bVbx9S1LR-pf8hLWVRQPUfK9zrHZvA7ApJ5aZXwhA7H1j-kHhccBjOAGYXZQT-ts7Jq3SJlzo5vtUjGBtDg\"}";
};
string access_token = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
title: "Access Token",

View File

@ -18,7 +18,7 @@ message UpdateAccountRequest {
"id"
];
};
example: "{\"id\": 195, \"street\": \"Death Star 2\"}";
example: "{\"id\": \"195\", \"street\": \"Death Star 2\"}";
};
int64 id = 1;
optional string email = 2;
@ -31,7 +31,7 @@ message UpdateAccountRequest {
optional string country = 9;
optional string phone = 10;
optional google.protobuf.Timestamp birthday = 11 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"1990-10-05T00:00:0Z\""
example: "\"1990-10-05T00:00:00Z\""
}];
}

View File

@ -18,10 +18,10 @@ message UpdateAccountPrivacyRequest {
"privacy_accepted"
];
};
example: "{\"id\": 185, \"privacy_accepted\": true }"
example: "{\"id\": \"1\", \"privacy_accepted\": true }"
};
int64 id = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "185",
example: "1",
format: "int64"
}];
optional bool privacy_accepted = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {

View File

@ -7,6 +7,8 @@ import "protoc-gen-openapiv2/options/annotations.proto";
import "rpc_create_account.proto";
import "rpc_update_account.proto";
import "rpc_get_account.proto";
import "rpc_list_accounts.proto";
import "rpc_block_session.proto";
import "rpc_update_account_privacy.proto";
import "rpc_login.proto";
@ -32,7 +34,11 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
security_definitions: {
security: {
key: "BearerAuth";
value: {type: TYPE_API_KEY}
value: {
type: TYPE_API_KEY
in: IN_HEADER
name: "Authorization"
}
}
}
};
@ -68,6 +74,34 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
}
};
};
rpc GetAccount (GetAccountRequest) returns (GetAccountResponse) {
option (google.api.http) = {
get: "/v1/get_account"
// get: "/v1/accounts/{id=id}"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
security: {
security_requirement: {
key: "BearerAuth";
value: {}
}
}
};
};
rpc ListAccounts (ListAccountsRequest) returns (ListAccountsResponse) {
option (google.api.http) = {
get: "/v1/list_accounts"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
security: {
security_requirement: {
key: "BearerAuth";
value: {}
}
}
};
};
rpc CreateAccount (CreateAccountRequest) returns (CreateAccountResponse) {
option (google.api.http) = {
post: "/v1/create_account"

View File

@ -7,7 +7,8 @@ import (
)
var (
isValidName = regexp.MustCompile(`^[a-zA-Z\s]+$`).MatchString
isValidName = regexp.MustCompile(`^[a-zA-Z\s]+$`).MatchString
isValidAlphaNum = regexp.MustCompile(`^[a-zA-Z0-9\s]+$`).MatchString
)
func ValidateString(value string, minLength int, maxLength int) error {
@ -43,12 +44,24 @@ func ValidateEmail(value string) error {
}
func ValidateEmailId(value int64) error {
if value <= 0 {
if value < 1 {
return fmt.Errorf("must be a positive integer")
}
return nil
}
func ValidateStreet(value string) error {
if err := ValidateString(value, 4, 100); err != nil {
return err
}
if !isValidAlphaNum(value) {
return fmt.Errorf("must contain only letters, numbers or spaces")
}
return nil
}
func ValidateSecretCode(value string) error {
return ValidateString(value, 32, 128)
}