fix/moves proto.service.Sessions and Accounts back together

This commit is contained in:
itsscb 2023-10-05 04:08:01 +02:00
parent d4690ab68c
commit 95d9c8e0f1
13 changed files with 562 additions and 697 deletions

View File

@ -18,7 +18,7 @@ backend_build:
docker run --name migrateup --rm --privileged=true -v $(PWD)/bff/db/migration:/migrations --network host migrate/migrate -path=/migrations/ -database $(DB_URL) up
backend:
docker start postgres; docker rm -vf df; docker run --name df --rm -p 8080:8080 --network df-network -d df:latest
docker start postgres; docker rm -vf df; docker run --name df --rm -p 8080:8080 -p 9090:9090 --network df-network -d df:latest
backend-stop:
docker stop postgres; docker stop df

View File

@ -11,12 +11,8 @@
},
"tags": [
{
"name": "Sessions",
"description": "Sessions"
},
{
"name": "Accounts",
"description": "Account"
"name": "df",
"description": "df"
}
],
"schemes": [
@ -31,8 +27,8 @@
],
"paths": {
"/v1/block_session": {
"post": {
"operationId": "Sessions_BlockSession",
"patch": {
"operationId": "df_BlockSession",
"responses": {
"200": {
"description": "A successful response.",
@ -59,7 +55,7 @@
}
],
"tags": [
"Sessions"
"df"
],
"security": [
{
@ -70,7 +66,7 @@
},
"/v1/create_account": {
"post": {
"operationId": "Accounts_CreateAccount",
"operationId": "df_CreateAccount",
"responses": {
"200": {
"description": "A successful response.",
@ -97,13 +93,13 @@
}
],
"tags": [
"Accounts"
"df"
]
}
},
"/v1/login": {
"post": {
"operationId": "Sessions_Login",
"operationId": "df_Login",
"responses": {
"200": {
"description": "A successful response.",
@ -130,13 +126,13 @@
}
],
"tags": [
"Sessions"
"df"
]
}
},
"/v1/refresh_token": {
"post": {
"operationId": "Sessions_RefreshToken",
"operationId": "df_RefreshToken",
"responses": {
"200": {
"description": "A successful response.",
@ -163,13 +159,13 @@
}
],
"tags": [
"Sessions"
"df"
]
}
},
"/v1/update_account": {
"post": {
"operationId": "Accounts_UpdateAccount",
"patch": {
"operationId": "df_UpdateAccount",
"responses": {
"200": {
"description": "A successful response.",
@ -196,7 +192,7 @@
}
],
"tags": [
"Accounts"
"df"
],
"security": [
{
@ -206,8 +202,8 @@
}
},
"/v1/update_account_privacy": {
"post": {
"operationId": "Accounts_UpdateAccountPrivacy",
"patch": {
"operationId": "df_UpdateAccountPrivacy",
"responses": {
"200": {
"description": "A successful response.",
@ -234,7 +230,7 @@
}
],
"tags": [
"Accounts"
"df"
],
"security": [
{
@ -257,7 +253,7 @@
"zip": "0815",
"city": "New York",
"country": "USA",
"birthday": "1990-10-05T00:00:0Z",
"birthday": "1990-10-05T00:00:00Z",
"privacy_accepted": false,
"privacy_accepted_date": "0001-01-01T00:00:00Z",
"creator": "john.doe@example.com",
@ -374,7 +370,7 @@
"zip": "0815",
"city": "New York",
"country": "USA",
"birthday": "1990-10-05T00:00:0Z"
"birthday": "1990-10-05T00:00:00Z"
},
"properties": {
"email": {
@ -407,7 +403,7 @@
"birthday": {
"type": "string",
"format": "date-time",
"example": "1990-10-05T00:00:0Z"
"example": "1990-10-05T00:00:00Z"
},
"privacyAccepted": {
"type": "boolean",
@ -542,7 +538,7 @@
},
"privacyAccepted": {
"type": "boolean",
"example": true
"example": false
}
},
"description": "Update the Privacy Consent of an Account",

View File

@ -1,23 +1,17 @@
package gapi
import (
"context"
"fmt"
"log"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
db "github.com/itsscb/df/bff/db/sqlc"
"github.com/itsscb/df/bff/pb"
"github.com/itsscb/df/bff/token"
"github.com/itsscb/df/bff/util"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
)
// Server serves gRPC requests for df service
type Server struct {
pb.UnimplementedAccountsServer
pb.UnimplementedSessionsServer
pb.UnimplementedDfServer
store db.Store
config util.Config
tokenMaker token.Maker
@ -37,20 +31,3 @@ func NewServer(config util.Config, store db.Store) (*Server, error) {
return server, nil
}
func (server *Server) RegisterServer(grpcServer *grpc.Server) {
pb.RegisterAccountsServer(grpcServer, server)
pb.RegisterSessionsServer(grpcServer, server)
reflection.Register(grpcServer)
}
func (server *Server) RegisterHandler(ctx context.Context, mux *runtime.ServeMux) {
err := pb.RegisterAccountsHandlerServer(ctx, mux, server)
if err != nil {
log.Fatal("cannot register handler server")
}
err = pb.RegisterSessionsHandlerServer(ctx, mux, server)
if err != nil {
log.Fatal("cannot register handler server")
}
}

View File

@ -13,9 +13,11 @@ import (
"github.com/itsscb/df/bff/api"
db "github.com/itsscb/df/bff/db/sqlc"
"github.com/itsscb/df/bff/gapi"
"github.com/itsscb/df/bff/pb"
"github.com/itsscb/df/bff/util"
_ "github.com/lib/pq"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
"google.golang.org/protobuf/encoding/protojson"
)
@ -54,7 +56,8 @@ func runGRPCServer(config util.Config, store db.Store) {
}
grpcServer := grpc.NewServer()
server.RegisterServer(grpcServer)
pb.RegisterDfServer(grpcServer, server)
reflection.Register(grpcServer)
listener, err := net.Listen("tcp", config.GRPCServerAddress)
if err != nil {
@ -88,7 +91,10 @@ func runGatewayServer(config util.Config, store db.Store, swaggerFS http.FileSys
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
server.RegisterHandler(ctx, grpcMux)
err = pb.RegisterDfHandlerServer(ctx, grpcMux, server)
if err != nil {
log.Fatal("cannot register handler server")
}
mux := http.NewServeMux()
mux.Handle("/", grpcMux)

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, 0x94, 0x08, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x08, 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,
@ -243,8 +243,8 @@ var file_account_proto_rawDesc = []byte{
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, 0xbc, 0x03, 0x92,
0x41, 0xb8, 0x03, 0x0a, 0x09, 0x2a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xaa,
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,
@ -258,22 +258,22 @@ var file_account_proto_rawDesc = []byte{
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,
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, 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

@ -207,7 +207,7 @@ var file_rpc_create_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, 0xf9,
0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfb,
0x05, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a,
@ -223,49 +223,49 @@ var file_rpc_create_account_proto_rawDesc = []byte{
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, 0x14, 0x0a, 0x05, 0x70,
0x68, 0x6f, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e,
0x65, 0x12, 0x52, 0x0a, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x18, 0x0a, 0x20,
0x65, 0x12, 0x53, 0x0a, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x18, 0x0a, 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, 0x52, 0x08, 0x62, 0x69, 0x72,
0x74, 0x68, 0x64, 0x61, 0x79, 0x12, 0x39, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79,
0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42,
0x09, 0x92, 0x41, 0x06, 0x4a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72,
0x69, 0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01,
0x3a, 0xe2, 0x02, 0x92, 0x41, 0xde, 0x02, 0x0a, 0x78, 0x2a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0xd2, 0x01, 0x05, 0x65,
0x6d, 0x61, 0x69, 0x6c, 0xd2, 0x01, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0xd2,
0x01, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x08, 0x6c, 0x61,
0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x06, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0xd2,
0x01, 0x04, 0x63, 0x69, 0x74, 0x79, 0xd2, 0x01, 0x03, 0x7a, 0x69, 0x70, 0xd2, 0x01, 0x07, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0xd2, 0x01, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61,
0x79, 0x32, 0xe1, 0x01, 0x7b, 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, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22,
0x3a, 0x20, 0x22, 0x4d, 0x61, 0x79, 0x54, 0x68, 0x65, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x42, 0x65,
0x57, 0x69, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x21, 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, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x4d, 0x61,
0x69, 0x6e, 0x20, 0x53, 0x74, 0x72, 0x65, 0x65, 0x74, 0x20, 0x31, 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, 0x5a, 0x22, 0x7d, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63,
0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x78, 0x0a, 0x15, 0x43, 0x72,
0x65, 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, 0x43, 0x72, 0x65, 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, 0x63, 0x72, 0x65, 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,
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, 0x52, 0x08, 0x62, 0x69,
0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x12, 0x39, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63,
0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08,
0x42, 0x09, 0x92, 0x41, 0x06, 0x4a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x70,
0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x88, 0x01,
0x01, 0x3a, 0xe3, 0x02, 0x92, 0x41, 0xdf, 0x02, 0x0a, 0x78, 0x2a, 0x0e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x11, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0xd2, 0x01, 0x05,
0x65, 0x6d, 0x61, 0x69, 0x6c, 0xd2, 0x01, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
0xd2, 0x01, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x08, 0x6c,
0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x06, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74,
0xd2, 0x01, 0x04, 0x63, 0x69, 0x74, 0x79, 0xd2, 0x01, 0x03, 0x7a, 0x69, 0x70, 0xd2, 0x01, 0x07,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0xd2, 0x01, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64,
0x61, 0x79, 0x32, 0xe2, 0x01, 0x7b, 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, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
0x22, 0x3a, 0x20, 0x22, 0x4d, 0x61, 0x79, 0x54, 0x68, 0x65, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x42,
0x65, 0x57, 0x69, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x21, 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, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x4d,
0x61, 0x69, 0x6e, 0x20, 0x53, 0x74, 0x72, 0x65, 0x65, 0x74, 0x20, 0x31, 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, 0x7d, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x72, 0x69, 0x76,
0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x78, 0x0a, 0x15,
0x43, 0x72, 0x65, 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, 0x43, 0x72, 0x65, 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, 0x63, 0x72, 0x65, 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, 0xa2, 0x02, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 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, 0x39, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61,
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, 0x09, 0x92, 0x41, 0x06, 0x4a, 0x04, 0x74, 0x72, 0x75, 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,
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,
}
var (

View File

@ -39,62 +39,60 @@ var file_service_df_proto_rawDesc = []byte{
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, 0xb4, 0x02,
0x0a, 0x08, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 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, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e,
0x3a, 0x01, 0x2a, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x5f,
0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x17,
0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66,
0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x76,
0x31, 0x2f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
0x74, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x17, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c,
0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x31, 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, 0x16, 0x3a,
0x01, 0x2a, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x65,
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x0d, 0x92, 0x41, 0x0a, 0x12, 0x08, 0x53, 0x65, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x73, 0x32, 0x8f, 0x03, 0x0a, 0x08, 0x41, 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,
0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x9f, 0x05,
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,
0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x3a, 0x01, 0x2a, 0x22, 0x09, 0x2f,
0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x5f, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72,
0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65,
0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f,
0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x72,
0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x74, 0x0a, 0x0c, 0x42, 0x6c, 0x6f,
0x63, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x42,
0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 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, 0x22, 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, 0x22, 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, 0x0c, 0x92, 0x41, 0x09, 0x12, 0x07, 0x41,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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,
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,
}
var file_service_df_proto_goTypes = []interface{}{
@ -112,18 +110,18 @@ var file_service_df_proto_goTypes = []interface{}{
(*UpdateAccountPrivacyResponse)(nil), // 11: pb.UpdateAccountPrivacyResponse
}
var file_service_df_proto_depIdxs = []int32{
0, // 0: pb.Sessions.Login:input_type -> pb.LoginRequest
1, // 1: pb.Sessions.RefreshToken:input_type -> pb.RefreshTokenRequest
2, // 2: pb.Sessions.BlockSession:input_type -> pb.BlockSessionRequest
3, // 3: pb.Accounts.CreateAccount:input_type -> pb.CreateAccountRequest
4, // 4: pb.Accounts.UpdateAccount:input_type -> pb.UpdateAccountRequest
5, // 5: pb.Accounts.UpdateAccountPrivacy:input_type -> pb.UpdateAccountPrivacyRequest
6, // 6: pb.Sessions.Login:output_type -> pb.LoginResponse
7, // 7: pb.Sessions.RefreshToken:output_type -> pb.RefreshTokenResponse
8, // 8: pb.Sessions.BlockSession:output_type -> pb.BlockSessionResponse
9, // 9: pb.Accounts.CreateAccount:output_type -> pb.CreateAccountResponse
10, // 10: pb.Accounts.UpdateAccount:output_type -> pb.UpdateAccountResponse
11, // 11: pb.Accounts.UpdateAccountPrivacy:output_type -> pb.UpdateAccountPrivacyResponse
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
0, // [0:0] is the sub-list for extension type_name
@ -150,7 +148,7 @@ func file_service_df_proto_init() {
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
NumServices: 2,
NumServices: 1,
},
GoTypes: file_service_df_proto_goTypes,
DependencyIndexes: file_service_df_proto_depIdxs,

View File

@ -31,7 +31,7 @@ var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
func request_Sessions_Login_0(ctx context.Context, marshaler runtime.Marshaler, client SessionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
func request_Df_Login_0(ctx context.Context, marshaler runtime.Marshaler, client DfClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq LoginRequest
var metadata runtime.ServerMetadata
@ -48,7 +48,7 @@ func request_Sessions_Login_0(ctx context.Context, marshaler runtime.Marshaler,
}
func local_request_Sessions_Login_0(ctx context.Context, marshaler runtime.Marshaler, server SessionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
func local_request_Df_Login_0(ctx context.Context, marshaler runtime.Marshaler, server DfServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq LoginRequest
var metadata runtime.ServerMetadata
@ -65,7 +65,7 @@ func local_request_Sessions_Login_0(ctx context.Context, marshaler runtime.Marsh
}
func request_Sessions_RefreshToken_0(ctx context.Context, marshaler runtime.Marshaler, client SessionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
func request_Df_RefreshToken_0(ctx context.Context, marshaler runtime.Marshaler, client DfClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq RefreshTokenRequest
var metadata runtime.ServerMetadata
@ -82,7 +82,7 @@ func request_Sessions_RefreshToken_0(ctx context.Context, marshaler runtime.Mars
}
func local_request_Sessions_RefreshToken_0(ctx context.Context, marshaler runtime.Marshaler, server SessionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
func local_request_Df_RefreshToken_0(ctx context.Context, marshaler runtime.Marshaler, server DfServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq RefreshTokenRequest
var metadata runtime.ServerMetadata
@ -99,7 +99,7 @@ func local_request_Sessions_RefreshToken_0(ctx context.Context, marshaler runtim
}
func request_Sessions_BlockSession_0(ctx context.Context, marshaler runtime.Marshaler, client SessionsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
func request_Df_BlockSession_0(ctx context.Context, marshaler runtime.Marshaler, client DfClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq BlockSessionRequest
var metadata runtime.ServerMetadata
@ -116,7 +116,7 @@ func request_Sessions_BlockSession_0(ctx context.Context, marshaler runtime.Mars
}
func local_request_Sessions_BlockSession_0(ctx context.Context, marshaler runtime.Marshaler, server SessionsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
func local_request_Df_BlockSession_0(ctx context.Context, marshaler runtime.Marshaler, server DfServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq BlockSessionRequest
var metadata runtime.ServerMetadata
@ -133,7 +133,7 @@ func local_request_Sessions_BlockSession_0(ctx context.Context, marshaler runtim
}
func request_Accounts_CreateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AccountsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
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
@ -150,7 +150,7 @@ func request_Accounts_CreateAccount_0(ctx context.Context, marshaler runtime.Mar
}
func local_request_Accounts_CreateAccount_0(ctx context.Context, marshaler runtime.Marshaler, server AccountsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
func local_request_Df_CreateAccount_0(ctx context.Context, marshaler runtime.Marshaler, server DfServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CreateAccountRequest
var metadata runtime.ServerMetadata
@ -167,7 +167,7 @@ func local_request_Accounts_CreateAccount_0(ctx context.Context, marshaler runti
}
func request_Accounts_UpdateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AccountsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
func request_Df_UpdateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client DfClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq UpdateAccountRequest
var metadata runtime.ServerMetadata
@ -184,7 +184,7 @@ func request_Accounts_UpdateAccount_0(ctx context.Context, marshaler runtime.Mar
}
func local_request_Accounts_UpdateAccount_0(ctx context.Context, marshaler runtime.Marshaler, server AccountsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
func local_request_Df_UpdateAccount_0(ctx context.Context, marshaler runtime.Marshaler, server DfServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq UpdateAccountRequest
var metadata runtime.ServerMetadata
@ -201,7 +201,7 @@ func local_request_Accounts_UpdateAccount_0(ctx context.Context, marshaler runti
}
func request_Accounts_UpdateAccountPrivacy_0(ctx context.Context, marshaler runtime.Marshaler, client AccountsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
func request_Df_UpdateAccountPrivacy_0(ctx context.Context, marshaler runtime.Marshaler, client DfClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq UpdateAccountPrivacyRequest
var metadata runtime.ServerMetadata
@ -218,7 +218,7 @@ func request_Accounts_UpdateAccountPrivacy_0(ctx context.Context, marshaler runt
}
func local_request_Accounts_UpdateAccountPrivacy_0(ctx context.Context, marshaler runtime.Marshaler, server AccountsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
func local_request_Df_UpdateAccountPrivacy_0(ctx context.Context, marshaler runtime.Marshaler, server DfServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq UpdateAccountPrivacyRequest
var metadata runtime.ServerMetadata
@ -235,13 +235,13 @@ func local_request_Accounts_UpdateAccountPrivacy_0(ctx context.Context, marshale
}
// RegisterSessionsHandlerServer registers the http handlers for service Sessions to "mux".
// UnaryRPC :call SessionsServer directly.
// RegisterDfHandlerServer registers the http handlers for service Df to "mux".
// UnaryRPC :call DfServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSessionsHandlerFromEndpoint instead.
func RegisterSessionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SessionsServer) error {
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDfHandlerFromEndpoint instead.
func RegisterDfHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DfServer) error {
mux.Handle("POST", pattern_Sessions_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("POST", pattern_Df_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@ -249,12 +249,12 @@ func RegisterSessionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pb.Sessions/Login", runtime.WithHTTPPathPattern("/v1/login"))
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pb.Df/Login", runtime.WithHTTPPathPattern("/v1/login"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Sessions_Login_0(annotatedContext, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_Df_Login_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 {
@ -262,11 +262,11 @@ func RegisterSessionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s
return
}
forward_Sessions_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
forward_Df_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Sessions_RefreshToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("POST", pattern_Df_RefreshToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@ -274,12 +274,12 @@ func RegisterSessionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pb.Sessions/RefreshToken", runtime.WithHTTPPathPattern("/v1/refresh_token"))
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pb.Df/RefreshToken", runtime.WithHTTPPathPattern("/v1/refresh_token"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Sessions_RefreshToken_0(annotatedContext, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_Df_RefreshToken_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 {
@ -287,11 +287,11 @@ func RegisterSessionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s
return
}
forward_Sessions_RefreshToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
forward_Df_RefreshToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Sessions_BlockSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("PATCH", pattern_Df_BlockSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@ -299,12 +299,12 @@ func RegisterSessionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pb.Sessions/BlockSession", runtime.WithHTTPPathPattern("/v1/block_session"))
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pb.Df/BlockSession", runtime.WithHTTPPathPattern("/v1/block_session"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Sessions_BlockSession_0(annotatedContext, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_Df_BlockSession_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 {
@ -312,100 +312,91 @@ func RegisterSessionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, s
return
}
forward_Sessions_BlockSession_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
forward_Df_BlockSession_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()
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/CreateAccount", runtime.WithHTTPPathPattern("/v1/create_account"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Df_CreateAccount_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_CreateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("PATCH", pattern_Df_UpdateAccount_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/UpdateAccount", runtime.WithHTTPPathPattern("/v1/update_account"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Df_UpdateAccount_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_UpdateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("PATCH", pattern_Df_UpdateAccountPrivacy_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/UpdateAccountPrivacy", runtime.WithHTTPPathPattern("/v1/update_account_privacy"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Df_UpdateAccountPrivacy_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_UpdateAccountPrivacy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterAccountsHandlerServer registers the http handlers for service Accounts to "mux".
// UnaryRPC :call AccountsServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAccountsHandlerFromEndpoint instead.
func RegisterAccountsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccountsServer) error {
mux.Handle("POST", pattern_Accounts_CreateAccount_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.Accounts/CreateAccount", runtime.WithHTTPPathPattern("/v1/create_account"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Accounts_CreateAccount_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_Accounts_CreateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Accounts_UpdateAccount_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.Accounts/UpdateAccount", runtime.WithHTTPPathPattern("/v1/update_account"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Accounts_UpdateAccount_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_Accounts_UpdateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Accounts_UpdateAccountPrivacy_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.Accounts/UpdateAccountPrivacy", runtime.WithHTTPPathPattern("/v1/update_account_privacy"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Accounts_UpdateAccountPrivacy_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_Accounts_UpdateAccountPrivacy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterSessionsHandlerFromEndpoint is same as RegisterSessionsHandler but
// RegisterDfHandlerFromEndpoint is same as RegisterDfHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSessionsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
func RegisterDfHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.DialContext(ctx, endpoint, opts...)
if err != nil {
return err
@ -425,85 +416,151 @@ func RegisterSessionsHandlerFromEndpoint(ctx context.Context, mux *runtime.Serve
}()
}()
return RegisterSessionsHandler(ctx, mux, conn)
return RegisterDfHandler(ctx, mux, conn)
}
// RegisterSessionsHandler registers the http handlers for service Sessions to "mux".
// RegisterDfHandler registers the http handlers for service Df to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterSessionsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterSessionsHandlerClient(ctx, mux, NewSessionsClient(conn))
func RegisterDfHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterDfHandlerClient(ctx, mux, NewDfClient(conn))
}
// RegisterSessionsHandlerClient registers the http handlers for service Sessions
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SessionsClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SessionsClient"
// RegisterDfHandlerClient registers the http handlers for service Df
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DfClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DfClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "SessionsClient" to call the correct interceptors.
func RegisterSessionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SessionsClient) error {
// "DfClient" to call the correct interceptors.
func RegisterDfHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DfClient) error {
mux.Handle("POST", pattern_Sessions_Login_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("POST", pattern_Df_Login_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.Sessions/Login", runtime.WithHTTPPathPattern("/v1/login"))
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pb.Df/Login", runtime.WithHTTPPathPattern("/v1/login"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Sessions_Login_0(annotatedContext, inboundMarshaler, client, req, pathParams)
resp, md, err := request_Df_Login_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_Sessions_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
forward_Df_Login_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Sessions_RefreshToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("POST", pattern_Df_RefreshToken_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.Sessions/RefreshToken", runtime.WithHTTPPathPattern("/v1/refresh_token"))
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pb.Df/RefreshToken", runtime.WithHTTPPathPattern("/v1/refresh_token"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Sessions_RefreshToken_0(annotatedContext, inboundMarshaler, client, req, pathParams)
resp, md, err := request_Df_RefreshToken_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_Sessions_RefreshToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
forward_Df_RefreshToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Sessions_BlockSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("PATCH", pattern_Df_BlockSession_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.Sessions/BlockSession", runtime.WithHTTPPathPattern("/v1/block_session"))
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pb.Df/BlockSession", runtime.WithHTTPPathPattern("/v1/block_session"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Sessions_BlockSession_0(annotatedContext, inboundMarshaler, client, req, pathParams)
resp, md, err := request_Df_BlockSession_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_Sessions_BlockSession_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
forward_Df_BlockSession_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()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pb.Df/CreateAccount", runtime.WithHTTPPathPattern("/v1/create_account"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Df_CreateAccount_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_CreateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("PATCH", pattern_Df_UpdateAccount_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/UpdateAccount", runtime.WithHTTPPathPattern("/v1/update_account"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Df_UpdateAccount_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_UpdateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("PATCH", pattern_Df_UpdateAccountPrivacy_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/UpdateAccountPrivacy", runtime.WithHTTPPathPattern("/v1/update_account_privacy"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Df_UpdateAccountPrivacy_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_UpdateAccountPrivacy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@ -511,140 +568,29 @@ func RegisterSessionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c
}
var (
pattern_Sessions_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "login"}, ""))
pattern_Df_Login_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "login"}, ""))
pattern_Sessions_RefreshToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "refresh_token"}, ""))
pattern_Df_RefreshToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "refresh_token"}, ""))
pattern_Sessions_BlockSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "block_session"}, ""))
pattern_Df_BlockSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "block_session"}, ""))
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"}, ""))
pattern_Df_UpdateAccountPrivacy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "update_account_privacy"}, ""))
)
var (
forward_Sessions_Login_0 = runtime.ForwardResponseMessage
forward_Df_Login_0 = runtime.ForwardResponseMessage
forward_Sessions_RefreshToken_0 = runtime.ForwardResponseMessage
forward_Df_RefreshToken_0 = runtime.ForwardResponseMessage
forward_Sessions_BlockSession_0 = runtime.ForwardResponseMessage
)
// RegisterAccountsHandlerFromEndpoint is same as RegisterAccountsHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAccountsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.DialContext(ctx, endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterAccountsHandler(ctx, mux, conn)
}
// RegisterAccountsHandler registers the http handlers for service Accounts to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterAccountsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterAccountsHandlerClient(ctx, mux, NewAccountsClient(conn))
}
// RegisterAccountsHandlerClient registers the http handlers for service Accounts
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AccountsClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AccountsClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "AccountsClient" to call the correct interceptors.
func RegisterAccountsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccountsClient) error {
mux.Handle("POST", pattern_Accounts_CreateAccount_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.Accounts/CreateAccount", runtime.WithHTTPPathPattern("/v1/create_account"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Accounts_CreateAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_Accounts_CreateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Accounts_UpdateAccount_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.Accounts/UpdateAccount", runtime.WithHTTPPathPattern("/v1/update_account"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Accounts_UpdateAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_Accounts_UpdateAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Accounts_UpdateAccountPrivacy_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.Accounts/UpdateAccountPrivacy", runtime.WithHTTPPathPattern("/v1/update_account_privacy"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Accounts_UpdateAccountPrivacy_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_Accounts_UpdateAccountPrivacy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_Accounts_CreateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "create_account"}, ""))
pattern_Accounts_UpdateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "update_account"}, ""))
pattern_Accounts_UpdateAccountPrivacy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "update_account_privacy"}, ""))
)
var (
forward_Accounts_CreateAccount_0 = runtime.ForwardResponseMessage
forward_Accounts_UpdateAccount_0 = runtime.ForwardResponseMessage
forward_Accounts_UpdateAccountPrivacy_0 = runtime.ForwardResponseMessage
forward_Df_BlockSession_0 = runtime.ForwardResponseMessage
forward_Df_CreateAccount_0 = runtime.ForwardResponseMessage
forward_Df_UpdateAccount_0 = runtime.ForwardResponseMessage
forward_Df_UpdateAccountPrivacy_0 = runtime.ForwardResponseMessage
)

View File

@ -19,327 +19,274 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
Sessions_Login_FullMethodName = "/pb.Sessions/Login"
Sessions_RefreshToken_FullMethodName = "/pb.Sessions/RefreshToken"
Sessions_BlockSession_FullMethodName = "/pb.Sessions/BlockSession"
Df_Login_FullMethodName = "/pb.df/Login"
Df_RefreshToken_FullMethodName = "/pb.df/RefreshToken"
Df_BlockSession_FullMethodName = "/pb.df/BlockSession"
Df_CreateAccount_FullMethodName = "/pb.df/CreateAccount"
Df_UpdateAccount_FullMethodName = "/pb.df/UpdateAccount"
Df_UpdateAccountPrivacy_FullMethodName = "/pb.df/UpdateAccountPrivacy"
)
// SessionsClient is the client API for Sessions service.
// DfClient is the client API for Df service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type SessionsClient interface {
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)
}
type sessionsClient struct {
cc grpc.ClientConnInterface
}
func NewSessionsClient(cc grpc.ClientConnInterface) SessionsClient {
return &sessionsClient{cc}
}
func (c *sessionsClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
out := new(LoginResponse)
err := c.cc.Invoke(ctx, Sessions_Login_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionsClient) RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*RefreshTokenResponse, error) {
out := new(RefreshTokenResponse)
err := c.cc.Invoke(ctx, Sessions_RefreshToken_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionsClient) BlockSession(ctx context.Context, in *BlockSessionRequest, opts ...grpc.CallOption) (*BlockSessionResponse, error) {
out := new(BlockSessionResponse)
err := c.cc.Invoke(ctx, Sessions_BlockSession_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SessionsServer is the server API for Sessions service.
// All implementations must embed UnimplementedSessionsServer
// for forward compatibility
type SessionsServer interface {
Login(context.Context, *LoginRequest) (*LoginResponse, error)
RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenResponse, error)
BlockSession(context.Context, *BlockSessionRequest) (*BlockSessionResponse, error)
mustEmbedUnimplementedSessionsServer()
}
// UnimplementedSessionsServer must be embedded to have forward compatible implementations.
type UnimplementedSessionsServer struct {
}
func (UnimplementedSessionsServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
}
func (UnimplementedSessionsServer) RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RefreshToken not implemented")
}
func (UnimplementedSessionsServer) BlockSession(context.Context, *BlockSessionRequest) (*BlockSessionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method BlockSession not implemented")
}
func (UnimplementedSessionsServer) mustEmbedUnimplementedSessionsServer() {}
// UnsafeSessionsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SessionsServer will
// result in compilation errors.
type UnsafeSessionsServer interface {
mustEmbedUnimplementedSessionsServer()
}
func RegisterSessionsServer(s grpc.ServiceRegistrar, srv SessionsServer) {
s.RegisterService(&Sessions_ServiceDesc, srv)
}
func _Sessions_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LoginRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionsServer).Login(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Sessions_Login_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionsServer).Login(ctx, req.(*LoginRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Sessions_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RefreshTokenRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionsServer).RefreshToken(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Sessions_RefreshToken_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionsServer).RefreshToken(ctx, req.(*RefreshTokenRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Sessions_BlockSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BlockSessionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionsServer).BlockSession(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Sessions_BlockSession_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionsServer).BlockSession(ctx, req.(*BlockSessionRequest))
}
return interceptor(ctx, in, info, handler)
}
// Sessions_ServiceDesc is the grpc.ServiceDesc for Sessions service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Sessions_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pb.Sessions",
HandlerType: (*SessionsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Login",
Handler: _Sessions_Login_Handler,
},
{
MethodName: "RefreshToken",
Handler: _Sessions_RefreshToken_Handler,
},
{
MethodName: "BlockSession",
Handler: _Sessions_BlockSession_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_df.proto",
}
const (
Accounts_CreateAccount_FullMethodName = "/pb.Accounts/CreateAccount"
Accounts_UpdateAccount_FullMethodName = "/pb.Accounts/UpdateAccount"
Accounts_UpdateAccountPrivacy_FullMethodName = "/pb.Accounts/UpdateAccountPrivacy"
)
// AccountsClient is the client API for Accounts service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type AccountsClient interface {
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)
}
type accountsClient struct {
type dfClient struct {
cc grpc.ClientConnInterface
}
func NewAccountsClient(cc grpc.ClientConnInterface) AccountsClient {
return &accountsClient{cc}
func NewDfClient(cc grpc.ClientConnInterface) DfClient {
return &dfClient{cc}
}
func (c *accountsClient) CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error) {
func (c *dfClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
out := new(LoginResponse)
err := c.cc.Invoke(ctx, Df_Login_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dfClient) RefreshToken(ctx context.Context, in *RefreshTokenRequest, opts ...grpc.CallOption) (*RefreshTokenResponse, error) {
out := new(RefreshTokenResponse)
err := c.cc.Invoke(ctx, Df_RefreshToken_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *dfClient) BlockSession(ctx context.Context, in *BlockSessionRequest, opts ...grpc.CallOption) (*BlockSessionResponse, error) {
out := new(BlockSessionResponse)
err := c.cc.Invoke(ctx, Df_BlockSession_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, Accounts_CreateAccount_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Df_CreateAccount_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountsClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error) {
func (c *dfClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error) {
out := new(UpdateAccountResponse)
err := c.cc.Invoke(ctx, Accounts_UpdateAccount_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Df_UpdateAccount_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountsClient) UpdateAccountPrivacy(ctx context.Context, in *UpdateAccountPrivacyRequest, opts ...grpc.CallOption) (*UpdateAccountPrivacyResponse, error) {
func (c *dfClient) UpdateAccountPrivacy(ctx context.Context, in *UpdateAccountPrivacyRequest, opts ...grpc.CallOption) (*UpdateAccountPrivacyResponse, error) {
out := new(UpdateAccountPrivacyResponse)
err := c.cc.Invoke(ctx, Accounts_UpdateAccountPrivacy_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, Df_UpdateAccountPrivacy_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AccountsServer is the server API for Accounts service.
// All implementations must embed UnimplementedAccountsServer
// DfServer is the server API for Df service.
// All implementations must embed UnimplementedDfServer
// for forward compatibility
type AccountsServer interface {
type DfServer interface {
Login(context.Context, *LoginRequest) (*LoginResponse, error)
RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenResponse, error)
BlockSession(context.Context, *BlockSessionRequest) (*BlockSessionResponse, error)
CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error)
UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error)
UpdateAccountPrivacy(context.Context, *UpdateAccountPrivacyRequest) (*UpdateAccountPrivacyResponse, error)
mustEmbedUnimplementedAccountsServer()
mustEmbedUnimplementedDfServer()
}
// UnimplementedAccountsServer must be embedded to have forward compatible implementations.
type UnimplementedAccountsServer struct {
// UnimplementedDfServer must be embedded to have forward compatible implementations.
type UnimplementedDfServer struct {
}
func (UnimplementedAccountsServer) CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error) {
func (UnimplementedDfServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
}
func (UnimplementedDfServer) RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RefreshToken not implemented")
}
func (UnimplementedDfServer) BlockSession(context.Context, *BlockSessionRequest) (*BlockSessionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method BlockSession not implemented")
}
func (UnimplementedDfServer) CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateAccount not implemented")
}
func (UnimplementedAccountsServer) UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error) {
func (UnimplementedDfServer) UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateAccount not implemented")
}
func (UnimplementedAccountsServer) UpdateAccountPrivacy(context.Context, *UpdateAccountPrivacyRequest) (*UpdateAccountPrivacyResponse, error) {
func (UnimplementedDfServer) UpdateAccountPrivacy(context.Context, *UpdateAccountPrivacyRequest) (*UpdateAccountPrivacyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateAccountPrivacy not implemented")
}
func (UnimplementedAccountsServer) mustEmbedUnimplementedAccountsServer() {}
func (UnimplementedDfServer) mustEmbedUnimplementedDfServer() {}
// UnsafeAccountsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AccountsServer will
// UnsafeDfServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DfServer will
// result in compilation errors.
type UnsafeAccountsServer interface {
mustEmbedUnimplementedAccountsServer()
type UnsafeDfServer interface {
mustEmbedUnimplementedDfServer()
}
func RegisterAccountsServer(s grpc.ServiceRegistrar, srv AccountsServer) {
s.RegisterService(&Accounts_ServiceDesc, srv)
func RegisterDfServer(s grpc.ServiceRegistrar, srv DfServer) {
s.RegisterService(&Df_ServiceDesc, srv)
}
func _Accounts_CreateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
func _Df_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LoginRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DfServer).Login(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Df_Login_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DfServer).Login(ctx, req.(*LoginRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Df_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RefreshTokenRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DfServer).RefreshToken(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Df_RefreshToken_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DfServer).RefreshToken(ctx, req.(*RefreshTokenRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Df_BlockSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BlockSessionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DfServer).BlockSession(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Df_BlockSession_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DfServer).BlockSession(ctx, req.(*BlockSessionRequest))
}
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 {
return nil, err
}
if interceptor == nil {
return srv.(AccountsServer).CreateAccount(ctx, in)
return srv.(DfServer).CreateAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Accounts_CreateAccount_FullMethodName,
FullMethod: Df_CreateAccount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountsServer).CreateAccount(ctx, req.(*CreateAccountRequest))
return srv.(DfServer).CreateAccount(ctx, req.(*CreateAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Accounts_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
func _Df_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountsServer).UpdateAccount(ctx, in)
return srv.(DfServer).UpdateAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Accounts_UpdateAccount_FullMethodName,
FullMethod: Df_UpdateAccount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountsServer).UpdateAccount(ctx, req.(*UpdateAccountRequest))
return srv.(DfServer).UpdateAccount(ctx, req.(*UpdateAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Accounts_UpdateAccountPrivacy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
func _Df_UpdateAccountPrivacy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateAccountPrivacyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountsServer).UpdateAccountPrivacy(ctx, in)
return srv.(DfServer).UpdateAccountPrivacy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Accounts_UpdateAccountPrivacy_FullMethodName,
FullMethod: Df_UpdateAccountPrivacy_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountsServer).UpdateAccountPrivacy(ctx, req.(*UpdateAccountPrivacyRequest))
return srv.(DfServer).UpdateAccountPrivacy(ctx, req.(*UpdateAccountPrivacyRequest))
}
return interceptor(ctx, in, info, handler)
}
// Accounts_ServiceDesc is the grpc.ServiceDesc for Accounts service.
// Df_ServiceDesc is the grpc.ServiceDesc for Df service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Accounts_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pb.Accounts",
HandlerType: (*AccountsServer)(nil),
var Df_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pb.df",
HandlerType: (*DfServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Login",
Handler: _Df_Login_Handler,
},
{
MethodName: "RefreshToken",
Handler: _Df_RefreshToken_Handler,
},
{
MethodName: "BlockSession",
Handler: _Df_BlockSession_Handler,
},
{
MethodName: "CreateAccount",
Handler: _Accounts_CreateAccount_Handler,
Handler: _Df_CreateAccount_Handler,
},
{
MethodName: "UpdateAccount",
Handler: _Accounts_UpdateAccount_Handler,
Handler: _Df_UpdateAccount_Handler,
},
{
MethodName: "UpdateAccountPrivacy",
Handler: _Accounts_UpdateAccountPrivacy_Handler,
Handler: _Df_UpdateAccountPrivacy_Handler,
},
},
Streams: []grpc.StreamDesc{},

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:0Z\", \"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\": 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\"}";
};
int64 id = 1;
string email = 2;

View File

@ -26,7 +26,7 @@ message CreateAccountRequest {
"birthday"
];
};
example: "{\"email\": \"john.doe@example.com\", \"password\": \"MayTheForceBeWithYou!\", \"firstname\": \"John\", \"lastname\": \"Doe\", \"street\": \"Main Street 1\", \"zip\": \"0815\", \"city\": \"New York\", \"country\": \"USA\", \"birthday\": \"1990-10-05T00:00:0Z\"}";
example: "{\"email\": \"john.doe@example.com\", \"password\": \"MayTheForceBeWithYou!\", \"firstname\": \"John\", \"lastname\": \"Doe\", \"street\": \"Main Street 1\", \"zip\": \"0815\", \"city\": \"New York\", \"country\": \"USA\", \"birthday\": \"1990-10-05T00:00:00Z\"}";
};
string email = 1;
string password = 2;
@ -38,7 +38,7 @@ message CreateAccountRequest {
string country = 8;
string phone = 9;
google.protobuf.Timestamp birthday = 10 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"1990-10-05T00:00:0Z\""
example: "\"1990-10-05T00:00:00Z\""
}];
optional bool privacy_accepted = 11 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "true"

View File

@ -36,11 +36,12 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
}
}
};
service df {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag) = {
description: "df"
};
service Sessions {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag) = {
description: "Sessions"
};
rpc Login (LoginRequest) returns (LoginResponse) {
option (google.api.http) = {
post: "/v1/login"
@ -55,7 +56,7 @@ service Sessions {
};
rpc BlockSession (BlockSessionRequest) returns (BlockSessionResponse) {
option (google.api.http) = {
post: "/v1/block_session"
patch: "/v1/block_session"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
@ -67,12 +68,6 @@ service Sessions {
}
};
};
}
service Accounts {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag) = {
description: "Account"
};
rpc CreateAccount (CreateAccountRequest) returns (CreateAccountResponse) {
option (google.api.http) = {
post: "/v1/create_account"
@ -81,7 +76,7 @@ service Accounts {
};
rpc UpdateAccount (UpdateAccountRequest) returns (UpdateAccountResponse) {
option (google.api.http) = {
post: "/v1/update_account"
patch: "/v1/update_account"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
@ -95,7 +90,7 @@ service Accounts {
};
rpc UpdateAccountPrivacy (UpdateAccountPrivacyRequest) returns (UpdateAccountPrivacyResponse) {
option (google.api.http) = {
post: "/v1/update_account_privacy"
patch: "/v1/update_account_privacy"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {