Merge pull request #81 from itsscb/gRPC-endpoints
This commit is contained in:
commit
77a836f50b
@ -7,6 +7,7 @@ RUN go build -o main main.go
|
||||
# Run stage
|
||||
FROM alpine:3.18
|
||||
WORKDIR /app
|
||||
RUN mkdir files
|
||||
COPY --from=builder /app/main .
|
||||
COPY app.env .
|
||||
ENV DB_SOURCE=postgresql://root:secret@postgres:5432/df?sslmode=disable
|
||||
|
@ -63,7 +63,7 @@ func (server *Server) createAccount(ctx *gin.Context) {
|
||||
}
|
||||
|
||||
type getAccountRequest struct {
|
||||
ID int64 `uri:"id" binding:"required,min=1" json:"id"`
|
||||
ID uint64 `uri:"id" binding:"required,min=1" json:"id"`
|
||||
}
|
||||
|
||||
func (server *Server) getAccount(ctx *gin.Context) {
|
||||
@ -86,7 +86,7 @@ func (server *Server) getAccount(ctx *gin.Context) {
|
||||
}
|
||||
|
||||
authPayload := ctx.MustGet(authorizationPayloadKey).(*token.Payload)
|
||||
if account.Email != authPayload.Email {
|
||||
if account.ID != authPayload.AccountID {
|
||||
err := errors.New("account doesn't belong to the authenticated user")
|
||||
ctx.JSON(http.StatusUnauthorized, errorResponse(err))
|
||||
return
|
||||
@ -110,7 +110,7 @@ func (server *Server) listAccounts(ctx *gin.Context) {
|
||||
|
||||
authPayload := ctx.MustGet(authorizationPayloadKey).(*token.Payload)
|
||||
|
||||
account, err := server.store.GetAccountByEmail(ctx, authPayload.Email)
|
||||
account, err := server.store.GetAccount(ctx, authPayload.AccountID)
|
||||
if err != nil {
|
||||
if err == sql.ErrNoRows {
|
||||
ctx.JSON(http.StatusNotFound, errorResponse(err))
|
||||
@ -142,8 +142,8 @@ func (server *Server) listAccounts(ctx *gin.Context) {
|
||||
}
|
||||
|
||||
type updateAccountPrivacyRequest struct {
|
||||
ID int64 `binding:"required" json:"ID"`
|
||||
PrivacyAccepted *bool `binding:"required" json:"privacy_accepted"`
|
||||
ID uint64 `binding:"required" json:"ID"`
|
||||
PrivacyAccepted *bool `binding:"required" json:"privacy_accepted"`
|
||||
}
|
||||
|
||||
func (server *Server) updateAccountPrivacy(ctx *gin.Context) {
|
||||
@ -160,7 +160,7 @@ func (server *Server) updateAccountPrivacy(ctx *gin.Context) {
|
||||
}
|
||||
|
||||
authPayload := ctx.MustGet(authorizationPayloadKey).(*token.Payload)
|
||||
if account.Email != authPayload.Email {
|
||||
if account.ID != authPayload.AccountID {
|
||||
err := errors.New("account doesn't belong to the authenticated user")
|
||||
ctx.JSON(http.StatusUnauthorized, errorResponse(err))
|
||||
return
|
||||
@ -168,7 +168,7 @@ func (server *Server) updateAccountPrivacy(ctx *gin.Context) {
|
||||
|
||||
account, err = server.store.UpdateAccountPrivacyTx(ctx, db.UpdateAccountPrivacyTxParams{
|
||||
ID: req.ID,
|
||||
Changer: authPayload.Email,
|
||||
Changer: account.Email,
|
||||
PrivacyAccepted: req.PrivacyAccepted,
|
||||
})
|
||||
if err != nil {
|
||||
@ -180,7 +180,7 @@ func (server *Server) updateAccountPrivacy(ctx *gin.Context) {
|
||||
}
|
||||
|
||||
type updateAccountRequest struct {
|
||||
ID int64 `binding:"required" json:"ID"`
|
||||
ID uint64 `binding:"required" json:"ID"`
|
||||
NewPassword string `json:"new_password"`
|
||||
Firstname string `json:"firstname"`
|
||||
Lastname string `json:"lastname"`
|
||||
@ -207,7 +207,7 @@ func (server *Server) updateAccount(ctx *gin.Context) {
|
||||
}
|
||||
|
||||
authPayload := ctx.MustGet(authorizationPayloadKey).(*token.Payload)
|
||||
if account.Email != authPayload.Email {
|
||||
if account.ID != authPayload.AccountID {
|
||||
err := errors.New("account doesn't belong to the authenticated user")
|
||||
ctx.JSON(http.StatusUnauthorized, errorResponse(err))
|
||||
return
|
||||
@ -215,7 +215,7 @@ func (server *Server) updateAccount(ctx *gin.Context) {
|
||||
|
||||
arg := db.UpdateAccountTxParams{
|
||||
ID: req.ID,
|
||||
Changer: authPayload.Email,
|
||||
Changer: account.Email,
|
||||
Passwordhash: sql.NullString{
|
||||
String: req.NewPassword,
|
||||
Valid: req.NewPassword != "",
|
||||
|
@ -49,7 +49,7 @@ func TestCreateAccountAPI(t *testing.T) {
|
||||
"creator": account.Email,
|
||||
},
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
arg := db.CreateAccountTxParams{
|
||||
@ -110,7 +110,7 @@ func TestCreateAccountAPI(t *testing.T) {
|
||||
"email": account.Email,
|
||||
},
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
store.EXPECT().
|
||||
@ -139,7 +139,7 @@ func TestCreateAccountAPI(t *testing.T) {
|
||||
"creator": account.Email,
|
||||
},
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
store.EXPECT().
|
||||
@ -188,7 +188,7 @@ func TestGetAccountAPI(t *testing.T) {
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
accountID int64
|
||||
accountID uint64
|
||||
setupAuth func(t *testing.T, request *http.Request, tokenMaker token.Maker)
|
||||
buildStubs func(store *mockdb.MockStore)
|
||||
checkResponse func(t *testing.T, recorder *httptest.ResponseRecorder)
|
||||
@ -197,7 +197,7 @@ func TestGetAccountAPI(t *testing.T) {
|
||||
name: "OK",
|
||||
accountID: account.ID,
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
store.EXPECT().
|
||||
@ -214,7 +214,7 @@ func TestGetAccountAPI(t *testing.T) {
|
||||
name: "UnauthorizedUser",
|
||||
accountID: account.ID,
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, "UnauthorizedUser", time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, 2, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
store.EXPECT().
|
||||
@ -244,7 +244,7 @@ func TestGetAccountAPI(t *testing.T) {
|
||||
name: "NotFound",
|
||||
accountID: account.ID,
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
store.EXPECT().
|
||||
@ -260,7 +260,7 @@ func TestGetAccountAPI(t *testing.T) {
|
||||
name: "InternalError",
|
||||
accountID: account.ID,
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
store.EXPECT().
|
||||
@ -276,7 +276,7 @@ func TestGetAccountAPI(t *testing.T) {
|
||||
name: "InvalidID",
|
||||
accountID: 0,
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
store.EXPECT().
|
||||
@ -373,7 +373,7 @@ func TestUpdateAccountTxAPI(t *testing.T) {
|
||||
"lastname": newLastname,
|
||||
},
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
arg := db.UpdateAccountTxParams{
|
||||
@ -423,7 +423,7 @@ func TestUpdateAccountTxAPI(t *testing.T) {
|
||||
"email": account.Email,
|
||||
},
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
store.EXPECT().
|
||||
@ -495,7 +495,7 @@ func TestListAccountsAPI(t *testing.T) {
|
||||
pageSize: n,
|
||||
},
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
arg := db.ListAccountsParams{
|
||||
@ -507,7 +507,7 @@ func TestListAccountsAPI(t *testing.T) {
|
||||
accountAdmin.PermissionLevel = 1
|
||||
|
||||
store.EXPECT().
|
||||
GetAccountByEmail(gomock.Any(), gomock.Eq(account.Email)).
|
||||
GetAccount(gomock.Any(), gomock.Eq(account.ID)).
|
||||
Times(1).
|
||||
Return(accountAdmin, nil)
|
||||
|
||||
@ -542,7 +542,7 @@ func TestListAccountsAPI(t *testing.T) {
|
||||
name: "EmptyQuery",
|
||||
query: Query{},
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
store.EXPECT().
|
||||
@ -560,7 +560,7 @@ func TestListAccountsAPI(t *testing.T) {
|
||||
pageSize: n,
|
||||
},
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
store.EXPECT().
|
||||
@ -578,7 +578,7 @@ func TestListAccountsAPI(t *testing.T) {
|
||||
pageSize: 100000,
|
||||
},
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
store.EXPECT().
|
||||
@ -640,7 +640,7 @@ func TestUpdateAccountPrivacyTxAPI(t *testing.T) {
|
||||
"privacy_accepted": true,
|
||||
},
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
trueBool := true
|
||||
@ -687,7 +687,7 @@ func TestUpdateAccountPrivacyTxAPI(t *testing.T) {
|
||||
"privacy_accepted": true,
|
||||
},
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
trueBool := true
|
||||
@ -735,7 +735,7 @@ func TestUpdateAccountPrivacyTxAPI(t *testing.T) {
|
||||
"privacy_accepted": false,
|
||||
},
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
falseBool := false
|
||||
@ -784,7 +784,7 @@ func TestUpdateAccountPrivacyTxAPI(t *testing.T) {
|
||||
"id": account.ID,
|
||||
},
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
||||
},
|
||||
buildStubs: func(store *mockdb.MockStore) {
|
||||
store.EXPECT().
|
||||
|
@ -19,13 +19,13 @@ func addAuthorization(
|
||||
request *http.Request,
|
||||
tokenMaker token.Maker,
|
||||
authorizationType string,
|
||||
email string,
|
||||
account_id uint64,
|
||||
duration time.Duration,
|
||||
) {
|
||||
id, err := tokenMaker.NewTokenID()
|
||||
require.NoError(t, err)
|
||||
|
||||
token, payload, err := tokenMaker.CreateToken(email, id, duration)
|
||||
token, payload, err := tokenMaker.CreateToken(account_id, id, duration)
|
||||
require.NoError(t, err)
|
||||
require.NotEmpty(t, payload)
|
||||
|
||||
@ -42,7 +42,7 @@ func TestAuthMiddleware(t *testing.T) {
|
||||
{
|
||||
name: "OK",
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, "user", time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, 1, time.Minute)
|
||||
},
|
||||
checkResponse: func(t *testing.T, recorder *httptest.ResponseRecorder) {
|
||||
require.Equal(t, http.StatusOK, recorder.Code)
|
||||
@ -59,7 +59,7 @@ func TestAuthMiddleware(t *testing.T) {
|
||||
{
|
||||
name: "UnsupportedAuthorization",
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, "unsupported", "user", time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, "unsupported", 1, time.Minute)
|
||||
},
|
||||
checkResponse: func(t *testing.T, recorder *httptest.ResponseRecorder) {
|
||||
require.Equal(t, http.StatusUnauthorized, recorder.Code)
|
||||
@ -68,7 +68,7 @@ func TestAuthMiddleware(t *testing.T) {
|
||||
{
|
||||
name: "InvalidAuthorizationFormat",
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, "", "user", time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, "", 1, time.Minute)
|
||||
},
|
||||
checkResponse: func(t *testing.T, recorder *httptest.ResponseRecorder) {
|
||||
require.Equal(t, http.StatusUnauthorized, recorder.Code)
|
||||
@ -77,7 +77,7 @@ func TestAuthMiddleware(t *testing.T) {
|
||||
{
|
||||
name: "ExpiredToken",
|
||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, "user", -time.Minute)
|
||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, 1, -time.Minute)
|
||||
},
|
||||
checkResponse: func(t *testing.T, recorder *httptest.ResponseRecorder) {
|
||||
require.Equal(t, http.StatusUnauthorized, recorder.Code)
|
||||
|
@ -24,7 +24,7 @@ type loginAccountResponse struct {
|
||||
AccessTokenExpiresAt time.Time `json:"access_token_expires_at"`
|
||||
RefreshToken string `json:"refresh_token"`
|
||||
RefreshTokenExpiresAt time.Time `json:"refresh_token_expires_at"`
|
||||
Email string `json:"email"`
|
||||
AccountID uint64 `json:"account_id"`
|
||||
}
|
||||
|
||||
func (server *Server) loginAccount(ctx *gin.Context) {
|
||||
@ -55,13 +55,13 @@ func (server *Server) loginAccount(ctx *gin.Context) {
|
||||
ctx.JSON(http.StatusInternalServerError, errorResponse(errors.New("failed to create session token")))
|
||||
}
|
||||
refreshToken, refreshPayload, err := server.tokenMaker.CreateToken(
|
||||
account.Email,
|
||||
account.ID,
|
||||
id,
|
||||
server.config.RefreshTokenDuration,
|
||||
)
|
||||
|
||||
accessToken, accessPayload, err := server.tokenMaker.CreateToken(
|
||||
account.Email,
|
||||
account.ID,
|
||||
id,
|
||||
server.config.AccessTokenDuration,
|
||||
)
|
||||
@ -73,7 +73,7 @@ func (server *Server) loginAccount(ctx *gin.Context) {
|
||||
|
||||
session, err := server.store.CreateSession(ctx, db.CreateSessionParams{
|
||||
ID: refreshPayload.ID,
|
||||
Email: account.Email,
|
||||
AccountID: refreshPayload.AccountID,
|
||||
RefreshToken: refreshToken,
|
||||
UserAgent: ctx.Request.UserAgent(),
|
||||
ClientIp: ctx.ClientIP(),
|
||||
@ -91,7 +91,7 @@ func (server *Server) loginAccount(ctx *gin.Context) {
|
||||
AccessTokenExpiresAt: accessPayload.ExpiredAt,
|
||||
RefreshToken: refreshToken,
|
||||
RefreshTokenExpiresAt: refreshPayload.ExpiredAt,
|
||||
Email: account.Email,
|
||||
AccountID: refreshPayload.AccountID,
|
||||
}
|
||||
ctx.JSON(http.StatusOK, rsp)
|
||||
}
|
||||
@ -130,7 +130,7 @@ func (server *Server) blockSession(ctx *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if session.Email != payload.Email {
|
||||
if session.AccountID != payload.AccountID {
|
||||
ctx.JSON(http.StatusUnauthorized, errorResponse(errors.New("unauthorized")))
|
||||
return
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ func (server *Server) renewAccessToken(ctx *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if session.Email != refreshPayload.Email {
|
||||
if session.AccountID != refreshPayload.AccountID {
|
||||
err := fmt.Errorf("incorrect session user")
|
||||
ctx.JSON(http.StatusUnauthorized, errorResponse(err))
|
||||
return
|
||||
@ -71,7 +71,7 @@ func (server *Server) renewAccessToken(ctx *gin.Context) {
|
||||
ctx.JSON(http.StatusInternalServerError, errorResponse(errors.New("failed to create session token")))
|
||||
}
|
||||
accessToken, accessPayload, err := server.tokenMaker.CreateToken(
|
||||
refreshPayload.Email,
|
||||
refreshPayload.AccountID,
|
||||
id,
|
||||
server.config.AccessTokenDuration,
|
||||
)
|
||||
|
@ -35,7 +35,7 @@ CREATE TABLE "accounts" (
|
||||
|
||||
CREATE TABLE "sessions" (
|
||||
"id" uuid UNIQUE PRIMARY KEY NOT NULL,
|
||||
"email" varchar NOT NULL,
|
||||
"account_id" bigint NOT NULL,
|
||||
"user_agent" varchar NOT NULL,
|
||||
"client_ip" varchar NOT NULL,
|
||||
"refresh_token" varchar NOT NULL,
|
||||
@ -66,7 +66,7 @@ CREATE TABLE "documents" (
|
||||
"name" varchar NOT NULL,
|
||||
"type" varchar NOT NULL,
|
||||
"path" varchar NOT NULL,
|
||||
"url" varchar NOT NULL,
|
||||
"hash" varchar NOT NULL,
|
||||
"valid" boolean NOT NULL DEFAULT false,
|
||||
"valid_date" timestamptz,
|
||||
"validated_by" varchar,
|
||||
@ -114,7 +114,7 @@ CREATE TABLE "returns" (
|
||||
"description" text NOT NULL,
|
||||
"category" varchar NOT NULL,
|
||||
"email" varchar NOT NULL,
|
||||
"status" varchar NOT NULL,
|
||||
"status" varchar NOT NULL DEFAULT 'created',
|
||||
"creator" varchar NOT NULL,
|
||||
"created" timestamptz NOT NULL DEFAULT (now()),
|
||||
"changer" varchar NOT NULL,
|
||||
@ -125,21 +125,17 @@ CREATE TABLE "returnsLog" (
|
||||
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
|
||||
"return_id" bigint NOT NULL,
|
||||
"mail_id" bigint NOT NULL,
|
||||
"status" varchar,
|
||||
"status" varchar NOT NULL DEFAULT 'created',
|
||||
"creator" varchar NOT NULL,
|
||||
"created" timestamptz NOT NULL DEFAULT (now()),
|
||||
"changer" varchar NOT NULL,
|
||||
"changed" timestamptz NOT NULL DEFAULT (now())
|
||||
);
|
||||
|
||||
ALTER TABLE "sessions" ADD FOREIGN KEY ("email") REFERENCES "accounts" ("email");
|
||||
ALTER TABLE "sessions" ADD FOREIGN KEY ("account_id") REFERENCES "accounts" ("id");
|
||||
|
||||
ALTER TABLE "persons" ADD FOREIGN KEY ("account_id") REFERENCES "accounts" ("id");
|
||||
|
||||
ALTER TABLE "documents" ADD FOREIGN KEY ("person_id") REFERENCES "persons" ("id");
|
||||
|
||||
ALTER TABLE "documents" ADD FOREIGN KEY ("mail_id") REFERENCES "mails" ("id");
|
||||
|
||||
ALTER TABLE "payments" ADD FOREIGN KEY ("account_id") REFERENCES "accounts" ("id");
|
||||
|
||||
ALTER TABLE "returns" ADD FOREIGN KEY ("person_id") REFERENCES "persons" ("id");
|
||||
|
@ -10,11 +10,13 @@ package mockdb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
sql "database/sql"
|
||||
reflect "reflect"
|
||||
|
||||
uuid "github.com/google/uuid"
|
||||
db "github.com/itsscb/df/bff/db/sqlc"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
)
|
||||
|
||||
// MockStore is a mock of Store interface.
|
||||
@ -98,6 +100,21 @@ func (mr *MockStoreMockRecorder) CreateAccountTx(arg0, arg1 any) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateAccountTx", reflect.TypeOf((*MockStore)(nil).CreateAccountTx), arg0, arg1)
|
||||
}
|
||||
|
||||
// CreateDocument mocks base method.
|
||||
func (m *MockStore) CreateDocument(arg0 context.Context, arg1 db.CreateDocumentParams) (db.Document, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "CreateDocument", arg0, arg1)
|
||||
ret0, _ := ret[0].(db.Document)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// CreateDocument indicates an expected call of CreateDocument.
|
||||
func (mr *MockStoreMockRecorder) CreateDocument(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateDocument", reflect.TypeOf((*MockStore)(nil).CreateDocument), arg0, arg1)
|
||||
}
|
||||
|
||||
// CreateDocumentMail mocks base method.
|
||||
func (m *MockStore) CreateDocumentMail(arg0 context.Context, arg1 db.CreateDocumentMailParams) (db.Document, error) {
|
||||
m.ctrl.T.Helper()
|
||||
@ -113,6 +130,22 @@ func (mr *MockStoreMockRecorder) CreateDocumentMail(arg0, arg1 any) *gomock.Call
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateDocumentMail", reflect.TypeOf((*MockStore)(nil).CreateDocumentMail), arg0, arg1)
|
||||
}
|
||||
|
||||
// CreateDocumentTx mocks base method.
|
||||
func (m *MockStore) CreateDocumentTx(arg0 context.Context, arg1 db.CreateDocumentTxParams) (db.Document, int, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "CreateDocumentTx", arg0, arg1)
|
||||
ret0, _ := ret[0].(db.Document)
|
||||
ret1, _ := ret[1].(int)
|
||||
ret2, _ := ret[2].(error)
|
||||
return ret0, ret1, ret2
|
||||
}
|
||||
|
||||
// CreateDocumentTx indicates an expected call of CreateDocumentTx.
|
||||
func (mr *MockStoreMockRecorder) CreateDocumentTx(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateDocumentTx", reflect.TypeOf((*MockStore)(nil).CreateDocumentTx), arg0, arg1)
|
||||
}
|
||||
|
||||
// CreateDocumentUpload mocks base method.
|
||||
func (m *MockStore) CreateDocumentUpload(arg0 context.Context, arg1 db.CreateDocumentUploadParams) (db.Document, error) {
|
||||
m.ctrl.T.Helper()
|
||||
@ -249,7 +282,7 @@ func (mr *MockStoreMockRecorder) CreateSession(arg0, arg1 any) *gomock.Call {
|
||||
}
|
||||
|
||||
// DeleteAccount mocks base method.
|
||||
func (m *MockStore) DeleteAccount(arg0 context.Context, arg1 int64) error {
|
||||
func (m *MockStore) DeleteAccount(arg0 context.Context, arg1 uint64) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DeleteAccount", arg0, arg1)
|
||||
ret0, _ := ret[0].(error)
|
||||
@ -263,7 +296,7 @@ func (mr *MockStoreMockRecorder) DeleteAccount(arg0, arg1 any) *gomock.Call {
|
||||
}
|
||||
|
||||
// DeleteDocument mocks base method.
|
||||
func (m *MockStore) DeleteDocument(arg0 context.Context, arg1 int64) error {
|
||||
func (m *MockStore) DeleteDocument(arg0 context.Context, arg1 uint64) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DeleteDocument", arg0, arg1)
|
||||
ret0, _ := ret[0].(error)
|
||||
@ -276,8 +309,37 @@ func (mr *MockStoreMockRecorder) DeleteDocument(arg0, arg1 any) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDocument", reflect.TypeOf((*MockStore)(nil).DeleteDocument), arg0, arg1)
|
||||
}
|
||||
|
||||
// DeleteDocumentTx mocks base method.
|
||||
func (m *MockStore) DeleteDocumentTx(arg0 context.Context, arg1 uint64) (codes.Code, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DeleteDocumentTx", arg0, arg1)
|
||||
ret0, _ := ret[0].(codes.Code)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// DeleteDocumentTx indicates an expected call of DeleteDocumentTx.
|
||||
func (mr *MockStoreMockRecorder) DeleteDocumentTx(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDocumentTx", reflect.TypeOf((*MockStore)(nil).DeleteDocumentTx), arg0, arg1)
|
||||
}
|
||||
|
||||
// DeleteDocumentsByPersonID mocks base method.
|
||||
func (m *MockStore) DeleteDocumentsByPersonID(arg0 context.Context, arg1 sql.NullInt64) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DeleteDocumentsByPersonID", arg0, arg1)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// DeleteDocumentsByPersonID indicates an expected call of DeleteDocumentsByPersonID.
|
||||
func (mr *MockStoreMockRecorder) DeleteDocumentsByPersonID(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDocumentsByPersonID", reflect.TypeOf((*MockStore)(nil).DeleteDocumentsByPersonID), arg0, arg1)
|
||||
}
|
||||
|
||||
// DeleteMail mocks base method.
|
||||
func (m *MockStore) DeleteMail(arg0 context.Context, arg1 int64) error {
|
||||
func (m *MockStore) DeleteMail(arg0 context.Context, arg1 uint64) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DeleteMail", arg0, arg1)
|
||||
ret0, _ := ret[0].(error)
|
||||
@ -291,7 +353,7 @@ func (mr *MockStoreMockRecorder) DeleteMail(arg0, arg1 any) *gomock.Call {
|
||||
}
|
||||
|
||||
// DeletePayment mocks base method.
|
||||
func (m *MockStore) DeletePayment(arg0 context.Context, arg1 int64) error {
|
||||
func (m *MockStore) DeletePayment(arg0 context.Context, arg1 uint64) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DeletePayment", arg0, arg1)
|
||||
ret0, _ := ret[0].(error)
|
||||
@ -305,7 +367,7 @@ func (mr *MockStoreMockRecorder) DeletePayment(arg0, arg1 any) *gomock.Call {
|
||||
}
|
||||
|
||||
// DeletePerson mocks base method.
|
||||
func (m *MockStore) DeletePerson(arg0 context.Context, arg1 int64) error {
|
||||
func (m *MockStore) DeletePerson(arg0 context.Context, arg1 uint64) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DeletePerson", arg0, arg1)
|
||||
ret0, _ := ret[0].(error)
|
||||
@ -318,8 +380,22 @@ func (mr *MockStoreMockRecorder) DeletePerson(arg0, arg1 any) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePerson", reflect.TypeOf((*MockStore)(nil).DeletePerson), arg0, arg1)
|
||||
}
|
||||
|
||||
// DeletePersonTx mocks base method.
|
||||
func (m *MockStore) DeletePersonTx(arg0 context.Context, arg1 uint64) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DeletePersonTx", arg0, arg1)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// DeletePersonTx indicates an expected call of DeletePersonTx.
|
||||
func (mr *MockStoreMockRecorder) DeletePersonTx(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePersonTx", reflect.TypeOf((*MockStore)(nil).DeletePersonTx), arg0, arg1)
|
||||
}
|
||||
|
||||
// DeleteProvider mocks base method.
|
||||
func (m *MockStore) DeleteProvider(arg0 context.Context, arg1 int64) error {
|
||||
func (m *MockStore) DeleteProvider(arg0 context.Context, arg1 uint64) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DeleteProvider", arg0, arg1)
|
||||
ret0, _ := ret[0].(error)
|
||||
@ -333,7 +409,7 @@ func (mr *MockStoreMockRecorder) DeleteProvider(arg0, arg1 any) *gomock.Call {
|
||||
}
|
||||
|
||||
// DeleteReturn mocks base method.
|
||||
func (m *MockStore) DeleteReturn(arg0 context.Context, arg1 int64) error {
|
||||
func (m *MockStore) DeleteReturn(arg0 context.Context, arg1 uint64) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DeleteReturn", arg0, arg1)
|
||||
ret0, _ := ret[0].(error)
|
||||
@ -346,8 +422,22 @@ func (mr *MockStoreMockRecorder) DeleteReturn(arg0, arg1 any) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteReturn", reflect.TypeOf((*MockStore)(nil).DeleteReturn), arg0, arg1)
|
||||
}
|
||||
|
||||
// DeleteReturnsByPersonID mocks base method.
|
||||
func (m *MockStore) DeleteReturnsByPersonID(arg0 context.Context, arg1 uint64) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DeleteReturnsByPersonID", arg0, arg1)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// DeleteReturnsByPersonID indicates an expected call of DeleteReturnsByPersonID.
|
||||
func (mr *MockStoreMockRecorder) DeleteReturnsByPersonID(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteReturnsByPersonID", reflect.TypeOf((*MockStore)(nil).DeleteReturnsByPersonID), arg0, arg1)
|
||||
}
|
||||
|
||||
// DeleteReturnsLog mocks base method.
|
||||
func (m *MockStore) DeleteReturnsLog(arg0 context.Context, arg1 int64) error {
|
||||
func (m *MockStore) DeleteReturnsLog(arg0 context.Context, arg1 uint64) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DeleteReturnsLog", arg0, arg1)
|
||||
ret0, _ := ret[0].(error)
|
||||
@ -360,8 +450,22 @@ func (mr *MockStoreMockRecorder) DeleteReturnsLog(arg0, arg1 any) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteReturnsLog", reflect.TypeOf((*MockStore)(nil).DeleteReturnsLog), arg0, arg1)
|
||||
}
|
||||
|
||||
// DeleteReturnsLogsByPersonID mocks base method.
|
||||
func (m *MockStore) DeleteReturnsLogsByPersonID(arg0 context.Context, arg1 uint64) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "DeleteReturnsLogsByPersonID", arg0, arg1)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// DeleteReturnsLogsByPersonID indicates an expected call of DeleteReturnsLogsByPersonID.
|
||||
func (mr *MockStoreMockRecorder) DeleteReturnsLogsByPersonID(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteReturnsLogsByPersonID", reflect.TypeOf((*MockStore)(nil).DeleteReturnsLogsByPersonID), arg0, arg1)
|
||||
}
|
||||
|
||||
// GetAccount mocks base method.
|
||||
func (m *MockStore) GetAccount(arg0 context.Context, arg1 int64) (db.Account, error) {
|
||||
func (m *MockStore) GetAccount(arg0 context.Context, arg1 uint64) (db.Account, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetAccount", arg0, arg1)
|
||||
ret0, _ := ret[0].(db.Account)
|
||||
@ -391,7 +495,7 @@ func (mr *MockStoreMockRecorder) GetAccountByEmail(arg0, arg1 any) *gomock.Call
|
||||
}
|
||||
|
||||
// GetAccountForUpdate mocks base method.
|
||||
func (m *MockStore) GetAccountForUpdate(arg0 context.Context, arg1 int64) (db.Account, error) {
|
||||
func (m *MockStore) GetAccountForUpdate(arg0 context.Context, arg1 uint64) (db.Account, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetAccountForUpdate", arg0, arg1)
|
||||
ret0, _ := ret[0].(db.Account)
|
||||
@ -406,7 +510,7 @@ func (mr *MockStoreMockRecorder) GetAccountForUpdate(arg0, arg1 any) *gomock.Cal
|
||||
}
|
||||
|
||||
// GetDocument mocks base method.
|
||||
func (m *MockStore) GetDocument(arg0 context.Context, arg1 int64) (db.Document, error) {
|
||||
func (m *MockStore) GetDocument(arg0 context.Context, arg1 uint64) (db.Document, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetDocument", arg0, arg1)
|
||||
ret0, _ := ret[0].(db.Document)
|
||||
@ -420,8 +524,38 @@ func (mr *MockStoreMockRecorder) GetDocument(arg0, arg1 any) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDocument", reflect.TypeOf((*MockStore)(nil).GetDocument), arg0, arg1)
|
||||
}
|
||||
|
||||
// GetDocumentByHash mocks base method.
|
||||
func (m *MockStore) GetDocumentByHash(arg0 context.Context, arg1 db.GetDocumentByHashParams) ([]uint64, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetDocumentByHash", arg0, arg1)
|
||||
ret0, _ := ret[0].([]uint64)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetDocumentByHash indicates an expected call of GetDocumentByHash.
|
||||
func (mr *MockStoreMockRecorder) GetDocumentByHash(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDocumentByHash", reflect.TypeOf((*MockStore)(nil).GetDocumentByHash), arg0, arg1)
|
||||
}
|
||||
|
||||
// GetDocumentByIDWithAccountID mocks base method.
|
||||
func (m *MockStore) GetDocumentByIDWithAccountID(arg0 context.Context, arg1 db.GetDocumentByIDWithAccountIDParams) (db.Document, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetDocumentByIDWithAccountID", arg0, arg1)
|
||||
ret0, _ := ret[0].(db.Document)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetDocumentByIDWithAccountID indicates an expected call of GetDocumentByIDWithAccountID.
|
||||
func (mr *MockStoreMockRecorder) GetDocumentByIDWithAccountID(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDocumentByIDWithAccountID", reflect.TypeOf((*MockStore)(nil).GetDocumentByIDWithAccountID), arg0, arg1)
|
||||
}
|
||||
|
||||
// GetMail mocks base method.
|
||||
func (m *MockStore) GetMail(arg0 context.Context, arg1 int64) (db.Mail, error) {
|
||||
func (m *MockStore) GetMail(arg0 context.Context, arg1 uint64) (db.Mail, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetMail", arg0, arg1)
|
||||
ret0, _ := ret[0].(db.Mail)
|
||||
@ -436,7 +570,7 @@ func (mr *MockStoreMockRecorder) GetMail(arg0, arg1 any) *gomock.Call {
|
||||
}
|
||||
|
||||
// GetPayment mocks base method.
|
||||
func (m *MockStore) GetPayment(arg0 context.Context, arg1 int64) (db.Payment, error) {
|
||||
func (m *MockStore) GetPayment(arg0 context.Context, arg1 uint64) (db.Payment, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetPayment", arg0, arg1)
|
||||
ret0, _ := ret[0].(db.Payment)
|
||||
@ -451,7 +585,7 @@ func (mr *MockStoreMockRecorder) GetPayment(arg0, arg1 any) *gomock.Call {
|
||||
}
|
||||
|
||||
// GetPerson mocks base method.
|
||||
func (m *MockStore) GetPerson(arg0 context.Context, arg1 int64) (db.Person, error) {
|
||||
func (m *MockStore) GetPerson(arg0 context.Context, arg1 uint64) (db.Person, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetPerson", arg0, arg1)
|
||||
ret0, _ := ret[0].(db.Person)
|
||||
@ -466,7 +600,7 @@ func (mr *MockStoreMockRecorder) GetPerson(arg0, arg1 any) *gomock.Call {
|
||||
}
|
||||
|
||||
// GetProvider mocks base method.
|
||||
func (m *MockStore) GetProvider(arg0 context.Context, arg1 int64) (db.Provider, error) {
|
||||
func (m *MockStore) GetProvider(arg0 context.Context, arg1 uint64) (db.Provider, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetProvider", arg0, arg1)
|
||||
ret0, _ := ret[0].(db.Provider)
|
||||
@ -481,7 +615,7 @@ func (mr *MockStoreMockRecorder) GetProvider(arg0, arg1 any) *gomock.Call {
|
||||
}
|
||||
|
||||
// GetReturn mocks base method.
|
||||
func (m *MockStore) GetReturn(arg0 context.Context, arg1 int64) (db.Return, error) {
|
||||
func (m *MockStore) GetReturn(arg0 context.Context, arg1 uint64) (db.Return, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetReturn", arg0, arg1)
|
||||
ret0, _ := ret[0].(db.Return)
|
||||
@ -495,8 +629,23 @@ func (mr *MockStoreMockRecorder) GetReturn(arg0, arg1 any) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReturn", reflect.TypeOf((*MockStore)(nil).GetReturn), arg0, arg1)
|
||||
}
|
||||
|
||||
// GetReturnIDsByPersonID mocks base method.
|
||||
func (m *MockStore) GetReturnIDsByPersonID(arg0 context.Context, arg1 uint64) ([]uint64, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetReturnIDsByPersonID", arg0, arg1)
|
||||
ret0, _ := ret[0].([]uint64)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetReturnIDsByPersonID indicates an expected call of GetReturnIDsByPersonID.
|
||||
func (mr *MockStoreMockRecorder) GetReturnIDsByPersonID(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReturnIDsByPersonID", reflect.TypeOf((*MockStore)(nil).GetReturnIDsByPersonID), arg0, arg1)
|
||||
}
|
||||
|
||||
// GetReturns mocks base method.
|
||||
func (m *MockStore) GetReturns(arg0 context.Context, arg1 int64) ([]db.Return, error) {
|
||||
func (m *MockStore) GetReturns(arg0 context.Context, arg1 uint64) ([]db.Return, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetReturns", arg0, arg1)
|
||||
ret0, _ := ret[0].([]db.Return)
|
||||
@ -511,7 +660,7 @@ func (mr *MockStoreMockRecorder) GetReturns(arg0, arg1 any) *gomock.Call {
|
||||
}
|
||||
|
||||
// GetReturnsLog mocks base method.
|
||||
func (m *MockStore) GetReturnsLog(arg0 context.Context, arg1 int64) (db.ReturnsLog, error) {
|
||||
func (m *MockStore) GetReturnsLog(arg0 context.Context, arg1 uint64) (db.ReturnsLog, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetReturnsLog", arg0, arg1)
|
||||
ret0, _ := ret[0].(db.ReturnsLog)
|
||||
@ -601,7 +750,7 @@ func (mr *MockStoreMockRecorder) ListMails(arg0, arg1 any) *gomock.Call {
|
||||
}
|
||||
|
||||
// ListPayments mocks base method.
|
||||
func (m *MockStore) ListPayments(arg0 context.Context, arg1 db.ListPaymentsParams) ([]db.Payment, error) {
|
||||
func (m *MockStore) ListPayments(arg0 context.Context, arg1 uint64) ([]db.Payment, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ListPayments", arg0, arg1)
|
||||
ret0, _ := ret[0].([]db.Payment)
|
||||
@ -616,7 +765,7 @@ func (mr *MockStoreMockRecorder) ListPayments(arg0, arg1 any) *gomock.Call {
|
||||
}
|
||||
|
||||
// ListPersons mocks base method.
|
||||
func (m *MockStore) ListPersons(arg0 context.Context, arg1 db.ListPersonsParams) ([]db.Person, error) {
|
||||
func (m *MockStore) ListPersons(arg0 context.Context, arg1 uint64) ([]db.Person, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ListPersons", arg0, arg1)
|
||||
ret0, _ := ret[0].([]db.Person)
|
||||
@ -675,8 +824,23 @@ func (mr *MockStoreMockRecorder) ListReturnsLogs(arg0, arg1 any) *gomock.Call {
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListReturnsLogs", reflect.TypeOf((*MockStore)(nil).ListReturnsLogs), arg0, arg1)
|
||||
}
|
||||
|
||||
// ListReturnsLogsByPersonID mocks base method.
|
||||
func (m *MockStore) ListReturnsLogsByPersonID(arg0 context.Context, arg1 uint64) ([]db.ReturnsLog, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ListReturnsLogsByPersonID", arg0, arg1)
|
||||
ret0, _ := ret[0].([]db.ReturnsLog)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// ListReturnsLogsByPersonID indicates an expected call of ListReturnsLogsByPersonID.
|
||||
func (mr *MockStoreMockRecorder) ListReturnsLogsByPersonID(arg0, arg1 any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListReturnsLogsByPersonID", reflect.TypeOf((*MockStore)(nil).ListReturnsLogsByPersonID), arg0, arg1)
|
||||
}
|
||||
|
||||
// ListSessions mocks base method.
|
||||
func (m *MockStore) ListSessions(arg0 context.Context, arg1 string) ([]db.Session, error) {
|
||||
func (m *MockStore) ListSessions(arg0 context.Context, arg1 uint64) ([]db.Session, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ListSessions", arg0, arg1)
|
||||
ret0, _ := ret[0].([]db.Session)
|
||||
|
@ -80,8 +80,4 @@ RETURNING *;
|
||||
|
||||
-- name: DeleteAccount :exec
|
||||
DELETE FROM accounts
|
||||
WHERE "id" = $1;
|
||||
|
||||
-- name: ListSessions :many
|
||||
SELECT * FROM sessions
|
||||
WHERE email = sqlc.arg(email) AND is_blocked = false AND expires_at > now();
|
||||
WHERE "id" = $1;
|
@ -2,17 +2,52 @@
|
||||
SELECT * FROM documents
|
||||
WHERE "id" = $1 LIMIT 1;
|
||||
|
||||
-- name: GetDocumentByHash :many
|
||||
SELECT d."id" FROM documents d
|
||||
INNER JOIN persons p
|
||||
ON d."person_id" = p."id"
|
||||
WHERE p."account_id" = sqlc.arg(account_id) AND
|
||||
d."hash" = sqlc.arg(hash);
|
||||
|
||||
-- name: GetDocumentByIDWithAccountID :one
|
||||
SELECT d.* FROM documents d
|
||||
INNER JOIN persons p
|
||||
ON d."person_id" = p."id"
|
||||
WHERE d."id" = sqlc.arg(id) AND p."account_id" = sqlc.arg(account_id);
|
||||
|
||||
-- name: CreateDocument :one
|
||||
INSERT INTO documents (
|
||||
"person_id",
|
||||
"name",
|
||||
"type",
|
||||
"path",
|
||||
"hash",
|
||||
"creator",
|
||||
"changer",
|
||||
"mail_id"
|
||||
) VALUES (
|
||||
sqlc.narg(person_id),
|
||||
sqlc.arg(name),
|
||||
sqlc.arg(type),
|
||||
sqlc.arg(path),
|
||||
sqlc.arg(hash),
|
||||
sqlc.arg(creator),
|
||||
sqlc.arg(creator),
|
||||
sqlc.narg(mail_id)
|
||||
) RETURNING *;
|
||||
|
||||
-- name: CreateDocumentUpload :one
|
||||
INSERT INTO documents (
|
||||
"person_id",
|
||||
"name",
|
||||
"type",
|
||||
"path",
|
||||
"url",
|
||||
"hash",
|
||||
"creator",
|
||||
"changer"
|
||||
"changer",
|
||||
"mail_id"
|
||||
) VALUES (
|
||||
$1, $2, $3, $4, $5, $6, $7
|
||||
$1, $2, $3, $4, $5, $6, $7, NULL
|
||||
) RETURNING *;
|
||||
|
||||
-- name: CreateDocumentMail :one
|
||||
@ -21,11 +56,12 @@ INSERT INTO documents (
|
||||
"name",
|
||||
"type",
|
||||
"path",
|
||||
"url",
|
||||
"hash",
|
||||
"creator",
|
||||
"changer"
|
||||
"changer",
|
||||
"person_id"
|
||||
) VALUES (
|
||||
$1, $2, $3, $4, $5, $6, $7
|
||||
$1, $2, $3, $4, $5, $6, $7, NULL
|
||||
) RETURNING *;
|
||||
|
||||
-- name: ListDocuments :many
|
||||
@ -37,11 +73,10 @@ OFFSET $2;
|
||||
-- name: UpdateDocument :one
|
||||
UPDATE documents
|
||||
SET
|
||||
"person_id" = COALESCE(sqlc.narg(person_id), "person_id"),
|
||||
"name" = COALESCE(sqlc.narg(name), "name"),
|
||||
"type" = COALESCE(sqlc.narg(type), "type"),
|
||||
"path" = COALESCE(sqlc.narg(path), "path"),
|
||||
"url" = COALESCE(sqlc.narg(url), "url"),
|
||||
"hash" = COALESCE(sqlc.narg(hash), "hash"),
|
||||
changer = $2,
|
||||
changed = now()
|
||||
WHERE "id" = $1
|
||||
@ -71,4 +106,8 @@ RETURNING *;
|
||||
|
||||
-- name: DeleteDocument :exec
|
||||
DELETE FROM documents
|
||||
WHERE "id" = $1;
|
||||
WHERE "id" = $1;
|
||||
|
||||
-- name: DeleteDocumentsByPersonID :exec
|
||||
DELETE FROM "documents"
|
||||
WHERE "person_id" = sqlc.arg(person_id);
|
@ -21,14 +21,12 @@ INSERT INTO payments (
|
||||
|
||||
-- name: ListPayments :many
|
||||
SELECT * FROM payments
|
||||
ORDER BY "payment_category"
|
||||
LIMIT $1
|
||||
OFFSET $2;
|
||||
WHERE "account_id" = sqlc.arg(account_id)
|
||||
ORDER BY "payment_category";
|
||||
|
||||
-- name: UpdatePayment :one
|
||||
UPDATE payments
|
||||
SET
|
||||
"account_id" = COALESCE(sqlc.narg(account_id), "account_id"),
|
||||
"payment_category" = COALESCE(sqlc.narg(payment_category), "payment_category"),
|
||||
"bankname" = COALESCE(sqlc.narg(bankname), "bankname"),
|
||||
"IBAN" = COALESCE(sqlc.narg(IBAN), "IBAN"),
|
||||
@ -37,9 +35,9 @@ SET
|
||||
"paypal_id" = COALESCE(sqlc.narg(paypal_id), "paypal_id"),
|
||||
"payment_system" = COALESCE(sqlc.narg(payment_system), "payment_system"),
|
||||
"type" = COALESCE(sqlc.narg(type), "type"),
|
||||
"changer" = $2,
|
||||
"changer" = sqlc.arg(changer),
|
||||
"changed" = now()
|
||||
WHERE "id" = $1
|
||||
WHERE "id" = sqlc.arg(id)
|
||||
RETURNING *;
|
||||
|
||||
-- name: DeletePayment :exec
|
||||
|
@ -20,14 +20,12 @@ INSERT INTO persons (
|
||||
|
||||
-- name: ListPersons :many
|
||||
SELECT * FROM persons
|
||||
ORDER BY "lastname", "firstname"
|
||||
LIMIT $1
|
||||
OFFSET $2;
|
||||
WHERE "account_id" = sqlc.arg(account_id)
|
||||
ORDER BY "lastname", "firstname";
|
||||
|
||||
-- name: UpdatePerson :one
|
||||
UPDATE persons
|
||||
SET
|
||||
"account_id" = COALESCE(sqlc.narg(account_id), "account_id"),
|
||||
"firstname" = COALESCE(sqlc.narg(firstname), "firstname"),
|
||||
"lastname" = COALESCE(sqlc.narg(lastname), "lastname"),
|
||||
"birthday" = COALESCE(sqlc.narg(birthday), "birthday"),
|
||||
@ -42,7 +40,7 @@ RETURNING *;
|
||||
|
||||
-- name: DeletePerson :exec
|
||||
DELETE FROM persons
|
||||
WHERE "id" = $1;
|
||||
WHERE "id" = sqlc.arg(id);
|
||||
|
||||
-- name: GetReturns :many
|
||||
SELECT * FROM returns
|
||||
|
@ -34,8 +34,6 @@ OFFSET $2;
|
||||
-- name: UpdateReturn :one
|
||||
UPDATE returns
|
||||
SET
|
||||
"person_id" = COALESCE(sqlc.narg(person_id), "person_id"),
|
||||
"provider_id" = COALESCE(sqlc.narg(provider_id), "provider_id"),
|
||||
"name" = COALESCE(sqlc.narg(name), "name"),
|
||||
"description" = COALESCE(sqlc.narg(description), "description"),
|
||||
"category" = COALESCE(sqlc.narg(category), "category"),
|
||||
@ -72,4 +70,12 @@ SELECT
|
||||
sqlc.arg(creator),
|
||||
sqlc.arg(creator),
|
||||
sqlc.arg(person_id)
|
||||
FROM providers;
|
||||
FROM providers;
|
||||
|
||||
-- name: GetReturnIDsByPersonID :many
|
||||
SELECT "id" FROM "returns"
|
||||
WHERE "person_id" = sqlc.arg(person_id);
|
||||
|
||||
-- name: DeleteReturnsByPersonID :exec
|
||||
DELETE FROM "returns"
|
||||
WHERE "person_id" = sqlc.arg(person_id);
|
@ -23,11 +23,25 @@ ORDER BY "status"
|
||||
LIMIT $1
|
||||
OFFSET $2;
|
||||
|
||||
-- name: ListReturnsLogsByPersonID :many
|
||||
SELECT * FROM "returnsLog"
|
||||
WHERE "return_id" IN (
|
||||
SELECT "id"
|
||||
FROM "returns"
|
||||
WHERE "person_id" = sqlc.arg(person_id)
|
||||
);
|
||||
|
||||
-- name: DeleteReturnsLogsByPersonID :exec
|
||||
DELETE FROM "returnsLog"
|
||||
WHERE "return_id" IN (
|
||||
SELECT "id"
|
||||
FROM "returns"
|
||||
WHERE "person_id" = sqlc.arg(person_id)
|
||||
);
|
||||
|
||||
-- name: UpdateReturnsLog :one
|
||||
UPDATE "returnsLog"
|
||||
SET
|
||||
"return_id" = COALESCE(sqlc.narg(return_id), "return_id"),
|
||||
"mail_id" = COALESCE(sqlc.narg(mail_id), "mail_id"),
|
||||
"status" = COALESCE(sqlc.narg(status), "status"),
|
||||
"changer" = $1,
|
||||
"changed" = now()
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- name: CreateSession :one
|
||||
INSERT INTO sessions (
|
||||
id,
|
||||
email,
|
||||
account_id,
|
||||
refresh_token,
|
||||
user_agent,
|
||||
client_ip,
|
||||
@ -19,4 +19,9 @@ WHERE id = $1 LIMIT 1;
|
||||
UPDATE sessions
|
||||
SET
|
||||
"is_blocked" = true
|
||||
WHERE "id" = sqlc.arg(id);
|
||||
WHERE "id" = sqlc.arg(id);
|
||||
|
||||
|
||||
-- name: ListSessions :many
|
||||
SELECT * FROM sessions
|
||||
WHERE account_id = sqlc.arg(account_id) AND is_blocked = false AND expires_at > now();
|
@ -106,7 +106,7 @@ DELETE FROM accounts
|
||||
WHERE "id" = $1
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteAccount(ctx context.Context, id int64) error {
|
||||
func (q *Queries) DeleteAccount(ctx context.Context, id uint64) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteAccount, id)
|
||||
return err
|
||||
}
|
||||
@ -116,7 +116,7 @@ SELECT id, permission_level, passwordhash, firstname, lastname, birthday, privac
|
||||
WHERE "id" = $1 LIMIT 1
|
||||
`
|
||||
|
||||
func (q *Queries) GetAccount(ctx context.Context, id int64) (Account, error) {
|
||||
func (q *Queries) GetAccount(ctx context.Context, id uint64) (Account, error) {
|
||||
row := q.db.QueryRowContext(ctx, getAccount, id)
|
||||
var i Account
|
||||
err := row.Scan(
|
||||
@ -179,7 +179,7 @@ WHERE "id" = $1 LIMIT 1
|
||||
FOR NO KEY UPDATE
|
||||
`
|
||||
|
||||
func (q *Queries) GetAccountForUpdate(ctx context.Context, id int64) (Account, error) {
|
||||
func (q *Queries) GetAccountForUpdate(ctx context.Context, id uint64) (Account, error) {
|
||||
row := q.db.QueryRowContext(ctx, getAccountForUpdate, id)
|
||||
var i Account
|
||||
err := row.Scan(
|
||||
@ -259,43 +259,6 @@ func (q *Queries) ListAccounts(ctx context.Context, arg ListAccountsParams) ([]A
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listSessions = `-- name: ListSessions :many
|
||||
SELECT id, email, user_agent, client_ip, refresh_token, is_blocked, expires_at, created_at FROM sessions
|
||||
WHERE email = $1 AND is_blocked = false AND expires_at > now()
|
||||
`
|
||||
|
||||
func (q *Queries) ListSessions(ctx context.Context, email string) ([]Session, error) {
|
||||
rows, err := q.db.QueryContext(ctx, listSessions, email)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
items := []Session{}
|
||||
for rows.Next() {
|
||||
var i Session
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.Email,
|
||||
&i.UserAgent,
|
||||
&i.ClientIp,
|
||||
&i.RefreshToken,
|
||||
&i.IsBlocked,
|
||||
&i.ExpiresAt,
|
||||
&i.CreatedAt,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const updateAccount = `-- name: UpdateAccount :one
|
||||
UPDATE accounts
|
||||
SET
|
||||
@ -316,7 +279,7 @@ RETURNING id, permission_level, passwordhash, firstname, lastname, birthday, pri
|
||||
`
|
||||
|
||||
type UpdateAccountParams struct {
|
||||
ID int64 `json:"id"`
|
||||
ID uint64 `json:"id"`
|
||||
Changer string `json:"changer"`
|
||||
Passwordhash sql.NullString `json:"passwordhash"`
|
||||
Firstname sql.NullString `json:"firstname"`
|
||||
@ -384,7 +347,7 @@ type UpdateAccountPrivacyParams struct {
|
||||
PrivacyAccepted sql.NullBool `json:"privacy_accepted"`
|
||||
PrivacyAcceptedDate sql.NullTime `json:"privacy_accepted_date"`
|
||||
Changer string `json:"changer"`
|
||||
ID int64 `json:"id"`
|
||||
ID uint64 `json:"id"`
|
||||
}
|
||||
|
||||
func (q *Queries) UpdateAccountPrivacy(ctx context.Context, arg UpdateAccountPrivacyParams) (Account, error) {
|
||||
|
@ -10,18 +10,81 @@ import (
|
||||
"database/sql"
|
||||
)
|
||||
|
||||
const createDocument = `-- name: CreateDocument :one
|
||||
INSERT INTO documents (
|
||||
"person_id",
|
||||
"name",
|
||||
"type",
|
||||
"path",
|
||||
"hash",
|
||||
"creator",
|
||||
"changer",
|
||||
"mail_id"
|
||||
) VALUES (
|
||||
$1,
|
||||
$2,
|
||||
$3,
|
||||
$4,
|
||||
$5,
|
||||
$6,
|
||||
$6,
|
||||
$7
|
||||
) RETURNING id, person_id, name, type, path, hash, valid, valid_date, validated_by, mail_id, creator, created, changer, changed
|
||||
`
|
||||
|
||||
type CreateDocumentParams struct {
|
||||
PersonID sql.NullInt64 `json:"person_id"`
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Path string `json:"path"`
|
||||
Hash string `json:"hash"`
|
||||
Creator string `json:"creator"`
|
||||
MailID sql.NullInt64 `json:"mail_id"`
|
||||
}
|
||||
|
||||
func (q *Queries) CreateDocument(ctx context.Context, arg CreateDocumentParams) (Document, error) {
|
||||
row := q.db.QueryRowContext(ctx, createDocument,
|
||||
arg.PersonID,
|
||||
arg.Name,
|
||||
arg.Type,
|
||||
arg.Path,
|
||||
arg.Hash,
|
||||
arg.Creator,
|
||||
arg.MailID,
|
||||
)
|
||||
var i Document
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.PersonID,
|
||||
&i.Name,
|
||||
&i.Type,
|
||||
&i.Path,
|
||||
&i.Hash,
|
||||
&i.Valid,
|
||||
&i.ValidDate,
|
||||
&i.ValidatedBy,
|
||||
&i.MailID,
|
||||
&i.Creator,
|
||||
&i.Created,
|
||||
&i.Changer,
|
||||
&i.Changed,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const createDocumentMail = `-- name: CreateDocumentMail :one
|
||||
INSERT INTO documents (
|
||||
"mail_id",
|
||||
"name",
|
||||
"type",
|
||||
"path",
|
||||
"url",
|
||||
"hash",
|
||||
"creator",
|
||||
"changer"
|
||||
"changer",
|
||||
"person_id"
|
||||
) VALUES (
|
||||
$1, $2, $3, $4, $5, $6, $7
|
||||
) RETURNING id, person_id, name, type, path, url, valid, valid_date, validated_by, mail_id, creator, created, changer, changed
|
||||
$1, $2, $3, $4, $5, $6, $7, NULL
|
||||
) RETURNING id, person_id, name, type, path, hash, valid, valid_date, validated_by, mail_id, creator, created, changer, changed
|
||||
`
|
||||
|
||||
type CreateDocumentMailParams struct {
|
||||
@ -29,7 +92,7 @@ type CreateDocumentMailParams struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Path string `json:"path"`
|
||||
Url string `json:"url"`
|
||||
Hash string `json:"hash"`
|
||||
Creator string `json:"creator"`
|
||||
Changer string `json:"changer"`
|
||||
}
|
||||
@ -40,7 +103,7 @@ func (q *Queries) CreateDocumentMail(ctx context.Context, arg CreateDocumentMail
|
||||
arg.Name,
|
||||
arg.Type,
|
||||
arg.Path,
|
||||
arg.Url,
|
||||
arg.Hash,
|
||||
arg.Creator,
|
||||
arg.Changer,
|
||||
)
|
||||
@ -51,7 +114,7 @@ func (q *Queries) CreateDocumentMail(ctx context.Context, arg CreateDocumentMail
|
||||
&i.Name,
|
||||
&i.Type,
|
||||
&i.Path,
|
||||
&i.Url,
|
||||
&i.Hash,
|
||||
&i.Valid,
|
||||
&i.ValidDate,
|
||||
&i.ValidatedBy,
|
||||
@ -70,12 +133,13 @@ INSERT INTO documents (
|
||||
"name",
|
||||
"type",
|
||||
"path",
|
||||
"url",
|
||||
"hash",
|
||||
"creator",
|
||||
"changer"
|
||||
"changer",
|
||||
"mail_id"
|
||||
) VALUES (
|
||||
$1, $2, $3, $4, $5, $6, $7
|
||||
) RETURNING id, person_id, name, type, path, url, valid, valid_date, validated_by, mail_id, creator, created, changer, changed
|
||||
$1, $2, $3, $4, $5, $6, $7, NULL
|
||||
) RETURNING id, person_id, name, type, path, hash, valid, valid_date, validated_by, mail_id, creator, created, changer, changed
|
||||
`
|
||||
|
||||
type CreateDocumentUploadParams struct {
|
||||
@ -83,7 +147,7 @@ type CreateDocumentUploadParams struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Path string `json:"path"`
|
||||
Url string `json:"url"`
|
||||
Hash string `json:"hash"`
|
||||
Creator string `json:"creator"`
|
||||
Changer string `json:"changer"`
|
||||
}
|
||||
@ -94,7 +158,7 @@ func (q *Queries) CreateDocumentUpload(ctx context.Context, arg CreateDocumentUp
|
||||
arg.Name,
|
||||
arg.Type,
|
||||
arg.Path,
|
||||
arg.Url,
|
||||
arg.Hash,
|
||||
arg.Creator,
|
||||
arg.Changer,
|
||||
)
|
||||
@ -105,7 +169,7 @@ func (q *Queries) CreateDocumentUpload(ctx context.Context, arg CreateDocumentUp
|
||||
&i.Name,
|
||||
&i.Type,
|
||||
&i.Path,
|
||||
&i.Url,
|
||||
&i.Hash,
|
||||
&i.Valid,
|
||||
&i.ValidDate,
|
||||
&i.ValidatedBy,
|
||||
@ -123,17 +187,27 @@ DELETE FROM documents
|
||||
WHERE "id" = $1
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteDocument(ctx context.Context, id int64) error {
|
||||
func (q *Queries) DeleteDocument(ctx context.Context, id uint64) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteDocument, id)
|
||||
return err
|
||||
}
|
||||
|
||||
const deleteDocumentsByPersonID = `-- name: DeleteDocumentsByPersonID :exec
|
||||
DELETE FROM "documents"
|
||||
WHERE "person_id" = $1
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteDocumentsByPersonID(ctx context.Context, personID sql.NullInt64) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteDocumentsByPersonID, personID)
|
||||
return err
|
||||
}
|
||||
|
||||
const getDocument = `-- name: GetDocument :one
|
||||
SELECT id, person_id, name, type, path, url, valid, valid_date, validated_by, mail_id, creator, created, changer, changed FROM documents
|
||||
SELECT id, person_id, name, type, path, hash, valid, valid_date, validated_by, mail_id, creator, created, changer, changed FROM documents
|
||||
WHERE "id" = $1 LIMIT 1
|
||||
`
|
||||
|
||||
func (q *Queries) GetDocument(ctx context.Context, id int64) (Document, error) {
|
||||
func (q *Queries) GetDocument(ctx context.Context, id uint64) (Document, error) {
|
||||
row := q.db.QueryRowContext(ctx, getDocument, id)
|
||||
var i Document
|
||||
err := row.Scan(
|
||||
@ -142,7 +216,77 @@ func (q *Queries) GetDocument(ctx context.Context, id int64) (Document, error) {
|
||||
&i.Name,
|
||||
&i.Type,
|
||||
&i.Path,
|
||||
&i.Url,
|
||||
&i.Hash,
|
||||
&i.Valid,
|
||||
&i.ValidDate,
|
||||
&i.ValidatedBy,
|
||||
&i.MailID,
|
||||
&i.Creator,
|
||||
&i.Created,
|
||||
&i.Changer,
|
||||
&i.Changed,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const getDocumentByHash = `-- name: GetDocumentByHash :many
|
||||
SELECT d."id" FROM documents d
|
||||
INNER JOIN persons p
|
||||
ON d."person_id" = p."id"
|
||||
WHERE p."account_id" = $1 AND
|
||||
d."hash" = $2
|
||||
`
|
||||
|
||||
type GetDocumentByHashParams struct {
|
||||
AccountID uint64 `json:"account_id"`
|
||||
Hash string `json:"hash"`
|
||||
}
|
||||
|
||||
func (q *Queries) GetDocumentByHash(ctx context.Context, arg GetDocumentByHashParams) ([]uint64, error) {
|
||||
rows, err := q.db.QueryContext(ctx, getDocumentByHash, arg.AccountID, arg.Hash)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
items := []uint64{}
|
||||
for rows.Next() {
|
||||
var id uint64
|
||||
if err := rows.Scan(&id); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, id)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const getDocumentByIDWithAccountID = `-- name: GetDocumentByIDWithAccountID :one
|
||||
SELECT d.id, d.person_id, d.name, d.type, d.path, d.hash, d.valid, d.valid_date, d.validated_by, d.mail_id, d.creator, d.created, d.changer, d.changed FROM documents d
|
||||
INNER JOIN persons p
|
||||
ON d."person_id" = p."id"
|
||||
WHERE d."id" = $1 AND p."account_id" = $2
|
||||
`
|
||||
|
||||
type GetDocumentByIDWithAccountIDParams struct {
|
||||
ID uint64 `json:"id"`
|
||||
AccountID uint64 `json:"account_id"`
|
||||
}
|
||||
|
||||
func (q *Queries) GetDocumentByIDWithAccountID(ctx context.Context, arg GetDocumentByIDWithAccountIDParams) (Document, error) {
|
||||
row := q.db.QueryRowContext(ctx, getDocumentByIDWithAccountID, arg.ID, arg.AccountID)
|
||||
var i Document
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.PersonID,
|
||||
&i.Name,
|
||||
&i.Type,
|
||||
&i.Path,
|
||||
&i.Hash,
|
||||
&i.Valid,
|
||||
&i.ValidDate,
|
||||
&i.ValidatedBy,
|
||||
@ -164,11 +308,11 @@ SET
|
||||
"changer" = $2,
|
||||
"changed" = now()
|
||||
WHERE "id" = $1
|
||||
RETURNING id, person_id, name, type, path, url, valid, valid_date, validated_by, mail_id, creator, created, changer, changed
|
||||
RETURNING id, person_id, name, type, path, hash, valid, valid_date, validated_by, mail_id, creator, created, changer, changed
|
||||
`
|
||||
|
||||
type InvalidateDocumentParams struct {
|
||||
ID int64 `json:"id"`
|
||||
ID uint64 `json:"id"`
|
||||
Changer string `json:"changer"`
|
||||
}
|
||||
|
||||
@ -181,7 +325,7 @@ func (q *Queries) InvalidateDocument(ctx context.Context, arg InvalidateDocument
|
||||
&i.Name,
|
||||
&i.Type,
|
||||
&i.Path,
|
||||
&i.Url,
|
||||
&i.Hash,
|
||||
&i.Valid,
|
||||
&i.ValidDate,
|
||||
&i.ValidatedBy,
|
||||
@ -195,7 +339,7 @@ func (q *Queries) InvalidateDocument(ctx context.Context, arg InvalidateDocument
|
||||
}
|
||||
|
||||
const listDocuments = `-- name: ListDocuments :many
|
||||
SELECT id, person_id, name, type, path, url, valid, valid_date, validated_by, mail_id, creator, created, changer, changed FROM documents
|
||||
SELECT id, person_id, name, type, path, hash, valid, valid_date, validated_by, mail_id, creator, created, changer, changed FROM documents
|
||||
ORDER BY "valid", "type", "name"
|
||||
LIMIT $1
|
||||
OFFSET $2
|
||||
@ -221,7 +365,7 @@ func (q *Queries) ListDocuments(ctx context.Context, arg ListDocumentsParams) ([
|
||||
&i.Name,
|
||||
&i.Type,
|
||||
&i.Path,
|
||||
&i.Url,
|
||||
&i.Hash,
|
||||
&i.Valid,
|
||||
&i.ValidDate,
|
||||
&i.ValidatedBy,
|
||||
@ -247,36 +391,33 @@ func (q *Queries) ListDocuments(ctx context.Context, arg ListDocumentsParams) ([
|
||||
const updateDocument = `-- name: UpdateDocument :one
|
||||
UPDATE documents
|
||||
SET
|
||||
"person_id" = COALESCE($3, "person_id"),
|
||||
"name" = COALESCE($4, "name"),
|
||||
"type" = COALESCE($5, "type"),
|
||||
"path" = COALESCE($6, "path"),
|
||||
"url" = COALESCE($7, "url"),
|
||||
"name" = COALESCE($3, "name"),
|
||||
"type" = COALESCE($4, "type"),
|
||||
"path" = COALESCE($5, "path"),
|
||||
"hash" = COALESCE($6, "hash"),
|
||||
changer = $2,
|
||||
changed = now()
|
||||
WHERE "id" = $1
|
||||
RETURNING id, person_id, name, type, path, url, valid, valid_date, validated_by, mail_id, creator, created, changer, changed
|
||||
RETURNING id, person_id, name, type, path, hash, valid, valid_date, validated_by, mail_id, creator, created, changer, changed
|
||||
`
|
||||
|
||||
type UpdateDocumentParams struct {
|
||||
ID int64 `json:"id"`
|
||||
Changer string `json:"changer"`
|
||||
PersonID sql.NullInt64 `json:"person_id"`
|
||||
Name sql.NullString `json:"name"`
|
||||
Type sql.NullString `json:"type"`
|
||||
Path sql.NullString `json:"path"`
|
||||
Url sql.NullString `json:"url"`
|
||||
ID uint64 `json:"id"`
|
||||
Changer string `json:"changer"`
|
||||
Name sql.NullString `json:"name"`
|
||||
Type sql.NullString `json:"type"`
|
||||
Path sql.NullString `json:"path"`
|
||||
Hash sql.NullString `json:"hash"`
|
||||
}
|
||||
|
||||
func (q *Queries) UpdateDocument(ctx context.Context, arg UpdateDocumentParams) (Document, error) {
|
||||
row := q.db.QueryRowContext(ctx, updateDocument,
|
||||
arg.ID,
|
||||
arg.Changer,
|
||||
arg.PersonID,
|
||||
arg.Name,
|
||||
arg.Type,
|
||||
arg.Path,
|
||||
arg.Url,
|
||||
arg.Hash,
|
||||
)
|
||||
var i Document
|
||||
err := row.Scan(
|
||||
@ -285,7 +426,7 @@ func (q *Queries) UpdateDocument(ctx context.Context, arg UpdateDocumentParams)
|
||||
&i.Name,
|
||||
&i.Type,
|
||||
&i.Path,
|
||||
&i.Url,
|
||||
&i.Hash,
|
||||
&i.Valid,
|
||||
&i.ValidDate,
|
||||
&i.ValidatedBy,
|
||||
@ -307,11 +448,11 @@ SET
|
||||
"changer" = $2,
|
||||
"changed" = now()
|
||||
WHERE "id" = $1
|
||||
RETURNING id, person_id, name, type, path, url, valid, valid_date, validated_by, mail_id, creator, created, changer, changed
|
||||
RETURNING id, person_id, name, type, path, hash, valid, valid_date, validated_by, mail_id, creator, created, changer, changed
|
||||
`
|
||||
|
||||
type ValidateDocumentParams struct {
|
||||
ID int64 `json:"id"`
|
||||
ID uint64 `json:"id"`
|
||||
ValidatedBy sql.NullString `json:"validated_by"`
|
||||
}
|
||||
|
||||
@ -324,7 +465,7 @@ func (q *Queries) ValidateDocument(ctx context.Context, arg ValidateDocumentPara
|
||||
&i.Name,
|
||||
&i.Type,
|
||||
&i.Path,
|
||||
&i.Url,
|
||||
&i.Hash,
|
||||
&i.Valid,
|
||||
&i.ValidDate,
|
||||
&i.ValidatedBy,
|
||||
|
@ -19,12 +19,12 @@ func createRandomDocumentUpload(t *testing.T) Document {
|
||||
arg := CreateDocumentUploadParams{
|
||||
PersonID: sql.NullInt64{
|
||||
Valid: true,
|
||||
Int64: person.ID,
|
||||
Int64: int64(person.ID),
|
||||
},
|
||||
Name: util.RandomString(20),
|
||||
Type: util.RandomString(5),
|
||||
Path: util.RandomString(50),
|
||||
Url: util.RandomString(60),
|
||||
Hash: util.RandomString(60),
|
||||
Creator: creator,
|
||||
Changer: creator,
|
||||
}
|
||||
@ -37,7 +37,7 @@ func createRandomDocumentUpload(t *testing.T) Document {
|
||||
require.Equal(t, arg.Name, document.Name)
|
||||
require.Equal(t, arg.Type, document.Type)
|
||||
require.Equal(t, arg.Path, document.Path)
|
||||
require.Equal(t, arg.Url, document.Url)
|
||||
require.Equal(t, arg.Hash, document.Hash)
|
||||
require.Equal(t, arg.Creator, document.Creator)
|
||||
require.Equal(t, arg.Changer, document.Changer)
|
||||
require.Equal(t, document.Valid, false)
|
||||
@ -57,12 +57,12 @@ func TestCreateDocumentMail(t *testing.T) {
|
||||
arg := CreateDocumentMailParams{
|
||||
MailID: sql.NullInt64{
|
||||
Valid: true,
|
||||
Int64: mail.ID,
|
||||
Int64: int64(mail.ID),
|
||||
},
|
||||
Name: util.RandomString(20),
|
||||
Type: util.RandomString(5),
|
||||
Path: util.RandomString(50),
|
||||
Url: util.RandomString(60),
|
||||
Hash: util.RandomString(60),
|
||||
Creator: util.RandomName(),
|
||||
Changer: util.RandomName(),
|
||||
}
|
||||
@ -75,7 +75,7 @@ func TestCreateDocumentMail(t *testing.T) {
|
||||
require.Equal(t, arg.Name, document.Name)
|
||||
require.Equal(t, arg.Type, document.Type)
|
||||
require.Equal(t, arg.Path, document.Path)
|
||||
require.Equal(t, arg.Url, document.Url)
|
||||
require.Equal(t, arg.Hash, document.Hash)
|
||||
require.Equal(t, arg.Creator, document.Creator)
|
||||
require.Equal(t, arg.Changer, document.Changer)
|
||||
require.Equal(t, document.Valid, false)
|
||||
@ -102,7 +102,7 @@ func TestGetDocument(t *testing.T) {
|
||||
require.Equal(t, newdocument.ID, document.ID)
|
||||
require.Equal(t, newdocument.PersonID, document.PersonID)
|
||||
require.Equal(t, newdocument.Type, document.Type)
|
||||
require.Equal(t, newdocument.Url, document.Url)
|
||||
require.Equal(t, newdocument.Hash, document.Hash)
|
||||
require.Equal(t, newdocument.Path, document.Path)
|
||||
require.Equal(t, newdocument.Valid, document.Valid)
|
||||
require.Equal(t, newdocument.ValidDate, document.ValidDate)
|
||||
|
@ -89,7 +89,7 @@ WHERE "id" = $1
|
||||
//
|
||||
// WHERE "id" = $1
|
||||
// RETURNING *;
|
||||
func (q *Queries) DeleteMail(ctx context.Context, id int64) error {
|
||||
func (q *Queries) DeleteMail(ctx context.Context, id uint64) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteMail, id)
|
||||
return err
|
||||
}
|
||||
@ -99,7 +99,7 @@ SELECT id, "from", "to", cc, timestamp, subject, body, creator, created, changer
|
||||
WHERE "id" = $1 LIMIT 1
|
||||
`
|
||||
|
||||
func (q *Queries) GetMail(ctx context.Context, id int64) (Mail, error) {
|
||||
func (q *Queries) GetMail(ctx context.Context, id uint64) (Mail, error) {
|
||||
row := q.db.QueryRowContext(ctx, getMail, id)
|
||||
var i Mail
|
||||
err := row.Scan(
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
type Account struct {
|
||||
ID int64 `json:"id"`
|
||||
ID uint64 `json:"id"`
|
||||
PermissionLevel int32 `json:"permission_level"`
|
||||
Passwordhash string `json:"passwordhash"`
|
||||
Firstname string `json:"firstname"`
|
||||
@ -33,12 +33,12 @@ type Account struct {
|
||||
}
|
||||
|
||||
type Document struct {
|
||||
ID int64 `json:"id"`
|
||||
ID uint64 `json:"id"`
|
||||
PersonID sql.NullInt64 `json:"person_id"`
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Path string `json:"path"`
|
||||
Url string `json:"url"`
|
||||
Hash string `json:"hash"`
|
||||
Valid bool `json:"valid"`
|
||||
ValidDate sql.NullTime `json:"valid_date"`
|
||||
ValidatedBy sql.NullString `json:"validated_by"`
|
||||
@ -50,7 +50,7 @@ type Document struct {
|
||||
}
|
||||
|
||||
type Mail struct {
|
||||
ID int64 `json:"id"`
|
||||
ID uint64 `json:"id"`
|
||||
From string `json:"from"`
|
||||
To []string `json:"to"`
|
||||
Cc []string `json:"cc"`
|
||||
@ -64,8 +64,8 @@ type Mail struct {
|
||||
}
|
||||
|
||||
type Payment struct {
|
||||
ID int64 `json:"id"`
|
||||
AccountID int64 `json:"account_id"`
|
||||
ID uint64 `json:"id"`
|
||||
AccountID uint64 `json:"account_id"`
|
||||
PaymentCategory string `json:"payment_category"`
|
||||
Bankname sql.NullString `json:"bankname"`
|
||||
IBAN sql.NullString `json:"IBAN"`
|
||||
@ -81,8 +81,8 @@ type Payment struct {
|
||||
}
|
||||
|
||||
type Person struct {
|
||||
ID int64 `json:"id"`
|
||||
AccountID int64 `json:"account_id"`
|
||||
ID uint64 `json:"id"`
|
||||
AccountID uint64 `json:"account_id"`
|
||||
Firstname string `json:"firstname"`
|
||||
Lastname string `json:"lastname"`
|
||||
Birthday time.Time `json:"birthday"`
|
||||
@ -97,7 +97,7 @@ type Person struct {
|
||||
}
|
||||
|
||||
type Provider struct {
|
||||
ID int64 `json:"id"`
|
||||
ID uint64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Category string `json:"category"`
|
||||
@ -109,9 +109,9 @@ type Provider struct {
|
||||
}
|
||||
|
||||
type Return struct {
|
||||
ID int64 `json:"id"`
|
||||
PersonID int64 `json:"person_id"`
|
||||
ProviderID int64 `json:"provider_id"`
|
||||
ID uint64 `json:"id"`
|
||||
PersonID uint64 `json:"person_id"`
|
||||
ProviderID uint64 `json:"provider_id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Category string `json:"category"`
|
||||
@ -124,19 +124,19 @@ type Return struct {
|
||||
}
|
||||
|
||||
type ReturnsLog struct {
|
||||
ID int64 `json:"id"`
|
||||
ReturnID int64 `json:"return_id"`
|
||||
MailID int64 `json:"mail_id"`
|
||||
Status sql.NullString `json:"status"`
|
||||
Creator string `json:"creator"`
|
||||
Created time.Time `json:"created"`
|
||||
Changer string `json:"changer"`
|
||||
Changed time.Time `json:"changed"`
|
||||
ID uint64 `json:"id"`
|
||||
ReturnID uint64 `json:"return_id"`
|
||||
MailID uint64 `json:"mail_id"`
|
||||
Status string `json:"status"`
|
||||
Creator string `json:"creator"`
|
||||
Created time.Time `json:"created"`
|
||||
Changer string `json:"changer"`
|
||||
Changed time.Time `json:"changed"`
|
||||
}
|
||||
|
||||
type Session struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
Email string `json:"email"`
|
||||
AccountID uint64 `json:"account_id"`
|
||||
UserAgent string `json:"user_agent"`
|
||||
ClientIp string `json:"client_ip"`
|
||||
RefreshToken string `json:"refresh_token"`
|
||||
|
@ -29,7 +29,7 @@ INSERT INTO payments (
|
||||
`
|
||||
|
||||
type CreatePaymentParams struct {
|
||||
AccountID int64 `json:"account_id"`
|
||||
AccountID uint64 `json:"account_id"`
|
||||
PaymentCategory string `json:"payment_category"`
|
||||
Bankname sql.NullString `json:"bankname"`
|
||||
IBAN sql.NullString `json:"IBAN"`
|
||||
@ -81,7 +81,7 @@ DELETE FROM payments
|
||||
WHERE "id" = $1
|
||||
`
|
||||
|
||||
func (q *Queries) DeletePayment(ctx context.Context, id int64) error {
|
||||
func (q *Queries) DeletePayment(ctx context.Context, id uint64) error {
|
||||
_, err := q.db.ExecContext(ctx, deletePayment, id)
|
||||
return err
|
||||
}
|
||||
@ -91,7 +91,7 @@ SELECT id, account_id, payment_category, bankname, "IBAN", "BIC", paypal_account
|
||||
WHERE "id" = $1 LIMIT 1
|
||||
`
|
||||
|
||||
func (q *Queries) GetPayment(ctx context.Context, id int64) (Payment, error) {
|
||||
func (q *Queries) GetPayment(ctx context.Context, id uint64) (Payment, error) {
|
||||
row := q.db.QueryRowContext(ctx, getPayment, id)
|
||||
var i Payment
|
||||
err := row.Scan(
|
||||
@ -115,18 +115,12 @@ func (q *Queries) GetPayment(ctx context.Context, id int64) (Payment, error) {
|
||||
|
||||
const listPayments = `-- name: ListPayments :many
|
||||
SELECT id, account_id, payment_category, bankname, "IBAN", "BIC", paypal_account, paypal_id, payment_system, type, creator, created, changer, changed FROM payments
|
||||
WHERE "account_id" = $1
|
||||
ORDER BY "payment_category"
|
||||
LIMIT $1
|
||||
OFFSET $2
|
||||
`
|
||||
|
||||
type ListPaymentsParams struct {
|
||||
Limit int32 `json:"limit"`
|
||||
Offset int32 `json:"offset"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListPayments(ctx context.Context, arg ListPaymentsParams) ([]Payment, error) {
|
||||
rows, err := q.db.QueryContext(ctx, listPayments, arg.Limit, arg.Offset)
|
||||
func (q *Queries) ListPayments(ctx context.Context, accountID uint64) ([]Payment, error) {
|
||||
rows, err := q.db.QueryContext(ctx, listPayments, accountID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -166,25 +160,21 @@ func (q *Queries) ListPayments(ctx context.Context, arg ListPaymentsParams) ([]P
|
||||
const updatePayment = `-- name: UpdatePayment :one
|
||||
UPDATE payments
|
||||
SET
|
||||
"account_id" = COALESCE($3, "account_id"),
|
||||
"payment_category" = COALESCE($4, "payment_category"),
|
||||
"bankname" = COALESCE($5, "bankname"),
|
||||
"IBAN" = COALESCE($6, "IBAN"),
|
||||
"BIC" = COALESCE($7, "BIC"),
|
||||
"paypal_account" = COALESCE($8, "paypal_account"),
|
||||
"paypal_id" = COALESCE($9, "paypal_id"),
|
||||
"payment_system" = COALESCE($10, "payment_system"),
|
||||
"type" = COALESCE($11, "type"),
|
||||
"changer" = $2,
|
||||
"payment_category" = COALESCE($1, "payment_category"),
|
||||
"bankname" = COALESCE($2, "bankname"),
|
||||
"IBAN" = COALESCE($3, "IBAN"),
|
||||
"BIC" = COALESCE($4, "BIC"),
|
||||
"paypal_account" = COALESCE($5, "paypal_account"),
|
||||
"paypal_id" = COALESCE($6, "paypal_id"),
|
||||
"payment_system" = COALESCE($7, "payment_system"),
|
||||
"type" = COALESCE($8, "type"),
|
||||
"changer" = $9,
|
||||
"changed" = now()
|
||||
WHERE "id" = $1
|
||||
WHERE "id" = $10
|
||||
RETURNING id, account_id, payment_category, bankname, "IBAN", "BIC", paypal_account, paypal_id, payment_system, type, creator, created, changer, changed
|
||||
`
|
||||
|
||||
type UpdatePaymentParams struct {
|
||||
ID int64 `json:"id"`
|
||||
Changer string `json:"changer"`
|
||||
AccountID sql.NullInt64 `json:"account_id"`
|
||||
PaymentCategory sql.NullString `json:"payment_category"`
|
||||
Bankname sql.NullString `json:"bankname"`
|
||||
Iban sql.NullString `json:"iban"`
|
||||
@ -193,13 +183,12 @@ type UpdatePaymentParams struct {
|
||||
PaypalID sql.NullString `json:"paypal_id"`
|
||||
PaymentSystem sql.NullString `json:"payment_system"`
|
||||
Type sql.NullString `json:"type"`
|
||||
Changer string `json:"changer"`
|
||||
ID uint64 `json:"id"`
|
||||
}
|
||||
|
||||
func (q *Queries) UpdatePayment(ctx context.Context, arg UpdatePaymentParams) (Payment, error) {
|
||||
row := q.db.QueryRowContext(ctx, updatePayment,
|
||||
arg.ID,
|
||||
arg.Changer,
|
||||
arg.AccountID,
|
||||
arg.PaymentCategory,
|
||||
arg.Bankname,
|
||||
arg.Iban,
|
||||
@ -208,6 +197,8 @@ func (q *Queries) UpdatePayment(ctx context.Context, arg UpdatePaymentParams) (P
|
||||
arg.PaypalID,
|
||||
arg.PaymentSystem,
|
||||
arg.Type,
|
||||
arg.Changer,
|
||||
arg.ID,
|
||||
)
|
||||
var i Payment
|
||||
err := row.Scan(
|
||||
|
@ -10,6 +10,27 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestUpdatePayment(t *testing.T) {
|
||||
payment1 := createRandomPayment(t)
|
||||
require.NotEmpty(t, payment1)
|
||||
|
||||
arg := UpdatePaymentParams{
|
||||
ID: payment1.ID,
|
||||
Bankname: sql.NullString{
|
||||
String: util.RandomName(),
|
||||
Valid: true,
|
||||
},
|
||||
}
|
||||
|
||||
payment2, err := testQueries.UpdatePayment(context.Background(), arg)
|
||||
require.NoError(t, err)
|
||||
require.NotEmpty(t, payment2)
|
||||
|
||||
require.Equal(t, payment1.ID, payment2.ID)
|
||||
require.Equal(t, payment1.PaymentCategory, payment2.PaymentCategory)
|
||||
require.NotEqual(t, payment1.Bankname, payment2.Bankname)
|
||||
}
|
||||
|
||||
func createRandomPayment(t *testing.T) Payment {
|
||||
account := createRandomAccount(t)
|
||||
require.NotEmpty(t, account)
|
||||
@ -48,25 +69,25 @@ func createRandomPayment(t *testing.T) Payment {
|
||||
Changer: creator,
|
||||
}
|
||||
|
||||
person, err := testQueries.CreatePayment(context.Background(), arg)
|
||||
payment, err := testQueries.CreatePayment(context.Background(), arg)
|
||||
require.NoError(t, err)
|
||||
require.NotEmpty(t, person)
|
||||
require.NotEmpty(t, payment)
|
||||
|
||||
require.Equal(t, arg.PaymentCategory, person.PaymentCategory)
|
||||
require.Equal(t, arg.Bankname, person.Bankname)
|
||||
require.Equal(t, arg.AccountID, person.AccountID)
|
||||
require.Equal(t, arg.IBAN, person.IBAN)
|
||||
require.Equal(t, arg.BIC, person.BIC)
|
||||
require.Equal(t, arg.PaypalAccount, person.PaypalAccount)
|
||||
require.Equal(t, arg.PaymentSystem, person.PaymentSystem)
|
||||
require.Equal(t, arg.PaypalID, person.PaypalID)
|
||||
require.Equal(t, arg.Creator, person.Creator)
|
||||
require.Equal(t, arg.Type, person.Type)
|
||||
require.Equal(t, arg.PaymentCategory, payment.PaymentCategory)
|
||||
require.Equal(t, arg.Bankname, payment.Bankname)
|
||||
require.Equal(t, arg.AccountID, payment.AccountID)
|
||||
require.Equal(t, arg.IBAN, payment.IBAN)
|
||||
require.Equal(t, arg.BIC, payment.BIC)
|
||||
require.Equal(t, arg.PaypalAccount, payment.PaypalAccount)
|
||||
require.Equal(t, arg.PaymentSystem, payment.PaymentSystem)
|
||||
require.Equal(t, arg.PaypalID, payment.PaypalID)
|
||||
require.Equal(t, arg.Creator, payment.Creator)
|
||||
require.Equal(t, arg.Type, payment.Type)
|
||||
|
||||
require.NotZero(t, person.ID)
|
||||
require.NotZero(t, person.Created)
|
||||
require.NotZero(t, payment.ID)
|
||||
require.NotZero(t, payment.Created)
|
||||
|
||||
return person
|
||||
return payment
|
||||
}
|
||||
|
||||
func TestCreatePayment(t *testing.T) {
|
||||
@ -74,74 +95,34 @@ func TestCreatePayment(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetPayment(t *testing.T) {
|
||||
newperson := createRandomPayment(t)
|
||||
require.NotEmpty(t, newperson)
|
||||
newpayment := createRandomPayment(t)
|
||||
require.NotEmpty(t, newpayment)
|
||||
|
||||
person, err := testQueries.GetPayment(context.Background(), newperson.ID)
|
||||
payment, err := testQueries.GetPayment(context.Background(), newpayment.ID)
|
||||
require.NoError(t, err)
|
||||
require.NotEmpty(t, person)
|
||||
require.NotEmpty(t, payment)
|
||||
|
||||
require.Equal(t, newperson.PaymentCategory, person.PaymentCategory)
|
||||
require.Equal(t, newperson.Bankname, person.Bankname)
|
||||
require.Equal(t, newperson.AccountID, person.AccountID)
|
||||
require.Equal(t, newperson.IBAN, person.IBAN)
|
||||
require.Equal(t, newperson.BIC, person.BIC)
|
||||
require.Equal(t, newperson.PaypalAccount, person.PaypalAccount)
|
||||
require.Equal(t, newperson.PaymentSystem, person.PaymentSystem)
|
||||
require.Equal(t, newperson.PaypalID, person.PaypalID)
|
||||
require.Equal(t, newperson.Creator, person.Creator)
|
||||
require.Equal(t, newperson.Type, person.Type)
|
||||
require.Equal(t, newpayment.PaymentCategory, payment.PaymentCategory)
|
||||
require.Equal(t, newpayment.Bankname, payment.Bankname)
|
||||
require.Equal(t, newpayment.AccountID, payment.AccountID)
|
||||
require.Equal(t, newpayment.IBAN, payment.IBAN)
|
||||
require.Equal(t, newpayment.BIC, payment.BIC)
|
||||
require.Equal(t, newpayment.PaypalAccount, payment.PaypalAccount)
|
||||
require.Equal(t, newpayment.PaymentSystem, payment.PaymentSystem)
|
||||
require.Equal(t, newpayment.PaypalID, payment.PaypalID)
|
||||
require.Equal(t, newpayment.Creator, payment.Creator)
|
||||
require.Equal(t, newpayment.Type, payment.Type)
|
||||
|
||||
require.WithinDuration(t, newperson.Created, person.Created, time.Second)
|
||||
require.WithinDuration(t, newpayment.Created, payment.Created, time.Second)
|
||||
}
|
||||
|
||||
func TestDeletePayment(t *testing.T) {
|
||||
person1 := createRandomPayment(t)
|
||||
err := testQueries.DeletePayment(context.Background(), person1.ID)
|
||||
payment1 := createRandomPayment(t)
|
||||
err := testQueries.DeletePayment(context.Background(), payment1.ID)
|
||||
require.NoError(t, err)
|
||||
|
||||
person2, err := testQueries.GetPayment(context.Background(), person1.ID)
|
||||
payment2, err := testQueries.GetPayment(context.Background(), payment1.ID)
|
||||
require.Error(t, err)
|
||||
require.EqualError(t, err, sql.ErrNoRows.Error())
|
||||
require.Empty(t, person2)
|
||||
}
|
||||
|
||||
func TestUpdatePayment(t *testing.T) {
|
||||
person1 := createRandomPayment(t)
|
||||
require.NotEmpty(t, person1)
|
||||
|
||||
arg := UpdatePaymentParams{
|
||||
ID: person1.ID,
|
||||
Bankname: sql.NullString{
|
||||
String: util.RandomName(),
|
||||
Valid: true,
|
||||
},
|
||||
}
|
||||
|
||||
person2, err := testQueries.UpdatePayment(context.Background(), arg)
|
||||
require.NoError(t, err)
|
||||
require.NotEmpty(t, person2)
|
||||
|
||||
require.Equal(t, person1.ID, person2.ID)
|
||||
require.Equal(t, person1.PaymentCategory, person2.PaymentCategory)
|
||||
require.NotEqual(t, person1.Bankname, person2.Bankname)
|
||||
}
|
||||
|
||||
func TestListPayments(t *testing.T) {
|
||||
for i := 0; i < 10; i++ {
|
||||
createRandomPayment(t)
|
||||
}
|
||||
|
||||
arg := ListPaymentsParams{
|
||||
Limit: 5,
|
||||
Offset: 5,
|
||||
}
|
||||
|
||||
persons, err := testQueries.ListPayments(context.Background(), arg)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, persons, 5)
|
||||
|
||||
for _, person := range persons {
|
||||
require.NotEmpty(t, person)
|
||||
}
|
||||
require.Empty(t, payment2)
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ INSERT INTO persons (
|
||||
`
|
||||
|
||||
type CreatePersonParams struct {
|
||||
AccountID int64 `json:"account_id"`
|
||||
AccountID uint64 `json:"account_id"`
|
||||
Firstname string `json:"firstname"`
|
||||
Lastname string `json:"lastname"`
|
||||
Birthday time.Time `json:"birthday"`
|
||||
@ -78,7 +78,7 @@ DELETE FROM persons
|
||||
WHERE "id" = $1
|
||||
`
|
||||
|
||||
func (q *Queries) DeletePerson(ctx context.Context, id int64) error {
|
||||
func (q *Queries) DeletePerson(ctx context.Context, id uint64) error {
|
||||
_, err := q.db.ExecContext(ctx, deletePerson, id)
|
||||
return err
|
||||
}
|
||||
@ -88,7 +88,7 @@ SELECT id, account_id, firstname, lastname, birthday, city, zip, street, country
|
||||
WHERE "id" = $1 LIMIT 1
|
||||
`
|
||||
|
||||
func (q *Queries) GetPerson(ctx context.Context, id int64) (Person, error) {
|
||||
func (q *Queries) GetPerson(ctx context.Context, id uint64) (Person, error) {
|
||||
row := q.db.QueryRowContext(ctx, getPerson, id)
|
||||
var i Person
|
||||
err := row.Scan(
|
||||
@ -114,7 +114,7 @@ SELECT id, person_id, provider_id, name, description, category, email, status, c
|
||||
WHERE "person_id" = $1
|
||||
`
|
||||
|
||||
func (q *Queries) GetReturns(ctx context.Context, id int64) ([]Return, error) {
|
||||
func (q *Queries) GetReturns(ctx context.Context, id uint64) ([]Return, error) {
|
||||
rows, err := q.db.QueryContext(ctx, getReturns, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -152,18 +152,12 @@ func (q *Queries) GetReturns(ctx context.Context, id int64) ([]Return, error) {
|
||||
|
||||
const listPersons = `-- name: ListPersons :many
|
||||
SELECT id, account_id, firstname, lastname, birthday, city, zip, street, country, creator, created, changer, changed FROM persons
|
||||
WHERE "account_id" = $1
|
||||
ORDER BY "lastname", "firstname"
|
||||
LIMIT $1
|
||||
OFFSET $2
|
||||
`
|
||||
|
||||
type ListPersonsParams struct {
|
||||
Limit int32 `json:"limit"`
|
||||
Offset int32 `json:"offset"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListPersons(ctx context.Context, arg ListPersonsParams) ([]Person, error) {
|
||||
rows, err := q.db.QueryContext(ctx, listPersons, arg.Limit, arg.Offset)
|
||||
func (q *Queries) ListPersons(ctx context.Context, accountID uint64) ([]Person, error) {
|
||||
rows, err := q.db.QueryContext(ctx, listPersons, accountID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -202,14 +196,13 @@ func (q *Queries) ListPersons(ctx context.Context, arg ListPersonsParams) ([]Per
|
||||
const updatePerson = `-- name: UpdatePerson :one
|
||||
UPDATE persons
|
||||
SET
|
||||
"account_id" = COALESCE($3, "account_id"),
|
||||
"firstname" = COALESCE($4, "firstname"),
|
||||
"lastname" = COALESCE($5, "lastname"),
|
||||
"birthday" = COALESCE($6, "birthday"),
|
||||
"city" = COALESCE($7, "city"),
|
||||
"zip" = COALESCE($8, "zip"),
|
||||
"street" = COALESCE($9, "street"),
|
||||
"country" = COALESCE($10, "country"),
|
||||
"firstname" = COALESCE($3, "firstname"),
|
||||
"lastname" = COALESCE($4, "lastname"),
|
||||
"birthday" = COALESCE($5, "birthday"),
|
||||
"city" = COALESCE($6, "city"),
|
||||
"zip" = COALESCE($7, "zip"),
|
||||
"street" = COALESCE($8, "street"),
|
||||
"country" = COALESCE($9, "country"),
|
||||
"changer" = $2,
|
||||
"changed" = now()
|
||||
WHERE "id" = $1
|
||||
@ -217,9 +210,8 @@ RETURNING id, account_id, firstname, lastname, birthday, city, zip, street, coun
|
||||
`
|
||||
|
||||
type UpdatePersonParams struct {
|
||||
ID int64 `json:"id"`
|
||||
ID uint64 `json:"id"`
|
||||
Changer string `json:"changer"`
|
||||
AccountID sql.NullInt64 `json:"account_id"`
|
||||
Firstname sql.NullString `json:"firstname"`
|
||||
Lastname sql.NullString `json:"lastname"`
|
||||
Birthday sql.NullTime `json:"birthday"`
|
||||
@ -233,7 +225,6 @@ func (q *Queries) UpdatePerson(ctx context.Context, arg UpdatePersonParams) (Per
|
||||
row := q.db.QueryRowContext(ctx, updatePerson,
|
||||
arg.ID,
|
||||
arg.Changer,
|
||||
arg.AccountID,
|
||||
arg.Firstname,
|
||||
arg.Lastname,
|
||||
arg.Birthday,
|
||||
|
@ -104,22 +104,3 @@ func TestUpdatePerson(t *testing.T) {
|
||||
require.Equal(t, person1.Firstname, person2.Firstname)
|
||||
require.NotEqual(t, person1.Lastname, person2.Lastname)
|
||||
}
|
||||
|
||||
func TestListPersons(t *testing.T) {
|
||||
for i := 0; i < 10; i++ {
|
||||
createRandomPerson(t)
|
||||
}
|
||||
|
||||
arg := ListPersonsParams{
|
||||
Limit: 5,
|
||||
Offset: 5,
|
||||
}
|
||||
|
||||
persons, err := testQueries.ListPersons(context.Background(), arg)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, persons, 5)
|
||||
|
||||
for _, person := range persons {
|
||||
require.NotEmpty(t, person)
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ DELETE FROM providers
|
||||
WHERE "id" = $1
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteProvider(ctx context.Context, id int64) error {
|
||||
func (q *Queries) DeleteProvider(ctx context.Context, id uint64) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteProvider, id)
|
||||
return err
|
||||
}
|
||||
@ -71,7 +71,7 @@ SELECT id, name, description, category, email, creator, created, changer, change
|
||||
WHERE "id" = $1 LIMIT 1
|
||||
`
|
||||
|
||||
func (q *Queries) GetProvider(ctx context.Context, id int64) (Provider, error) {
|
||||
func (q *Queries) GetProvider(ctx context.Context, id uint64) (Provider, error) {
|
||||
row := q.db.QueryRowContext(ctx, getProvider, id)
|
||||
var i Provider
|
||||
err := row.Scan(
|
||||
@ -147,7 +147,7 @@ RETURNING id, name, description, category, email, creator, created, changer, cha
|
||||
`
|
||||
|
||||
type UpdateProviderParams struct {
|
||||
ID int64 `json:"id"`
|
||||
ID uint64 `json:"id"`
|
||||
Changer string `json:"changer"`
|
||||
Name sql.NullString `json:"name"`
|
||||
Description sql.NullString `json:"description"`
|
||||
|
@ -6,6 +6,7 @@ package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
@ -14,6 +15,7 @@ type Querier interface {
|
||||
BlockSession(ctx context.Context, id uuid.UUID) error
|
||||
CloneProviders(ctx context.Context, arg CloneProvidersParams) error
|
||||
CreateAccount(ctx context.Context, arg CreateAccountParams) (Account, error)
|
||||
CreateDocument(ctx context.Context, arg CreateDocumentParams) (Document, error)
|
||||
CreateDocumentMail(ctx context.Context, arg CreateDocumentMailParams) (Document, error)
|
||||
CreateDocumentUpload(ctx context.Context, arg CreateDocumentUploadParams) (Document, error)
|
||||
CreateMail(ctx context.Context, arg CreateMailParams) (Mail, error)
|
||||
@ -23,8 +25,9 @@ type Querier interface {
|
||||
CreateReturn(ctx context.Context, arg CreateReturnParams) (Return, error)
|
||||
CreateReturnsLog(ctx context.Context, arg CreateReturnsLogParams) (ReturnsLog, error)
|
||||
CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error)
|
||||
DeleteAccount(ctx context.Context, id int64) error
|
||||
DeleteDocument(ctx context.Context, id int64) error
|
||||
DeleteAccount(ctx context.Context, id uint64) error
|
||||
DeleteDocument(ctx context.Context, id uint64) error
|
||||
DeleteDocumentsByPersonID(ctx context.Context, personID sql.NullInt64) error
|
||||
// -- name: UpdateMail :one
|
||||
// UPDATE mails
|
||||
// SET
|
||||
@ -38,34 +41,40 @@ type Querier interface {
|
||||
// changed = now()
|
||||
// WHERE "id" = $1
|
||||
// RETURNING *;
|
||||
DeleteMail(ctx context.Context, id int64) error
|
||||
DeletePayment(ctx context.Context, id int64) error
|
||||
DeletePerson(ctx context.Context, id int64) error
|
||||
DeleteProvider(ctx context.Context, id int64) error
|
||||
DeleteReturn(ctx context.Context, id int64) error
|
||||
DeleteReturnsLog(ctx context.Context, id int64) error
|
||||
GetAccount(ctx context.Context, id int64) (Account, error)
|
||||
DeleteMail(ctx context.Context, id uint64) error
|
||||
DeletePayment(ctx context.Context, id uint64) error
|
||||
DeletePerson(ctx context.Context, id uint64) error
|
||||
DeleteProvider(ctx context.Context, id uint64) error
|
||||
DeleteReturn(ctx context.Context, id uint64) error
|
||||
DeleteReturnsByPersonID(ctx context.Context, personID uint64) error
|
||||
DeleteReturnsLog(ctx context.Context, id uint64) error
|
||||
DeleteReturnsLogsByPersonID(ctx context.Context, personID uint64) error
|
||||
GetAccount(ctx context.Context, id uint64) (Account, error)
|
||||
GetAccountByEmail(ctx context.Context, email string) (Account, error)
|
||||
GetAccountForUpdate(ctx context.Context, id int64) (Account, error)
|
||||
GetDocument(ctx context.Context, id int64) (Document, error)
|
||||
GetMail(ctx context.Context, id int64) (Mail, error)
|
||||
GetPayment(ctx context.Context, id int64) (Payment, error)
|
||||
GetPerson(ctx context.Context, id int64) (Person, error)
|
||||
GetProvider(ctx context.Context, id int64) (Provider, error)
|
||||
GetReturn(ctx context.Context, id int64) (Return, error)
|
||||
GetReturns(ctx context.Context, id int64) ([]Return, error)
|
||||
GetReturnsLog(ctx context.Context, id int64) (ReturnsLog, error)
|
||||
GetAccountForUpdate(ctx context.Context, id uint64) (Account, error)
|
||||
GetDocument(ctx context.Context, id uint64) (Document, error)
|
||||
GetDocumentByHash(ctx context.Context, arg GetDocumentByHashParams) ([]uint64, error)
|
||||
GetDocumentByIDWithAccountID(ctx context.Context, arg GetDocumentByIDWithAccountIDParams) (Document, error)
|
||||
GetMail(ctx context.Context, id uint64) (Mail, error)
|
||||
GetPayment(ctx context.Context, id uint64) (Payment, error)
|
||||
GetPerson(ctx context.Context, id uint64) (Person, error)
|
||||
GetProvider(ctx context.Context, id uint64) (Provider, error)
|
||||
GetReturn(ctx context.Context, id uint64) (Return, error)
|
||||
GetReturnIDsByPersonID(ctx context.Context, personID uint64) ([]uint64, error)
|
||||
GetReturns(ctx context.Context, id uint64) ([]Return, error)
|
||||
GetReturnsLog(ctx context.Context, id uint64) (ReturnsLog, error)
|
||||
GetSession(ctx context.Context, id uuid.UUID) (Session, error)
|
||||
InvalidateDocument(ctx context.Context, arg InvalidateDocumentParams) (Document, error)
|
||||
ListAccounts(ctx context.Context, arg ListAccountsParams) ([]Account, error)
|
||||
ListDocuments(ctx context.Context, arg ListDocumentsParams) ([]Document, error)
|
||||
ListMails(ctx context.Context, arg ListMailsParams) ([]Mail, error)
|
||||
ListPayments(ctx context.Context, arg ListPaymentsParams) ([]Payment, error)
|
||||
ListPersons(ctx context.Context, arg ListPersonsParams) ([]Person, error)
|
||||
ListPayments(ctx context.Context, accountID uint64) ([]Payment, error)
|
||||
ListPersons(ctx context.Context, accountID uint64) ([]Person, error)
|
||||
ListProviders(ctx context.Context, arg ListProvidersParams) ([]Provider, error)
|
||||
ListReturns(ctx context.Context, arg ListReturnsParams) ([]Return, error)
|
||||
ListReturnsLogs(ctx context.Context, arg ListReturnsLogsParams) ([]ReturnsLog, error)
|
||||
ListSessions(ctx context.Context, email string) ([]Session, error)
|
||||
ListReturnsLogsByPersonID(ctx context.Context, personID uint64) ([]ReturnsLog, error)
|
||||
ListSessions(ctx context.Context, accountID uint64) ([]Session, error)
|
||||
UpdateAccount(ctx context.Context, arg UpdateAccountParams) (Account, error)
|
||||
UpdateAccountPrivacy(ctx context.Context, arg UpdateAccountPrivacyParams) (Account, error)
|
||||
UpdateDocument(ctx context.Context, arg UpdateDocumentParams) (Document, error)
|
||||
|
@ -37,7 +37,7 @@ FROM providers
|
||||
|
||||
type CloneProvidersParams struct {
|
||||
Creator string `json:"creator"`
|
||||
PersonID int64 `json:"person_id"`
|
||||
PersonID uint64 `json:"person_id"`
|
||||
}
|
||||
|
||||
func (q *Queries) CloneProviders(ctx context.Context, arg CloneProvidersParams) error {
|
||||
@ -70,8 +70,8 @@ INSERT INTO returns (
|
||||
`
|
||||
|
||||
type CreateReturnParams struct {
|
||||
PersonID int64 `json:"person_id"`
|
||||
ProviderID int64 `json:"provider_id"`
|
||||
PersonID uint64 `json:"person_id"`
|
||||
ProviderID uint64 `json:"provider_id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Category string `json:"category"`
|
||||
@ -116,17 +116,27 @@ DELETE FROM returns
|
||||
WHERE "id" = $1
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteReturn(ctx context.Context, id int64) error {
|
||||
func (q *Queries) DeleteReturn(ctx context.Context, id uint64) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteReturn, id)
|
||||
return err
|
||||
}
|
||||
|
||||
const deleteReturnsByPersonID = `-- name: DeleteReturnsByPersonID :exec
|
||||
DELETE FROM "returns"
|
||||
WHERE "person_id" = $1
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteReturnsByPersonID(ctx context.Context, personID uint64) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteReturnsByPersonID, personID)
|
||||
return err
|
||||
}
|
||||
|
||||
const getReturn = `-- name: GetReturn :one
|
||||
SELECT id, person_id, provider_id, name, description, category, email, status, creator, created, changer, changed FROM returns
|
||||
WHERE "id" = $1 LIMIT 1
|
||||
`
|
||||
|
||||
func (q *Queries) GetReturn(ctx context.Context, id int64) (Return, error) {
|
||||
func (q *Queries) GetReturn(ctx context.Context, id uint64) (Return, error) {
|
||||
row := q.db.QueryRowContext(ctx, getReturn, id)
|
||||
var i Return
|
||||
err := row.Scan(
|
||||
@ -146,6 +156,34 @@ func (q *Queries) GetReturn(ctx context.Context, id int64) (Return, error) {
|
||||
return i, err
|
||||
}
|
||||
|
||||
const getReturnIDsByPersonID = `-- name: GetReturnIDsByPersonID :many
|
||||
SELECT "id" FROM "returns"
|
||||
WHERE "person_id" = $1
|
||||
`
|
||||
|
||||
func (q *Queries) GetReturnIDsByPersonID(ctx context.Context, personID uint64) ([]uint64, error) {
|
||||
rows, err := q.db.QueryContext(ctx, getReturnIDsByPersonID, personID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
items := []uint64{}
|
||||
for rows.Next() {
|
||||
var id uint64
|
||||
if err := rows.Scan(&id); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, id)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listReturns = `-- name: ListReturns :many
|
||||
SELECT id, person_id, provider_id, name, description, category, email, status, creator, created, changer, changed FROM returns
|
||||
ORDER BY "name"
|
||||
@ -197,35 +235,29 @@ func (q *Queries) ListReturns(ctx context.Context, arg ListReturnsParams) ([]Ret
|
||||
const updateReturn = `-- name: UpdateReturn :one
|
||||
UPDATE returns
|
||||
SET
|
||||
"person_id" = COALESCE($1, "person_id"),
|
||||
"provider_id" = COALESCE($2, "provider_id"),
|
||||
"name" = COALESCE($3, "name"),
|
||||
"description" = COALESCE($4, "description"),
|
||||
"category" = COALESCE($5, "category"),
|
||||
"email" = COALESCE($6, "email"),
|
||||
"status" = COALESCE($7, "status"),
|
||||
"changer" = $8,
|
||||
"name" = COALESCE($1, "name"),
|
||||
"description" = COALESCE($2, "description"),
|
||||
"category" = COALESCE($3, "category"),
|
||||
"email" = COALESCE($4, "email"),
|
||||
"status" = COALESCE($5, "status"),
|
||||
"changer" = $6,
|
||||
"changed" = now()
|
||||
WHERE "id" = $9
|
||||
WHERE "id" = $7
|
||||
RETURNING id, person_id, provider_id, name, description, category, email, status, creator, created, changer, changed
|
||||
`
|
||||
|
||||
type UpdateReturnParams struct {
|
||||
PersonID sql.NullInt64 `json:"person_id"`
|
||||
ProviderID sql.NullInt64 `json:"provider_id"`
|
||||
Name sql.NullString `json:"name"`
|
||||
Description sql.NullString `json:"description"`
|
||||
Category sql.NullString `json:"category"`
|
||||
Email sql.NullString `json:"email"`
|
||||
Status sql.NullString `json:"status"`
|
||||
Changer string `json:"changer"`
|
||||
ID int64 `json:"id"`
|
||||
ID uint64 `json:"id"`
|
||||
}
|
||||
|
||||
func (q *Queries) UpdateReturn(ctx context.Context, arg UpdateReturnParams) (Return, error) {
|
||||
row := q.db.QueryRowContext(ctx, updateReturn,
|
||||
arg.PersonID,
|
||||
arg.ProviderID,
|
||||
arg.Name,
|
||||
arg.Description,
|
||||
arg.Category,
|
||||
|
@ -27,10 +27,10 @@ INSERT INTO "returnsLog" (
|
||||
`
|
||||
|
||||
type CreateReturnsLogParams struct {
|
||||
ReturnID int64 `json:"return_id"`
|
||||
MailID int64 `json:"mail_id"`
|
||||
Status sql.NullString `json:"status"`
|
||||
Creator string `json:"creator"`
|
||||
ReturnID uint64 `json:"return_id"`
|
||||
MailID uint64 `json:"mail_id"`
|
||||
Status string `json:"status"`
|
||||
Creator string `json:"creator"`
|
||||
}
|
||||
|
||||
func (q *Queries) CreateReturnsLog(ctx context.Context, arg CreateReturnsLogParams) (ReturnsLog, error) {
|
||||
@ -59,17 +59,31 @@ DELETE FROM "returnsLog"
|
||||
WHERE "id" = $1
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteReturnsLog(ctx context.Context, id int64) error {
|
||||
func (q *Queries) DeleteReturnsLog(ctx context.Context, id uint64) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteReturnsLog, id)
|
||||
return err
|
||||
}
|
||||
|
||||
const deleteReturnsLogsByPersonID = `-- name: DeleteReturnsLogsByPersonID :exec
|
||||
DELETE FROM "returnsLog"
|
||||
WHERE "return_id" IN (
|
||||
SELECT "id"
|
||||
FROM "returns"
|
||||
WHERE "person_id" = $1
|
||||
)
|
||||
`
|
||||
|
||||
func (q *Queries) DeleteReturnsLogsByPersonID(ctx context.Context, personID uint64) error {
|
||||
_, err := q.db.ExecContext(ctx, deleteReturnsLogsByPersonID, personID)
|
||||
return err
|
||||
}
|
||||
|
||||
const getReturnsLog = `-- name: GetReturnsLog :one
|
||||
SELECT id, return_id, mail_id, status, creator, created, changer, changed FROM "returnsLog"
|
||||
WHERE "id" = $1 LIMIT 1
|
||||
`
|
||||
|
||||
func (q *Queries) GetReturnsLog(ctx context.Context, id int64) (ReturnsLog, error) {
|
||||
func (q *Queries) GetReturnsLog(ctx context.Context, id uint64) (ReturnsLog, error) {
|
||||
row := q.db.QueryRowContext(ctx, getReturnsLog, id)
|
||||
var i ReturnsLog
|
||||
err := row.Scan(
|
||||
@ -129,34 +143,65 @@ func (q *Queries) ListReturnsLogs(ctx context.Context, arg ListReturnsLogsParams
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const listReturnsLogsByPersonID = `-- name: ListReturnsLogsByPersonID :many
|
||||
SELECT id, return_id, mail_id, status, creator, created, changer, changed FROM "returnsLog"
|
||||
WHERE "return_id" IN (
|
||||
SELECT "id"
|
||||
FROM "returns"
|
||||
WHERE "person_id" = $1
|
||||
)
|
||||
`
|
||||
|
||||
func (q *Queries) ListReturnsLogsByPersonID(ctx context.Context, personID uint64) ([]ReturnsLog, error) {
|
||||
rows, err := q.db.QueryContext(ctx, listReturnsLogsByPersonID, personID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
items := []ReturnsLog{}
|
||||
for rows.Next() {
|
||||
var i ReturnsLog
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.ReturnID,
|
||||
&i.MailID,
|
||||
&i.Status,
|
||||
&i.Creator,
|
||||
&i.Created,
|
||||
&i.Changer,
|
||||
&i.Changed,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
const updateReturnsLog = `-- name: UpdateReturnsLog :one
|
||||
UPDATE "returnsLog"
|
||||
SET
|
||||
"return_id" = COALESCE($2, "return_id"),
|
||||
"mail_id" = COALESCE($3, "mail_id"),
|
||||
"status" = COALESCE($4, "status"),
|
||||
"status" = COALESCE($2, "status"),
|
||||
"changer" = $1,
|
||||
"changed" = now()
|
||||
WHERE "id" = $5
|
||||
WHERE "id" = $3
|
||||
RETURNING id, return_id, mail_id, status, creator, created, changer, changed
|
||||
`
|
||||
|
||||
type UpdateReturnsLogParams struct {
|
||||
Changer string `json:"changer"`
|
||||
ReturnID sql.NullInt64 `json:"return_id"`
|
||||
MailID sql.NullInt64 `json:"mail_id"`
|
||||
Status sql.NullString `json:"status"`
|
||||
ID int64 `json:"id"`
|
||||
Changer string `json:"changer"`
|
||||
Status sql.NullString `json:"status"`
|
||||
ID uint64 `json:"id"`
|
||||
}
|
||||
|
||||
func (q *Queries) UpdateReturnsLog(ctx context.Context, arg UpdateReturnsLogParams) (ReturnsLog, error) {
|
||||
row := q.db.QueryRowContext(ctx, updateReturnsLog,
|
||||
arg.Changer,
|
||||
arg.ReturnID,
|
||||
arg.MailID,
|
||||
arg.Status,
|
||||
arg.ID,
|
||||
)
|
||||
row := q.db.QueryRowContext(ctx, updateReturnsLog, arg.Changer, arg.Status, arg.ID)
|
||||
var i ReturnsLog
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
|
@ -20,11 +20,8 @@ func createRandomReturnsLog(t *testing.T) ReturnsLog {
|
||||
arg := CreateReturnsLogParams{
|
||||
ReturnID: ret.ID,
|
||||
MailID: mail.ID,
|
||||
Status: sql.NullString{
|
||||
Valid: true,
|
||||
String: util.RandomString(7),
|
||||
},
|
||||
Creator: creator,
|
||||
Status: util.RandomString(7),
|
||||
Creator: creator,
|
||||
}
|
||||
|
||||
returnsLog, err := testQueries.CreateReturnsLog(context.Background(), arg)
|
||||
|
@ -27,7 +27,7 @@ func (q *Queries) BlockSession(ctx context.Context, id uuid.UUID) error {
|
||||
const createSession = `-- name: CreateSession :one
|
||||
INSERT INTO sessions (
|
||||
id,
|
||||
email,
|
||||
account_id,
|
||||
refresh_token,
|
||||
user_agent,
|
||||
client_ip,
|
||||
@ -35,12 +35,12 @@ INSERT INTO sessions (
|
||||
expires_at
|
||||
) VALUES (
|
||||
$1, $2, $3, $4, $5, $6, $7
|
||||
) RETURNING id, email, user_agent, client_ip, refresh_token, is_blocked, expires_at, created_at
|
||||
) RETURNING id, account_id, user_agent, client_ip, refresh_token, is_blocked, expires_at, created_at
|
||||
`
|
||||
|
||||
type CreateSessionParams struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
Email string `json:"email"`
|
||||
AccountID uint64 `json:"account_id"`
|
||||
RefreshToken string `json:"refresh_token"`
|
||||
UserAgent string `json:"user_agent"`
|
||||
ClientIp string `json:"client_ip"`
|
||||
@ -51,7 +51,7 @@ type CreateSessionParams struct {
|
||||
func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error) {
|
||||
row := q.db.QueryRowContext(ctx, createSession,
|
||||
arg.ID,
|
||||
arg.Email,
|
||||
arg.AccountID,
|
||||
arg.RefreshToken,
|
||||
arg.UserAgent,
|
||||
arg.ClientIp,
|
||||
@ -61,7 +61,7 @@ func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (S
|
||||
var i Session
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.Email,
|
||||
&i.AccountID,
|
||||
&i.UserAgent,
|
||||
&i.ClientIp,
|
||||
&i.RefreshToken,
|
||||
@ -73,7 +73,7 @@ func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (S
|
||||
}
|
||||
|
||||
const getSession = `-- name: GetSession :one
|
||||
SELECT id, email, user_agent, client_ip, refresh_token, is_blocked, expires_at, created_at FROM sessions
|
||||
SELECT id, account_id, user_agent, client_ip, refresh_token, is_blocked, expires_at, created_at FROM sessions
|
||||
WHERE id = $1 LIMIT 1
|
||||
`
|
||||
|
||||
@ -82,7 +82,7 @@ func (q *Queries) GetSession(ctx context.Context, id uuid.UUID) (Session, error)
|
||||
var i Session
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.Email,
|
||||
&i.AccountID,
|
||||
&i.UserAgent,
|
||||
&i.ClientIp,
|
||||
&i.RefreshToken,
|
||||
@ -92,3 +92,40 @@ func (q *Queries) GetSession(ctx context.Context, id uuid.UUID) (Session, error)
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const listSessions = `-- name: ListSessions :many
|
||||
SELECT id, account_id, user_agent, client_ip, refresh_token, is_blocked, expires_at, created_at FROM sessions
|
||||
WHERE account_id = $1 AND is_blocked = false AND expires_at > now()
|
||||
`
|
||||
|
||||
func (q *Queries) ListSessions(ctx context.Context, accountID uint64) ([]Session, error) {
|
||||
rows, err := q.db.QueryContext(ctx, listSessions, accountID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
items := []Session{}
|
||||
for rows.Next() {
|
||||
var i Session
|
||||
if err := rows.Scan(
|
||||
&i.ID,
|
||||
&i.AccountID,
|
||||
&i.UserAgent,
|
||||
&i.ClientIp,
|
||||
&i.RefreshToken,
|
||||
&i.IsBlocked,
|
||||
&i.ExpiresAt,
|
||||
&i.CreatedAt,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
items = append(items, i)
|
||||
}
|
||||
if err := rows.Close(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
@ -4,6 +4,8 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"google.golang.org/grpc/codes"
|
||||
)
|
||||
|
||||
type Store interface {
|
||||
@ -12,6 +14,9 @@ type Store interface {
|
||||
UpdateAccountTx(ctx context.Context, arg UpdateAccountTxParams) (Account, error)
|
||||
UpdateAccountPrivacyTx(ctx context.Context, arg UpdateAccountPrivacyTxParams) (Account, error)
|
||||
CreatePersonTx(ctx context.Context, arg CreatePersonTxParams) (Person, error)
|
||||
DeletePersonTx(ctx context.Context, id uint64) error
|
||||
CreateDocumentTx(ctx context.Context, arg CreateDocumentTxParams) (doc Document, code int, err error)
|
||||
DeleteDocumentTx(ctx context.Context, id uint64) (code codes.Code, err error)
|
||||
}
|
||||
|
||||
// Store provides all functions to execute db queries and transactions
|
||||
|
139
bff/db/sqlc/tx_create_document.go
Normal file
139
bff/db/sqlc/tx_create_document.go
Normal file
@ -0,0 +1,139 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/sha256"
|
||||
"database/sql"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
type CreateDocumentTxParams struct {
|
||||
AccountID uint64 `json:"account_id"`
|
||||
PersonID uint64 `json:"person_id"`
|
||||
MailID uint64 `json:"mail_id"`
|
||||
File *multipart.FileHeader `json:"file"`
|
||||
Creator string `json:"creator"`
|
||||
}
|
||||
|
||||
type CreateDocumentTxResult struct {
|
||||
Document Document `json:"document"`
|
||||
}
|
||||
|
||||
func (store *SQLStore) CreateDocumentTx(ctx context.Context, arg CreateDocumentTxParams) (doc Document, code int, err error) {
|
||||
var result CreateDocumentTxResult
|
||||
|
||||
if arg.MailID > 0 && arg.PersonID > 0 {
|
||||
return Document{}, http.StatusBadRequest, errors.New("document can't be assigned to both person_id AND mail_id")
|
||||
}
|
||||
if arg.MailID < 1 && arg.PersonID < 1 {
|
||||
return Document{}, http.StatusBadRequest, errors.New("document has to be assigned to either a person_id or a mail_id")
|
||||
}
|
||||
|
||||
req := CreateDocumentParams{
|
||||
Creator: arg.Creator,
|
||||
}
|
||||
targetDir := filepath.Join("./files", fmt.Sprintf("%d", arg.AccountID))
|
||||
|
||||
fileData, err := arg.File.Open()
|
||||
if err != nil {
|
||||
return Document{}, http.StatusBadRequest, errors.New("failed to read file")
|
||||
}
|
||||
|
||||
h := sha256.New()
|
||||
_, err = io.Copy(h, fileData)
|
||||
if err != nil {
|
||||
return Document{}, http.StatusInternalServerError, errors.New("could not create file hash")
|
||||
}
|
||||
|
||||
fileData.Seek(0, io.SeekStart)
|
||||
|
||||
req.Hash = hex.EncodeToString(h.Sum(nil))
|
||||
|
||||
if arg.MailID > 0 {
|
||||
_, err := store.GetMail(ctx, arg.MailID)
|
||||
if err != nil {
|
||||
return Document{}, http.StatusNotFound, errors.New("mail not found")
|
||||
}
|
||||
|
||||
targetDir = filepath.Join(targetDir, "mail", fmt.Sprintf("%d", arg.MailID))
|
||||
|
||||
req.MailID = sql.NullInt64{
|
||||
Valid: true,
|
||||
Int64: int64(arg.MailID),
|
||||
}
|
||||
}
|
||||
|
||||
if arg.PersonID > 0 {
|
||||
_, err := store.GetPerson(ctx, arg.PersonID)
|
||||
if err != nil {
|
||||
return Document{}, http.StatusNotFound, errors.New("person not found")
|
||||
}
|
||||
|
||||
docs, err := store.GetDocumentByHash(ctx, GetDocumentByHashParams{
|
||||
AccountID: arg.AccountID,
|
||||
Hash: req.Hash,
|
||||
})
|
||||
if err != nil {
|
||||
return Document{}, http.StatusInternalServerError, fmt.Errorf("could not check file hash in db: %v", err.Error())
|
||||
}
|
||||
|
||||
if len(docs) > 0 {
|
||||
return Document{
|
||||
ID: docs[0],
|
||||
}, http.StatusConflict, errors.New("file already exists in database")
|
||||
}
|
||||
|
||||
targetDir = filepath.Join(targetDir, "person", fmt.Sprintf("%d", arg.PersonID))
|
||||
req.PersonID = sql.NullInt64{
|
||||
Valid: true,
|
||||
Int64: int64(arg.PersonID),
|
||||
}
|
||||
}
|
||||
|
||||
req.Type = path.Ext(arg.File.Filename)
|
||||
req.Name = arg.File.Filename
|
||||
|
||||
p := filepath.Join(targetDir, req.Hash+path.Ext(arg.File.Filename))
|
||||
req.Path = p
|
||||
|
||||
if _, err := os.Stat(p); err == nil {
|
||||
return Document{}, http.StatusConflict, errors.New("file already exists")
|
||||
}
|
||||
|
||||
err = store.execTx(ctx, func(q *Queries) error {
|
||||
var err error
|
||||
|
||||
if _, err := os.Stat(targetDir); err != nil {
|
||||
err = os.MkdirAll(targetDir, 0755)
|
||||
if err != nil {
|
||||
return errors.New("could not create directory structure")
|
||||
}
|
||||
|
||||
}
|
||||
f, err := os.Create(p)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not create file: %v", err)
|
||||
}
|
||||
|
||||
_, err = io.Copy(f, fileData)
|
||||
if err != nil {
|
||||
return errors.New("could not write file")
|
||||
}
|
||||
|
||||
result.Document, err = q.CreateDocument(ctx, req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return err
|
||||
})
|
||||
|
||||
return result.Document, http.StatusInternalServerError, err
|
||||
}
|
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
type CreatePersonTxParams struct {
|
||||
AccountID int64 `json:"account_id"`
|
||||
AccountID uint64 `json:"account_id"`
|
||||
Firstname string `json:"firstname"`
|
||||
Lastname string `json:"lastname"`
|
||||
Birthday time.Time `json:"birthday"`
|
||||
|
46
bff/db/sqlc/tx_delete_document.go
Normal file
46
bff/db/sqlc/tx_delete_document.go
Normal file
@ -0,0 +1,46 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"google.golang.org/grpc/codes"
|
||||
)
|
||||
|
||||
func (store *SQLStore) DeleteDocumentTx(ctx context.Context, id uint64) (code codes.Code, err error) {
|
||||
|
||||
doc, err := store.GetDocument(ctx, id)
|
||||
if err != nil {
|
||||
return codes.NotFound, fmt.Errorf("document not found")
|
||||
}
|
||||
|
||||
p := filepath.Join("./", doc.Path)
|
||||
|
||||
_, err = os.Stat(p)
|
||||
if err != nil {
|
||||
return codes.Internal, fmt.Errorf("document not found on disk")
|
||||
}
|
||||
|
||||
err = store.execTx(ctx, func(q *Queries) error {
|
||||
var err error
|
||||
|
||||
err = q.DeleteDocument(ctx, id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = os.Remove(p)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not delete file from disk")
|
||||
}
|
||||
return err
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return codes.Internal, err
|
||||
}
|
||||
|
||||
return codes.OK, err
|
||||
}
|
38
bff/db/sqlc/tx_delete_person.go
Normal file
38
bff/db/sqlc/tx_delete_person.go
Normal file
@ -0,0 +1,38 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
)
|
||||
|
||||
func (store *SQLStore) DeletePersonTx(ctx context.Context, id uint64) error {
|
||||
err := store.execTx(ctx, func(q *Queries) error {
|
||||
|
||||
err := q.DeleteDocumentsByPersonID(ctx, sql.NullInt64{
|
||||
Valid: true,
|
||||
Int64: int64(id),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = q.DeleteReturnsLogsByPersonID(ctx, id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = q.DeleteReturnsByPersonID(ctx, id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = q.DeletePerson(ctx, id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return err
|
||||
})
|
||||
|
||||
return err
|
||||
}
|
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
type UpdateAccountTxParams struct {
|
||||
ID int64 `json:"ID"`
|
||||
ID uint64 `json:"ID"`
|
||||
Changer string `json:"changer"`
|
||||
Passwordhash sql.NullString `json:"passwordhash"`
|
||||
Firstname sql.NullString `json:"firstname"`
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
type UpdateAccountPrivacyTxParams struct {
|
||||
ID int64 `json:"ID"`
|
||||
ID uint64 `json:"ID"`
|
||||
Changer string `json:"changer"`
|
||||
PrivacyAccepted *bool `json:"privacy_accepted"`
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -8,8 +8,8 @@ services:
|
||||
- POSTGRES_DB=df
|
||||
ports:
|
||||
- "5432:5432"
|
||||
# volumes:
|
||||
# - ./db/migration:/docker-entrypoint-initdb.d
|
||||
volumes:
|
||||
- data-volume:/var/lib/postgresql/data
|
||||
api:
|
||||
build:
|
||||
context: .
|
||||
@ -17,8 +17,13 @@ services:
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "9090:9090"
|
||||
volumes:
|
||||
- ./files:/app/files/:Z
|
||||
environment:
|
||||
- DB_SOURCE=postgresql://root:secret@postgres:5432/df?sslmode=disable
|
||||
depends_on:
|
||||
- postgres
|
||||
command: [ "/app/main" ]
|
||||
|
||||
volumes:
|
||||
data-volume:
|
@ -60,7 +60,7 @@ func (server *Server) authorizeUser(ctx context.Context) (*token.Payload, error)
|
||||
}
|
||||
|
||||
func (server *Server) isAdmin(ctx context.Context, payload *token.Payload) bool {
|
||||
acc, err := server.store.GetAccountByEmail(ctx, payload.Email)
|
||||
acc, err := server.store.GetAccount(ctx, payload.AccountID)
|
||||
if err != nil {
|
||||
fmt.Printf("could not verify admin: %#v", err)
|
||||
return false
|
||||
|
@ -30,7 +30,8 @@ func convertAccount(account db.Account) *pb.Account {
|
||||
|
||||
func convertPerson(person db.Person) *pb.Person {
|
||||
return &pb.Person{
|
||||
AccountId: person.AccountID,
|
||||
Id: person.ID,
|
||||
AccountId: uint64(person.AccountID),
|
||||
Firstname: person.Firstname,
|
||||
Lastname: person.Lastname,
|
||||
Street: person.Street,
|
||||
@ -48,7 +49,7 @@ func convertPerson(person db.Person) *pb.Person {
|
||||
func convertSession(session db.Session) *pb.Session {
|
||||
return &pb.Session{
|
||||
Id: session.ID.String(),
|
||||
Email: session.Email,
|
||||
AccountId: session.AccountID,
|
||||
ClientIp: session.ClientIp,
|
||||
UserAgent: session.UserAgent,
|
||||
RefreshToken: session.RefreshToken,
|
||||
@ -57,3 +58,35 @@ func convertSession(session db.Session) *pb.Session {
|
||||
IsBlocked: session.IsBlocked,
|
||||
}
|
||||
}
|
||||
|
||||
func convertPayment(payment db.Payment) *pb.Payment {
|
||||
return &pb.Payment{
|
||||
Id: payment.ID,
|
||||
AccountId: uint64(payment.AccountID),
|
||||
PaymentCategory: payment.PaymentCategory,
|
||||
Bankname: &payment.Bankname.String,
|
||||
IBAN: &payment.IBAN.String,
|
||||
BIC: &payment.BIC.String,
|
||||
PaypalAccount: &payment.PaypalAccount.String,
|
||||
PaypalId: &payment.PaypalID.String,
|
||||
PaymentSystem: &payment.PaymentSystem.String,
|
||||
Type: payment.Type,
|
||||
Creator: payment.Creator,
|
||||
Created: timestamppb.New(payment.Created),
|
||||
Changer: payment.Changer,
|
||||
Changed: timestamppb.New(payment.Changed),
|
||||
}
|
||||
}
|
||||
|
||||
func convertReturnsLog(returnsLog db.ReturnsLog) *pb.ReturnsLog {
|
||||
return &pb.ReturnsLog{
|
||||
Id: returnsLog.ID,
|
||||
ReturnId: returnsLog.ReturnID,
|
||||
MailId: returnsLog.MailID,
|
||||
Status: returnsLog.Status,
|
||||
Creator: returnsLog.Creator,
|
||||
Changer: returnsLog.Changer,
|
||||
Created: timestamppb.New(returnsLog.Created),
|
||||
Changed: timestamppb.New(returnsLog.Changed),
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
@ -30,10 +31,11 @@ func (server *Server) BlockSession(ctx context.Context, req *pb.BlockSessionRequ
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "session not found")
|
||||
}
|
||||
slog.Error("block_session (get)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.String("session_id", req.GetSessionId()), slog.String("error", err.Error()))
|
||||
return nil, status.Errorf(codes.Internal, "failed to get session")
|
||||
}
|
||||
|
||||
if session.Email != authPayload.Email {
|
||||
if session.AccountID != authPayload.AccountID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "session not found")
|
||||
}
|
||||
@ -45,6 +47,7 @@ func (server *Server) BlockSession(ctx context.Context, req *pb.BlockSessionRequ
|
||||
|
||||
err = server.store.BlockSession(ctx, uid)
|
||||
if err != nil {
|
||||
slog.Error("block_session (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.String("session_id", req.GetSessionId()), slog.String("error", err.Error()))
|
||||
return nil, status.Errorf(codes.Internal, "failed to block session")
|
||||
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
db "github.com/itsscb/df/bff/db/sqlc"
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
@ -22,6 +23,7 @@ func (server *Server) CreateAccount(ctx context.Context, req *pb.CreateAccountRe
|
||||
|
||||
hashedPassword, err := util.HashPassword(req.GetPassword())
|
||||
if err != nil {
|
||||
slog.Error("create_account (hash_password)", slog.String("invoked_by", req.GetEmail()), slog.String("error", err.Error()))
|
||||
return nil, status.Errorf(codes.Internal, "failed to hash password: %s", err)
|
||||
}
|
||||
|
||||
@ -48,6 +50,7 @@ func (server *Server) CreateAccount(ctx context.Context, req *pb.CreateAccountRe
|
||||
|
||||
account, err := server.store.CreateAccountTx(ctx, arg)
|
||||
if err != nil {
|
||||
slog.Error("create_account (db)", slog.String("invoked_by", req.GetEmail()), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to create account")
|
||||
}
|
||||
|
||||
|
115
bff/gapi/rpc_create_payment.go
Normal file
115
bff/gapi/rpc_create_payment.go
Normal file
@ -0,0 +1,115 @@
|
||||
package gapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
db "github.com/itsscb/df/bff/db/sqlc"
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
"github.com/itsscb/df/bff/val"
|
||||
"google.golang.org/genproto/googleapis/rpc/errdetails"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
func (server *Server) CreatePayment(ctx context.Context, req *pb.CreatePaymentRequest) (*pb.CreatePaymentResponse, error) {
|
||||
authPayload, err := server.authorizeUser(ctx)
|
||||
if err != nil {
|
||||
return nil, unauthenticatedError(err)
|
||||
}
|
||||
|
||||
violations := validateCreatePaymentRequest(req)
|
||||
if violations != nil {
|
||||
return nil, invalidArgumentError(violations)
|
||||
}
|
||||
|
||||
account, err := server.store.GetAccount(ctx, req.GetAccountId())
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
||||
}
|
||||
slog.Error("create_payment (get_account)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetAccountId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.NotFound, "failed to get account")
|
||||
}
|
||||
|
||||
if authPayload.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
arg := db.CreatePaymentParams{
|
||||
AccountID: req.GetAccountId(),
|
||||
PaymentCategory: req.GetPaymentCategory(),
|
||||
Bankname: sql.NullString{
|
||||
Valid: req.GetBankname() != "",
|
||||
String: req.GetBankname(),
|
||||
},
|
||||
IBAN: sql.NullString{
|
||||
Valid: req.GetIBAN() != "",
|
||||
String: req.GetIBAN(),
|
||||
},
|
||||
BIC: sql.NullString{
|
||||
Valid: req.GetBIC() != "",
|
||||
String: req.GetBIC(),
|
||||
},
|
||||
PaypalAccount: sql.NullString{
|
||||
Valid: req.GetPaypalAccount() != "",
|
||||
String: req.GetPaypalAccount(),
|
||||
},
|
||||
PaypalID: sql.NullString{
|
||||
Valid: req.GetPaypalId() != "",
|
||||
String: req.GetPaypalId(),
|
||||
},
|
||||
PaymentSystem: sql.NullString{
|
||||
Valid: req.GetPaymentSystem() != "",
|
||||
String: req.GetPaymentSystem(),
|
||||
},
|
||||
Type: req.GetType(),
|
||||
Creator: account.Email,
|
||||
Changer: account.Email,
|
||||
}
|
||||
|
||||
payment, err := server.store.CreatePayment(ctx, arg)
|
||||
if err != nil {
|
||||
slog.Error("create_payment (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetAccountId())), slog.String("payment_category", req.GetPaymentCategory()), slog.String("error", err.Error()))
|
||||
return nil, status.Errorf(codes.Internal, "failed to create payment")
|
||||
}
|
||||
|
||||
rsp := &pb.CreatePaymentResponse{
|
||||
Payment: convertPayment(payment),
|
||||
}
|
||||
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func validateCreatePaymentRequest(req *pb.CreatePaymentRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||
// TODO: #80 Add Validations to rpc_create_payment
|
||||
if req.GetAccountId() < 1 {
|
||||
violations = append(violations, fieldViolation("account_id", errors.New("must be greater than 0")))
|
||||
}
|
||||
|
||||
if err := val.ValidateEmail(req.GetPaypalAccount()); err != nil {
|
||||
violations = append(violations, fieldViolation("paypal_account", err))
|
||||
}
|
||||
|
||||
// if err := val.ValidateName(req.GetPaymentCategory()); err != nil {
|
||||
// violations = append(violations, fieldViolation("payment_category", err))
|
||||
// }
|
||||
|
||||
// if err := val.ValidateName(req.GetBankname()); err != nil {
|
||||
// violations = append(violations, fieldViolation("bankname", err))
|
||||
// }
|
||||
|
||||
// if err := val.ValidateAlphaSpace(req.GetIBAN()); err != nil {
|
||||
// violations = append(violations, fieldViolation("IBAN", err))
|
||||
// }
|
||||
|
||||
// if err := val.ValidateAlphaSpace(req.GetBIC()); err != nil {
|
||||
// violations = append(violations, fieldViolation("BIC", err))
|
||||
// }
|
||||
|
||||
return violations
|
||||
}
|
@ -4,6 +4,8 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
|
||||
db "github.com/itsscb/df/bff/db/sqlc"
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
@ -29,17 +31,18 @@ func (server *Server) CreatePerson(ctx context.Context, req *pb.CreatePersonRequ
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
||||
}
|
||||
slog.Error("create_person (get_account)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetAccountId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.NotFound, "failed to get account")
|
||||
}
|
||||
|
||||
if authPayload.Email != account.Email {
|
||||
if authPayload.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
arg := db.CreatePersonTxParams{
|
||||
AccountID: req.GetAccountId(),
|
||||
AccountID: account.ID,
|
||||
Firstname: req.GetFirstname(),
|
||||
Lastname: req.GetLastname(),
|
||||
Birthday: req.GetBirthday().AsTime(),
|
||||
@ -47,12 +50,13 @@ func (server *Server) CreatePerson(ctx context.Context, req *pb.CreatePersonRequ
|
||||
Street: req.GetStreet(),
|
||||
Country: req.GetCountry(),
|
||||
Zip: req.GetZip(),
|
||||
Creator: authPayload.Email,
|
||||
Changer: authPayload.Email,
|
||||
Creator: account.Email,
|
||||
Changer: account.Email,
|
||||
}
|
||||
|
||||
person, err := server.store.CreatePersonTx(ctx, arg)
|
||||
if err != nil {
|
||||
slog.Error("create_person (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.String("person", fmt.Sprintf("%s, %s", req.GetLastname(), req.GetFirstname())), slog.String("error", err.Error()))
|
||||
return nil, status.Errorf(codes.Internal, "failed to create person")
|
||||
}
|
||||
|
||||
|
79
bff/gapi/rpc_delete_document.go
Normal file
79
bff/gapi/rpc_delete_document.go
Normal file
@ -0,0 +1,79 @@
|
||||
package gapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
db "github.com/itsscb/df/bff/db/sqlc"
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
"google.golang.org/genproto/googleapis/rpc/errdetails"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
func (server *Server) DeleteDocument(ctx context.Context, req *pb.DeleteDocumentRequest) (*pb.DeleteDocumentResponse, error) {
|
||||
authPayload, err := server.authorizeUser(ctx)
|
||||
if err != nil {
|
||||
return nil, unauthenticatedError(err)
|
||||
}
|
||||
|
||||
violations := validateDeleteDocumentRequest(req)
|
||||
if violations != nil {
|
||||
return nil, invalidArgumentError(violations)
|
||||
}
|
||||
|
||||
account, err := server.store.GetAccount(ctx, authPayload.AccountID)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
||||
}
|
||||
slog.Error("delete_document (get_account)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("document_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to get account")
|
||||
}
|
||||
|
||||
if authPayload.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
var document db.Document
|
||||
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
document, err = server.store.GetDocumentByIDWithAccountID(ctx, db.GetDocumentByIDWithAccountIDParams{
|
||||
ID: req.GetId(),
|
||||
AccountID: account.ID,
|
||||
})
|
||||
} else {
|
||||
document, err = server.store.GetDocument(ctx, req.GetId())
|
||||
}
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "document not found")
|
||||
}
|
||||
slog.Error("delete_document (get_document)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("document_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Errorf(codes.Internal, "failed to get document")
|
||||
}
|
||||
|
||||
code, err := server.store.DeleteDocumentTx(ctx, document.ID)
|
||||
if err != nil {
|
||||
slog.Error("delete_document (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("document_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Errorf(code, "failed to delete document")
|
||||
}
|
||||
|
||||
rsp := &pb.DeleteDocumentResponse{
|
||||
Id: document.ID,
|
||||
Deleted: true,
|
||||
}
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func validateDeleteDocumentRequest(req *pb.DeleteDocumentRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||
if req.GetId() < 1 {
|
||||
violations = append(violations, fieldViolation("id", errors.New("must be greater than 0")))
|
||||
}
|
||||
|
||||
return violations
|
||||
}
|
76
bff/gapi/rpc_delete_payment.go
Normal file
76
bff/gapi/rpc_delete_payment.go
Normal file
@ -0,0 +1,76 @@
|
||||
package gapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
"google.golang.org/genproto/googleapis/rpc/errdetails"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
func (server *Server) DeletePayment(ctx context.Context, req *pb.DeletePaymentRequest) (*pb.DeletePaymentResponse, error) {
|
||||
authPayload, err := server.authorizeUser(ctx)
|
||||
if err != nil {
|
||||
return nil, unauthenticatedError(err)
|
||||
}
|
||||
|
||||
violations := validateDeletePaymentRequest(req)
|
||||
if violations != nil {
|
||||
return nil, invalidArgumentError(violations)
|
||||
}
|
||||
|
||||
account, err := server.store.GetAccount(ctx, authPayload.AccountID)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
||||
}
|
||||
slog.Error("delete_payment (get_account)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("payment_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to get account")
|
||||
}
|
||||
|
||||
if authPayload.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
payment, err := server.store.GetPayment(ctx, req.GetId())
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "payment not found")
|
||||
}
|
||||
slog.Error("delete_payment (get_payment)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("payment_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Errorf(codes.Internal, "failed to get payment")
|
||||
}
|
||||
|
||||
if payment.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "payment not found")
|
||||
}
|
||||
}
|
||||
|
||||
err = server.store.DeletePayment(ctx, req.GetId())
|
||||
if err != nil {
|
||||
slog.Error("delete_payment (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("payment_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Errorf(codes.Internal, "failed to delete payment")
|
||||
|
||||
}
|
||||
|
||||
rsp := &pb.DeletePaymentResponse{
|
||||
Id: payment.ID,
|
||||
Deleted: true,
|
||||
}
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func validateDeletePaymentRequest(req *pb.DeletePaymentRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||
if req.GetId() < 1 {
|
||||
violations = append(violations, fieldViolation("id", errors.New("must be greater than 0")))
|
||||
}
|
||||
|
||||
return violations
|
||||
}
|
76
bff/gapi/rpc_delete_person.go
Normal file
76
bff/gapi/rpc_delete_person.go
Normal file
@ -0,0 +1,76 @@
|
||||
package gapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
"google.golang.org/genproto/googleapis/rpc/errdetails"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
func (server *Server) DeletePerson(ctx context.Context, req *pb.DeletePersonRequest) (*pb.DeletePersonResponse, error) {
|
||||
authPayload, err := server.authorizeUser(ctx)
|
||||
if err != nil {
|
||||
return nil, unauthenticatedError(err)
|
||||
}
|
||||
|
||||
violations := validateDeletePersonRequest(req)
|
||||
if violations != nil {
|
||||
return nil, invalidArgumentError(violations)
|
||||
}
|
||||
|
||||
account, err := server.store.GetAccount(ctx, authPayload.AccountID)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
||||
}
|
||||
slog.Error("delete_person (get_account)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("person_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to get account")
|
||||
}
|
||||
|
||||
if authPayload.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
person, err := server.store.GetPerson(ctx, req.GetId())
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "person not found")
|
||||
}
|
||||
slog.Error("delete_person (get_person)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("person_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Errorf(codes.Internal, "failed to get person")
|
||||
}
|
||||
|
||||
if person.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "person not found")
|
||||
}
|
||||
}
|
||||
|
||||
err = server.store.DeletePersonTx(ctx, person.ID)
|
||||
if err != nil {
|
||||
slog.Error("delete_person (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("person_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Errorf(codes.Internal, "failed to delete person")
|
||||
|
||||
}
|
||||
|
||||
rsp := &pb.DeletePersonResponse{
|
||||
Id: person.ID,
|
||||
Deleted: true,
|
||||
}
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func validateDeletePersonRequest(req *pb.DeletePersonRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||
if req.GetId() < 1 {
|
||||
violations = append(violations, fieldViolation("id", errors.New("must be greater than 0")))
|
||||
}
|
||||
|
||||
return violations
|
||||
}
|
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
"google.golang.org/genproto/googleapis/rpc/errdetails"
|
||||
@ -27,10 +28,11 @@ func (server *Server) GetAccount(ctx context.Context, req *pb.GetAccountRequest)
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
||||
}
|
||||
slog.Error("get_account (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to get account")
|
||||
}
|
||||
|
||||
if authPayload.Email != account.Email {
|
||||
if authPayload.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
|
69
bff/gapi/rpc_get_payment.go
Normal file
69
bff/gapi/rpc_get_payment.go
Normal file
@ -0,0 +1,69 @@
|
||||
package gapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
"google.golang.org/genproto/googleapis/rpc/errdetails"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
func (server *Server) GetPayment(ctx context.Context, req *pb.GetPaymentRequest) (*pb.GetPaymentResponse, error) {
|
||||
authPayload, err := server.authorizeUser(ctx)
|
||||
if err != nil {
|
||||
return nil, unauthenticatedError(err)
|
||||
}
|
||||
|
||||
violations := validateGetPaymentRequest(req)
|
||||
if violations != nil {
|
||||
return nil, invalidArgumentError(violations)
|
||||
}
|
||||
|
||||
account, err := server.store.GetAccount(ctx, authPayload.AccountID)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
||||
}
|
||||
slog.Error("get_payment (get_account)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("payment_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to get account")
|
||||
}
|
||||
|
||||
if authPayload.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
payment, err := server.store.GetPayment(ctx, req.GetId())
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Error(codes.NotFound, "no payments found")
|
||||
}
|
||||
slog.Error("get_payment (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("payment_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.NotFound, "failed to get payments")
|
||||
}
|
||||
|
||||
if account.ID != payment.AccountID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
rsp := &pb.GetPaymentResponse{
|
||||
Payment: convertPayment(payment),
|
||||
}
|
||||
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func validateGetPaymentRequest(req *pb.GetPaymentRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||
if req.GetId() < 1 {
|
||||
violations = append(violations, fieldViolation("id", errors.New("must be greater than 0")))
|
||||
}
|
||||
|
||||
return violations
|
||||
}
|
69
bff/gapi/rpc_get_person.go
Normal file
69
bff/gapi/rpc_get_person.go
Normal file
@ -0,0 +1,69 @@
|
||||
package gapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
"google.golang.org/genproto/googleapis/rpc/errdetails"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
func (server *Server) GetPerson(ctx context.Context, req *pb.GetPersonRequest) (*pb.GetPersonResponse, error) {
|
||||
authPayload, err := server.authorizeUser(ctx)
|
||||
if err != nil {
|
||||
return nil, unauthenticatedError(err)
|
||||
}
|
||||
|
||||
violations := validateGetPersonRequest(req)
|
||||
if violations != nil {
|
||||
return nil, invalidArgumentError(violations)
|
||||
}
|
||||
|
||||
account, err := server.store.GetAccount(ctx, authPayload.AccountID)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
||||
}
|
||||
slog.Error("get_person (get_account)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("person_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to get account")
|
||||
}
|
||||
|
||||
if authPayload.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
person, err := server.store.GetPerson(ctx, req.GetId())
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Error(codes.NotFound, "no persons found")
|
||||
}
|
||||
slog.Error("get_person (get_person)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("person_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.NotFound, "failed to get persons")
|
||||
}
|
||||
|
||||
if account.ID != person.AccountID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
rsp := &pb.GetPersonResponse{
|
||||
Person: convertPerson(person),
|
||||
}
|
||||
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func validateGetPersonRequest(req *pb.GetPersonRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||
if req.GetId() < 1 {
|
||||
violations = append(violations, fieldViolation("id", errors.New("must be greater than 0")))
|
||||
}
|
||||
|
||||
return violations
|
||||
}
|
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
db "github.com/itsscb/df/bff/db/sqlc"
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
@ -24,8 +25,8 @@ func (server *Server) ListAccounts(ctx context.Context, req *pb.ListAccountsRequ
|
||||
}
|
||||
|
||||
arg := db.ListAccountsParams{
|
||||
Limit: req.GetPageSize(),
|
||||
Offset: (req.GetPageId() - 1) * req.GetPageSize(),
|
||||
Limit: int32(req.GetPageSize()),
|
||||
Offset: int32((req.GetPageId() - 1) * req.GetPageSize()),
|
||||
}
|
||||
|
||||
dbAccounts, err := server.store.ListAccounts(ctx, arg)
|
||||
@ -33,6 +34,7 @@ func (server *Server) ListAccounts(ctx context.Context, req *pb.ListAccountsRequ
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Error(codes.NotFound, "no accounts found")
|
||||
}
|
||||
slog.Error("list_accounts (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int("page_id", int(req.GetPageId())), slog.Int("page_size", int(req.GetPageSize())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.NotFound, "failed to get accounts")
|
||||
}
|
||||
|
||||
@ -46,7 +48,7 @@ func (server *Server) ListAccounts(ctx context.Context, req *pb.ListAccountsRequ
|
||||
}
|
||||
|
||||
rsp := &pb.ListAccountsResponse{
|
||||
Account: accounts,
|
||||
Accounts: accounts,
|
||||
}
|
||||
|
||||
return rsp, nil
|
||||
|
74
bff/gapi/rpc_list_payments.go
Normal file
74
bff/gapi/rpc_list_payments.go
Normal file
@ -0,0 +1,74 @@
|
||||
package gapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
"google.golang.org/genproto/googleapis/rpc/errdetails"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
func (server *Server) ListPayments(ctx context.Context, req *pb.ListPaymentsRequest) (*pb.ListPaymentsResponse, error) {
|
||||
authPayload, err := server.authorizeUser(ctx)
|
||||
if err != nil {
|
||||
return nil, unauthenticatedError(err)
|
||||
}
|
||||
|
||||
violations := validateListPaymentsRequest(req)
|
||||
if violations != nil {
|
||||
return nil, invalidArgumentError(violations)
|
||||
}
|
||||
|
||||
account, err := server.store.GetAccount(ctx, authPayload.AccountID)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
||||
}
|
||||
slog.Error("list_payments (get_account)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetAccountId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to get account")
|
||||
}
|
||||
|
||||
if authPayload.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
if account.ID != req.GetAccountId() {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
dbPayments, err := server.store.ListPayments(ctx, account.ID)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Error(codes.NotFound, "no payments found")
|
||||
}
|
||||
slog.Error("list_payments (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetAccountId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.NotFound, "failed to get payments")
|
||||
}
|
||||
|
||||
var payments []*pb.Payment
|
||||
for _, a := range dbPayments {
|
||||
payments = append(payments, convertPayment(a))
|
||||
}
|
||||
|
||||
rsp := &pb.ListPaymentsResponse{
|
||||
Payments: payments,
|
||||
}
|
||||
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func validateListPaymentsRequest(req *pb.ListPaymentsRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||
if req.GetAccountId() < 1 {
|
||||
violations = append(violations, fieldViolation("account_id", errors.New("must be greater than 0")))
|
||||
}
|
||||
|
||||
return violations
|
||||
}
|
74
bff/gapi/rpc_list_persons.go
Normal file
74
bff/gapi/rpc_list_persons.go
Normal file
@ -0,0 +1,74 @@
|
||||
package gapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
"google.golang.org/genproto/googleapis/rpc/errdetails"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
func (server *Server) ListPersons(ctx context.Context, req *pb.ListPersonsRequest) (*pb.ListPersonsResponse, error) {
|
||||
authPayload, err := server.authorizeUser(ctx)
|
||||
if err != nil {
|
||||
return nil, unauthenticatedError(err)
|
||||
}
|
||||
|
||||
violations := validateListPersonsRequest(req)
|
||||
if violations != nil {
|
||||
return nil, invalidArgumentError(violations)
|
||||
}
|
||||
|
||||
account, err := server.store.GetAccount(ctx, authPayload.AccountID)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
||||
}
|
||||
slog.Error("list_persons (get_account)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetAccountId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to get account")
|
||||
}
|
||||
|
||||
if authPayload.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
if account.ID != req.GetAccountId() {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
dbPersons, err := server.store.ListPersons(ctx, account.ID)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Error(codes.NotFound, "no persons found")
|
||||
}
|
||||
slog.Error("list_persons (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetAccountId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.NotFound, "failed to get persons")
|
||||
}
|
||||
|
||||
var persons []*pb.Person
|
||||
for _, a := range dbPersons {
|
||||
persons = append(persons, convertPerson(a))
|
||||
}
|
||||
|
||||
rsp := &pb.ListPersonsResponse{
|
||||
Persons: persons,
|
||||
}
|
||||
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func validateListPersonsRequest(req *pb.ListPersonsRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||
if req.GetAccountId() < 1 {
|
||||
violations = append(violations, fieldViolation("account_id", errors.New("must be greater than 0")))
|
||||
}
|
||||
|
||||
return violations
|
||||
}
|
74
bff/gapi/rpc_list_returns_log_by_person_id.go
Normal file
74
bff/gapi/rpc_list_returns_log_by_person_id.go
Normal file
@ -0,0 +1,74 @@
|
||||
package gapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
"google.golang.org/genproto/googleapis/rpc/errdetails"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
func (server *Server) ListReturnsLog(ctx context.Context, req *pb.ListReturnsLogRequest) (*pb.ListReturnsLogResponse, error) {
|
||||
authPayload, err := server.authorizeUser(ctx)
|
||||
if err != nil {
|
||||
return nil, unauthenticatedError(err)
|
||||
}
|
||||
|
||||
violations := validateListReturnsLogRequest(req)
|
||||
if violations != nil {
|
||||
return nil, invalidArgumentError(violations)
|
||||
}
|
||||
|
||||
account, err := server.store.GetAccount(ctx, authPayload.AccountID)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
||||
}
|
||||
slog.Error("list_returns_log_by_person_id (get_account)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("person_id", int64(req.GetPersonId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to get account")
|
||||
}
|
||||
|
||||
if authPayload.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
// if account.ID != req.GetPersonId() {
|
||||
// if !server.isAdmin(ctx, authPayload) {
|
||||
// return nil, status.Error(codes.NotFound, "account not found")
|
||||
// }
|
||||
// }
|
||||
|
||||
dbReturnsLog, err := server.store.ListReturnsLogsByPersonID(ctx, req.GetPersonId())
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Error(codes.NotFound, "no returns_logs found")
|
||||
}
|
||||
slog.Error("list_returns_log_by_person_id (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("person_id", int64(req.GetPersonId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.NotFound, "failed to get returns_logs")
|
||||
}
|
||||
|
||||
var returns_logs []*pb.ReturnsLog
|
||||
for _, a := range dbReturnsLog {
|
||||
returns_logs = append(returns_logs, convertReturnsLog(a))
|
||||
}
|
||||
|
||||
rsp := &pb.ListReturnsLogResponse{
|
||||
ReturnsLog: returns_logs,
|
||||
}
|
||||
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func validateListReturnsLogRequest(req *pb.ListReturnsLogRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||
if req.GetPersonId() < 1 {
|
||||
violations = append(violations, fieldViolation("account_id", errors.New("must be greater than 0")))
|
||||
}
|
||||
|
||||
return violations
|
||||
}
|
@ -4,9 +4,9 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
"github.com/itsscb/df/bff/val"
|
||||
"google.golang.org/genproto/googleapis/rpc/errdetails"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
@ -23,18 +23,35 @@ func (server *Server) ListSessions(ctx context.Context, req *pb.ListSessionsRequ
|
||||
return nil, invalidArgumentError(violations)
|
||||
}
|
||||
|
||||
dbSessions, err := server.store.ListSessions(ctx, req.GetEmail())
|
||||
account, err := server.store.GetAccount(ctx, authPayload.AccountID)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
||||
}
|
||||
slog.Error("list_sessions (get_account)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetAccountId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to get account")
|
||||
}
|
||||
|
||||
if authPayload.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
if account.ID != req.GetAccountId() {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
dbSessions, err := server.store.ListSessions(ctx, account.ID)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Error(codes.NotFound, "no accounts found")
|
||||
}
|
||||
slog.Error("list_sessions (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetAccountId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.NotFound, "failed to get accounts")
|
||||
}
|
||||
if authPayload.Email != req.GetEmail() {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.PermissionDenied, "only for administrators")
|
||||
}
|
||||
}
|
||||
|
||||
var sessions []*pb.Session
|
||||
for _, s := range dbSessions {
|
||||
@ -42,15 +59,15 @@ func (server *Server) ListSessions(ctx context.Context, req *pb.ListSessionsRequ
|
||||
}
|
||||
|
||||
rsp := &pb.ListSessionsResponse{
|
||||
Session: sessions,
|
||||
Sessions: sessions,
|
||||
}
|
||||
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func validateListSessionsRequest(req *pb.ListSessionsRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||
if err := val.ValidateEmail(req.GetEmail()); err != nil {
|
||||
violations = append(violations, fieldViolation("email", err))
|
||||
if req.GetAccountId() < 1 {
|
||||
violations = append(violations, fieldViolation("account_id", errors.New("must be greater than 0")))
|
||||
}
|
||||
|
||||
return violations
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
db "github.com/itsscb/df/bff/db/sqlc"
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
@ -27,6 +28,7 @@ func (server *Server) Login(ctx context.Context, req *pb.LoginRequest) (*pb.Logi
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
|
||||
}
|
||||
slog.Error("login (get_account)", slog.String("invoked_by", req.GetEmail()), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to get account")
|
||||
}
|
||||
|
||||
@ -37,25 +39,28 @@ func (server *Server) Login(ctx context.Context, req *pb.LoginRequest) (*pb.Logi
|
||||
|
||||
id, err := server.tokenMaker.NewTokenID()
|
||||
if err != nil {
|
||||
slog.Error("login (token_id)", slog.String("invoked_by", req.GetEmail()), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to create token id")
|
||||
}
|
||||
|
||||
refreshToken, refreshPayload, err := server.tokenMaker.CreateToken(
|
||||
account.Email,
|
||||
account.ID,
|
||||
id,
|
||||
server.config.RefreshTokenDuration,
|
||||
)
|
||||
if err != nil {
|
||||
slog.Error("login (refresh_token)", slog.String("invoked_by", req.GetEmail()), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to create refresh token")
|
||||
|
||||
}
|
||||
|
||||
accessToken, accessPayload, err := server.tokenMaker.CreateToken(
|
||||
account.Email,
|
||||
account.ID,
|
||||
id,
|
||||
server.config.AccessTokenDuration,
|
||||
)
|
||||
if err != nil {
|
||||
slog.Error("login (access_token)", slog.String("invoked_by", req.GetEmail()), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to create access token")
|
||||
}
|
||||
|
||||
@ -63,7 +68,7 @@ func (server *Server) Login(ctx context.Context, req *pb.LoginRequest) (*pb.Logi
|
||||
|
||||
_, err = server.store.CreateSession(ctx, db.CreateSessionParams{
|
||||
ID: refreshPayload.ID,
|
||||
Email: account.Email,
|
||||
AccountID: account.ID,
|
||||
RefreshToken: refreshToken,
|
||||
UserAgent: mtdt.UserAgent,
|
||||
ClientIp: mtdt.ClientIP,
|
||||
@ -71,6 +76,7 @@ func (server *Server) Login(ctx context.Context, req *pb.LoginRequest) (*pb.Logi
|
||||
ExpiresAt: refreshPayload.ExpiredAt,
|
||||
})
|
||||
if err != nil {
|
||||
slog.Error("login (db)", slog.String("invoked_by", req.GetEmail()), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to create session")
|
||||
|
||||
}
|
||||
@ -81,7 +87,7 @@ func (server *Server) Login(ctx context.Context, req *pb.LoginRequest) (*pb.Logi
|
||||
AccessTokenExpiresAt: timestamppb.New(accessPayload.ExpiredAt),
|
||||
RefreshToken: refreshToken,
|
||||
RefreshTokenExpiresAt: timestamppb.New(refreshPayload.ExpiredAt),
|
||||
Email: account.Email,
|
||||
AccountId: account.ID,
|
||||
}
|
||||
return rsp, nil
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
"time"
|
||||
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
@ -31,6 +32,7 @@ func (server *Server) RefreshToken(ctx context.Context, req *pb.RefreshTokenRequ
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Error(codes.NotFound, "session not found")
|
||||
}
|
||||
slog.Error("refresh_token (get_account)", slog.Int64("invoked_by", int64(refreshPayload.AccountID)), slog.String("refresh_token", req.GetRefreshToken()), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "cannot find session")
|
||||
}
|
||||
|
||||
@ -38,7 +40,7 @@ func (server *Server) RefreshToken(ctx context.Context, req *pb.RefreshTokenRequ
|
||||
return nil, status.Error(codes.PermissionDenied, "session is blocked")
|
||||
}
|
||||
|
||||
if session.Email != refreshPayload.Email {
|
||||
if session.AccountID != refreshPayload.AccountID {
|
||||
return nil, status.Error(codes.PermissionDenied, "invalid account session")
|
||||
|
||||
}
|
||||
@ -54,14 +56,16 @@ func (server *Server) RefreshToken(ctx context.Context, req *pb.RefreshTokenRequ
|
||||
|
||||
id, err := server.tokenMaker.NewTokenID()
|
||||
if err != nil {
|
||||
slog.Error("refresh_token (token_id)", slog.Int64("invoked_by", int64(refreshPayload.AccountID)), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to create session token")
|
||||
}
|
||||
accessToken, accessPayload, err := server.tokenMaker.CreateToken(
|
||||
refreshPayload.Email,
|
||||
refreshPayload.AccountID,
|
||||
id,
|
||||
server.config.AccessTokenDuration,
|
||||
)
|
||||
if err != nil {
|
||||
slog.Error("refresh_token (access_token)", slog.Int64("invoked_by", int64(refreshPayload.AccountID)), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to create session token")
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
db "github.com/itsscb/df/bff/db/sqlc"
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
@ -25,15 +26,20 @@ func (server *Server) UpdateAccount(ctx context.Context, req *pb.UpdateAccountRe
|
||||
return nil, invalidArgumentError(violations)
|
||||
}
|
||||
|
||||
if authPayload.Email != req.GetEmail() {
|
||||
if authPayload.AccountID != req.GetId() {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
account, err := server.store.GetAccount(ctx, req.GetId())
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
|
||||
arg := db.UpdateAccountTxParams{
|
||||
ID: req.GetId(),
|
||||
Changer: authPayload.Email,
|
||||
Changer: account.Email,
|
||||
Email: sql.NullString{
|
||||
Valid: req.GetEmail() != "",
|
||||
String: req.GetEmail(),
|
||||
@ -75,6 +81,7 @@ func (server *Server) UpdateAccount(ctx context.Context, req *pb.UpdateAccountRe
|
||||
if req.Password != nil {
|
||||
hashedPassword, err := util.HashPassword(req.GetPassword())
|
||||
if err != nil {
|
||||
slog.Error("update_account (hash_password)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to hash password")
|
||||
}
|
||||
|
||||
@ -84,8 +91,9 @@ func (server *Server) UpdateAccount(ctx context.Context, req *pb.UpdateAccountRe
|
||||
}
|
||||
}
|
||||
|
||||
account, err := server.store.UpdateAccountTx(ctx, arg)
|
||||
account, err = server.store.UpdateAccountTx(ctx, arg)
|
||||
if err != nil {
|
||||
slog.Error("update_account (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to update account")
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
db "github.com/itsscb/df/bff/db/sqlc"
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
@ -28,10 +29,11 @@ func (server *Server) UpdateAccountPrivacy(ctx context.Context, req *pb.UpdateAc
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
||||
}
|
||||
slog.Error("update_account_privacy (get_account)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Errorf(codes.Internal, "failed to get account")
|
||||
}
|
||||
|
||||
if authPayload.Email != account.Email {
|
||||
if authPayload.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
@ -39,13 +41,14 @@ func (server *Server) UpdateAccountPrivacy(ctx context.Context, req *pb.UpdateAc
|
||||
privacyAccepted := req.GetPrivacyAccepted()
|
||||
|
||||
arg := db.UpdateAccountPrivacyTxParams{
|
||||
Changer: authPayload.Email,
|
||||
Changer: account.Email,
|
||||
ID: req.GetId(),
|
||||
PrivacyAccepted: &privacyAccepted,
|
||||
}
|
||||
|
||||
account, err = server.store.UpdateAccountPrivacyTx(ctx, arg)
|
||||
if err != nil {
|
||||
slog.Error("update_account_privacy (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to update account privacy")
|
||||
}
|
||||
|
||||
|
120
bff/gapi/rpc_update_payment.go
Normal file
120
bff/gapi/rpc_update_payment.go
Normal file
@ -0,0 +1,120 @@
|
||||
package gapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
db "github.com/itsscb/df/bff/db/sqlc"
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
"github.com/itsscb/df/bff/val"
|
||||
"google.golang.org/genproto/googleapis/rpc/errdetails"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
func (server *Server) UpdatePayment(ctx context.Context, req *pb.UpdatePaymentRequest) (*pb.UpdatePaymentResponse, error) {
|
||||
authPayload, err := server.authorizeUser(ctx)
|
||||
if err != nil {
|
||||
return nil, unauthenticatedError(err)
|
||||
}
|
||||
|
||||
violations := validateUpdatePaymentRequest(req)
|
||||
if violations != nil {
|
||||
return nil, invalidArgumentError(violations)
|
||||
}
|
||||
|
||||
account, err := server.store.GetAccount(ctx, authPayload.AccountID)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
||||
}
|
||||
slog.Error("update_payment (get_account)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("payment_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to get account")
|
||||
}
|
||||
|
||||
if authPayload.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
dbPayment, err := server.store.GetPayment(ctx, req.GetId())
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "payment not found")
|
||||
}
|
||||
slog.Error("update_payment (get_payment)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("payment_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to get payment")
|
||||
}
|
||||
|
||||
if dbPayment.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "payment not found")
|
||||
}
|
||||
}
|
||||
|
||||
arg := db.UpdatePaymentParams{
|
||||
ID: req.GetId(),
|
||||
PaymentCategory: sql.NullString{
|
||||
Valid: req.GetPaymentCategory() != "",
|
||||
String: req.GetPaymentCategory(),
|
||||
},
|
||||
Bankname: sql.NullString{
|
||||
Valid: req.GetBankname() != "",
|
||||
String: req.GetBankname(),
|
||||
},
|
||||
Iban: sql.NullString{
|
||||
Valid: req.GetIBAN() != "",
|
||||
String: req.GetIBAN(),
|
||||
},
|
||||
Bic: sql.NullString{
|
||||
Valid: req.GetBIC() != "",
|
||||
String: req.GetBIC(),
|
||||
},
|
||||
PaypalAccount: sql.NullString{
|
||||
Valid: req.GetPaypalAccount() != "",
|
||||
String: req.GetPaypalAccount(),
|
||||
},
|
||||
PaypalID: sql.NullString{
|
||||
Valid: req.GetPaypalId() != "",
|
||||
String: req.GetPaypalId(),
|
||||
},
|
||||
PaymentSystem: sql.NullString{
|
||||
Valid: req.GetPaymentSystem() != "",
|
||||
String: req.GetPaymentSystem(),
|
||||
},
|
||||
Type: sql.NullString{
|
||||
Valid: req.GetType() != "",
|
||||
String: req.GetType(),
|
||||
},
|
||||
Changer: account.Email,
|
||||
}
|
||||
|
||||
payment, err := server.store.UpdatePayment(ctx, arg)
|
||||
if err != nil {
|
||||
slog.Error("update_payment (get_payment)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("payment_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to update payment")
|
||||
}
|
||||
|
||||
rsp := &pb.UpdatePaymentResponse{
|
||||
Payment: convertPayment(payment),
|
||||
}
|
||||
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func validateUpdatePaymentRequest(req *pb.UpdatePaymentRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||
if req.GetId() < 1 {
|
||||
violations = append(violations, fieldViolation("id", errors.New("must be greater than 0")))
|
||||
}
|
||||
|
||||
if req.GetPaypalAccount() != "" {
|
||||
if err := val.ValidateEmail(req.GetPaypalAccount()); err != nil {
|
||||
violations = append(violations, fieldViolation("email", err))
|
||||
}
|
||||
}
|
||||
|
||||
return violations
|
||||
}
|
109
bff/gapi/rpc_update_person.go
Normal file
109
bff/gapi/rpc_update_person.go
Normal file
@ -0,0 +1,109 @@
|
||||
package gapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
"log/slog"
|
||||
|
||||
db "github.com/itsscb/df/bff/db/sqlc"
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
"google.golang.org/genproto/googleapis/rpc/errdetails"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
func (server *Server) UpdatePerson(ctx context.Context, req *pb.UpdatePersonRequest) (*pb.UpdatePersonResponse, error) {
|
||||
authPayload, err := server.authorizeUser(ctx)
|
||||
if err != nil {
|
||||
return nil, unauthenticatedError(err)
|
||||
}
|
||||
|
||||
violations := validateUpdatePersonRequest(req)
|
||||
if violations != nil {
|
||||
return nil, invalidArgumentError(violations)
|
||||
}
|
||||
|
||||
account, err := server.store.GetAccount(ctx, authPayload.AccountID)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
||||
}
|
||||
slog.Error("update_person (get_account)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("person_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to get account")
|
||||
}
|
||||
|
||||
if authPayload.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "account not found")
|
||||
}
|
||||
}
|
||||
|
||||
dbPerson, err := server.store.GetPerson(ctx, req.GetId())
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return nil, status.Errorf(codes.NotFound, "person not found")
|
||||
}
|
||||
slog.Error("update_person (get_person)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("person_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to get person")
|
||||
}
|
||||
|
||||
if dbPerson.AccountID != account.ID {
|
||||
if !server.isAdmin(ctx, authPayload) {
|
||||
return nil, status.Error(codes.NotFound, "person not found")
|
||||
}
|
||||
}
|
||||
|
||||
arg := db.UpdatePersonParams{
|
||||
ID: req.GetId(),
|
||||
Firstname: sql.NullString{
|
||||
Valid: req.GetFirstname() != "",
|
||||
String: req.GetFirstname(),
|
||||
},
|
||||
Lastname: sql.NullString{
|
||||
Valid: req.GetLastname() != "",
|
||||
String: req.GetLastname(),
|
||||
},
|
||||
City: sql.NullString{
|
||||
Valid: req.GetCity() != "",
|
||||
String: req.GetCity(),
|
||||
},
|
||||
Zip: sql.NullString{
|
||||
Valid: req.GetZip() != "",
|
||||
String: req.GetZip(),
|
||||
},
|
||||
Street: sql.NullString{
|
||||
Valid: req.GetStreet() != "",
|
||||
String: req.GetStreet(),
|
||||
},
|
||||
Country: sql.NullString{
|
||||
Valid: req.GetCountry() != "",
|
||||
String: req.GetCountry(),
|
||||
},
|
||||
Birthday: sql.NullTime{
|
||||
Valid: req.GetBirthday().IsValid(),
|
||||
Time: req.GetBirthday().AsTime(),
|
||||
},
|
||||
Changer: account.Email,
|
||||
}
|
||||
|
||||
person, err := server.store.UpdatePerson(ctx, arg)
|
||||
if err != nil {
|
||||
slog.Error("update_person (get_person)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("person_id", int64(req.GetId())), slog.String("error", err.Error()))
|
||||
return nil, status.Error(codes.Internal, "failed to update person")
|
||||
}
|
||||
|
||||
rsp := &pb.UpdatePersonResponse{
|
||||
Person: convertPerson(person),
|
||||
}
|
||||
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func validateUpdatePersonRequest(req *pb.UpdatePersonRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||
if req.GetId() < 1 {
|
||||
violations = append(violations, fieldViolation("id", errors.New("must be greater than 0")))
|
||||
}
|
||||
|
||||
return violations
|
||||
}
|
@ -32,12 +32,15 @@ func NewServer(config util.Config, store db.Store) (*Server, error) {
|
||||
}
|
||||
|
||||
logLevel := slog.LevelError
|
||||
var logSource bool
|
||||
if config.Environment == "development" {
|
||||
logLevel = slog.LevelDebug
|
||||
logSource = true
|
||||
}
|
||||
|
||||
opts := slog.HandlerOptions{
|
||||
Level: logLevel,
|
||||
Level: logLevel,
|
||||
AddSource: logSource,
|
||||
}
|
||||
logger := slog.New(slog.NewTextHandler(os.Stdout, &opts))
|
||||
|
||||
|
70
bff/gw/document.go
Normal file
70
bff/gw/document.go
Normal file
@ -0,0 +1,70 @@
|
||||
package gw
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"log/slog"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
db "github.com/itsscb/df/bff/db/sqlc"
|
||||
)
|
||||
|
||||
type uploadDocumentRequest struct {
|
||||
PersonID uint64 `form:"person_id"`
|
||||
MailID uint64 `form:"mail_id"`
|
||||
File *multipart.FileHeader `form:"file"`
|
||||
}
|
||||
|
||||
func (server *Server) UploadDocument(ctx *gin.Context) {
|
||||
authHeader := ctx.GetHeader("authorization")
|
||||
|
||||
authFields := strings.Fields(authHeader)
|
||||
|
||||
if len(authFields) != 2 {
|
||||
ctx.JSON(http.StatusUnauthorized, errorResponse(errors.New("invalid or missing authorization header")))
|
||||
return
|
||||
}
|
||||
|
||||
token := authFields[1]
|
||||
|
||||
authPayload, err := server.tokenMaker.VerifyToken(token)
|
||||
if err != nil {
|
||||
ctx.JSON(http.StatusUnauthorized, errorResponse(errors.New("invalid authorization header")))
|
||||
return
|
||||
}
|
||||
|
||||
account, err := server.store.GetAccount(ctx, authPayload.AccountID)
|
||||
if err != nil {
|
||||
ctx.JSON(http.StatusNotFound, errorResponse(errors.New("account not found")))
|
||||
return
|
||||
}
|
||||
|
||||
var req *uploadDocumentRequest
|
||||
err = ctx.ShouldBind(&req)
|
||||
if err != nil {
|
||||
ctx.JSON(http.StatusBadRequest, errorResponse(errors.New("failed to parse request")))
|
||||
return
|
||||
}
|
||||
|
||||
r := db.CreateDocumentTxParams{
|
||||
AccountID: account.ID,
|
||||
PersonID: req.PersonID,
|
||||
MailID: req.MailID,
|
||||
File: req.File,
|
||||
Creator: account.Email,
|
||||
}
|
||||
|
||||
doc, code, err := server.store.CreateDocumentTx(ctx, r)
|
||||
if err != nil {
|
||||
if code == http.StatusInternalServerError {
|
||||
slog.Error("create_document", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.String("document_name", req.File.Filename), slog.String("error", err.Error()))
|
||||
}
|
||||
ctx.JSON(code, errorResponse(err))
|
||||
return
|
||||
}
|
||||
|
||||
ctx.JSON(http.StatusOK, doc)
|
||||
}
|
47
bff/gw/server.go
Normal file
47
bff/gw/server.go
Normal file
@ -0,0 +1,47 @@
|
||||
package gw
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
db "github.com/itsscb/df/bff/db/sqlc"
|
||||
"github.com/itsscb/df/bff/gapi"
|
||||
"github.com/itsscb/df/bff/token"
|
||||
"github.com/itsscb/df/bff/util"
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
Grpc gapi.Server
|
||||
store db.Store
|
||||
config util.Config
|
||||
tokenMaker token.Maker
|
||||
swaggerFS http.FileSystem
|
||||
}
|
||||
|
||||
func NewServer(config util.Config, store db.Store, swaggerFS http.FileSystem) (*Server, error) {
|
||||
gprcServer, err := gapi.NewServer(config, store)
|
||||
if err != nil {
|
||||
log.Fatal("cannot create gateway gPRC server")
|
||||
}
|
||||
|
||||
tokenMaker, err := token.NewPasetoMaker(config.TokenPrivateKeyHex)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot create token maker for gateway server: %w", err)
|
||||
}
|
||||
|
||||
server := &Server{
|
||||
Grpc: *gprcServer,
|
||||
store: store,
|
||||
config: config,
|
||||
tokenMaker: tokenMaker,
|
||||
swaggerFS: swaggerFS,
|
||||
}
|
||||
|
||||
return server, nil
|
||||
}
|
||||
|
||||
func errorResponse(err error) gin.H {
|
||||
return gin.H{"error": err.Error()}
|
||||
}
|
20
bff/main.go
20
bff/main.go
@ -11,10 +11,12 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"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/gw"
|
||||
"github.com/itsscb/df/bff/pb"
|
||||
"github.com/itsscb/df/bff/util"
|
||||
_ "github.com/lib/pq"
|
||||
@ -109,11 +111,16 @@ func runGRPCServer(config util.Config, store db.Store) {
|
||||
}
|
||||
|
||||
func runGatewayServer(config util.Config, store db.Store, swaggerFS http.FileSystem) {
|
||||
server, err := gapi.NewServer(config, store)
|
||||
server, err := gw.NewServer(config, store, swaggerFS)
|
||||
if err != nil {
|
||||
log.Fatal("cannot create server")
|
||||
}
|
||||
|
||||
// server, err := gapi.NewServer(config, store)
|
||||
// if err != nil {
|
||||
// log.Fatal("cannot create server")
|
||||
// }
|
||||
|
||||
jsonOption := runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.JSONPb{
|
||||
MarshalOptions: protojson.MarshalOptions{
|
||||
UseProtoNames: true,
|
||||
@ -129,16 +136,15 @@ func runGatewayServer(config util.Config, store db.Store, swaggerFS http.FileSys
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
err = pb.RegisterDfHandlerServer(ctx, grpcMux, server)
|
||||
err = pb.RegisterDfHandlerServer(ctx, grpcMux, &server.Grpc)
|
||||
if err != nil {
|
||||
log.Fatal("cannot register handler server")
|
||||
}
|
||||
|
||||
mux := http.NewServeMux()
|
||||
mux.Handle("/", grpcMux)
|
||||
|
||||
swaggerHandler := http.StripPrefix("/swagger/", http.FileServer(swaggerFS))
|
||||
mux.Handle("/swagger/", swaggerHandler)
|
||||
mux := gin.New()
|
||||
mux.Group("v1/*{grpc_gateway}").Any("", gin.WrapH(grpcMux))
|
||||
mux.POST("documents/upload", server.UploadDocument)
|
||||
mux.StaticFS("/swagger/", swaggerFS)
|
||||
|
||||
listener, err := net.Listen("tcp", config.HTTPServerAddress)
|
||||
if err != nil {
|
||||
|
@ -27,7 +27,7 @@ type Account struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
|
||||
Firstname string `protobuf:"bytes,3,opt,name=firstname,proto3" json:"firstname,omitempty"`
|
||||
Lastname string `protobuf:"bytes,4,opt,name=lastname,proto3" json:"lastname,omitempty"`
|
||||
@ -78,7 +78,7 @@ func (*Account) Descriptor() ([]byte, []int) {
|
||||
return file_account_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Account) GetId() int64 {
|
||||
func (x *Account) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
@ -207,7 +207,7 @@ var file_account_proto_rawDesc = []byte{
|
||||
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, 0xae, 0x09, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 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,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74,
|
||||
|
292
bff/pb/document.pb.go
Normal file
292
bff/pb/document.pb.go
Normal file
@ -0,0 +1,292 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.4
|
||||
// source: document.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type Document struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
PersonId *uint64 `protobuf:"varint,1,opt,name=person_id,json=personId,proto3,oneof" json:"person_id,omitempty"`
|
||||
MailId *uint64 `protobuf:"varint,2,opt,name=mail_id,json=mailId,proto3,oneof" json:"mail_id,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"`
|
||||
Url string `protobuf:"bytes,6,opt,name=url,proto3" json:"url,omitempty"`
|
||||
Valid bool `protobuf:"varint,7,opt,name=valid,proto3" json:"valid,omitempty"`
|
||||
ValidatedBy string `protobuf:"bytes,8,opt,name=validated_by,json=validatedBy,proto3" json:"validated_by,omitempty"`
|
||||
ValidDate *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=valid_date,json=validDate,proto3" json:"valid_date,omitempty"`
|
||||
Creator string `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"`
|
||||
Created *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=created,proto3" json:"created,omitempty"`
|
||||
Changer string `protobuf:"bytes,12,opt,name=changer,proto3" json:"changer,omitempty"`
|
||||
Changed *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=changed,proto3" json:"changed,omitempty"`
|
||||
Id uint64 `protobuf:"varint,14,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Document) Reset() {
|
||||
*x = Document{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_document_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Document) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Document) ProtoMessage() {}
|
||||
|
||||
func (x *Document) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_document_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Document.ProtoReflect.Descriptor instead.
|
||||
func (*Document) Descriptor() ([]byte, []int) {
|
||||
return file_document_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Document) GetPersonId() uint64 {
|
||||
if x != nil && x.PersonId != nil {
|
||||
return *x.PersonId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Document) GetMailId() uint64 {
|
||||
if x != nil && x.MailId != nil {
|
||||
return *x.MailId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Document) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Document) GetType() string {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Document) GetPath() string {
|
||||
if x != nil {
|
||||
return x.Path
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Document) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Document) GetValid() bool {
|
||||
if x != nil {
|
||||
return x.Valid
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Document) GetValidatedBy() string {
|
||||
if x != nil {
|
||||
return x.ValidatedBy
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Document) GetValidDate() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.ValidDate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Document) GetCreator() string {
|
||||
if x != nil {
|
||||
return x.Creator
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Document) GetCreated() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Created
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Document) GetChanger() string {
|
||||
if x != nil {
|
||||
return x.Changer
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Document) GetChanged() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Changed
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Document) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_document_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_document_proto_rawDesc = []byte{
|
||||
0x0a, 0x0e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x12, 0x02, 0x70, 0x62, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e,
|
||||
0x70, 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, 0xbe, 0x04, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49,
|
||||
0x64, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x06, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x64, 0x88,
|
||||
0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
|
||||
0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
|
||||
0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x61,
|
||||
0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x56, 0x0a, 0x0a, 0x76, 0x61, 0x6c,
|
||||
0x69, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
|
||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16,
|
||||
0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30,
|
||||
0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x44, 0x61, 0x74,
|
||||
0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x07, 0x63,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
|
||||
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22,
|
||||
0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30,
|
||||
0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x32, 0x30, 0x32,
|
||||
0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30,
|
||||
0x5a, 0x22, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x0f, 0x92, 0x41, 0x0c,
|
||||
0x0a, 0x0a, 0x2a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0c, 0x0a, 0x0a,
|
||||
0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d,
|
||||
0x61, 0x69, 0x6c, 0x5f, 0x69, 0x64, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70,
|
||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_document_proto_rawDescOnce sync.Once
|
||||
file_document_proto_rawDescData = file_document_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_document_proto_rawDescGZIP() []byte {
|
||||
file_document_proto_rawDescOnce.Do(func() {
|
||||
file_document_proto_rawDescData = protoimpl.X.CompressGZIP(file_document_proto_rawDescData)
|
||||
})
|
||||
return file_document_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_document_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_document_proto_goTypes = []interface{}{
|
||||
(*Document)(nil), // 0: pb.Document
|
||||
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
|
||||
}
|
||||
var file_document_proto_depIdxs = []int32{
|
||||
1, // 0: pb.Document.valid_date:type_name -> google.protobuf.Timestamp
|
||||
1, // 1: pb.Document.created:type_name -> google.protobuf.Timestamp
|
||||
1, // 2: pb.Document.changed:type_name -> google.protobuf.Timestamp
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_document_proto_init() }
|
||||
func file_document_proto_init() {
|
||||
if File_document_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_document_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Document); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_document_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_document_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_document_proto_goTypes,
|
||||
DependencyIndexes: file_document_proto_depIdxs,
|
||||
MessageInfos: file_document_proto_msgTypes,
|
||||
}.Build()
|
||||
File_document_proto = out.File
|
||||
file_document_proto_rawDesc = nil
|
||||
file_document_proto_goTypes = nil
|
||||
file_document_proto_depIdxs = nil
|
||||
}
|
317
bff/pb/payment.pb.go
Normal file
317
bff/pb/payment.pb.go
Normal file
@ -0,0 +1,317 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.4
|
||||
// source: payment.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type Payment struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
AccountId uint64 `protobuf:"varint,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
|
||||
PaymentCategory string `protobuf:"bytes,3,opt,name=payment_category,json=paymentCategory,proto3" json:"payment_category,omitempty"`
|
||||
Bankname *string `protobuf:"bytes,4,opt,name=bankname,proto3,oneof" json:"bankname,omitempty"`
|
||||
IBAN *string `protobuf:"bytes,5,opt,name=IBAN,proto3,oneof" json:"IBAN,omitempty"`
|
||||
BIC *string `protobuf:"bytes,6,opt,name=BIC,proto3,oneof" json:"BIC,omitempty"`
|
||||
PaypalAccount *string `protobuf:"bytes,7,opt,name=paypal_account,json=paypalAccount,proto3,oneof" json:"paypal_account,omitempty"`
|
||||
PaypalId *string `protobuf:"bytes,8,opt,name=paypal_id,json=paypalId,proto3,oneof" json:"paypal_id,omitempty"`
|
||||
PaymentSystem *string `protobuf:"bytes,9,opt,name=payment_system,json=paymentSystem,proto3,oneof" json:"payment_system,omitempty"`
|
||||
Type string `protobuf:"bytes,10,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Creator string `protobuf:"bytes,11,opt,name=creator,proto3" json:"creator,omitempty"`
|
||||
Created *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=created,proto3" json:"created,omitempty"`
|
||||
Changer string `protobuf:"bytes,13,opt,name=changer,proto3" json:"changer,omitempty"`
|
||||
Changed *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=changed,proto3" json:"changed,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Payment) Reset() {
|
||||
*x = Payment{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_payment_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Payment) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Payment) ProtoMessage() {}
|
||||
|
||||
func (x *Payment) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_payment_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Payment.ProtoReflect.Descriptor instead.
|
||||
func (*Payment) Descriptor() ([]byte, []int) {
|
||||
return file_payment_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Payment) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Payment) GetAccountId() uint64 {
|
||||
if x != nil {
|
||||
return x.AccountId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Payment) GetPaymentCategory() string {
|
||||
if x != nil {
|
||||
return x.PaymentCategory
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Payment) GetBankname() string {
|
||||
if x != nil && x.Bankname != nil {
|
||||
return *x.Bankname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Payment) GetIBAN() string {
|
||||
if x != nil && x.IBAN != nil {
|
||||
return *x.IBAN
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Payment) GetBIC() string {
|
||||
if x != nil && x.BIC != nil {
|
||||
return *x.BIC
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Payment) GetPaypalAccount() string {
|
||||
if x != nil && x.PaypalAccount != nil {
|
||||
return *x.PaypalAccount
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Payment) GetPaypalId() string {
|
||||
if x != nil && x.PaypalId != nil {
|
||||
return *x.PaypalId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Payment) GetPaymentSystem() string {
|
||||
if x != nil && x.PaymentSystem != nil {
|
||||
return *x.PaymentSystem
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Payment) GetType() string {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Payment) GetCreator() string {
|
||||
if x != nil {
|
||||
return x.Creator
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Payment) GetCreated() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Created
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Payment) GetChanger() string {
|
||||
if x != nil {
|
||||
return x.Changer
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Payment) GetChanged() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Changed
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_payment_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_payment_proto_rawDesc = []byte{
|
||||
0x0a, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x02, 0x70, 0x62, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70,
|
||||
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, 0xdf, 0x07, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64,
|
||||
0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12,
|
||||
0x29, 0x0a, 0x10, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67,
|
||||
0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x08, 0x62, 0x61,
|
||||
0x6e, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08,
|
||||
0x62, 0x61, 0x6e, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x49,
|
||||
0x42, 0x41, 0x4e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x49, 0x42, 0x41,
|
||||
0x4e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x42, 0x49, 0x43, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x09, 0x48, 0x02, 0x52, 0x03, 0x42, 0x49, 0x43, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70,
|
||||
0x61, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20,
|
||||
0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x41, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x79, 0x70, 0x61,
|
||||
0x6c, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x08, 0x70, 0x61,
|
||||
0x79, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28,
|
||||
0x09, 0x48, 0x05, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x79, 0x73, 0x74,
|
||||
0x65, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65,
|
||||
0x61, 0x74, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61,
|
||||
0x74, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0c,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
|
||||
0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d,
|
||||
0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x07, 0x63,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
|
||||
0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x72,
|
||||
0x12, 0x51, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92,
|
||||
0x41, 0x18, 0x4a, 0x16, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54,
|
||||
0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x64, 0x3a, 0xee, 0x02, 0x92, 0x41, 0xea, 0x02, 0x0a, 0x09, 0x2a, 0x07, 0x50, 0x61,
|
||||
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0xdc, 0x02, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22,
|
||||
0x31, 0x22, 0x2c, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x3a,
|
||||
0x20, 0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63,
|
||||
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x42, 0x44, 0x3a, 0x20,
|
||||
0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c,
|
||||
0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20,
|
||||
0x22, 0x74, 0x68, 0x69, 0x73, 0x2d, 0x69, 0x73, 0x2d, 0x61, 0x2d, 0x70, 0x61, 0x79, 0x70, 0x61,
|
||||
0x6c, 0x2d, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f,
|
||||
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x42, 0x44, 0x3a, 0x20, 0x70,
|
||||
0x61, 0x79, 0x70, 0x61, 0x6c, 0x20, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x2c, 0x20, 0x22,
|
||||
0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x42, 0x44, 0x3a, 0x20, 0x73, 0x6f, 0x6d,
|
||||
0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 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, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x61, 0x6e, 0x6b, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x49, 0x42, 0x41, 0x4e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x42,
|
||||
0x49, 0x43, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c,
|
||||
0x5f, 0x69, 0x64, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f,
|
||||
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70,
|
||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_payment_proto_rawDescOnce sync.Once
|
||||
file_payment_proto_rawDescData = file_payment_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_payment_proto_rawDescGZIP() []byte {
|
||||
file_payment_proto_rawDescOnce.Do(func() {
|
||||
file_payment_proto_rawDescData = protoimpl.X.CompressGZIP(file_payment_proto_rawDescData)
|
||||
})
|
||||
return file_payment_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_payment_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_payment_proto_goTypes = []interface{}{
|
||||
(*Payment)(nil), // 0: pb.Payment
|
||||
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
|
||||
}
|
||||
var file_payment_proto_depIdxs = []int32{
|
||||
1, // 0: pb.Payment.created:type_name -> google.protobuf.Timestamp
|
||||
1, // 1: pb.Payment.changed:type_name -> google.protobuf.Timestamp
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_payment_proto_init() }
|
||||
func file_payment_proto_init() {
|
||||
if File_payment_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_payment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Payment); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_payment_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_payment_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_payment_proto_goTypes,
|
||||
DependencyIndexes: file_payment_proto_depIdxs,
|
||||
MessageInfos: file_payment_proto_msgTypes,
|
||||
}.Build()
|
||||
File_payment_proto = out.File
|
||||
file_payment_proto_rawDesc = nil
|
||||
file_payment_proto_goTypes = nil
|
||||
file_payment_proto_depIdxs = nil
|
||||
}
|
@ -27,7 +27,8 @@ type Person struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
AccountId int64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
AccountId uint64 `protobuf:"varint,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
|
||||
Firstname string `protobuf:"bytes,3,opt,name=firstname,proto3" json:"firstname,omitempty"`
|
||||
Lastname string `protobuf:"bytes,4,opt,name=lastname,proto3" json:"lastname,omitempty"`
|
||||
Street string `protobuf:"bytes,5,opt,name=street,proto3" json:"street,omitempty"`
|
||||
@ -73,7 +74,14 @@ func (*Person) Descriptor() ([]byte, []int) {
|
||||
return file_person_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Person) GetAccountId() int64 {
|
||||
func (x *Person) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Person) GetAccountId() uint64 {
|
||||
if x != nil {
|
||||
return x.AccountId
|
||||
}
|
||||
@ -166,9 +174,10 @@ var file_person_proto_rawDesc = []byte{
|
||||
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, 0xa7, 0x07, 0x0a, 0x06, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1d,
|
||||
0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a,
|
||||
0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x07, 0x0a, 0x06, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x0e,
|
||||
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d,
|
||||
0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x04, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c,
|
||||
0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c,
|
||||
|
255
bff/pb/returns_log.pb.go
Normal file
255
bff/pb/returns_log.pb.go
Normal file
@ -0,0 +1,255 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.4
|
||||
// source: returns_log.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type ReturnsLog struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
ReturnId uint64 `protobuf:"varint,2,opt,name=return_id,json=returnId,proto3" json:"return_id,omitempty"`
|
||||
MailId uint64 `protobuf:"varint,3,opt,name=mail_id,json=mailId,proto3" json:"mail_id,omitempty"`
|
||||
Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Creator string `protobuf:"bytes,5,opt,name=creator,proto3" json:"creator,omitempty"`
|
||||
Created *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created,proto3" json:"created,omitempty"`
|
||||
Changer string `protobuf:"bytes,7,opt,name=changer,proto3" json:"changer,omitempty"`
|
||||
Changed *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=changed,proto3" json:"changed,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ReturnsLog) Reset() {
|
||||
*x = ReturnsLog{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_returns_log_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ReturnsLog) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ReturnsLog) ProtoMessage() {}
|
||||
|
||||
func (x *ReturnsLog) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_returns_log_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ReturnsLog.ProtoReflect.Descriptor instead.
|
||||
func (*ReturnsLog) Descriptor() ([]byte, []int) {
|
||||
return file_returns_log_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ReturnsLog) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ReturnsLog) GetReturnId() uint64 {
|
||||
if x != nil {
|
||||
return x.ReturnId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ReturnsLog) GetMailId() uint64 {
|
||||
if x != nil {
|
||||
return x.MailId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ReturnsLog) GetStatus() string {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ReturnsLog) GetCreator() string {
|
||||
if x != nil {
|
||||
return x.Creator
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ReturnsLog) GetCreated() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Created
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ReturnsLog) GetChanger() string {
|
||||
if x != nil {
|
||||
return x.Changer
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ReturnsLog) GetChanged() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Changed
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_returns_log_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_returns_log_proto_rawDesc = []byte{
|
||||
0x0a, 0x11, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
|
||||
0x6d, 0x70, 0x2e, 0x70, 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, 0x87, 0x06, 0x0a, 0x0a, 0x52, 0x65, 0x74,
|
||||
0x75, 0x72, 0x6e, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72,
|
||||
0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x74, 0x75,
|
||||
0x72, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x64, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12,
|
||||
0x51, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41,
|
||||
0x18, 0x4a, 0x16, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30,
|
||||
0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x18, 0x07, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x07,
|
||||
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
|
||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16,
|
||||
0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30,
|
||||
0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x3a,
|
||||
0xc0, 0x03, 0x92, 0x41, 0xbc, 0x03, 0x0a, 0x0c, 0x2a, 0x0a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e,
|
||||
0x73, 0x4c, 0x6f, 0x67, 0x32, 0xab, 0x03, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31,
|
||||
0x22, 0x2c, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x3a, 0x20, 0x22, 0x6a, 0x6f, 0x68, 0x6e,
|
||||
0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x22, 0x2c, 0x20, 0x22, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20,
|
||||
0x22, 0x4a, 0x6f, 0x68, 0x6e, 0x22, 0x2c, 0x20, 0x22, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x6f, 0x65, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x68, 0x6f, 0x6e,
|
||||
0x65, 0x22, 0x3a, 0x20, 0x22, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x22,
|
||||
0x3a, 0x20, 0x22, 0x44, 0x65, 0x61, 0x74, 0x68, 0x20, 0x53, 0x74, 0x61, 0x72, 0x20, 0x32, 0x22,
|
||||
0x2c, 0x20, 0x22, 0x7a, 0x69, 0x70, 0x22, 0x3a, 0x20, 0x22, 0x30, 0x38, 0x31, 0x35, 0x22, 0x2c,
|
||||
0x20, 0x22, 0x63, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x4e, 0x65, 0x77, 0x20, 0x59, 0x6f,
|
||||
0x72, 0x6b, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x3a, 0x20,
|
||||
0x22, 0x55, 0x53, 0x41, 0x22, 0x2c, 0x20, 0x22, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79,
|
||||
0x22, 0x3a, 0x20, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30,
|
||||
0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x72, 0x69, 0x76,
|
||||
0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x66,
|
||||
0x61, 0x6c, 0x73, 0x65, 0x2c, 0x20, 0x22, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61,
|
||||
0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x22, 0x3a, 0x20, 0x22,
|
||||
0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30,
|
||||
0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22,
|
||||
0x3a, 0x20, 0x22, 0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d,
|
||||
0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35,
|
||||
0x54, 0x30, 0x32, 0x3a, 0x33, 0x30, 0x3a, 0x35, 0x33, 0x5a, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x68,
|
||||
0x61, 0x6e, 0x67, 0x65, 0x72, 0x22, 0x3a, 0x20, 0x22, 0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f,
|
||||
0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20,
|
||||
0x22, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x32, 0x30, 0x32, 0x33,
|
||||
0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x32, 0x3a, 0x33, 0x30, 0x3a, 0x35, 0x33, 0x5a,
|
||||
0x22, 0x7d, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_returns_log_proto_rawDescOnce sync.Once
|
||||
file_returns_log_proto_rawDescData = file_returns_log_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_returns_log_proto_rawDescGZIP() []byte {
|
||||
file_returns_log_proto_rawDescOnce.Do(func() {
|
||||
file_returns_log_proto_rawDescData = protoimpl.X.CompressGZIP(file_returns_log_proto_rawDescData)
|
||||
})
|
||||
return file_returns_log_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_returns_log_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_returns_log_proto_goTypes = []interface{}{
|
||||
(*ReturnsLog)(nil), // 0: pb.ReturnsLog
|
||||
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
|
||||
}
|
||||
var file_returns_log_proto_depIdxs = []int32{
|
||||
1, // 0: pb.ReturnsLog.created:type_name -> google.protobuf.Timestamp
|
||||
1, // 1: pb.ReturnsLog.changed:type_name -> google.protobuf.Timestamp
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_returns_log_proto_init() }
|
||||
func file_returns_log_proto_init() {
|
||||
if File_returns_log_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_returns_log_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ReturnsLog); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_returns_log_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_returns_log_proto_goTypes,
|
||||
DependencyIndexes: file_returns_log_proto_depIdxs,
|
||||
MessageInfos: file_returns_log_proto_msgTypes,
|
||||
}.Build()
|
||||
File_returns_log_proto = out.File
|
||||
file_returns_log_proto_rawDesc = nil
|
||||
file_returns_log_proto_goTypes = nil
|
||||
file_returns_log_proto_depIdxs = nil
|
||||
}
|
324
bff/pb/rpc_create_payment.pb.go
Normal file
324
bff/pb/rpc_create_payment.pb.go
Normal file
@ -0,0 +1,324 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.4
|
||||
// source: rpc_create_payment.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type CreatePaymentRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
AccountId uint64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
|
||||
PaymentCategory string `protobuf:"bytes,2,opt,name=payment_category,json=paymentCategory,proto3" json:"payment_category,omitempty"`
|
||||
Bankname *string `protobuf:"bytes,3,opt,name=bankname,proto3,oneof" json:"bankname,omitempty"`
|
||||
IBAN *string `protobuf:"bytes,4,opt,name=IBAN,proto3,oneof" json:"IBAN,omitempty"`
|
||||
BIC *string `protobuf:"bytes,5,opt,name=BIC,proto3,oneof" json:"BIC,omitempty"`
|
||||
PaypalAccount *string `protobuf:"bytes,6,opt,name=paypal_account,json=paypalAccount,proto3,oneof" json:"paypal_account,omitempty"`
|
||||
PaypalId *string `protobuf:"bytes,7,opt,name=paypal_id,json=paypalId,proto3,oneof" json:"paypal_id,omitempty"`
|
||||
PaymentSystem *string `protobuf:"bytes,8,opt,name=payment_system,json=paymentSystem,proto3,oneof" json:"payment_system,omitempty"`
|
||||
Type string `protobuf:"bytes,9,opt,name=type,proto3" json:"type,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) Reset() {
|
||||
*x = CreatePaymentRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_create_payment_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreatePaymentRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreatePaymentRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_create_payment_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreatePaymentRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreatePaymentRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_create_payment_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) GetAccountId() uint64 {
|
||||
if x != nil {
|
||||
return x.AccountId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) GetPaymentCategory() string {
|
||||
if x != nil {
|
||||
return x.PaymentCategory
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) GetBankname() string {
|
||||
if x != nil && x.Bankname != nil {
|
||||
return *x.Bankname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) GetIBAN() string {
|
||||
if x != nil && x.IBAN != nil {
|
||||
return *x.IBAN
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) GetBIC() string {
|
||||
if x != nil && x.BIC != nil {
|
||||
return *x.BIC
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) GetPaypalAccount() string {
|
||||
if x != nil && x.PaypalAccount != nil {
|
||||
return *x.PaypalAccount
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) GetPaypalId() string {
|
||||
if x != nil && x.PaypalId != nil {
|
||||
return *x.PaypalId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) GetPaymentSystem() string {
|
||||
if x != nil && x.PaymentSystem != nil {
|
||||
return *x.PaymentSystem
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreatePaymentRequest) GetType() string {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CreatePaymentResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Payment *Payment `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CreatePaymentResponse) Reset() {
|
||||
*x = CreatePaymentResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_create_payment_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CreatePaymentResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreatePaymentResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreatePaymentResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_create_payment_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreatePaymentResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CreatePaymentResponse) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_create_payment_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *CreatePaymentResponse) GetPayment() *Payment {
|
||||
if x != nil {
|
||||
return x.Payment
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_rpc_create_payment_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_rpc_create_payment_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61,
|
||||
0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e,
|
||||
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d,
|
||||
0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x05,
|
||||
0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
|
||||
0x12, 0x1f, 0x0a, 0x08, 0x62, 0x61, 0x6e, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x62, 0x61, 0x6e, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01,
|
||||
0x01, 0x12, 0x17, 0x0a, 0x04, 0x49, 0x42, 0x41, 0x4e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48,
|
||||
0x01, 0x52, 0x04, 0x49, 0x42, 0x41, 0x4e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x42, 0x49,
|
||||
0x43, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x03, 0x42, 0x49, 0x43, 0x88, 0x01,
|
||||
0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x0d, 0x70, 0x61, 0x79,
|
||||
0x70, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a,
|
||||
0x09, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
|
||||
0x48, 0x04, 0x52, 0x08, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12,
|
||||
0x2a, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65,
|
||||
0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x74,
|
||||
0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x3a,
|
||||
0x99, 0x02, 0x92, 0x41, 0x95, 0x02, 0x0a, 0x4a, 0x2a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x20, 0x61, 0x6e, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0xd2, 0x01, 0x0a, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0xd2, 0x01, 0x10, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0xd2, 0x01, 0x04, 0x74, 0x79,
|
||||
0x70, 0x65, 0x32, 0xc6, 0x01, 0x7b, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69,
|
||||
0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x42,
|
||||
0x44, 0x3a, 0x20, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x79,
|
||||
0x70, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64,
|
||||
0x22, 0x3a, 0x20, 0x22, 0x74, 0x68, 0x69, 0x73, 0x2d, 0x69, 0x73, 0x2d, 0x61, 0x2d, 0x70, 0x61,
|
||||
0x79, 0x70, 0x61, 0x6c, 0x2d, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x42, 0x44,
|
||||
0x3a, 0x20, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x20, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22,
|
||||
0x2c, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x42, 0x44, 0x3a, 0x20,
|
||||
0x73, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x22, 0x7d, 0x42, 0x0b, 0x0a, 0x09, 0x5f,
|
||||
0x62, 0x61, 0x6e, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x49, 0x42, 0x41,
|
||||
0x4e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x42, 0x49, 0x43, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x61,
|
||||
0x79, 0x70, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0c, 0x0a, 0x0a,
|
||||
0x5f, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x78, 0x0a,
|
||||
0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x64, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x1b, 0x52, 0x65, 0x74, 0x75,
|
||||
0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20,
|
||||
0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75,
|
||||
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f,
|
||||
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_rpc_create_payment_proto_rawDescOnce sync.Once
|
||||
file_rpc_create_payment_proto_rawDescData = file_rpc_create_payment_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_rpc_create_payment_proto_rawDescGZIP() []byte {
|
||||
file_rpc_create_payment_proto_rawDescOnce.Do(func() {
|
||||
file_rpc_create_payment_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_create_payment_proto_rawDescData)
|
||||
})
|
||||
return file_rpc_create_payment_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_rpc_create_payment_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_rpc_create_payment_proto_goTypes = []interface{}{
|
||||
(*CreatePaymentRequest)(nil), // 0: pb.CreatePaymentRequest
|
||||
(*CreatePaymentResponse)(nil), // 1: pb.CreatePaymentResponse
|
||||
(*Payment)(nil), // 2: pb.Payment
|
||||
}
|
||||
var file_rpc_create_payment_proto_depIdxs = []int32{
|
||||
2, // 0: pb.CreatePaymentResponse.payment:type_name -> pb.Payment
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_rpc_create_payment_proto_init() }
|
||||
func file_rpc_create_payment_proto_init() {
|
||||
if File_rpc_create_payment_proto != nil {
|
||||
return
|
||||
}
|
||||
file_payment_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_rpc_create_payment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreatePaymentRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_create_payment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreatePaymentResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_rpc_create_payment_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_rpc_create_payment_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_rpc_create_payment_proto_goTypes,
|
||||
DependencyIndexes: file_rpc_create_payment_proto_depIdxs,
|
||||
MessageInfos: file_rpc_create_payment_proto_msgTypes,
|
||||
}.Build()
|
||||
File_rpc_create_payment_proto = out.File
|
||||
file_rpc_create_payment_proto_rawDesc = nil
|
||||
file_rpc_create_payment_proto_goTypes = nil
|
||||
file_rpc_create_payment_proto_depIdxs = nil
|
||||
}
|
@ -27,7 +27,7 @@ type CreatePersonRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
AccountId int64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
|
||||
AccountId uint64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
|
||||
Firstname string `protobuf:"bytes,2,opt,name=firstname,proto3" json:"firstname,omitempty"`
|
||||
Lastname string `protobuf:"bytes,3,opt,name=lastname,proto3" json:"lastname,omitempty"`
|
||||
Street string `protobuf:"bytes,4,opt,name=street,proto3" json:"street,omitempty"`
|
||||
@ -69,7 +69,7 @@ func (*CreatePersonRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_create_person_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *CreatePersonRequest) GetAccountId() int64 {
|
||||
func (x *CreatePersonRequest) GetAccountId() uint64 {
|
||||
if x != nil {
|
||||
return x.AccountId
|
||||
}
|
||||
@ -182,10 +182,10 @@ var file_rpc_create_person_proto_rawDesc = []byte{
|
||||
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, 0x0c,
|
||||
0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x04, 0x0a,
|
||||
0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc7, 0x04, 0x0a,
|
||||
0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
|
||||
@ -200,34 +200,35 @@ var file_rpc_create_person_proto_rawDesc = []byte{
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
|
||||
0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 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, 0x3a, 0x9c, 0x02, 0x92, 0x41, 0x98,
|
||||
0x02, 0x0a, 0x63, 0x2a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x50, 0x65, 0x72, 0x73,
|
||||
0x52, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x3a, 0xa9, 0x02, 0x92, 0x41, 0xa5,
|
||||
0x02, 0x0a, 0x70, 0x2a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x50, 0x65, 0x72, 0x73,
|
||||
0x6f, 0x6e, 0x32, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x50, 0x65,
|
||||
0x72, 0x73, 0x6f, 0x6e, 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, 0xb0, 0x01, 0x7b, 0x20, 0x22, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 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, 0x22, 0x72, 0x0a, 0x14, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x27, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x42, 0x03, 0x92,
|
||||
0x41, 0x00, 0x52, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x3a, 0x31, 0x92, 0x41, 0x2e, 0x0a,
|
||||
0x2c, 0x2a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f,
|
||||
0x6e, 0x32, 0x1a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x42, 0x19, 0x5a,
|
||||
0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73,
|
||||
0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x72, 0x73, 0x6f, 0x6e, 0xd2, 0x01, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69,
|
||||
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, 0xb0, 0x01, 0x7b, 0x20, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 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, 0x22, 0x72, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27,
|
||||
0x0a, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a,
|
||||
0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52,
|
||||
0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x3a, 0x31, 0x92, 0x41, 0x2e, 0x0a, 0x2c, 0x2a, 0x0e,
|
||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x32, 0x1a,
|
||||
0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 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 (
|
||||
|
227
bff/pb/rpc_delete_document.pb.go
Normal file
227
bff/pb/rpc_delete_document.pb.go
Normal file
@ -0,0 +1,227 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.4
|
||||
// source: rpc_delete_document.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type DeleteDocumentRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeleteDocumentRequest) Reset() {
|
||||
*x = DeleteDocumentRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_delete_document_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteDocumentRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteDocumentRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteDocumentRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_delete_document_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteDocumentRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteDocumentRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_delete_document_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *DeleteDocumentRequest) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DeleteDocumentResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Deleted bool `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeleteDocumentResponse) Reset() {
|
||||
*x = DeleteDocumentResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_delete_document_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteDocumentResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteDocumentResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteDocumentResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_delete_document_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteDocumentResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteDocumentResponse) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_delete_document_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *DeleteDocumentResponse) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DeleteDocumentResponse) GetDeleted() bool {
|
||||
if x != nil {
|
||||
return x.Deleted
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_rpc_delete_document_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_rpc_delete_document_proto_rawDesc = []byte{
|
||||
0x0a, 0x19, 0x72, 0x70, 0x63, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x64, 0x6f, 0x63,
|
||||
0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e,
|
||||
0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e,
|
||||
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
|
||||
0x64, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x3b, 0x92, 0x41, 0x38, 0x0a, 0x29, 0x2a,
|
||||
0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x32, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x61, 0x20, 0x44, 0x6f, 0x63, 0x75, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x0b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a,
|
||||
0x20, 0x22, 0x31, 0x22, 0x7d, 0x22, 0x81, 0x01, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x3a, 0x3d, 0x92, 0x41, 0x3a, 0x0a,
|
||||
0x1a, 0x2a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x1c, 0x7b, 0x22, 0x69,
|
||||
0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 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 (
|
||||
file_rpc_delete_document_proto_rawDescOnce sync.Once
|
||||
file_rpc_delete_document_proto_rawDescData = file_rpc_delete_document_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_rpc_delete_document_proto_rawDescGZIP() []byte {
|
||||
file_rpc_delete_document_proto_rawDescOnce.Do(func() {
|
||||
file_rpc_delete_document_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_delete_document_proto_rawDescData)
|
||||
})
|
||||
return file_rpc_delete_document_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_rpc_delete_document_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_rpc_delete_document_proto_goTypes = []interface{}{
|
||||
(*DeleteDocumentRequest)(nil), // 0: pb.DeleteDocumentRequest
|
||||
(*DeleteDocumentResponse)(nil), // 1: pb.DeleteDocumentResponse
|
||||
}
|
||||
var file_rpc_delete_document_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_rpc_delete_document_proto_init() }
|
||||
func file_rpc_delete_document_proto_init() {
|
||||
if File_rpc_delete_document_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_rpc_delete_document_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteDocumentRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_delete_document_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteDocumentResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_rpc_delete_document_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_rpc_delete_document_proto_goTypes,
|
||||
DependencyIndexes: file_rpc_delete_document_proto_depIdxs,
|
||||
MessageInfos: file_rpc_delete_document_proto_msgTypes,
|
||||
}.Build()
|
||||
File_rpc_delete_document_proto = out.File
|
||||
file_rpc_delete_document_proto_rawDesc = nil
|
||||
file_rpc_delete_document_proto_goTypes = nil
|
||||
file_rpc_delete_document_proto_depIdxs = nil
|
||||
}
|
227
bff/pb/rpc_delete_payment.pb.go
Normal file
227
bff/pb/rpc_delete_payment.pb.go
Normal file
@ -0,0 +1,227 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.4
|
||||
// source: rpc_delete_payment.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type DeletePaymentRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeletePaymentRequest) Reset() {
|
||||
*x = DeletePaymentRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_delete_payment_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeletePaymentRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeletePaymentRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeletePaymentRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_delete_payment_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeletePaymentRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeletePaymentRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_delete_payment_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *DeletePaymentRequest) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DeletePaymentResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Deleted bool `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeletePaymentResponse) Reset() {
|
||||
*x = DeletePaymentResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_delete_payment_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeletePaymentResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeletePaymentResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DeletePaymentResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_delete_payment_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeletePaymentResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DeletePaymentResponse) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_delete_payment_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *DeletePaymentResponse) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DeletePaymentResponse) GetDeleted() bool {
|
||||
if x != nil {
|
||||
return x.Deleted
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_rpc_delete_payment_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_rpc_delete_payment_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x72, 0x70, 0x63, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61,
|
||||
0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e,
|
||||
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x61,
|
||||
0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x39, 0x92, 0x41, 0x36, 0x0a, 0x27, 0x2a, 0x0e, 0x44,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x10, 0x44,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x61, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0xd2,
|
||||
0x01, 0x02, 0x69, 0x64, 0x32, 0x0b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22,
|
||||
0x7d, 0x22, 0x7f, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x64, 0x3a, 0x3c, 0x92, 0x41, 0x39, 0x0a, 0x19, 0x2a, 0x17, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x32, 0x1c, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22,
|
||||
0x2c, 0x20, 0x22, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75,
|
||||
0x65, 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 (
|
||||
file_rpc_delete_payment_proto_rawDescOnce sync.Once
|
||||
file_rpc_delete_payment_proto_rawDescData = file_rpc_delete_payment_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_rpc_delete_payment_proto_rawDescGZIP() []byte {
|
||||
file_rpc_delete_payment_proto_rawDescOnce.Do(func() {
|
||||
file_rpc_delete_payment_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_delete_payment_proto_rawDescData)
|
||||
})
|
||||
return file_rpc_delete_payment_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_rpc_delete_payment_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_rpc_delete_payment_proto_goTypes = []interface{}{
|
||||
(*DeletePaymentRequest)(nil), // 0: pb.DeletePaymentRequest
|
||||
(*DeletePaymentResponse)(nil), // 1: pb.DeletePaymentResponse
|
||||
}
|
||||
var file_rpc_delete_payment_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_rpc_delete_payment_proto_init() }
|
||||
func file_rpc_delete_payment_proto_init() {
|
||||
if File_rpc_delete_payment_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_rpc_delete_payment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeletePaymentRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_delete_payment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeletePaymentResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_rpc_delete_payment_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_rpc_delete_payment_proto_goTypes,
|
||||
DependencyIndexes: file_rpc_delete_payment_proto_depIdxs,
|
||||
MessageInfos: file_rpc_delete_payment_proto_msgTypes,
|
||||
}.Build()
|
||||
File_rpc_delete_payment_proto = out.File
|
||||
file_rpc_delete_payment_proto_rawDesc = nil
|
||||
file_rpc_delete_payment_proto_goTypes = nil
|
||||
file_rpc_delete_payment_proto_depIdxs = nil
|
||||
}
|
226
bff/pb/rpc_delete_person.pb.go
Normal file
226
bff/pb/rpc_delete_person.pb.go
Normal file
@ -0,0 +1,226 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.4
|
||||
// source: rpc_delete_person.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type DeletePersonRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeletePersonRequest) Reset() {
|
||||
*x = DeletePersonRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_delete_person_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeletePersonRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeletePersonRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeletePersonRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_delete_person_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeletePersonRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeletePersonRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_delete_person_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *DeletePersonRequest) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DeletePersonResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Deleted bool `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeletePersonResponse) Reset() {
|
||||
*x = DeletePersonResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_delete_person_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeletePersonResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeletePersonResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DeletePersonResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_delete_person_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeletePersonResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DeletePersonResponse) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_delete_person_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *DeletePersonResponse) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DeletePersonResponse) GetDeleted() bool {
|
||||
if x != nil {
|
||||
return x.Deleted
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_rpc_delete_person_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_rpc_delete_person_proto_rawDesc = []byte{
|
||||
0x0a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72,
|
||||
0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
|
||||
0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
|
||||
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a,
|
||||
0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
|
||||
0x52, 0x02, 0x69, 0x64, 0x3a, 0x37, 0x92, 0x41, 0x34, 0x0a, 0x25, 0x2a, 0x0d, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x32, 0x0f, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x20, 0x61, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0xd2, 0x01, 0x02, 0x69, 0x64,
|
||||
0x32, 0x0b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x7d, 0x22, 0x7d, 0x0a,
|
||||
0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x3a,
|
||||
0x3b, 0x92, 0x41, 0x38, 0x0a, 0x18, 0x2a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x50,
|
||||
0x65, 0x72, 0x73, 0x6f, 0x6e, 0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x1c,
|
||||
0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x64, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 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 (
|
||||
file_rpc_delete_person_proto_rawDescOnce sync.Once
|
||||
file_rpc_delete_person_proto_rawDescData = file_rpc_delete_person_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_rpc_delete_person_proto_rawDescGZIP() []byte {
|
||||
file_rpc_delete_person_proto_rawDescOnce.Do(func() {
|
||||
file_rpc_delete_person_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_delete_person_proto_rawDescData)
|
||||
})
|
||||
return file_rpc_delete_person_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_rpc_delete_person_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_rpc_delete_person_proto_goTypes = []interface{}{
|
||||
(*DeletePersonRequest)(nil), // 0: pb.DeletePersonRequest
|
||||
(*DeletePersonResponse)(nil), // 1: pb.DeletePersonResponse
|
||||
}
|
||||
var file_rpc_delete_person_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_rpc_delete_person_proto_init() }
|
||||
func file_rpc_delete_person_proto_init() {
|
||||
if File_rpc_delete_person_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_rpc_delete_person_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeletePersonRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_delete_person_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeletePersonResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_rpc_delete_person_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_rpc_delete_person_proto_goTypes,
|
||||
DependencyIndexes: file_rpc_delete_person_proto_depIdxs,
|
||||
MessageInfos: file_rpc_delete_person_proto_msgTypes,
|
||||
}.Build()
|
||||
File_rpc_delete_person_proto = out.File
|
||||
file_rpc_delete_person_proto_rawDesc = nil
|
||||
file_rpc_delete_person_proto_goTypes = nil
|
||||
file_rpc_delete_person_proto_depIdxs = nil
|
||||
}
|
@ -26,7 +26,7 @@ type GetAccountRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetAccountRequest) Reset() {
|
||||
@ -61,7 +61,7 @@ func (*GetAccountRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_get_account_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *GetAccountRequest) GetId() int64 {
|
||||
func (x *GetAccountRequest) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
@ -125,7 +125,7 @@ var file_rpc_get_account_proto_rawDesc = []byte{
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a, 0x11, 0x47, 0x65,
|
||||
0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x3a,
|
||||
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a,
|
||||
0x3a, 0x92, 0x41, 0x37, 0x0a, 0x27, 0x2a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x32, 0x14, 0x47, 0x65, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x0c, 0x7b,
|
||||
|
222
bff/pb/rpc_get_payment.pb.go
Normal file
222
bff/pb/rpc_get_payment.pb.go
Normal file
@ -0,0 +1,222 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.4
|
||||
// source: rpc_get_payment.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type GetPaymentRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetPaymentRequest) Reset() {
|
||||
*x = GetPaymentRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_get_payment_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetPaymentRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetPaymentRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetPaymentRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_get_payment_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetPaymentRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetPaymentRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_get_payment_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *GetPaymentRequest) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetPaymentResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Payment *Payment `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetPaymentResponse) Reset() {
|
||||
*x = GetPaymentResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_get_payment_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetPaymentResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetPaymentResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetPaymentResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_get_payment_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetPaymentResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetPaymentResponse) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_get_payment_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetPaymentResponse) GetPayment() *Payment {
|
||||
if x != nil {
|
||||
return x.Payment
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_rpc_get_payment_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_rpc_get_payment_proto_rawDesc = []byte{
|
||||
0x0a, 0x15, 0x72, 0x70, 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
|
||||
0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a, 0x11, 0x47, 0x65,
|
||||
0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a,
|
||||
0x3a, 0x92, 0x41, 0x37, 0x0a, 0x27, 0x2a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x32, 0x14, 0x47, 0x65, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x0c, 0x7b,
|
||||
0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x20, 0x7d, 0x22, 0x71, 0x0a, 0x12, 0x47,
|
||||
0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x42,
|
||||
0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x2f, 0x92,
|
||||
0x41, 0x2c, 0x0a, 0x2a, 0x2a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x13, 0x52, 0x65, 0x74, 0x75, 0x72,
|
||||
0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x19,
|
||||
0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73,
|
||||
0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_rpc_get_payment_proto_rawDescOnce sync.Once
|
||||
file_rpc_get_payment_proto_rawDescData = file_rpc_get_payment_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_rpc_get_payment_proto_rawDescGZIP() []byte {
|
||||
file_rpc_get_payment_proto_rawDescOnce.Do(func() {
|
||||
file_rpc_get_payment_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_get_payment_proto_rawDescData)
|
||||
})
|
||||
return file_rpc_get_payment_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_rpc_get_payment_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_rpc_get_payment_proto_goTypes = []interface{}{
|
||||
(*GetPaymentRequest)(nil), // 0: pb.GetPaymentRequest
|
||||
(*GetPaymentResponse)(nil), // 1: pb.GetPaymentResponse
|
||||
(*Payment)(nil), // 2: pb.Payment
|
||||
}
|
||||
var file_rpc_get_payment_proto_depIdxs = []int32{
|
||||
2, // 0: pb.GetPaymentResponse.payment:type_name -> pb.Payment
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_rpc_get_payment_proto_init() }
|
||||
func file_rpc_get_payment_proto_init() {
|
||||
if File_rpc_get_payment_proto != nil {
|
||||
return
|
||||
}
|
||||
file_payment_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_rpc_get_payment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetPaymentRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_get_payment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetPaymentResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_rpc_get_payment_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_rpc_get_payment_proto_goTypes,
|
||||
DependencyIndexes: file_rpc_get_payment_proto_depIdxs,
|
||||
MessageInfos: file_rpc_get_payment_proto_msgTypes,
|
||||
}.Build()
|
||||
File_rpc_get_payment_proto = out.File
|
||||
file_rpc_get_payment_proto_rawDesc = nil
|
||||
file_rpc_get_payment_proto_goTypes = nil
|
||||
file_rpc_get_payment_proto_depIdxs = nil
|
||||
}
|
221
bff/pb/rpc_get_person.pb.go
Normal file
221
bff/pb/rpc_get_person.pb.go
Normal file
@ -0,0 +1,221 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.4
|
||||
// source: rpc_get_person.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type GetPersonRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetPersonRequest) Reset() {
|
||||
*x = GetPersonRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_get_person_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetPersonRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetPersonRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetPersonRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_get_person_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetPersonRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetPersonRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_get_person_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *GetPersonRequest) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetPersonResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Person *Person `protobuf:"bytes,1,opt,name=person,proto3" json:"person,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetPersonResponse) Reset() {
|
||||
*x = GetPersonResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_get_person_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetPersonResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetPersonResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetPersonResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_get_person_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetPersonResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetPersonResponse) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_get_person_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetPersonResponse) GetPerson() *Person {
|
||||
if x != nil {
|
||||
return x.Person
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_rpc_get_person_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_rpc_get_person_proto_rawDesc = []byte{
|
||||
0x0a, 0x14, 0x72, 0x70, 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32,
|
||||
0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x70, 0x65, 0x72, 0x73,
|
||||
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50,
|
||||
0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x38, 0x92, 0x41,
|
||||
0x35, 0x0a, 0x25, 0x2a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x32, 0x13,
|
||||
0x47, 0x65, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x20, 0x62, 0x79,
|
||||
0x20, 0x49, 0x44, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x0c, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a,
|
||||
0x20, 0x22, 0x31, 0x22, 0x20, 0x7d, 0x22, 0x6b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72,
|
||||
0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x70,
|
||||
0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x06, 0x70, 0x65,
|
||||
0x72, 0x73, 0x6f, 0x6e, 0x3a, 0x2d, 0x92, 0x41, 0x2a, 0x0a, 0x28, 0x2a, 0x12, 0x47, 0x65, 0x74,
|
||||
0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32,
|
||||
0x12, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x65, 0x72,
|
||||
0x73, 0x6f, 0x6e, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_rpc_get_person_proto_rawDescOnce sync.Once
|
||||
file_rpc_get_person_proto_rawDescData = file_rpc_get_person_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_rpc_get_person_proto_rawDescGZIP() []byte {
|
||||
file_rpc_get_person_proto_rawDescOnce.Do(func() {
|
||||
file_rpc_get_person_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_get_person_proto_rawDescData)
|
||||
})
|
||||
return file_rpc_get_person_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_rpc_get_person_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_rpc_get_person_proto_goTypes = []interface{}{
|
||||
(*GetPersonRequest)(nil), // 0: pb.GetPersonRequest
|
||||
(*GetPersonResponse)(nil), // 1: pb.GetPersonResponse
|
||||
(*Person)(nil), // 2: pb.Person
|
||||
}
|
||||
var file_rpc_get_person_proto_depIdxs = []int32{
|
||||
2, // 0: pb.GetPersonResponse.person:type_name -> pb.Person
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_rpc_get_person_proto_init() }
|
||||
func file_rpc_get_person_proto_init() {
|
||||
if File_rpc_get_person_proto != nil {
|
||||
return
|
||||
}
|
||||
file_person_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_rpc_get_person_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetPersonRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_get_person_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetPersonResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_rpc_get_person_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_rpc_get_person_proto_goTypes,
|
||||
DependencyIndexes: file_rpc_get_person_proto_depIdxs,
|
||||
MessageInfos: file_rpc_get_person_proto_msgTypes,
|
||||
}.Build()
|
||||
File_rpc_get_person_proto = out.File
|
||||
file_rpc_get_person_proto_rawDesc = nil
|
||||
file_rpc_get_person_proto_goTypes = nil
|
||||
file_rpc_get_person_proto_depIdxs = nil
|
||||
}
|
@ -26,8 +26,8 @@ type ListAccountsRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
PageId int32 `protobuf:"varint,1,opt,name=page_id,json=pageId,proto3" json:"page_id,omitempty"`
|
||||
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
|
||||
PageId uint32 `protobuf:"varint,1,opt,name=page_id,json=pageId,proto3" json:"page_id,omitempty"`
|
||||
PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListAccountsRequest) Reset() {
|
||||
@ -62,14 +62,14 @@ func (*ListAccountsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_list_accounts_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ListAccountsRequest) GetPageId() int32 {
|
||||
func (x *ListAccountsRequest) GetPageId() uint32 {
|
||||
if x != nil {
|
||||
return x.PageId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListAccountsRequest) GetPageSize() int32 {
|
||||
func (x *ListAccountsRequest) GetPageSize() uint32 {
|
||||
if x != nil {
|
||||
return x.PageSize
|
||||
}
|
||||
@ -81,7 +81,7 @@ type ListAccountsResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Account []*Account `protobuf:"bytes,1,rep,name=account,proto3" json:"account,omitempty"`
|
||||
Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListAccountsResponse) Reset() {
|
||||
@ -116,9 +116,9 @@ func (*ListAccountsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_list_accounts_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ListAccountsResponse) GetAccount() []*Account {
|
||||
func (x *ListAccountsResponse) GetAccounts() []*Account {
|
||||
if x != nil {
|
||||
return x.Account
|
||||
return x.Accounts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -131,27 +131,28 @@ var file_rpc_list_accounts_proto_rawDesc = []byte{
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
|
||||
0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
|
||||
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x01, 0x0a,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x01, 0x0a,
|
||||
0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a,
|
||||
0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x3a, 0x56, 0x92, 0x41, 0x53, 0x0a,
|
||||
0x2f, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x32,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x70, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a,
|
||||
0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d,
|
||||
0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x3a, 0x67, 0x92, 0x41, 0x64, 0x0a,
|
||||
0x40, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x32,
|
||||
0x1a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x20,
|
||||
0x6f, 0x66, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0xd2, 0x01, 0x02, 0x69, 0x64,
|
||||
0x32, 0x20, 0x7b, 0x22, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x31, 0x2c,
|
||||
0x20, 0x22, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3a, 0x20, 0x31, 0x30,
|
||||
0x20, 0x7d, 0x22, 0x75, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x31, 0x92, 0x41, 0x2e, 0x0a, 0x2c, 0x2a, 0x15, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x20, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x32, 0x13, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68,
|
||||
0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74,
|
||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64,
|
||||
0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6f, 0x66, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0xd2, 0x01, 0x07, 0x70, 0x61,
|
||||
0x67, 0x65, 0x5f, 0x69, 0x64, 0xd2, 0x01, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a,
|
||||
0x65, 0x32, 0x20, 0x7b, 0x22, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x31,
|
||||
0x2c, 0x20, 0x22, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3a, 0x20, 0x31,
|
||||
0x30, 0x20, 0x7d, 0x22, 0x77, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52,
|
||||
0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x31, 0x92, 0x41, 0x2e, 0x0a, 0x2c,
|
||||
0x2a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x20, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x13, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73,
|
||||
0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17,
|
||||
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63,
|
||||
0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -173,7 +174,7 @@ var file_rpc_list_accounts_proto_goTypes = []interface{}{
|
||||
(*Account)(nil), // 2: pb.Account
|
||||
}
|
||||
var file_rpc_list_accounts_proto_depIdxs = []int32{
|
||||
2, // 0: pb.ListAccountsResponse.account:type_name -> pb.Account
|
||||
2, // 0: pb.ListAccountsResponse.accounts:type_name -> pb.Account
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
|
225
bff/pb/rpc_list_payments.pb.go
Normal file
225
bff/pb/rpc_list_payments.pb.go
Normal file
@ -0,0 +1,225 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.4
|
||||
// source: rpc_list_payments.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type ListPaymentsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
AccountId uint64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListPaymentsRequest) Reset() {
|
||||
*x = ListPaymentsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_list_payments_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListPaymentsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListPaymentsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListPaymentsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_list_payments_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListPaymentsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListPaymentsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_list_payments_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ListPaymentsRequest) GetAccountId() uint64 {
|
||||
if x != nil {
|
||||
return x.AccountId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListPaymentsResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Payments []*Payment `protobuf:"bytes,1,rep,name=payments,proto3" json:"payments,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListPaymentsResponse) Reset() {
|
||||
*x = ListPaymentsResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_list_payments_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListPaymentsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListPaymentsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListPaymentsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_list_payments_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListPaymentsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListPaymentsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_list_payments_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ListPaymentsResponse) GetPayments() []*Payment {
|
||||
if x != nil {
|
||||
return x.Payments
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_rpc_list_payments_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_rpc_list_payments_proto_rawDesc = []byte{
|
||||
0x0a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
|
||||
0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
|
||||
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x70,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x01, 0x0a,
|
||||
0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x49, 0x64, 0x3a, 0x50, 0x92, 0x41, 0x4d, 0x0a, 0x37, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x32, 0x1a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e,
|
||||
0x73, 0x20, 0x61, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x50, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x73, 0xd2, 0x01, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69,
|
||||
0x64, 0x32, 0x12, 0x7b, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22,
|
||||
0x3a, 0x20, 0x31, 0x20, 0x7d, 0x22, 0x77, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a,
|
||||
0x08, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41,
|
||||
0x00, 0x52, 0x08, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x31, 0x92, 0x41, 0x2e,
|
||||
0x0a, 0x2c, 0x2a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73,
|
||||
0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x13, 0x52, 0x65, 0x74, 0x75, 0x72,
|
||||
0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x19,
|
||||
0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73,
|
||||
0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_rpc_list_payments_proto_rawDescOnce sync.Once
|
||||
file_rpc_list_payments_proto_rawDescData = file_rpc_list_payments_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_rpc_list_payments_proto_rawDescGZIP() []byte {
|
||||
file_rpc_list_payments_proto_rawDescOnce.Do(func() {
|
||||
file_rpc_list_payments_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_list_payments_proto_rawDescData)
|
||||
})
|
||||
return file_rpc_list_payments_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_rpc_list_payments_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_rpc_list_payments_proto_goTypes = []interface{}{
|
||||
(*ListPaymentsRequest)(nil), // 0: pb.ListPaymentsRequest
|
||||
(*ListPaymentsResponse)(nil), // 1: pb.ListPaymentsResponse
|
||||
(*Payment)(nil), // 2: pb.Payment
|
||||
}
|
||||
var file_rpc_list_payments_proto_depIdxs = []int32{
|
||||
2, // 0: pb.ListPaymentsResponse.payments:type_name -> pb.Payment
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_rpc_list_payments_proto_init() }
|
||||
func file_rpc_list_payments_proto_init() {
|
||||
if File_rpc_list_payments_proto != nil {
|
||||
return
|
||||
}
|
||||
file_payment_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_rpc_list_payments_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListPaymentsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_list_payments_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListPaymentsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_rpc_list_payments_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_rpc_list_payments_proto_goTypes,
|
||||
DependencyIndexes: file_rpc_list_payments_proto_depIdxs,
|
||||
MessageInfos: file_rpc_list_payments_proto_msgTypes,
|
||||
}.Build()
|
||||
File_rpc_list_payments_proto = out.File
|
||||
file_rpc_list_payments_proto_rawDesc = nil
|
||||
file_rpc_list_payments_proto_goTypes = nil
|
||||
file_rpc_list_payments_proto_depIdxs = nil
|
||||
}
|
224
bff/pb/rpc_list_persons.pb.go
Normal file
224
bff/pb/rpc_list_persons.pb.go
Normal file
@ -0,0 +1,224 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.4
|
||||
// source: rpc_list_persons.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type ListPersonsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
AccountId uint64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListPersonsRequest) Reset() {
|
||||
*x = ListPersonsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_list_persons_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListPersonsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListPersonsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListPersonsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_list_persons_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListPersonsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListPersonsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_list_persons_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ListPersonsRequest) GetAccountId() uint64 {
|
||||
if x != nil {
|
||||
return x.AccountId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListPersonsResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Persons []*Person `protobuf:"bytes,1,rep,name=persons,proto3" json:"persons,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListPersonsResponse) Reset() {
|
||||
*x = ListPersonsResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_list_persons_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListPersonsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListPersonsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListPersonsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_list_persons_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListPersonsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListPersonsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_list_persons_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ListPersonsResponse) GetPersons() []*Person {
|
||||
if x != nil {
|
||||
return x.Persons
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_rpc_list_persons_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_rpc_list_persons_proto_rawDesc = []byte{
|
||||
0x0a, 0x16, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f,
|
||||
0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
|
||||
0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x70, 0x65,
|
||||
0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x01, 0x0a, 0x12, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64,
|
||||
0x3a, 0x4e, 0x92, 0x41, 0x4b, 0x0a, 0x35, 0x2a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72,
|
||||
0x73, 0x6f, 0x6e, 0x73, 0x32, 0x19, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0xd2,
|
||||
0x01, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x32, 0x12, 0x7b, 0x22,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x31, 0x20, 0x7d,
|
||||
0x22, 0x71, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x70, 0x65, 0x72, 0x73, 0x6f,
|
||||
0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65,
|
||||
0x72, 0x73, 0x6f, 0x6e, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x70, 0x65, 0x72, 0x73, 0x6f,
|
||||
0x6e, 0x73, 0x3a, 0x2f, 0x92, 0x41, 0x2c, 0x0a, 0x2a, 0x2a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50,
|
||||
0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32,
|
||||
0x12, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x65, 0x72,
|
||||
0x73, 0x6f, 0x6e, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_rpc_list_persons_proto_rawDescOnce sync.Once
|
||||
file_rpc_list_persons_proto_rawDescData = file_rpc_list_persons_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_rpc_list_persons_proto_rawDescGZIP() []byte {
|
||||
file_rpc_list_persons_proto_rawDescOnce.Do(func() {
|
||||
file_rpc_list_persons_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_list_persons_proto_rawDescData)
|
||||
})
|
||||
return file_rpc_list_persons_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_rpc_list_persons_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_rpc_list_persons_proto_goTypes = []interface{}{
|
||||
(*ListPersonsRequest)(nil), // 0: pb.ListPersonsRequest
|
||||
(*ListPersonsResponse)(nil), // 1: pb.ListPersonsResponse
|
||||
(*Person)(nil), // 2: pb.Person
|
||||
}
|
||||
var file_rpc_list_persons_proto_depIdxs = []int32{
|
||||
2, // 0: pb.ListPersonsResponse.persons:type_name -> pb.Person
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_rpc_list_persons_proto_init() }
|
||||
func file_rpc_list_persons_proto_init() {
|
||||
if File_rpc_list_persons_proto != nil {
|
||||
return
|
||||
}
|
||||
file_person_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_rpc_list_persons_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListPersonsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_list_persons_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListPersonsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_rpc_list_persons_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_rpc_list_persons_proto_goTypes,
|
||||
DependencyIndexes: file_rpc_list_persons_proto_depIdxs,
|
||||
MessageInfos: file_rpc_list_persons_proto_msgTypes,
|
||||
}.Build()
|
||||
File_rpc_list_persons_proto = out.File
|
||||
file_rpc_list_persons_proto_rawDesc = nil
|
||||
file_rpc_list_persons_proto_goTypes = nil
|
||||
file_rpc_list_persons_proto_depIdxs = nil
|
||||
}
|
227
bff/pb/rpc_list_returns_log_by_person_id.pb.go
Normal file
227
bff/pb/rpc_list_returns_log_by_person_id.pb.go
Normal file
@ -0,0 +1,227 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.4
|
||||
// source: rpc_list_returns_log_by_person_id.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type ListReturnsLogRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
PersonId uint64 `protobuf:"varint,1,opt,name=person_id,json=personId,proto3" json:"person_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListReturnsLogRequest) Reset() {
|
||||
*x = ListReturnsLogRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_list_returns_log_by_person_id_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListReturnsLogRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListReturnsLogRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListReturnsLogRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_list_returns_log_by_person_id_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListReturnsLogRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListReturnsLogRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_list_returns_log_by_person_id_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ListReturnsLogRequest) GetPersonId() uint64 {
|
||||
if x != nil {
|
||||
return x.PersonId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListReturnsLogResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ReturnsLog []*ReturnsLog `protobuf:"bytes,1,rep,name=returns_log,json=returnsLog,proto3" json:"returns_log,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListReturnsLogResponse) Reset() {
|
||||
*x = ListReturnsLogResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_list_returns_log_by_person_id_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListReturnsLogResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListReturnsLogResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListReturnsLogResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_list_returns_log_by_person_id_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListReturnsLogResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListReturnsLogResponse) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_list_returns_log_by_person_id_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ListReturnsLogResponse) GetReturnsLog() []*ReturnsLog {
|
||||
if x != nil {
|
||||
return x.ReturnsLog
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_rpc_list_returns_log_by_person_id_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_rpc_list_returns_log_by_person_id_proto_rawDesc = []byte{
|
||||
0x0a, 0x27, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x75, 0x72,
|
||||
0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x62, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
|
||||
0x5f, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
|
||||
0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
|
||||
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x72,
|
||||
0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x22, 0x88, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73,
|
||||
0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x65,
|
||||
0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x70,
|
||||
0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x3a, 0x52, 0x92, 0x41, 0x4f, 0x0a, 0x3a, 0x2a, 0x0e,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x4c, 0x6f, 0x67, 0x32, 0x1c,
|
||||
0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f,
|
||||
0x66, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x4c, 0x6f, 0x67, 0xd2, 0x01, 0x09, 0x70,
|
||||
0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x32, 0x11, 0x7b, 0x22, 0x70, 0x65, 0x72, 0x73,
|
||||
0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x31, 0x20, 0x7d, 0x22, 0x86, 0x01, 0x0a, 0x16,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
|
||||
0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x4c, 0x6f, 0x67, 0x42, 0x03, 0x92, 0x41, 0x00,
|
||||
0x52, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x4c, 0x6f, 0x67, 0x3a, 0x36, 0x92, 0x41,
|
||||
0x33, 0x0a, 0x31, 0x2a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73,
|
||||
0x4c, 0x6f, 0x67, 0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x16, 0x52, 0x65,
|
||||
0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e,
|
||||
0x73, 0x4c, 0x6f, 0x67, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_rpc_list_returns_log_by_person_id_proto_rawDescOnce sync.Once
|
||||
file_rpc_list_returns_log_by_person_id_proto_rawDescData = file_rpc_list_returns_log_by_person_id_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_rpc_list_returns_log_by_person_id_proto_rawDescGZIP() []byte {
|
||||
file_rpc_list_returns_log_by_person_id_proto_rawDescOnce.Do(func() {
|
||||
file_rpc_list_returns_log_by_person_id_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_list_returns_log_by_person_id_proto_rawDescData)
|
||||
})
|
||||
return file_rpc_list_returns_log_by_person_id_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_rpc_list_returns_log_by_person_id_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_rpc_list_returns_log_by_person_id_proto_goTypes = []interface{}{
|
||||
(*ListReturnsLogRequest)(nil), // 0: pb.ListReturnsLogRequest
|
||||
(*ListReturnsLogResponse)(nil), // 1: pb.ListReturnsLogResponse
|
||||
(*ReturnsLog)(nil), // 2: pb.ReturnsLog
|
||||
}
|
||||
var file_rpc_list_returns_log_by_person_id_proto_depIdxs = []int32{
|
||||
2, // 0: pb.ListReturnsLogResponse.returns_log:type_name -> pb.ReturnsLog
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_rpc_list_returns_log_by_person_id_proto_init() }
|
||||
func file_rpc_list_returns_log_by_person_id_proto_init() {
|
||||
if File_rpc_list_returns_log_by_person_id_proto != nil {
|
||||
return
|
||||
}
|
||||
file_returns_log_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_rpc_list_returns_log_by_person_id_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListReturnsLogRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_list_returns_log_by_person_id_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListReturnsLogResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_rpc_list_returns_log_by_person_id_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_rpc_list_returns_log_by_person_id_proto_goTypes,
|
||||
DependencyIndexes: file_rpc_list_returns_log_by_person_id_proto_depIdxs,
|
||||
MessageInfos: file_rpc_list_returns_log_by_person_id_proto_msgTypes,
|
||||
}.Build()
|
||||
File_rpc_list_returns_log_by_person_id_proto = out.File
|
||||
file_rpc_list_returns_log_by_person_id_proto_rawDesc = nil
|
||||
file_rpc_list_returns_log_by_person_id_proto_goTypes = nil
|
||||
file_rpc_list_returns_log_by_person_id_proto_depIdxs = nil
|
||||
}
|
@ -26,7 +26,7 @@ type ListSessionsRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
|
||||
AccountId uint64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListSessionsRequest) Reset() {
|
||||
@ -61,11 +61,11 @@ func (*ListSessionsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_list_sessions_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ListSessionsRequest) GetEmail() string {
|
||||
func (x *ListSessionsRequest) GetAccountId() uint64 {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
return x.AccountId
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListSessionsResponse struct {
|
||||
@ -73,7 +73,7 @@ type ListSessionsResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Session []*Session `protobuf:"bytes,1,rep,name=session,proto3" json:"session,omitempty"`
|
||||
Sessions []*Session `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListSessionsResponse) Reset() {
|
||||
@ -108,9 +108,9 @@ func (*ListSessionsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_list_sessions_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ListSessionsResponse) GetSession() []*Session {
|
||||
func (x *ListSessionsResponse) GetSessions() []*Session {
|
||||
if x != nil {
|
||||
return x.Session
|
||||
return x.Sessions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -123,26 +123,27 @@ var file_rpc_list_sessions_proto_rawDesc = []byte{
|
||||
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, 0x73,
|
||||
0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x01, 0x0a,
|
||||
0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x01, 0x0a,
|
||||
0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 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, 0x3a, 0x5b, 0x92, 0x41, 0x58, 0x0a,
|
||||
0x32, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32,
|
||||
0x1a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x20,
|
||||
0x6f, 0x66, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0xd2, 0x01, 0x05, 0x65, 0x6d,
|
||||
0x61, 0x69, 0x6c, 0x32, 0x22, 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, 0x20, 0x7d, 0x22, 0x76, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0e, 0x92, 0x41, 0x0b, 0x4a, 0x01, 0x31,
|
||||
0xa2, 0x02, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x49, 0x64, 0x3a, 0x52, 0x92, 0x41, 0x4f, 0x0a, 0x37, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x1a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e,
|
||||
0x73, 0x20, 0x61, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x41, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x73, 0xd2, 0x01, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69,
|
||||
0x64, 0x32, 0x14, 0x7b, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22,
|
||||
0x3a, 0x20, 0x22, 0x31, 0x22, 0x20, 0x7d, 0x22, 0x78, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53,
|
||||
0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x2a, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0x92,
|
||||
0x41, 0x00, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x32, 0x92, 0x41, 0x2f,
|
||||
0x0a, 0x2d, 0x2a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x14, 0x52, 0x65, 0x74, 0x75, 0x72,
|
||||
0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 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,
|
||||
0x2c, 0x0a, 0x08, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x03,
|
||||
0x92, 0x41, 0x00, 0x52, 0x08, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x32, 0x92,
|
||||
0x41, 0x2f, 0x0a, 0x2d, 0x2a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x14, 0x52, 0x65, 0x74,
|
||||
0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x73, 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 (
|
||||
@ -164,7 +165,7 @@ var file_rpc_list_sessions_proto_goTypes = []interface{}{
|
||||
(*Session)(nil), // 2: pb.Session
|
||||
}
|
||||
var file_rpc_list_sessions_proto_depIdxs = []int32{
|
||||
2, // 0: pb.ListSessionsResponse.session:type_name -> pb.Session
|
||||
2, // 0: pb.ListSessionsResponse.sessions:type_name -> pb.Session
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
|
@ -87,7 +87,7 @@ type LoginResponse struct {
|
||||
AccessTokenExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=access_token_expires_at,json=accessTokenExpiresAt,proto3" json:"access_token_expires_at,omitempty"`
|
||||
RefreshToken string `protobuf:"bytes,4,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
|
||||
RefreshTokenExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=refresh_token_expires_at,json=refreshTokenExpiresAt,proto3" json:"refresh_token_expires_at,omitempty"`
|
||||
Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"`
|
||||
AccountId uint64 `protobuf:"varint,6,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *LoginResponse) Reset() {
|
||||
@ -157,11 +157,11 @@ func (x *LoginResponse) GetRefreshTokenExpiresAt() *timestamppb.Timestamp {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *LoginResponse) GetEmail() string {
|
||||
func (x *LoginResponse) GetAccountId() uint64 {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
return x.AccountId
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_rpc_login_proto protoreflect.FileDescriptor
|
||||
@ -173,93 +173,92 @@ var file_rpc_login_proto_rawDesc = []byte{
|
||||
0x2e, 0x70, 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, 0x89, 0x02, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x6e,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0x92, 0x41, 0x20, 0x4a, 0x16, 0x22, 0x6a, 0x6f,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x81, 0x02, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x6e,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x6a, 0x6f,
|
||||
0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x22, 0xa2, 0x02, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x05, 0x65, 0x6d, 0x61,
|
||||
0x69, 0x6c, 0x12, 0x43, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0x92, 0x41, 0x24, 0x4a, 0x17, 0x22, 0x4d, 0x61, 0x79, 0x54,
|
||||
0x68, 0x65, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x42, 0x65, 0x57, 0x69, 0x74, 0x68, 0x59, 0x6f, 0x75,
|
||||
0x21, 0x22, 0xa2, 0x02, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x08, 0x70,
|
||||
0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x3a, 0x79, 0x92, 0x41, 0x76, 0x0a, 0x2c, 0x2a, 0x05,
|
||||
0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x32, 0x10, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 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, 0x32, 0x46, 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, 0x7d, 0x22, 0xb6, 0x08, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0x92, 0x41, 0x2f, 0x4a, 0x26, 0x22,
|
||||
0x35, 0x65, 0x31, 0x64, 0x36, 0x37, 0x64, 0x61, 0x2d, 0x37, 0x63, 0x39, 0x62, 0x2d, 0x34, 0x33,
|
||||
0x36, 0x35, 0x2d, 0x61, 0x34, 0x64, 0x35, 0x2d, 0x33, 0x63, 0x63, 0x30, 0x61, 0x30, 0x35, 0x31,
|
||||
0x32, 0x34, 0x31, 0x65, 0x22, 0xa2, 0x02, 0x04, 0x75, 0x75, 0x69, 0x64, 0x52, 0x09, 0x73, 0x65,
|
||||
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0xe9, 0x02, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65,
|
||||
0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0xc5,
|
||||
0x02, 0x92, 0x41, 0xc1, 0x02, 0x4a, 0xbe, 0x02, 0x22, 0x76, 0x34, 0x2e, 0x70, 0x75, 0x62, 0x6c,
|
||||
0x69, 0x63, 0x2e, 0x65, 0x79, 0x4a, 0x6c, 0x62, 0x57, 0x46, 0x70, 0x62, 0x43, 0x49, 0x36, 0x49,
|
||||
0x6d, 0x45, 0x79, 0x51, 0x47, 0x49, 0x75, 0x5a, 0x47, 0x55, 0x69, 0x4c, 0x43, 0x4a, 0x6c, 0x65,
|
||||
0x48, 0x41, 0x69, 0x4f, 0x69, 0x49, 0x79, 0x4d, 0x44, 0x49, 0x7a, 0x4c, 0x54, 0x45, 0x77, 0x4c,
|
||||
0x54, 0x41, 0x31, 0x56, 0x44, 0x41, 0x78, 0x4f, 0x6a, 0x45, 0x33, 0x4f, 0x6a, 0x41, 0x35, 0x4b,
|
||||
0x7a, 0x41, 0x79, 0x4f, 0x6a, 0x41, 0x77, 0x49, 0x69, 0x77, 0x69, 0x61, 0x57, 0x46, 0x30, 0x49,
|
||||
0x6f, 0x6d, 0x22, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x43, 0x0a, 0x08, 0x70, 0x61,
|
||||
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0x92, 0x41,
|
||||
0x24, 0x4a, 0x17, 0x22, 0x4d, 0x61, 0x79, 0x54, 0x68, 0x65, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x42,
|
||||
0x65, 0x57, 0x69, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x21, 0x22, 0xa2, 0x02, 0x08, 0x70, 0x61, 0x73,
|
||||
0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x3a,
|
||||
0x79, 0x92, 0x41, 0x76, 0x0a, 0x2c, 0x2a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x32, 0x10, 0x4c,
|
||||
0x6f, 0x67, 0x69, 0x6e, 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, 0x32, 0x46, 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, 0x7d, 0x22, 0xa4, 0x08, 0x0a, 0x0d, 0x4c,
|
||||
0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0a,
|
||||
0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x32, 0x92, 0x41, 0x2f, 0x4a, 0x26, 0x22, 0x35, 0x65, 0x31, 0x64, 0x36, 0x37, 0x64, 0x61,
|
||||
0x2d, 0x37, 0x63, 0x39, 0x62, 0x2d, 0x34, 0x33, 0x36, 0x35, 0x2d, 0x61, 0x34, 0x64, 0x35, 0x2d,
|
||||
0x33, 0x63, 0x63, 0x30, 0x61, 0x30, 0x35, 0x31, 0x32, 0x34, 0x31, 0x65, 0x22, 0xa2, 0x02, 0x04,
|
||||
0x75, 0x75, 0x69, 0x64, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12,
|
||||
0xe9, 0x02, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0xc5, 0x02, 0x92, 0x41, 0xc1, 0x02, 0x4a, 0xbe, 0x02,
|
||||
0x22, 0x76, 0x34, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2e, 0x65, 0x79, 0x4a, 0x6c, 0x62,
|
||||
0x57, 0x46, 0x70, 0x62, 0x43, 0x49, 0x36, 0x49, 0x6d, 0x45, 0x79, 0x51, 0x47, 0x49, 0x75, 0x5a,
|
||||
0x47, 0x55, 0x69, 0x4c, 0x43, 0x4a, 0x6c, 0x65, 0x48, 0x41, 0x69, 0x4f, 0x69, 0x49, 0x79, 0x4d,
|
||||
0x44, 0x49, 0x7a, 0x4c, 0x54, 0x45, 0x77, 0x4c, 0x54, 0x41, 0x31, 0x56, 0x44, 0x41, 0x78, 0x4f,
|
||||
0x6a, 0x45, 0x33, 0x4f, 0x6a, 0x41, 0x35, 0x4b, 0x7a, 0x41, 0x79, 0x4f, 0x6a, 0x41, 0x77, 0x49,
|
||||
0x69, 0x77, 0x69, 0x61, 0x57, 0x46, 0x30, 0x49, 0x6a, 0x6f, 0x69, 0x4d, 0x6a, 0x41, 0x79, 0x4d,
|
||||
0x79, 0x30, 0x78, 0x4d, 0x43, 0x30, 0x77, 0x4e, 0x56, 0x51, 0x77, 0x4d, 0x54, 0x6f, 0x77, 0x4d,
|
||||
0x6a, 0x6f, 0x77, 0x4f, 0x53, 0x73, 0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4d, 0x43, 0x49, 0x73, 0x49,
|
||||
0x6d, 0x6c, 0x6b, 0x49, 0x6a, 0x6f, 0x69, 0x5a, 0x6a, 0x6c, 0x68, 0x4d, 0x6a, 0x45, 0x32, 0x4f,
|
||||
0x57, 0x51, 0x74, 0x4d, 0x57, 0x59, 0x78, 0x59, 0x53, 0x30, 0x30, 0x59, 0x54, 0x68, 0x69, 0x4c,
|
||||
0x54, 0x67, 0x7a, 0x5a, 0x57, 0x45, 0x74, 0x4e, 0x7a, 0x6b, 0x78, 0x4d, 0x7a, 0x59, 0x35, 0x59,
|
||||
0x6a, 0x59, 0x33, 0x5a, 0x6d, 0x59, 0x78, 0x49, 0x69, 0x77, 0x69, 0x62, 0x6d, 0x4a, 0x6d, 0x49,
|
||||
0x6a, 0x6f, 0x69, 0x4d, 0x6a, 0x41, 0x79, 0x4d, 0x79, 0x30, 0x78, 0x4d, 0x43, 0x30, 0x77, 0x4e,
|
||||
0x56, 0x51, 0x77, 0x4d, 0x54, 0x6f, 0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4f, 0x53, 0x73, 0x77, 0x4d,
|
||||
0x6a, 0x6f, 0x77, 0x4d, 0x43, 0x49, 0x73, 0x49, 0x6d, 0x6c, 0x6b, 0x49, 0x6a, 0x6f, 0x69, 0x5a,
|
||||
0x6a, 0x6c, 0x68, 0x4d, 0x6a, 0x45, 0x32, 0x4f, 0x57, 0x51, 0x74, 0x4d, 0x57, 0x59, 0x78, 0x59,
|
||||
0x53, 0x30, 0x30, 0x59, 0x54, 0x68, 0x69, 0x4c, 0x54, 0x67, 0x7a, 0x5a, 0x57, 0x45, 0x74, 0x4e,
|
||||
0x7a, 0x6b, 0x78, 0x4d, 0x7a, 0x59, 0x35, 0x59, 0x6a, 0x59, 0x33, 0x5a, 0x6d, 0x59, 0x78, 0x49,
|
||||
0x69, 0x77, 0x69, 0x62, 0x6d, 0x4a, 0x6d, 0x49, 0x6a, 0x6f, 0x69, 0x4d, 0x6a, 0x41, 0x79, 0x4d,
|
||||
0x6a, 0x6f, 0x77, 0x4d, 0x43, 0x4a, 0x39, 0x41, 0x68, 0x30, 0x62, 0x56, 0x62, 0x78, 0x39, 0x53,
|
||||
0x31, 0x4c, 0x52, 0x2d, 0x70, 0x66, 0x38, 0x68, 0x4c, 0x57, 0x56, 0x52, 0x51, 0x50, 0x55, 0x66,
|
||||
0x4b, 0x39, 0x7a, 0x72, 0x48, 0x5a, 0x76, 0x41, 0x37, 0x41, 0x70, 0x4a, 0x35, 0x61, 0x5a, 0x58,
|
||||
0x77, 0x68, 0x41, 0x37, 0x48, 0x31, 0x6a, 0x2d, 0x6b, 0x48, 0x68, 0x63, 0x63, 0x42, 0x6a, 0x4f,
|
||||
0x41, 0x47, 0x59, 0x58, 0x5a, 0x51, 0x54, 0x2d, 0x74, 0x73, 0x37, 0x4a, 0x71, 0x33, 0x53, 0x4a,
|
||||
0x6c, 0x7a, 0x6f, 0x35, 0x76, 0x74, 0x55, 0x6a, 0x47, 0x42, 0x74, 0x44, 0x67, 0x22, 0x52, 0x0b,
|
||||
0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x51, 0x0a, 0x17, 0x61,
|
||||
0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69,
|
||||
0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x03, 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, 0x14, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0xeb,
|
||||
0x02, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0xc5, 0x02, 0x92, 0x41, 0xc1, 0x02, 0x4a, 0xbe, 0x02,
|
||||
0x22, 0x76, 0x34, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2e, 0x65, 0x79, 0x4a, 0x6c, 0x62,
|
||||
0x57, 0x46, 0x70, 0x62, 0x43, 0x49, 0x36, 0x49, 0x6d, 0x45, 0x79, 0x51, 0x47, 0x49, 0x75, 0x5a,
|
||||
0x47, 0x55, 0x69, 0x4c, 0x43, 0x4a, 0x6c, 0x65, 0x48, 0x41, 0x69, 0x4f, 0x69, 0x49, 0x79, 0x4d,
|
||||
0x44, 0x49, 0x7a, 0x4c, 0x54, 0x45, 0x77, 0x4c, 0x54, 0x41, 0x32, 0x56, 0x44, 0x41, 0x78, 0x4f,
|
||||
0x6a, 0x41, 0x79, 0x4f, 0x6a, 0x41, 0x35, 0x4b, 0x7a, 0x41, 0x79, 0x4f, 0x6a, 0x41, 0x77, 0x49,
|
||||
0x69, 0x77, 0x69, 0x61, 0x57, 0x46, 0x30, 0x49, 0x6a, 0x6f, 0x69, 0x4d, 0x6a, 0x41, 0x79, 0x4d,
|
||||
0x79, 0x30, 0x78, 0x4d, 0x43, 0x30, 0x77, 0x4e, 0x56, 0x51, 0x77, 0x4d, 0x54, 0x6f, 0x77, 0x4d,
|
||||
0x6a, 0x6f, 0x77, 0x4f, 0x53, 0x73, 0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4d, 0x43, 0x4a, 0x39, 0x41,
|
||||
0x68, 0x30, 0x62, 0x56, 0x62, 0x78, 0x39, 0x53, 0x31, 0x4c, 0x52, 0x2d, 0x70, 0x66, 0x38, 0x68,
|
||||
0x4c, 0x57, 0x56, 0x52, 0x51, 0x50, 0x55, 0x66, 0x4b, 0x39, 0x7a, 0x72, 0x48, 0x5a, 0x76, 0x41,
|
||||
0x37, 0x41, 0x70, 0x4a, 0x35, 0x61, 0x5a, 0x58, 0x77, 0x68, 0x41, 0x37, 0x48, 0x31, 0x6a, 0x2d,
|
||||
0x6b, 0x48, 0x68, 0x63, 0x63, 0x42, 0x6a, 0x4f, 0x41, 0x47, 0x59, 0x58, 0x5a, 0x51, 0x54, 0x2d,
|
||||
0x74, 0x73, 0x37, 0x4a, 0x71, 0x33, 0x53, 0x4a, 0x6c, 0x7a, 0x6f, 0x35, 0x76, 0x74, 0x55, 0x6a,
|
||||
0x47, 0x42, 0x74, 0x44, 0x67, 0x22, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x12, 0x51, 0x0a, 0x17, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x03,
|
||||
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, 0x14, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x70,
|
||||
0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0xeb, 0x02, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x72, 0x65,
|
||||
0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0xc5,
|
||||
0x02, 0x92, 0x41, 0xc1, 0x02, 0x4a, 0xbe, 0x02, 0x22, 0x76, 0x34, 0x2e, 0x70, 0x75, 0x62, 0x6c,
|
||||
0x69, 0x63, 0x2e, 0x65, 0x79, 0x4a, 0x6c, 0x62, 0x57, 0x46, 0x70, 0x62, 0x43, 0x49, 0x36, 0x49,
|
||||
0x6d, 0x45, 0x79, 0x51, 0x47, 0x49, 0x75, 0x5a, 0x47, 0x55, 0x69, 0x4c, 0x43, 0x4a, 0x6c, 0x65,
|
||||
0x48, 0x41, 0x69, 0x4f, 0x69, 0x49, 0x79, 0x4d, 0x44, 0x49, 0x7a, 0x4c, 0x54, 0x45, 0x77, 0x4c,
|
||||
0x54, 0x41, 0x32, 0x56, 0x44, 0x41, 0x78, 0x4f, 0x6a, 0x41, 0x79, 0x4f, 0x6a, 0x41, 0x35, 0x4b,
|
||||
0x7a, 0x41, 0x79, 0x4f, 0x6a, 0x41, 0x77, 0x49, 0x69, 0x77, 0x69, 0x61, 0x57, 0x46, 0x30, 0x49,
|
||||
0x6a, 0x6f, 0x77, 0x4f, 0x53, 0x73, 0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4d, 0x43, 0x49, 0x73, 0x49,
|
||||
0x6d, 0x6c, 0x6b, 0x49, 0x6a, 0x6f, 0x69, 0x4e, 0x57, 0x55, 0x78, 0x5a, 0x44, 0x59, 0x33, 0x5a,
|
||||
0x47, 0x45, 0x74, 0x4e, 0x32, 0x4d, 0x35, 0x59, 0x69, 0x30, 0x30, 0x4d, 0x7a, 0x59, 0x31, 0x4c,
|
||||
0x57, 0x45, 0x30, 0x5a, 0x44, 0x55, 0x74, 0x4d, 0x32, 0x4e, 0x6a, 0x4d, 0x47, 0x45, 0x77, 0x4e,
|
||||
0x54, 0x45, 0x79, 0x4e, 0x44, 0x46, 0x6c, 0x49, 0x69, 0x77, 0x69, 0x62, 0x6d, 0x4a, 0x6d, 0x49,
|
||||
0x6a, 0x6f, 0x69, 0x4d, 0x6a, 0x41, 0x79, 0x4d, 0x79, 0x30, 0x78, 0x4d, 0x43, 0x30, 0x77, 0x4e,
|
||||
0x56, 0x51, 0x77, 0x4d, 0x54, 0x6f, 0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4f, 0x53, 0x73, 0x77, 0x4d,
|
||||
0x6a, 0x6f, 0x77, 0x4d, 0x43, 0x49, 0x73, 0x49, 0x6d, 0x6c, 0x6b, 0x49, 0x6a, 0x6f, 0x69, 0x4e,
|
||||
0x57, 0x55, 0x78, 0x5a, 0x44, 0x59, 0x33, 0x5a, 0x47, 0x45, 0x74, 0x4e, 0x32, 0x4d, 0x35, 0x59,
|
||||
0x69, 0x30, 0x30, 0x4d, 0x7a, 0x59, 0x31, 0x4c, 0x57, 0x45, 0x30, 0x5a, 0x44, 0x55, 0x74, 0x4d,
|
||||
0x32, 0x4e, 0x6a, 0x4d, 0x47, 0x45, 0x77, 0x4e, 0x54, 0x45, 0x79, 0x4e, 0x44, 0x46, 0x6c, 0x49,
|
||||
0x69, 0x77, 0x69, 0x62, 0x6d, 0x4a, 0x6d, 0x49, 0x6a, 0x6f, 0x69, 0x4d, 0x6a, 0x41, 0x79, 0x4d,
|
||||
0x79, 0x30, 0x78, 0x4d, 0x43, 0x30, 0x77, 0x4e, 0x56, 0x51, 0x77, 0x4d, 0x54, 0x6f, 0x77, 0x4d,
|
||||
0x6a, 0x6f, 0x77, 0x4f, 0x53, 0x73, 0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4d, 0x43, 0x4a, 0x39, 0x42,
|
||||
0x6f, 0x58, 0x33, 0x36, 0x77, 0x30, 0x70, 0x6f, 0x31, 0x76, 0x76, 0x48, 0x53, 0x6a, 0x73, 0x42,
|
||||
0x50, 0x5f, 0x4b, 0x57, 0x65, 0x46, 0x78, 0x56, 0x31, 0x78, 0x52, 0x62, 0x51, 0x61, 0x79, 0x71,
|
||||
0x62, 0x4a, 0x75, 0x49, 0x6f, 0x4b, 0x32, 0x6a, 0x4b, 0x71, 0x79, 0x31, 0x42, 0x74, 0x32, 0x52,
|
||||
0x6f, 0x48, 0x79, 0x4a, 0x62, 0x4c, 0x6f, 0x43, 0x45, 0x4f, 0x31, 0x35, 0x43, 0x52, 0x54, 0x35,
|
||||
0x44, 0x6e, 0x51, 0x36, 0x50, 0x30, 0x41, 0x48, 0x6c, 0x42, 0x7a, 0x6a, 0x73, 0x58, 0x74, 0x36,
|
||||
0x31, 0x61, 0x44, 0x44, 0x77, 0x22, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54,
|
||||
0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x53, 0x0a, 0x18, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f,
|
||||
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74,
|
||||
0x18, 0x05, 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, 0x15, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
|
||||
0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x05, 0x65, 0x6d, 0x61,
|
||||
0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0x92, 0x41, 0x20, 0x4a, 0x16, 0x22,
|
||||
0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x22, 0xa2, 0x02, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x05, 0x65,
|
||||
0x6d, 0x61, 0x69, 0x6c, 0x3a, 0x15, 0x92, 0x41, 0x12, 0x0a, 0x10, 0x2a, 0x0e, 0x4c, 0x6f, 0x67,
|
||||
0x69, 0x6e, 0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x19, 0x5a, 0x17, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62,
|
||||
0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6a, 0x6f, 0x77, 0x4d, 0x43, 0x4a, 0x39, 0x42, 0x6f, 0x58, 0x33, 0x36, 0x77, 0x30, 0x70, 0x6f,
|
||||
0x31, 0x76, 0x76, 0x48, 0x53, 0x6a, 0x73, 0x42, 0x50, 0x5f, 0x4b, 0x57, 0x65, 0x46, 0x78, 0x56,
|
||||
0x31, 0x78, 0x52, 0x62, 0x51, 0x61, 0x79, 0x71, 0x62, 0x4a, 0x75, 0x49, 0x6f, 0x4b, 0x32, 0x6a,
|
||||
0x4b, 0x71, 0x79, 0x31, 0x42, 0x74, 0x32, 0x52, 0x6f, 0x48, 0x79, 0x4a, 0x62, 0x4c, 0x6f, 0x43,
|
||||
0x45, 0x4f, 0x31, 0x35, 0x43, 0x52, 0x54, 0x35, 0x44, 0x6e, 0x51, 0x36, 0x50, 0x30, 0x41, 0x48,
|
||||
0x6c, 0x42, 0x7a, 0x6a, 0x73, 0x58, 0x74, 0x36, 0x31, 0x61, 0x44, 0x44, 0x77, 0x22, 0x52, 0x0c,
|
||||
0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x53, 0x0a, 0x18,
|
||||
0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x78,
|
||||
0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x05, 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, 0x15, 0x72, 0x65, 0x66, 0x72,
|
||||
0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41,
|
||||
0x74, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x04, 0x42, 0x08, 0x92, 0x41, 0x05, 0x4a, 0x03, 0x22, 0x31, 0x22, 0x52,
|
||||
0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x3a, 0x15, 0x92, 0x41, 0x12, 0x0a,
|
||||
0x10, 0x2a, 0x0e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -27,7 +27,7 @@ type UpdateAccountRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Email *string `protobuf:"bytes,2,opt,name=email,proto3,oneof" json:"email,omitempty"`
|
||||
Password *string `protobuf:"bytes,3,opt,name=password,proto3,oneof" json:"password,omitempty"`
|
||||
Firstname *string `protobuf:"bytes,4,opt,name=firstname,proto3,oneof" json:"firstname,omitempty"`
|
||||
@ -72,7 +72,7 @@ func (*UpdateAccountRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_update_account_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *UpdateAccountRequest) GetId() int64 {
|
||||
func (x *UpdateAccountRequest) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
@ -206,10 +206,10 @@ var file_rpc_update_account_proto_rawDesc = []byte{
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e,
|
||||
0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e,
|
||||
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
||||
0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd0,
|
||||
0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xce,
|
||||
0x04, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
|
||||
0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x88,
|
||||
0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
|
||||
@ -231,29 +231,29 @@ var file_rpc_update_account_proto_rawDesc = []byte{
|
||||
0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41,
|
||||
0x18, 0x4a, 0x16, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30,
|
||||
0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x48, 0x09, 0x52, 0x08, 0x62, 0x69, 0x72,
|
||||
0x74, 0x68, 0x64, 0x61, 0x79, 0x88, 0x01, 0x01, 0x3a, 0x56, 0x92, 0x41, 0x53, 0x0a, 0x28, 0x2a,
|
||||
0x74, 0x68, 0x64, 0x61, 0x79, 0x88, 0x01, 0x01, 0x3a, 0x54, 0x92, 0x41, 0x51, 0x0a, 0x28, 0x2a,
|
||||
0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32,
|
||||
0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x27, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20,
|
||||
0x22, 0x31, 0x39, 0x35, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x22, 0x3a,
|
||||
0x20, 0x22, 0x44, 0x65, 0x61, 0x74, 0x68, 0x20, 0x53, 0x74, 0x61, 0x72, 0x20, 0x32, 0x22, 0x7d,
|
||||
0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70,
|
||||
0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x69, 0x72, 0x73,
|
||||
0x74, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x42, 0x07, 0x0a,
|
||||
0x05, 0x5f, 0x63, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x7a, 0x69, 0x70, 0x42, 0x0a,
|
||||
0x0a, 0x08, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x70,
|
||||
0x68, 0x6f, 0x6e, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61,
|
||||
0x79, 0x22, 0x78, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x0f, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x1b,
|
||||
0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x64, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62,
|
||||
0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6e, 0x74, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x25, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20,
|
||||
0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x22,
|
||||
0x44, 0x65, 0x61, 0x74, 0x68, 0x20, 0x53, 0x74, 0x61, 0x72, 0x20, 0x32, 0x22, 0x7d, 0x42, 0x08,
|
||||
0x0a, 0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x73,
|
||||
0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f,
|
||||
0x63, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x7a, 0x69, 0x70, 0x42, 0x0a, 0x0a, 0x08,
|
||||
0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x70, 0x68, 0x6f,
|
||||
0x6e, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x22,
|
||||
0x78, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x41,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x0f, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x64, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x1b, 0x52, 0x65,
|
||||
0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x64, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74,
|
||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64,
|
||||
0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -26,8 +26,8 @@ type UpdateAccountPrivacyRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
PrivacyAccepted *bool `protobuf:"varint,2,opt,name=privacy_accepted,json=privacyAccepted,proto3,oneof" json:"privacy_accepted,omitempty"`
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
PrivacyAccepted bool `protobuf:"varint,2,opt,name=privacy_accepted,json=privacyAccepted,proto3" json:"privacy_accepted,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UpdateAccountPrivacyRequest) Reset() {
|
||||
@ -62,7 +62,7 @@ func (*UpdateAccountPrivacyRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_update_account_privacy_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *UpdateAccountPrivacyRequest) GetId() int64 {
|
||||
func (x *UpdateAccountPrivacyRequest) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
@ -70,8 +70,8 @@ func (x *UpdateAccountPrivacyRequest) GetId() int64 {
|
||||
}
|
||||
|
||||
func (x *UpdateAccountPrivacyRequest) GetPrivacyAccepted() bool {
|
||||
if x != nil && x.PrivacyAccepted != nil {
|
||||
return *x.PrivacyAccepted
|
||||
if x != nil {
|
||||
return x.PrivacyAccepted
|
||||
}
|
||||
return false
|
||||
}
|
||||
@ -132,36 +132,34 @@ 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, 0xa1, 0x02, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 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, 0x1e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x03, 0x42, 0x0e, 0x92, 0x41, 0x0b, 0x4a, 0x01, 0x31, 0xa2, 0x02, 0x05, 0x69, 0x6e, 0x74, 0x36,
|
||||
0x34, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79,
|
||||
0x04, 0x42, 0x0e, 0x92, 0x41, 0x0b, 0x4a, 0x01, 0x31, 0xa2, 0x02, 0x05, 0x69, 0x6e, 0x74, 0x36,
|
||||
0x34, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79,
|
||||
0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42,
|
||||
0x0a, 0x92, 0x41, 0x07, 0x4a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x70,
|
||||
0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x88, 0x01,
|
||||
0x01, 0x3a, 0x90, 0x01, 0x92, 0x41, 0x8c, 0x01, 0x0a, 0x62, 0x2a, 0x1e, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61,
|
||||
0x63, 0x79, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x32, 0x28, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x43,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0xd2, 0x01, 0x02, 0x69, 0x64, 0xd2, 0x01, 0x10, 0x70, 0x72, 0x69, 0x76,
|
||||
0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x32, 0x26, 0x7b, 0x22,
|
||||
0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x72, 0x69, 0x76, 0x61,
|
||||
0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72,
|
||||
0x75, 0x65, 0x20, 0x7d, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79,
|
||||
0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x1c, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61,
|
||||
0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x14, 0x92, 0x41, 0x11, 0x2a, 0x0f, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x26, 0x92, 0x41, 0x23, 0x0a, 0x21, 0x2a, 0x1f,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x50,
|
||||
0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
|
||||
0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74,
|
||||
0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
0x0a, 0x92, 0x41, 0x07, 0x4a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x70, 0x72, 0x69,
|
||||
0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x3a, 0x90, 0x01, 0x92,
|
||||
0x41, 0x8c, 0x01, 0x0a, 0x62, 0x2a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x43, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x6e, 0x74, 0x32, 0x28, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68,
|
||||
0x65, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e,
|
||||
0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0xd2,
|
||||
0x01, 0x02, 0x69, 0x64, 0xd2, 0x01, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61,
|
||||
0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x32, 0x26, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20,
|
||||
0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63,
|
||||
0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0x20, 0x7d, 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 (
|
||||
@ -223,7 +221,6 @@ func file_rpc_update_account_privacy_proto_init() {
|
||||
}
|
||||
}
|
||||
}
|
||||
file_rpc_update_account_privacy_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
323
bff/pb/rpc_update_payment.pb.go
Normal file
323
bff/pb/rpc_update_payment.pb.go
Normal file
@ -0,0 +1,323 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.4
|
||||
// source: rpc_update_payment.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type UpdatePaymentRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
PaymentCategory *string `protobuf:"bytes,2,opt,name=payment_category,json=paymentCategory,proto3,oneof" json:"payment_category,omitempty"`
|
||||
Bankname *string `protobuf:"bytes,3,opt,name=bankname,proto3,oneof" json:"bankname,omitempty"`
|
||||
IBAN *string `protobuf:"bytes,4,opt,name=IBAN,proto3,oneof" json:"IBAN,omitempty"`
|
||||
BIC *string `protobuf:"bytes,5,opt,name=BIC,proto3,oneof" json:"BIC,omitempty"`
|
||||
PaypalAccount *string `protobuf:"bytes,6,opt,name=paypal_account,json=paypalAccount,proto3,oneof" json:"paypal_account,omitempty"`
|
||||
PaypalId *string `protobuf:"bytes,7,opt,name=paypal_id,json=paypalId,proto3,oneof" json:"paypal_id,omitempty"`
|
||||
PaymentSystem *string `protobuf:"bytes,8,opt,name=payment_system,json=paymentSystem,proto3,oneof" json:"payment_system,omitempty"`
|
||||
Type *string `protobuf:"bytes,9,opt,name=type,proto3,oneof" json:"type,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UpdatePaymentRequest) Reset() {
|
||||
*x = UpdatePaymentRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_update_payment_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UpdatePaymentRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdatePaymentRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdatePaymentRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_update_payment_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdatePaymentRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdatePaymentRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_update_payment_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *UpdatePaymentRequest) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdatePaymentRequest) GetPaymentCategory() string {
|
||||
if x != nil && x.PaymentCategory != nil {
|
||||
return *x.PaymentCategory
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdatePaymentRequest) GetBankname() string {
|
||||
if x != nil && x.Bankname != nil {
|
||||
return *x.Bankname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdatePaymentRequest) GetIBAN() string {
|
||||
if x != nil && x.IBAN != nil {
|
||||
return *x.IBAN
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdatePaymentRequest) GetBIC() string {
|
||||
if x != nil && x.BIC != nil {
|
||||
return *x.BIC
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdatePaymentRequest) GetPaypalAccount() string {
|
||||
if x != nil && x.PaypalAccount != nil {
|
||||
return *x.PaypalAccount
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdatePaymentRequest) GetPaypalId() string {
|
||||
if x != nil && x.PaypalId != nil {
|
||||
return *x.PaypalId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdatePaymentRequest) GetPaymentSystem() string {
|
||||
if x != nil && x.PaymentSystem != nil {
|
||||
return *x.PaymentSystem
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdatePaymentRequest) GetType() string {
|
||||
if x != nil && x.Type != nil {
|
||||
return *x.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type UpdatePaymentResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Payment *Payment `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UpdatePaymentResponse) Reset() {
|
||||
*x = UpdatePaymentResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_update_payment_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UpdatePaymentResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdatePaymentResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UpdatePaymentResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_update_payment_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdatePaymentResponse.ProtoReflect.Descriptor instead.
|
||||
func (*UpdatePaymentResponse) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_update_payment_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *UpdatePaymentResponse) GetPayment() *Payment {
|
||||
if x != nil {
|
||||
return x.Payment
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_rpc_update_payment_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_rpc_update_payment_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61,
|
||||
0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e,
|
||||
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d,
|
||||
0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x05,
|
||||
0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x48, 0x00, 0x52, 0x0f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67,
|
||||
0x6f, 0x72, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x62, 0x61, 0x6e, 0x6b, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x62, 0x61, 0x6e, 0x6b,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x49, 0x42, 0x41, 0x4e, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x49, 0x42, 0x41, 0x4e, 0x88, 0x01, 0x01,
|
||||
0x12, 0x15, 0x0a, 0x03, 0x42, 0x49, 0x43, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52,
|
||||
0x03, 0x42, 0x49, 0x43, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x70, 0x61,
|
||||
0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48,
|
||||
0x04, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64,
|
||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x08, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c,
|
||||
0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52,
|
||||
0x0d, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x88, 0x01,
|
||||
0x01, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48,
|
||||
0x07, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x3a, 0xef, 0x01, 0x92, 0x41, 0xeb,
|
||||
0x01, 0x0a, 0x28, 0x2a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x50, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x32, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x50,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0xbe, 0x01, 0x7b, 0x22,
|
||||
0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x54,
|
||||
0x42, 0x44, 0x3a, 0x20, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61,
|
||||
0x79, 0x70, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x69,
|
||||
0x64, 0x22, 0x3a, 0x20, 0x22, 0x74, 0x68, 0x69, 0x73, 0x2d, 0x69, 0x73, 0x2d, 0x61, 0x2d, 0x70,
|
||||
0x61, 0x79, 0x70, 0x61, 0x6c, 0x2d, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x42,
|
||||
0x44, 0x3a, 0x20, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x20, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
||||
0x22, 0x2c, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x42, 0x44, 0x3a,
|
||||
0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x22, 0x7d, 0x42, 0x13, 0x0a, 0x11,
|
||||
0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
|
||||
0x79, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x61, 0x6e, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x07,
|
||||
0x0a, 0x05, 0x5f, 0x49, 0x42, 0x41, 0x4e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x42, 0x49, 0x43, 0x42,
|
||||
0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64,
|
||||
0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x73,
|
||||
0x74, 0x65, 0x6d, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x78, 0x0a, 0x15,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x64, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x1b, 0x52, 0x65, 0x74, 0x75, 0x72,
|
||||
0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x20, 0x50,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70,
|
||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_rpc_update_payment_proto_rawDescOnce sync.Once
|
||||
file_rpc_update_payment_proto_rawDescData = file_rpc_update_payment_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_rpc_update_payment_proto_rawDescGZIP() []byte {
|
||||
file_rpc_update_payment_proto_rawDescOnce.Do(func() {
|
||||
file_rpc_update_payment_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_update_payment_proto_rawDescData)
|
||||
})
|
||||
return file_rpc_update_payment_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_rpc_update_payment_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_rpc_update_payment_proto_goTypes = []interface{}{
|
||||
(*UpdatePaymentRequest)(nil), // 0: pb.UpdatePaymentRequest
|
||||
(*UpdatePaymentResponse)(nil), // 1: pb.UpdatePaymentResponse
|
||||
(*Payment)(nil), // 2: pb.Payment
|
||||
}
|
||||
var file_rpc_update_payment_proto_depIdxs = []int32{
|
||||
2, // 0: pb.UpdatePaymentResponse.payment:type_name -> pb.Payment
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_rpc_update_payment_proto_init() }
|
||||
func file_rpc_update_payment_proto_init() {
|
||||
if File_rpc_update_payment_proto != nil {
|
||||
return
|
||||
}
|
||||
file_payment_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_rpc_update_payment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdatePaymentRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_update_payment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdatePaymentResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_rpc_update_payment_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_rpc_update_payment_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_rpc_update_payment_proto_goTypes,
|
||||
DependencyIndexes: file_rpc_update_payment_proto_depIdxs,
|
||||
MessageInfos: file_rpc_update_payment_proto_msgTypes,
|
||||
}.Build()
|
||||
File_rpc_update_payment_proto = out.File
|
||||
file_rpc_update_payment_proto_rawDesc = nil
|
||||
file_rpc_update_payment_proto_goTypes = nil
|
||||
file_rpc_update_payment_proto_depIdxs = nil
|
||||
}
|
316
bff/pb/rpc_update_person.pb.go
Normal file
316
bff/pb/rpc_update_person.pb.go
Normal file
@ -0,0 +1,316 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.4
|
||||
// source: rpc_update_person.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type UpdatePersonRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Firstname *string `protobuf:"bytes,2,opt,name=firstname,proto3,oneof" json:"firstname,omitempty"`
|
||||
Lastname *string `protobuf:"bytes,3,opt,name=lastname,proto3,oneof" json:"lastname,omitempty"`
|
||||
Street *string `protobuf:"bytes,4,opt,name=street,proto3,oneof" json:"street,omitempty"`
|
||||
City *string `protobuf:"bytes,5,opt,name=city,proto3,oneof" json:"city,omitempty"`
|
||||
Zip *string `protobuf:"bytes,6,opt,name=zip,proto3,oneof" json:"zip,omitempty"`
|
||||
Country *string `protobuf:"bytes,7,opt,name=country,proto3,oneof" json:"country,omitempty"`
|
||||
Birthday *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=birthday,proto3,oneof" json:"birthday,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UpdatePersonRequest) Reset() {
|
||||
*x = UpdatePersonRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_update_person_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UpdatePersonRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdatePersonRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdatePersonRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_update_person_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdatePersonRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdatePersonRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_update_person_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *UpdatePersonRequest) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdatePersonRequest) GetFirstname() string {
|
||||
if x != nil && x.Firstname != nil {
|
||||
return *x.Firstname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdatePersonRequest) GetLastname() string {
|
||||
if x != nil && x.Lastname != nil {
|
||||
return *x.Lastname
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdatePersonRequest) GetStreet() string {
|
||||
if x != nil && x.Street != nil {
|
||||
return *x.Street
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdatePersonRequest) GetCity() string {
|
||||
if x != nil && x.City != nil {
|
||||
return *x.City
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdatePersonRequest) GetZip() string {
|
||||
if x != nil && x.Zip != nil {
|
||||
return *x.Zip
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdatePersonRequest) GetCountry() string {
|
||||
if x != nil && x.Country != nil {
|
||||
return *x.Country
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UpdatePersonRequest) GetBirthday() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.Birthday
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type UpdatePersonResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Person *Person `protobuf:"bytes,1,opt,name=person,proto3" json:"person,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UpdatePersonResponse) Reset() {
|
||||
*x = UpdatePersonResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_update_person_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UpdatePersonResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdatePersonResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UpdatePersonResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_update_person_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdatePersonResponse.ProtoReflect.Descriptor instead.
|
||||
func (*UpdatePersonResponse) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_update_person_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *UpdatePersonResponse) GetPerson() *Person {
|
||||
if x != nil {
|
||||
return x.Person
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_rpc_update_person_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_rpc_update_person_proto_rawDesc = []byte{
|
||||
0x0a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72,
|
||||
0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1f, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 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, 0x1a, 0x0c,
|
||||
0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe7, 0x04, 0x0a,
|
||||
0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
|
||||
0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x73,
|
||||
0x74, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x65,
|
||||
0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x73, 0x74, 0x72, 0x65,
|
||||
0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x15,
|
||||
0x0a, 0x03, 0x7a, 0x69, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x03, 0x7a,
|
||||
0x69, 0x70, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x88, 0x01, 0x01, 0x12, 0x58, 0x0a, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79,
|
||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
|
||||
0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31,
|
||||
0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x48,
|
||||
0x06, 0x52, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x88, 0x01, 0x01, 0x3a, 0xe5,
|
||||
0x01, 0x92, 0x41, 0xe1, 0x01, 0x0a, 0x26, 0x2a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20,
|
||||
0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61,
|
||||
0x6e, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0xb6, 0x01,
|
||||
0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x66, 0x69, 0x72,
|
||||
0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x4a, 0x6f, 0x68, 0x6e, 0x22, 0x2c,
|
||||
0x20, 0x22, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x6f,
|
||||
0x65, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x22, 0x2c,
|
||||
0x20, 0x22, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x65, 0x61, 0x74,
|
||||
0x68, 0x20, 0x53, 0x74, 0x61, 0x72, 0x20, 0x33, 0x22, 0x2c, 0x20, 0x22, 0x7a, 0x69, 0x70, 0x22,
|
||||
0x3a, 0x20, 0x22, 0x30, 0x38, 0x31, 0x36, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x69, 0x74, 0x79, 0x22,
|
||||
0x3a, 0x20, 0x22, 0x4d, 0x6f, 0x6e, 0x74, 0x61, 0x6e, 0x61, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x43, 0x61, 0x6e, 0x61, 0x64, 0x61, 0x22,
|
||||
0x2c, 0x20, 0x22, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x31,
|
||||
0x39, 0x39, 0x32, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a,
|
||||
0x30, 0x30, 0x5a, 0x22, 0x20, 0x7d, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x42, 0x07, 0x0a, 0x05,
|
||||
0x5f, 0x63, 0x69, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x7a, 0x69, 0x70, 0x42, 0x0a, 0x0a,
|
||||
0x08, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x62, 0x69,
|
||||
0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x22, 0x72, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27,
|
||||
0x0a, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a,
|
||||
0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52,
|
||||
0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x3a, 0x31, 0x92, 0x41, 0x2e, 0x0a, 0x2c, 0x2a, 0x0e,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x32, 0x1a,
|
||||
0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69,
|
||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f,
|
||||
0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_rpc_update_person_proto_rawDescOnce sync.Once
|
||||
file_rpc_update_person_proto_rawDescData = file_rpc_update_person_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_rpc_update_person_proto_rawDescGZIP() []byte {
|
||||
file_rpc_update_person_proto_rawDescOnce.Do(func() {
|
||||
file_rpc_update_person_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_update_person_proto_rawDescData)
|
||||
})
|
||||
return file_rpc_update_person_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_rpc_update_person_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_rpc_update_person_proto_goTypes = []interface{}{
|
||||
(*UpdatePersonRequest)(nil), // 0: pb.UpdatePersonRequest
|
||||
(*UpdatePersonResponse)(nil), // 1: pb.UpdatePersonResponse
|
||||
(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
|
||||
(*Person)(nil), // 3: pb.Person
|
||||
}
|
||||
var file_rpc_update_person_proto_depIdxs = []int32{
|
||||
2, // 0: pb.UpdatePersonRequest.birthday:type_name -> google.protobuf.Timestamp
|
||||
3, // 1: pb.UpdatePersonResponse.person:type_name -> pb.Person
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_rpc_update_person_proto_init() }
|
||||
func file_rpc_update_person_proto_init() {
|
||||
if File_rpc_update_person_proto != nil {
|
||||
return
|
||||
}
|
||||
file_person_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_rpc_update_person_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdatePersonRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_update_person_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdatePersonResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_rpc_update_person_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_rpc_update_person_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_rpc_update_person_proto_goTypes,
|
||||
DependencyIndexes: file_rpc_update_person_proto_depIdxs,
|
||||
MessageInfos: file_rpc_update_person_proto_msgTypes,
|
||||
}.Build()
|
||||
File_rpc_update_person_proto = out.File
|
||||
file_rpc_update_person_proto_rawDesc = nil
|
||||
file_rpc_update_person_proto_goTypes = nil
|
||||
file_rpc_update_person_proto_depIdxs = nil
|
||||
}
|
246
bff/pb/rpc_upload_document.pb.go
Normal file
246
bff/pb/rpc_upload_document.pb.go
Normal file
@ -0,0 +1,246 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.4
|
||||
// source: rpc_upload_document.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type UploadDocumentRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
File []byte `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
|
||||
PersonId *uint64 `protobuf:"varint,2,opt,name=person_id,json=personId,proto3,oneof" json:"person_id,omitempty"`
|
||||
MailId *uint64 `protobuf:"varint,3,opt,name=mail_id,json=mailId,proto3,oneof" json:"mail_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UploadDocumentRequest) Reset() {
|
||||
*x = UploadDocumentRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_upload_document_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UploadDocumentRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UploadDocumentRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UploadDocumentRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_upload_document_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UploadDocumentRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UploadDocumentRequest) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_upload_document_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *UploadDocumentRequest) GetFile() []byte {
|
||||
if x != nil {
|
||||
return x.File
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UploadDocumentRequest) GetPersonId() uint64 {
|
||||
if x != nil && x.PersonId != nil {
|
||||
return *x.PersonId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UploadDocumentRequest) GetMailId() uint64 {
|
||||
if x != nil && x.MailId != nil {
|
||||
return *x.MailId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type UploadDocumentResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Document *Document `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UploadDocumentResponse) Reset() {
|
||||
*x = UploadDocumentResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_rpc_upload_document_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UploadDocumentResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UploadDocumentResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UploadDocumentResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_rpc_upload_document_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UploadDocumentResponse.ProtoReflect.Descriptor instead.
|
||||
func (*UploadDocumentResponse) Descriptor() ([]byte, []int) {
|
||||
return file_rpc_upload_document_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *UploadDocumentResponse) GetDocument() *Document {
|
||||
if x != nil {
|
||||
return x.Document
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_rpc_upload_document_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_rpc_upload_document_proto_rawDesc = []byte{
|
||||
0x0a, 0x19, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x64, 0x6f, 0x63,
|
||||
0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e,
|
||||
0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e,
|
||||
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
||||
0x0e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
|
||||
0xe3, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c,
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x20, 0x0a,
|
||||
0x09, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04,
|
||||
0x48, 0x00, 0x52, 0x08, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12,
|
||||
0x1c, 0x0a, 0x07, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04,
|
||||
0x48, 0x01, 0x52, 0x06, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x64, 0x88, 0x01, 0x01, 0x3a, 0x5c, 0x92,
|
||||
0x41, 0x59, 0x0a, 0x42, 0x2a, 0x1a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x6f, 0x63, 0x75,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x20, 0x5b, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x48, 0x54, 0x54, 0x50, 0x5d,
|
||||
0x32, 0x1d, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x20, 0x61, 0x20, 0x44, 0x6f, 0x63, 0x75, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x20, 0x5b, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x48, 0x54, 0x54, 0x50, 0x5d, 0xd2,
|
||||
0x01, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x32, 0x13, 0x7b, 0x22, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
|
||||
0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x20, 0x7d, 0x42, 0x0c, 0x0a, 0x0a, 0x5f,
|
||||
0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x61,
|
||||
0x69, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x62, 0x0a, 0x16, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44,
|
||||
0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x28, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52,
|
||||
0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x1e, 0x92, 0x41, 0x1b, 0x0a, 0x19,
|
||||
0x2a, 0x17, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
|
||||
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 (
|
||||
file_rpc_upload_document_proto_rawDescOnce sync.Once
|
||||
file_rpc_upload_document_proto_rawDescData = file_rpc_upload_document_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_rpc_upload_document_proto_rawDescGZIP() []byte {
|
||||
file_rpc_upload_document_proto_rawDescOnce.Do(func() {
|
||||
file_rpc_upload_document_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_upload_document_proto_rawDescData)
|
||||
})
|
||||
return file_rpc_upload_document_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_rpc_upload_document_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_rpc_upload_document_proto_goTypes = []interface{}{
|
||||
(*UploadDocumentRequest)(nil), // 0: pb.UploadDocumentRequest
|
||||
(*UploadDocumentResponse)(nil), // 1: pb.UploadDocumentResponse
|
||||
(*Document)(nil), // 2: pb.Document
|
||||
}
|
||||
var file_rpc_upload_document_proto_depIdxs = []int32{
|
||||
2, // 0: pb.UploadDocumentResponse.document:type_name -> pb.Document
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_rpc_upload_document_proto_init() }
|
||||
func file_rpc_upload_document_proto_init() {
|
||||
if File_rpc_upload_document_proto != nil {
|
||||
return
|
||||
}
|
||||
file_document_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_rpc_upload_document_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UploadDocumentRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_rpc_upload_document_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UploadDocumentResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_rpc_upload_document_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_rpc_upload_document_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_rpc_upload_document_proto_goTypes,
|
||||
DependencyIndexes: file_rpc_upload_document_proto_depIdxs,
|
||||
MessageInfos: file_rpc_upload_document_proto_msgTypes,
|
||||
}.Build()
|
||||
File_rpc_upload_document_proto = out.File
|
||||
file_rpc_upload_document_proto_rawDesc = nil
|
||||
file_rpc_upload_document_proto_goTypes = nil
|
||||
file_rpc_upload_document_proto_depIdxs = nil
|
||||
}
|
@ -31,151 +31,363 @@ var file_service_df_proto_rawDesc = []byte{
|
||||
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, 0x18, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17,
|
||||
0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f,
|
||||
0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x1a, 0x15, 0x72, 0x70, 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69,
|
||||
0x73, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x73, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f,
|
||||
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x66, 0x72,
|
||||
0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32,
|
||||
0xe6, 0x08, 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, 0x16, 0x3a, 0x01, 0x2a, 0x32, 0x11,
|
||||
0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x69, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12,
|
||||
0x15, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c,
|
||||
0x92, 0x41, 0x12, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41,
|
||||
0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x76, 0x31,
|
||||
0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x71, 0x0a, 0x0c,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x17, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53,
|
||||
0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x2e, 0x92, 0x41, 0x12, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72,
|
||||
0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76,
|
||||
0x31, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12,
|
||||
0x71, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12,
|
||||
0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x2e, 0x92, 0x41, 0x12, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61,
|
||||
0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12,
|
||||
0x11, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x73, 0x12, 0x63, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17,
|
||||
0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x78, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x92,
|
||||
0x41, 0x12, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75,
|
||||
0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x32, 0x12, 0x2f,
|
||||
0x76, 0x31, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x12, 0x95, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15,
|
||||
0x72, 0x70, 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f,
|
||||
0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18,
|
||||
0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x72, 0x70, 0x63, 0x5f, 0x64, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x70,
|
||||
0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x72, 0x70, 0x63,
|
||||
0x5f, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x1a, 0x16, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x73,
|
||||
0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x75,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70,
|
||||
0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x72, 0x70, 0x63,
|
||||
0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x72, 0x70, 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70,
|
||||
0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
||||
0x20, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x1a, 0x0f, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x73,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x73, 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, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f,
|
||||
0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x72,
|
||||
0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x5f,
|
||||
0x6c, 0x6f, 0x67, 0x5f, 0x62, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x6c, 0x6f,
|
||||
0x61, 0x64, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x1a, 0x19, 0x72, 0x70, 0x63, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x64, 0x6f,
|
||||
0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xf0, 0x1a, 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, 0x68, 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, 0x25, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65,
|
||||
0x6e, 0x12, 0xa4, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x61, 0x92, 0x41, 0x2f, 0x12, 0x1b, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x20, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x62, 0x79, 0x20, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61,
|
||||
0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12,
|
||||
0x27, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x69,
|
||||
0x73, 0x74, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x92, 0x01, 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, 0x4f, 0x92, 0x41,
|
||||
0x27, 0x12, 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 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, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
|
||||
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x92, 0x01,
|
||||
0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x15, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x55, 0x92, 0x41, 0x2d,
|
||||
0x12, 0x19, 0x47, 0x65, 0x74, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x62, 0x79,
|
||||
0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x62, 0x10, 0x0a, 0x0e, 0x0a,
|
||||
0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x73, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x7b, 0x69,
|
||||
0x64, 0x7d, 0x12, 0x96, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x73, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x92, 0x41, 0x2e, 0x12, 0x1a, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x20, 0x5b, 0x61, 0x64, 0x6d, 0x69,
|
||||
0x6e, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x5d, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61,
|
||||
0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12,
|
||||
0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x6c, 0x69,
|
||||
0x73, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x7f, 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, 0x39, 0x92, 0x41, 0x10, 0x12, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x41,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22,
|
||||
0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x91, 0x01, 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, 0x4b, 0x92, 0x41, 0x22, 0x12, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65,
|
||||
0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20,
|
||||
0x3a, 0x01, 0x2a, 0x32, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x73, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x12, 0xbf, 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, 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, 0x12, 0x74, 0x0a, 0x0c, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x65,
|
||||
0x72, 0x73, 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, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x1a,
|
||||
0x07, 0x92, 0x41, 0x04, 0x12, 0x02, 0x64, 0x66, 0x42, 0xb0, 0x01, 0x92, 0x41, 0x93, 0x01, 0x12,
|
||||
0x44, 0x0a, 0x06, 0x64, 0x66, 0x20, 0x41, 0x50, 0x49, 0x22, 0x35, 0x0a, 0x06, 0x69, 0x74, 0x73,
|
||||
0x73, 0x63, 0x62, 0x12, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74,
|
||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64,
|
||||
0x66, 0x1a, 0x0d, 0x64, 0x65, 0x76, 0x40, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2e, 0x64, 0x65,
|
||||
0x32, 0x03, 0x31, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69,
|
||||
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70,
|
||||
0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x5a, 0x23, 0x0a,
|
||||
0x21, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x13, 0x08,
|
||||
0x02, 0x1a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x20, 0x02, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69,
|
||||
0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
0x76, 0x61, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x64, 0x92, 0x41,
|
||||
0x33, 0x12, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x73, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75,
|
||||
0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x32, 0x23, 0x2f,
|
||||
0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61,
|
||||
0x63, 0x79, 0x12, 0x8b, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72,
|
||||
0x73, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50,
|
||||
0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x92, 0x41, 0x21, 0x12, 0x0d, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a,
|
||||
0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f,
|
||||
0x6e, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
|
||||
0x12, 0x8b, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f,
|
||||
0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72,
|
||||
0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x92, 0x41, 0x21, 0x12, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65,
|
||||
0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e,
|
||||
0x3a, 0x01, 0x2a, 0x32, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73,
|
||||
0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x84,
|
||||
0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x14, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f,
|
||||
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0x92, 0x41, 0x24, 0x12, 0x10,
|
||||
0x47, 0x65, 0x74, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44,
|
||||
0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68,
|
||||
0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65,
|
||||
0x72, 0x73, 0x6f, 0x6e, 0x73, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
|
||||
0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f,
|
||||
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x92, 0x41, 0x27, 0x12, 0x13,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x20, 0x62, 0x79,
|
||||
0x20, 0x49, 0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41,
|
||||
0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x2a, 0x1e, 0x2f, 0x76, 0x31,
|
||||
0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f,
|
||||
0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9e, 0x01, 0x0a, 0x0b,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72,
|
||||
0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0x92, 0x41,
|
||||
0x2e, 0x12, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x20,
|
||||
0x62, 0x79, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x62, 0x10, 0x0a,
|
||||
0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f,
|
||||
0x6e, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x2f,
|
||||
0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x91, 0x01, 0x0a,
|
||||
0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18,
|
||||
0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x4b, 0x92, 0x41, 0x22, 0x12, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65,
|
||||
0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20,
|
||||
0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x12, 0x8a, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12,
|
||||
0x15, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d,
|
||||
0x92, 0x41, 0x25, 0x12, 0x11, 0x47, 0x65, 0x74, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72,
|
||||
0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d,
|
||||
0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x65, 0x74,
|
||||
0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x99, 0x01,
|
||||
0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12,
|
||||
0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x44,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x92, 0x41, 0x28, 0x12, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0x62,
|
||||
0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12,
|
||||
0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x2a, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xa4, 0x01, 0x0a, 0x0c, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x61, 0x92,
|
||||
0x41, 0x2f, 0x12, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x73, 0x20, 0x62, 0x79, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x62,
|
||||
0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12,
|
||||
0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d,
|
||||
0x12, 0x91, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61,
|
||||
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x92, 0x41, 0x22, 0x12, 0x0e, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x10, 0x0a, 0x0e,
|
||||
0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x32, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x12, 0xb0, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x74,
|
||||
0x75, 0x72, 0x6e, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x74, 0x75,
|
||||
0x72, 0x6e, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67,
|
||||
0x92, 0x41, 0x30, 0x12, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e,
|
||||
0x73, 0x4c, 0x6f, 0x67, 0x20, 0x62, 0x79, 0x20, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69,
|
||||
0x64, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74,
|
||||
0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x76, 0x31, 0x2f, 0x72,
|
||||
0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x5f,
|
||||
0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x2f, 0x7b, 0x70, 0x65, 0x72,
|
||||
0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xca, 0x02, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f,
|
||||
0x61, 0x64, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61,
|
||||
0x64, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x80, 0x02, 0x92, 0x41, 0xe0, 0x01, 0x12, 0x1b, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64,
|
||||
0x20, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x5b, 0x6f, 0x6e, 0x6c, 0x79, 0x20,
|
||||
0x48, 0x54, 0x54, 0x50, 0x5d, 0x1a, 0xae, 0x01, 0x54, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20,
|
||||
0x76, 0x69, 0x61, 0x20, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x6e,
|
||||
0x6f, 0x74, 0x20, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x2e, 0x20, 0x54, 0x72, 0x79,
|
||||
0x20, 0x60, 0x60, 0x60, 0x63, 0x75, 0x72, 0x6c, 0x20, 0x2d, 0x58, 0x20, 0x50, 0x4f, 0x53, 0x54,
|
||||
0x20, 0x2d, 0x48, 0x20, 0x22, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x3a, 0x20, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x20, 0x7b, 0x74, 0x6f, 0x6b, 0x65,
|
||||
0x6e, 0x7d, 0x22, 0x20, 0x2d, 0x46, 0x20, 0x22, 0x66, 0x69, 0x6c, 0x65, 0x3d, 0x40, 0x2f, 0x70,
|
||||
0x61, 0x74, 0x68, 0x2f, 0x74, 0x6f, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x20, 0x2d, 0x46, 0x20,
|
||||
0x22, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x3d, 0x31, 0x22, 0x20, 0x22, 0x68,
|
||||
0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x7b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x52, 0x49,
|
||||
0x7d, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x70, 0x6c, 0x6f,
|
||||
0x61, 0x64, 0x22, 0x60, 0x60, 0x60, 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, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x70,
|
||||
0x6c, 0x6f, 0x61, 0x64, 0x12, 0x9f, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44,
|
||||
0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f,
|
||||
0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56,
|
||||
0x92, 0x41, 0x29, 0x12, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x44, 0x6f, 0x63, 0x75,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a,
|
||||
0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x24, 0x2a, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x1a, 0x07, 0x92, 0x41, 0x04, 0x12, 0x02, 0x64, 0x66, 0x42,
|
||||
0xb0, 0x01, 0x92, 0x41, 0x93, 0x01, 0x12, 0x44, 0x0a, 0x06, 0x64, 0x66, 0x20, 0x41, 0x50, 0x49,
|
||||
0x22, 0x35, 0x0a, 0x06, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x12, 0x1c, 0x68, 0x74, 0x74, 0x70,
|
||||
0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69,
|
||||
0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x1a, 0x0d, 0x64, 0x65, 0x76, 0x40, 0x69, 0x74,
|
||||
0x73, 0x73, 0x63, 0x62, 0x2e, 0x64, 0x65, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02,
|
||||
0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73,
|
||||
0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,
|
||||
0x6a, 0x73, 0x6f, 0x6e, 0x5a, 0x23, 0x0a, 0x21, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72,
|
||||
0x41, 0x75, 0x74, 0x68, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
|
||||
0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75,
|
||||
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f,
|
||||
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var file_service_df_proto_goTypes = []interface{}{
|
||||
(*LoginRequest)(nil), // 0: pb.LoginRequest
|
||||
(*RefreshTokenRequest)(nil), // 1: pb.RefreshTokenRequest
|
||||
(*BlockSessionRequest)(nil), // 2: pb.BlockSessionRequest
|
||||
(*GetAccountRequest)(nil), // 3: pb.GetAccountRequest
|
||||
(*ListSessionsRequest)(nil), // 4: pb.ListSessionsRequest
|
||||
(*ListSessionsRequest)(nil), // 2: pb.ListSessionsRequest
|
||||
(*BlockSessionRequest)(nil), // 3: pb.BlockSessionRequest
|
||||
(*GetAccountRequest)(nil), // 4: pb.GetAccountRequest
|
||||
(*ListAccountsRequest)(nil), // 5: pb.ListAccountsRequest
|
||||
(*CreateAccountRequest)(nil), // 6: pb.CreateAccountRequest
|
||||
(*UpdateAccountRequest)(nil), // 7: pb.UpdateAccountRequest
|
||||
(*UpdateAccountPrivacyRequest)(nil), // 8: pb.UpdateAccountPrivacyRequest
|
||||
(*CreatePersonRequest)(nil), // 9: pb.CreatePersonRequest
|
||||
(*LoginResponse)(nil), // 10: pb.LoginResponse
|
||||
(*RefreshTokenResponse)(nil), // 11: pb.RefreshTokenResponse
|
||||
(*BlockSessionResponse)(nil), // 12: pb.BlockSessionResponse
|
||||
(*GetAccountResponse)(nil), // 13: pb.GetAccountResponse
|
||||
(*ListSessionsResponse)(nil), // 14: pb.ListSessionsResponse
|
||||
(*ListAccountsResponse)(nil), // 15: pb.ListAccountsResponse
|
||||
(*CreateAccountResponse)(nil), // 16: pb.CreateAccountResponse
|
||||
(*UpdateAccountResponse)(nil), // 17: pb.UpdateAccountResponse
|
||||
(*UpdateAccountPrivacyResponse)(nil), // 18: pb.UpdateAccountPrivacyResponse
|
||||
(*CreatePersonResponse)(nil), // 19: pb.CreatePersonResponse
|
||||
(*UpdatePersonRequest)(nil), // 10: pb.UpdatePersonRequest
|
||||
(*GetPersonRequest)(nil), // 11: pb.GetPersonRequest
|
||||
(*DeletePersonRequest)(nil), // 12: pb.DeletePersonRequest
|
||||
(*ListPersonsRequest)(nil), // 13: pb.ListPersonsRequest
|
||||
(*CreatePaymentRequest)(nil), // 14: pb.CreatePaymentRequest
|
||||
(*GetPaymentRequest)(nil), // 15: pb.GetPaymentRequest
|
||||
(*DeletePaymentRequest)(nil), // 16: pb.DeletePaymentRequest
|
||||
(*ListPaymentsRequest)(nil), // 17: pb.ListPaymentsRequest
|
||||
(*UpdatePaymentRequest)(nil), // 18: pb.UpdatePaymentRequest
|
||||
(*ListReturnsLogRequest)(nil), // 19: pb.ListReturnsLogRequest
|
||||
(*UploadDocumentRequest)(nil), // 20: pb.UploadDocumentRequest
|
||||
(*DeleteDocumentRequest)(nil), // 21: pb.DeleteDocumentRequest
|
||||
(*LoginResponse)(nil), // 22: pb.LoginResponse
|
||||
(*RefreshTokenResponse)(nil), // 23: pb.RefreshTokenResponse
|
||||
(*ListSessionsResponse)(nil), // 24: pb.ListSessionsResponse
|
||||
(*BlockSessionResponse)(nil), // 25: pb.BlockSessionResponse
|
||||
(*GetAccountResponse)(nil), // 26: pb.GetAccountResponse
|
||||
(*ListAccountsResponse)(nil), // 27: pb.ListAccountsResponse
|
||||
(*CreateAccountResponse)(nil), // 28: pb.CreateAccountResponse
|
||||
(*UpdateAccountResponse)(nil), // 29: pb.UpdateAccountResponse
|
||||
(*UpdateAccountPrivacyResponse)(nil), // 30: pb.UpdateAccountPrivacyResponse
|
||||
(*CreatePersonResponse)(nil), // 31: pb.CreatePersonResponse
|
||||
(*UpdatePersonResponse)(nil), // 32: pb.UpdatePersonResponse
|
||||
(*GetPersonResponse)(nil), // 33: pb.GetPersonResponse
|
||||
(*DeletePersonResponse)(nil), // 34: pb.DeletePersonResponse
|
||||
(*ListPersonsResponse)(nil), // 35: pb.ListPersonsResponse
|
||||
(*CreatePaymentResponse)(nil), // 36: pb.CreatePaymentResponse
|
||||
(*GetPaymentResponse)(nil), // 37: pb.GetPaymentResponse
|
||||
(*DeletePaymentResponse)(nil), // 38: pb.DeletePaymentResponse
|
||||
(*ListPaymentsResponse)(nil), // 39: pb.ListPaymentsResponse
|
||||
(*UpdatePaymentResponse)(nil), // 40: pb.UpdatePaymentResponse
|
||||
(*ListReturnsLogResponse)(nil), // 41: pb.ListReturnsLogResponse
|
||||
(*UploadDocumentResponse)(nil), // 42: pb.UploadDocumentResponse
|
||||
(*DeleteDocumentResponse)(nil), // 43: pb.DeleteDocumentResponse
|
||||
}
|
||||
var file_service_df_proto_depIdxs = []int32{
|
||||
0, // 0: pb.df.Login:input_type -> pb.LoginRequest
|
||||
1, // 1: pb.df.RefreshToken:input_type -> pb.RefreshTokenRequest
|
||||
2, // 2: pb.df.BlockSession:input_type -> pb.BlockSessionRequest
|
||||
3, // 3: pb.df.GetAccount:input_type -> pb.GetAccountRequest
|
||||
4, // 4: pb.df.ListSessions:input_type -> pb.ListSessionsRequest
|
||||
2, // 2: pb.df.ListSessions:input_type -> pb.ListSessionsRequest
|
||||
3, // 3: pb.df.BlockSession:input_type -> pb.BlockSessionRequest
|
||||
4, // 4: pb.df.GetAccount:input_type -> pb.GetAccountRequest
|
||||
5, // 5: pb.df.ListAccounts:input_type -> pb.ListAccountsRequest
|
||||
6, // 6: pb.df.CreateAccount:input_type -> pb.CreateAccountRequest
|
||||
7, // 7: pb.df.UpdateAccount:input_type -> pb.UpdateAccountRequest
|
||||
8, // 8: pb.df.UpdateAccountPrivacy:input_type -> pb.UpdateAccountPrivacyRequest
|
||||
9, // 9: pb.df.CreatePerson:input_type -> pb.CreatePersonRequest
|
||||
10, // 10: pb.df.Login:output_type -> pb.LoginResponse
|
||||
11, // 11: pb.df.RefreshToken:output_type -> pb.RefreshTokenResponse
|
||||
12, // 12: pb.df.BlockSession:output_type -> pb.BlockSessionResponse
|
||||
13, // 13: pb.df.GetAccount:output_type -> pb.GetAccountResponse
|
||||
14, // 14: pb.df.ListSessions:output_type -> pb.ListSessionsResponse
|
||||
15, // 15: pb.df.ListAccounts:output_type -> pb.ListAccountsResponse
|
||||
16, // 16: pb.df.CreateAccount:output_type -> pb.CreateAccountResponse
|
||||
17, // 17: pb.df.UpdateAccount:output_type -> pb.UpdateAccountResponse
|
||||
18, // 18: pb.df.UpdateAccountPrivacy:output_type -> pb.UpdateAccountPrivacyResponse
|
||||
19, // 19: pb.df.CreatePerson:output_type -> pb.CreatePersonResponse
|
||||
10, // [10:20] is the sub-list for method output_type
|
||||
0, // [0:10] is the sub-list for method input_type
|
||||
10, // 10: pb.df.UpdatePerson:input_type -> pb.UpdatePersonRequest
|
||||
11, // 11: pb.df.GetPerson:input_type -> pb.GetPersonRequest
|
||||
12, // 12: pb.df.DeletePerson:input_type -> pb.DeletePersonRequest
|
||||
13, // 13: pb.df.ListPersons:input_type -> pb.ListPersonsRequest
|
||||
14, // 14: pb.df.CreatePayment:input_type -> pb.CreatePaymentRequest
|
||||
15, // 15: pb.df.GetPayment:input_type -> pb.GetPaymentRequest
|
||||
16, // 16: pb.df.DeletePayment:input_type -> pb.DeletePaymentRequest
|
||||
17, // 17: pb.df.ListPayments:input_type -> pb.ListPaymentsRequest
|
||||
18, // 18: pb.df.UpdatePayment:input_type -> pb.UpdatePaymentRequest
|
||||
19, // 19: pb.df.ListReturnsLog:input_type -> pb.ListReturnsLogRequest
|
||||
20, // 20: pb.df.UploadDocument:input_type -> pb.UploadDocumentRequest
|
||||
21, // 21: pb.df.DeleteDocument:input_type -> pb.DeleteDocumentRequest
|
||||
22, // 22: pb.df.Login:output_type -> pb.LoginResponse
|
||||
23, // 23: pb.df.RefreshToken:output_type -> pb.RefreshTokenResponse
|
||||
24, // 24: pb.df.ListSessions:output_type -> pb.ListSessionsResponse
|
||||
25, // 25: pb.df.BlockSession:output_type -> pb.BlockSessionResponse
|
||||
26, // 26: pb.df.GetAccount:output_type -> pb.GetAccountResponse
|
||||
27, // 27: pb.df.ListAccounts:output_type -> pb.ListAccountsResponse
|
||||
28, // 28: pb.df.CreateAccount:output_type -> pb.CreateAccountResponse
|
||||
29, // 29: pb.df.UpdateAccount:output_type -> pb.UpdateAccountResponse
|
||||
30, // 30: pb.df.UpdateAccountPrivacy:output_type -> pb.UpdateAccountPrivacyResponse
|
||||
31, // 31: pb.df.CreatePerson:output_type -> pb.CreatePersonResponse
|
||||
32, // 32: pb.df.UpdatePerson:output_type -> pb.UpdatePersonResponse
|
||||
33, // 33: pb.df.GetPerson:output_type -> pb.GetPersonResponse
|
||||
34, // 34: pb.df.DeletePerson:output_type -> pb.DeletePersonResponse
|
||||
35, // 35: pb.df.ListPersons:output_type -> pb.ListPersonsResponse
|
||||
36, // 36: pb.df.CreatePayment:output_type -> pb.CreatePaymentResponse
|
||||
37, // 37: pb.df.GetPayment:output_type -> pb.GetPaymentResponse
|
||||
38, // 38: pb.df.DeletePayment:output_type -> pb.DeletePaymentResponse
|
||||
39, // 39: pb.df.ListPayments:output_type -> pb.ListPaymentsResponse
|
||||
40, // 40: pb.df.UpdatePayment:output_type -> pb.UpdatePaymentResponse
|
||||
41, // 41: pb.df.ListReturnsLog:output_type -> pb.ListReturnsLogResponse
|
||||
42, // 42: pb.df.UploadDocument:output_type -> pb.UploadDocumentResponse
|
||||
43, // 43: pb.df.DeleteDocument:output_type -> pb.DeleteDocumentResponse
|
||||
22, // [22:44] is the sub-list for method output_type
|
||||
0, // [0:22] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
@ -186,16 +398,28 @@ func file_service_df_proto_init() {
|
||||
if File_service_df_proto != nil {
|
||||
return
|
||||
}
|
||||
file_rpc_create_account_proto_init()
|
||||
file_rpc_create_payment_proto_init()
|
||||
file_rpc_get_payment_proto_init()
|
||||
file_rpc_list_payments_proto_init()
|
||||
file_rpc_update_payment_proto_init()
|
||||
file_rpc_delete_payment_proto_init()
|
||||
file_rpc_create_person_proto_init()
|
||||
file_rpc_update_account_proto_init()
|
||||
file_rpc_get_person_proto_init()
|
||||
file_rpc_list_persons_proto_init()
|
||||
file_rpc_update_person_proto_init()
|
||||
file_rpc_delete_person_proto_init()
|
||||
file_rpc_create_account_proto_init()
|
||||
file_rpc_get_account_proto_init()
|
||||
file_rpc_list_accounts_proto_init()
|
||||
file_rpc_list_sessions_proto_init()
|
||||
file_rpc_block_session_proto_init()
|
||||
file_rpc_update_account_proto_init()
|
||||
file_rpc_update_account_privacy_proto_init()
|
||||
file_rpc_login_proto_init()
|
||||
file_rpc_list_sessions_proto_init()
|
||||
file_rpc_refresh_token_proto_init()
|
||||
file_rpc_block_session_proto_init()
|
||||
file_rpc_list_returns_log_by_person_id_proto_init()
|
||||
file_rpc_upload_document_proto_init()
|
||||
file_rpc_delete_document_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -21,14 +21,26 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
const (
|
||||
Df_Login_FullMethodName = "/pb.df/Login"
|
||||
Df_RefreshToken_FullMethodName = "/pb.df/RefreshToken"
|
||||
Df_ListSessions_FullMethodName = "/pb.df/ListSessions"
|
||||
Df_BlockSession_FullMethodName = "/pb.df/BlockSession"
|
||||
Df_GetAccount_FullMethodName = "/pb.df/GetAccount"
|
||||
Df_ListSessions_FullMethodName = "/pb.df/ListSessions"
|
||||
Df_ListAccounts_FullMethodName = "/pb.df/ListAccounts"
|
||||
Df_CreateAccount_FullMethodName = "/pb.df/CreateAccount"
|
||||
Df_UpdateAccount_FullMethodName = "/pb.df/UpdateAccount"
|
||||
Df_UpdateAccountPrivacy_FullMethodName = "/pb.df/UpdateAccountPrivacy"
|
||||
Df_CreatePerson_FullMethodName = "/pb.df/CreatePerson"
|
||||
Df_UpdatePerson_FullMethodName = "/pb.df/UpdatePerson"
|
||||
Df_GetPerson_FullMethodName = "/pb.df/GetPerson"
|
||||
Df_DeletePerson_FullMethodName = "/pb.df/DeletePerson"
|
||||
Df_ListPersons_FullMethodName = "/pb.df/ListPersons"
|
||||
Df_CreatePayment_FullMethodName = "/pb.df/CreatePayment"
|
||||
Df_GetPayment_FullMethodName = "/pb.df/GetPayment"
|
||||
Df_DeletePayment_FullMethodName = "/pb.df/DeletePayment"
|
||||
Df_ListPayments_FullMethodName = "/pb.df/ListPayments"
|
||||
Df_UpdatePayment_FullMethodName = "/pb.df/UpdatePayment"
|
||||
Df_ListReturnsLog_FullMethodName = "/pb.df/ListReturnsLog"
|
||||
Df_UploadDocument_FullMethodName = "/pb.df/UploadDocument"
|
||||
Df_DeleteDocument_FullMethodName = "/pb.df/DeleteDocument"
|
||||
)
|
||||
|
||||
// DfClient is the client API for Df service.
|
||||
@ -37,14 +49,26 @@ const (
|
||||
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)
|
||||
ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error)
|
||||
BlockSession(ctx context.Context, in *BlockSessionRequest, opts ...grpc.CallOption) (*BlockSessionResponse, error)
|
||||
GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error)
|
||||
ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error)
|
||||
ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error)
|
||||
CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error)
|
||||
UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error)
|
||||
UpdateAccountPrivacy(ctx context.Context, in *UpdateAccountPrivacyRequest, opts ...grpc.CallOption) (*UpdateAccountPrivacyResponse, error)
|
||||
CreatePerson(ctx context.Context, in *CreatePersonRequest, opts ...grpc.CallOption) (*CreatePersonResponse, error)
|
||||
UpdatePerson(ctx context.Context, in *UpdatePersonRequest, opts ...grpc.CallOption) (*UpdatePersonResponse, error)
|
||||
GetPerson(ctx context.Context, in *GetPersonRequest, opts ...grpc.CallOption) (*GetPersonResponse, error)
|
||||
DeletePerson(ctx context.Context, in *DeletePersonRequest, opts ...grpc.CallOption) (*DeletePersonResponse, error)
|
||||
ListPersons(ctx context.Context, in *ListPersonsRequest, opts ...grpc.CallOption) (*ListPersonsResponse, error)
|
||||
CreatePayment(ctx context.Context, in *CreatePaymentRequest, opts ...grpc.CallOption) (*CreatePaymentResponse, error)
|
||||
GetPayment(ctx context.Context, in *GetPaymentRequest, opts ...grpc.CallOption) (*GetPaymentResponse, error)
|
||||
DeletePayment(ctx context.Context, in *DeletePaymentRequest, opts ...grpc.CallOption) (*DeletePaymentResponse, error)
|
||||
ListPayments(ctx context.Context, in *ListPaymentsRequest, opts ...grpc.CallOption) (*ListPaymentsResponse, error)
|
||||
UpdatePayment(ctx context.Context, in *UpdatePaymentRequest, opts ...grpc.CallOption) (*UpdatePaymentResponse, error)
|
||||
ListReturnsLog(ctx context.Context, in *ListReturnsLogRequest, opts ...grpc.CallOption) (*ListReturnsLogResponse, error)
|
||||
UploadDocument(ctx context.Context, in *UploadDocumentRequest, opts ...grpc.CallOption) (*UploadDocumentResponse, error)
|
||||
DeleteDocument(ctx context.Context, in *DeleteDocumentRequest, opts ...grpc.CallOption) (*DeleteDocumentResponse, error)
|
||||
}
|
||||
|
||||
type dfClient struct {
|
||||
@ -73,6 +97,15 @@ func (c *dfClient) RefreshToken(ctx context.Context, in *RefreshTokenRequest, op
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfClient) ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error) {
|
||||
out := new(ListSessionsResponse)
|
||||
err := c.cc.Invoke(ctx, Df_ListSessions_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...)
|
||||
@ -91,15 +124,6 @@ func (c *dfClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts .
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfClient) ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error) {
|
||||
out := new(ListSessionsResponse)
|
||||
err := c.cc.Invoke(ctx, Df_ListSessions_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfClient) ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error) {
|
||||
out := new(ListAccountsResponse)
|
||||
err := c.cc.Invoke(ctx, Df_ListAccounts_FullMethodName, in, out, opts...)
|
||||
@ -145,20 +169,140 @@ func (c *dfClient) CreatePerson(ctx context.Context, in *CreatePersonRequest, op
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfClient) UpdatePerson(ctx context.Context, in *UpdatePersonRequest, opts ...grpc.CallOption) (*UpdatePersonResponse, error) {
|
||||
out := new(UpdatePersonResponse)
|
||||
err := c.cc.Invoke(ctx, Df_UpdatePerson_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfClient) GetPerson(ctx context.Context, in *GetPersonRequest, opts ...grpc.CallOption) (*GetPersonResponse, error) {
|
||||
out := new(GetPersonResponse)
|
||||
err := c.cc.Invoke(ctx, Df_GetPerson_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfClient) DeletePerson(ctx context.Context, in *DeletePersonRequest, opts ...grpc.CallOption) (*DeletePersonResponse, error) {
|
||||
out := new(DeletePersonResponse)
|
||||
err := c.cc.Invoke(ctx, Df_DeletePerson_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfClient) ListPersons(ctx context.Context, in *ListPersonsRequest, opts ...grpc.CallOption) (*ListPersonsResponse, error) {
|
||||
out := new(ListPersonsResponse)
|
||||
err := c.cc.Invoke(ctx, Df_ListPersons_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfClient) CreatePayment(ctx context.Context, in *CreatePaymentRequest, opts ...grpc.CallOption) (*CreatePaymentResponse, error) {
|
||||
out := new(CreatePaymentResponse)
|
||||
err := c.cc.Invoke(ctx, Df_CreatePayment_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfClient) GetPayment(ctx context.Context, in *GetPaymentRequest, opts ...grpc.CallOption) (*GetPaymentResponse, error) {
|
||||
out := new(GetPaymentResponse)
|
||||
err := c.cc.Invoke(ctx, Df_GetPayment_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfClient) DeletePayment(ctx context.Context, in *DeletePaymentRequest, opts ...grpc.CallOption) (*DeletePaymentResponse, error) {
|
||||
out := new(DeletePaymentResponse)
|
||||
err := c.cc.Invoke(ctx, Df_DeletePayment_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfClient) ListPayments(ctx context.Context, in *ListPaymentsRequest, opts ...grpc.CallOption) (*ListPaymentsResponse, error) {
|
||||
out := new(ListPaymentsResponse)
|
||||
err := c.cc.Invoke(ctx, Df_ListPayments_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfClient) UpdatePayment(ctx context.Context, in *UpdatePaymentRequest, opts ...grpc.CallOption) (*UpdatePaymentResponse, error) {
|
||||
out := new(UpdatePaymentResponse)
|
||||
err := c.cc.Invoke(ctx, Df_UpdatePayment_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfClient) ListReturnsLog(ctx context.Context, in *ListReturnsLogRequest, opts ...grpc.CallOption) (*ListReturnsLogResponse, error) {
|
||||
out := new(ListReturnsLogResponse)
|
||||
err := c.cc.Invoke(ctx, Df_ListReturnsLog_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfClient) UploadDocument(ctx context.Context, in *UploadDocumentRequest, opts ...grpc.CallOption) (*UploadDocumentResponse, error) {
|
||||
out := new(UploadDocumentResponse)
|
||||
err := c.cc.Invoke(ctx, Df_UploadDocument_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dfClient) DeleteDocument(ctx context.Context, in *DeleteDocumentRequest, opts ...grpc.CallOption) (*DeleteDocumentResponse, error) {
|
||||
out := new(DeleteDocumentResponse)
|
||||
err := c.cc.Invoke(ctx, Df_DeleteDocument_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// DfServer is the server API for Df service.
|
||||
// All implementations must embed UnimplementedDfServer
|
||||
// for forward compatibility
|
||||
type DfServer interface {
|
||||
Login(context.Context, *LoginRequest) (*LoginResponse, error)
|
||||
RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenResponse, error)
|
||||
ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error)
|
||||
BlockSession(context.Context, *BlockSessionRequest) (*BlockSessionResponse, error)
|
||||
GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error)
|
||||
ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error)
|
||||
ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error)
|
||||
CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error)
|
||||
UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error)
|
||||
UpdateAccountPrivacy(context.Context, *UpdateAccountPrivacyRequest) (*UpdateAccountPrivacyResponse, error)
|
||||
CreatePerson(context.Context, *CreatePersonRequest) (*CreatePersonResponse, error)
|
||||
UpdatePerson(context.Context, *UpdatePersonRequest) (*UpdatePersonResponse, error)
|
||||
GetPerson(context.Context, *GetPersonRequest) (*GetPersonResponse, error)
|
||||
DeletePerson(context.Context, *DeletePersonRequest) (*DeletePersonResponse, error)
|
||||
ListPersons(context.Context, *ListPersonsRequest) (*ListPersonsResponse, error)
|
||||
CreatePayment(context.Context, *CreatePaymentRequest) (*CreatePaymentResponse, error)
|
||||
GetPayment(context.Context, *GetPaymentRequest) (*GetPaymentResponse, error)
|
||||
DeletePayment(context.Context, *DeletePaymentRequest) (*DeletePaymentResponse, error)
|
||||
ListPayments(context.Context, *ListPaymentsRequest) (*ListPaymentsResponse, error)
|
||||
UpdatePayment(context.Context, *UpdatePaymentRequest) (*UpdatePaymentResponse, error)
|
||||
ListReturnsLog(context.Context, *ListReturnsLogRequest) (*ListReturnsLogResponse, error)
|
||||
UploadDocument(context.Context, *UploadDocumentRequest) (*UploadDocumentResponse, error)
|
||||
DeleteDocument(context.Context, *DeleteDocumentRequest) (*DeleteDocumentResponse, error)
|
||||
mustEmbedUnimplementedDfServer()
|
||||
}
|
||||
|
||||
@ -172,15 +316,15 @@ func (UnimplementedDfServer) Login(context.Context, *LoginRequest) (*LoginRespon
|
||||
func (UnimplementedDfServer) RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RefreshToken not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListSessions not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) BlockSession(context.Context, *BlockSessionRequest) (*BlockSessionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BlockSession not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListSessions not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListAccounts not implemented")
|
||||
}
|
||||
@ -196,6 +340,42 @@ func (UnimplementedDfServer) UpdateAccountPrivacy(context.Context, *UpdateAccoun
|
||||
func (UnimplementedDfServer) CreatePerson(context.Context, *CreatePersonRequest) (*CreatePersonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreatePerson not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) UpdatePerson(context.Context, *UpdatePersonRequest) (*UpdatePersonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdatePerson not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) GetPerson(context.Context, *GetPersonRequest) (*GetPersonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPerson not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) DeletePerson(context.Context, *DeletePersonRequest) (*DeletePersonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeletePerson not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) ListPersons(context.Context, *ListPersonsRequest) (*ListPersonsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListPersons not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) CreatePayment(context.Context, *CreatePaymentRequest) (*CreatePaymentResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreatePayment not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) GetPayment(context.Context, *GetPaymentRequest) (*GetPaymentResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPayment not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) DeletePayment(context.Context, *DeletePaymentRequest) (*DeletePaymentResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeletePayment not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) ListPayments(context.Context, *ListPaymentsRequest) (*ListPaymentsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListPayments not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) UpdatePayment(context.Context, *UpdatePaymentRequest) (*UpdatePaymentResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdatePayment not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) ListReturnsLog(context.Context, *ListReturnsLogRequest) (*ListReturnsLogResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListReturnsLog not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) UploadDocument(context.Context, *UploadDocumentRequest) (*UploadDocumentResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UploadDocument not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) DeleteDocument(context.Context, *DeleteDocumentRequest) (*DeleteDocumentResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteDocument not implemented")
|
||||
}
|
||||
func (UnimplementedDfServer) mustEmbedUnimplementedDfServer() {}
|
||||
|
||||
// UnsafeDfServer may be embedded to opt out of forward compatibility for this service.
|
||||
@ -245,6 +425,24 @@ func _Df_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Df_ListSessions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListSessionsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DfServer).ListSessions(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Df_ListSessions_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DfServer).ListSessions(ctx, req.(*ListSessionsRequest))
|
||||
}
|
||||
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 {
|
||||
@ -281,24 +479,6 @@ func _Df_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(inter
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Df_ListSessions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListSessionsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DfServer).ListSessions(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Df_ListSessions_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DfServer).ListSessions(ctx, req.(*ListSessionsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Df_ListAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListAccountsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -389,6 +569,222 @@ func _Df_CreatePerson_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Df_UpdatePerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdatePersonRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DfServer).UpdatePerson(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Df_UpdatePerson_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DfServer).UpdatePerson(ctx, req.(*UpdatePersonRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Df_GetPerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetPersonRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DfServer).GetPerson(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Df_GetPerson_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DfServer).GetPerson(ctx, req.(*GetPersonRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Df_DeletePerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeletePersonRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DfServer).DeletePerson(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Df_DeletePerson_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DfServer).DeletePerson(ctx, req.(*DeletePersonRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Df_ListPersons_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListPersonsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DfServer).ListPersons(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Df_ListPersons_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DfServer).ListPersons(ctx, req.(*ListPersonsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Df_CreatePayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreatePaymentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DfServer).CreatePayment(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Df_CreatePayment_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DfServer).CreatePayment(ctx, req.(*CreatePaymentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Df_GetPayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetPaymentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DfServer).GetPayment(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Df_GetPayment_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DfServer).GetPayment(ctx, req.(*GetPaymentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Df_DeletePayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeletePaymentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DfServer).DeletePayment(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Df_DeletePayment_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DfServer).DeletePayment(ctx, req.(*DeletePaymentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Df_ListPayments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListPaymentsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DfServer).ListPayments(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Df_ListPayments_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DfServer).ListPayments(ctx, req.(*ListPaymentsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Df_UpdatePayment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdatePaymentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DfServer).UpdatePayment(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Df_UpdatePayment_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DfServer).UpdatePayment(ctx, req.(*UpdatePaymentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Df_ListReturnsLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListReturnsLogRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DfServer).ListReturnsLog(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Df_ListReturnsLog_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DfServer).ListReturnsLog(ctx, req.(*ListReturnsLogRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Df_UploadDocument_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UploadDocumentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DfServer).UploadDocument(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Df_UploadDocument_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DfServer).UploadDocument(ctx, req.(*UploadDocumentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Df_DeleteDocument_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteDocumentRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DfServer).DeleteDocument(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Df_DeleteDocument_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DfServer).DeleteDocument(ctx, req.(*DeleteDocumentRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// 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)
|
||||
@ -404,6 +800,10 @@ var Df_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "RefreshToken",
|
||||
Handler: _Df_RefreshToken_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListSessions",
|
||||
Handler: _Df_ListSessions_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BlockSession",
|
||||
Handler: _Df_BlockSession_Handler,
|
||||
@ -412,10 +812,6 @@ var Df_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "GetAccount",
|
||||
Handler: _Df_GetAccount_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListSessions",
|
||||
Handler: _Df_ListSessions_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListAccounts",
|
||||
Handler: _Df_ListAccounts_Handler,
|
||||
@ -436,6 +832,54 @@ var Df_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "CreatePerson",
|
||||
Handler: _Df_CreatePerson_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdatePerson",
|
||||
Handler: _Df_UpdatePerson_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPerson",
|
||||
Handler: _Df_GetPerson_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeletePerson",
|
||||
Handler: _Df_DeletePerson_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListPersons",
|
||||
Handler: _Df_ListPersons_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreatePayment",
|
||||
Handler: _Df_CreatePayment_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPayment",
|
||||
Handler: _Df_GetPayment_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeletePayment",
|
||||
Handler: _Df_DeletePayment_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListPayments",
|
||||
Handler: _Df_ListPayments_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdatePayment",
|
||||
Handler: _Df_UpdatePayment_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListReturnsLog",
|
||||
Handler: _Df_ListReturnsLog_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UploadDocument",
|
||||
Handler: _Df_UploadDocument_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteDocument",
|
||||
Handler: _Df_DeleteDocument_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service_df.proto",
|
||||
|
@ -28,7 +28,7 @@ type Session struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
|
||||
AccountId uint64 `protobuf:"varint,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
|
||||
UserAgent string `protobuf:"bytes,3,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
|
||||
ClientIp string `protobuf:"bytes,4,opt,name=client_ip,json=clientIp,proto3" json:"client_ip,omitempty"`
|
||||
IsBlocked bool `protobuf:"varint,5,opt,name=is_blocked,json=isBlocked,proto3" json:"is_blocked,omitempty"`
|
||||
@ -76,11 +76,11 @@ func (x *Session) GetId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Session) GetEmail() string {
|
||||
func (x *Session) GetAccountId() uint64 {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
return x.AccountId
|
||||
}
|
||||
return ""
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Session) GetUserAgent() string {
|
||||
@ -134,66 +134,66 @@ var file_session_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, 0x8d, 0x07, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x07, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 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, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61,
|
||||
0x67, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72,
|
||||
0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f,
|
||||
0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74,
|
||||
0x49, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65,
|
||||
0x64, 0x12, 0x56, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
||||
0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30,
|
||||
0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x09,
|
||||
0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x56, 0x0a, 0x0a, 0x63, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
|
||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16,
|
||||
0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30,
|
||||
0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41,
|
||||
0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b,
|
||||
0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73,
|
||||
0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0xab, 0x04, 0x92, 0x41, 0xa7, 0x04, 0x0a, 0x09, 0x2a,
|
||||
0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x99, 0x04, 0x7b, 0x22, 0x69, 0x64, 0x22,
|
||||
0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x3a, 0x20, 0x22,
|
||||
0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f,
|
||||
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x76, 0x34, 0x2e, 0x70, 0x75, 0x62, 0x6c,
|
||||
0x69, 0x63, 0x2e, 0x65, 0x79, 0x4a, 0x6c, 0x62, 0x57, 0x46, 0x70, 0x62, 0x43, 0x49, 0x36, 0x49,
|
||||
0x6d, 0x45, 0x79, 0x51, 0x47, 0x49, 0x75, 0x5a, 0x47, 0x55, 0x69, 0x4c, 0x43, 0x4a, 0x6c, 0x65,
|
||||
0x48, 0x41, 0x69, 0x4f, 0x69, 0x49, 0x79, 0x4d, 0x44, 0x49, 0x7a, 0x4c, 0x54, 0x45, 0x77, 0x4c,
|
||||
0x54, 0x41, 0x32, 0x56, 0x44, 0x41, 0x78, 0x4f, 0x6a, 0x41, 0x79, 0x4f, 0x6a, 0x41, 0x35, 0x4b,
|
||||
0x7a, 0x41, 0x79, 0x4f, 0x6a, 0x41, 0x77, 0x49, 0x69, 0x77, 0x69, 0x61, 0x57, 0x46, 0x30, 0x49,
|
||||
0x6a, 0x6f, 0x69, 0x4d, 0x6a, 0x41, 0x79, 0x4d, 0x79, 0x30, 0x78, 0x4d, 0x43, 0x30, 0x77, 0x4e,
|
||||
0x56, 0x51, 0x77, 0x4d, 0x54, 0x6f, 0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4f, 0x53, 0x73, 0x77, 0x4d,
|
||||
0x6a, 0x6f, 0x77, 0x4d, 0x43, 0x49, 0x73, 0x49, 0x6d, 0x6c, 0x6b, 0x49, 0x6a, 0x6f, 0x69, 0x4e,
|
||||
0x57, 0x55, 0x78, 0x5a, 0x44, 0x59, 0x33, 0x5a, 0x47, 0x45, 0x74, 0x4e, 0x32, 0x4d, 0x35, 0x59,
|
||||
0x69, 0x30, 0x30, 0x4d, 0x7a, 0x59, 0x31, 0x4c, 0x57, 0x45, 0x30, 0x5a, 0x44, 0x55, 0x74, 0x4d,
|
||||
0x32, 0x4e, 0x6a, 0x4d, 0x47, 0x45, 0x77, 0x4e, 0x54, 0x45, 0x79, 0x4e, 0x44, 0x46, 0x6c, 0x49,
|
||||
0x69, 0x77, 0x69, 0x62, 0x6d, 0x4a, 0x6d, 0x49, 0x6a, 0x6f, 0x69, 0x4d, 0x6a, 0x41, 0x79, 0x4d,
|
||||
0x79, 0x30, 0x78, 0x4d, 0x43, 0x30, 0x77, 0x4e, 0x56, 0x51, 0x77, 0x4d, 0x54, 0x6f, 0x77, 0x4d,
|
||||
0x6a, 0x6f, 0x77, 0x4f, 0x53, 0x73, 0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4d, 0x43, 0x4a, 0x39, 0x42,
|
||||
0x6f, 0x58, 0x33, 0x36, 0x77, 0x30, 0x70, 0x6f, 0x31, 0x76, 0x76, 0x48, 0x53, 0x6a, 0x73, 0x42,
|
||||
0x50, 0x5f, 0x4b, 0x57, 0x65, 0x46, 0x78, 0x56, 0x31, 0x78, 0x52, 0x62, 0x51, 0x61, 0x79, 0x71,
|
||||
0x62, 0x4a, 0x75, 0x49, 0x6f, 0x4b, 0x32, 0x6a, 0x4b, 0x71, 0x79, 0x31, 0x42, 0x74, 0x32, 0x52,
|
||||
0x6f, 0x48, 0x79, 0x4a, 0x62, 0x4c, 0x6f, 0x43, 0x45, 0x4f, 0x31, 0x35, 0x43, 0x52, 0x54, 0x35,
|
||||
0x44, 0x6e, 0x51, 0x36, 0x50, 0x30, 0x41, 0x48, 0x6c, 0x42, 0x7a, 0x6a, 0x73, 0x58, 0x74, 0x36,
|
||||
0x31, 0x61, 0x44, 0x44, 0x77, 0x22, 0x2c, 0x20, 0x22, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73,
|
||||
0x5f, 0x61, 0x74, 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,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x32, 0x30, 0x32,
|
||||
0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x31, 0x3a, 0x32, 0x30, 0x3a, 0x31, 0x31,
|
||||
0x5a, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x70, 0x22, 0x3a,
|
||||
0x20, 0x22, 0x31, 0x30, 0x2e, 0x35, 0x36, 0x2e, 0x30, 0x2e, 0x31, 0x32, 0x22, 0x2c, 0x20, 0x22,
|
||||
0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x4d, 0x6f,
|
||||
0x7a, 0x69, 0x6c, 0x6c, 0x61, 0x20, 0x46, 0x69, 0x72, 0x65, 0x66, 0x6f, 0x78, 0x22, 0x2c, 0x20,
|
||||
0x22, 0x69, 0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x66, 0x61,
|
||||
0x6c, 0x73, 0x65, 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,
|
||||
0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12,
|
||||
0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1b,
|
||||
0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x69,
|
||||
0x73, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x09, 0x69, 0x73, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x0a, 0x65, 0x78,
|
||||
0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
|
||||
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a,
|
||||
0x16, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a,
|
||||
0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73,
|
||||
0x41, 0x74, 0x12, 0x56, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74,
|
||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
|
||||
0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31,
|
||||
0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52,
|
||||
0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65,
|
||||
0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x3a,
|
||||
0x9d, 0x04, 0x92, 0x41, 0x99, 0x04, 0x0a, 0x09, 0x2a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x32, 0x8b, 0x04, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x22,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22,
|
||||
0x2c, 0x20, 0x22, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
|
||||
0x22, 0x3a, 0x20, 0x22, 0x76, 0x34, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2e, 0x65, 0x79,
|
||||
0x4a, 0x6c, 0x62, 0x57, 0x46, 0x70, 0x62, 0x43, 0x49, 0x36, 0x49, 0x6d, 0x45, 0x79, 0x51, 0x47,
|
||||
0x49, 0x75, 0x5a, 0x47, 0x55, 0x69, 0x4c, 0x43, 0x4a, 0x6c, 0x65, 0x48, 0x41, 0x69, 0x4f, 0x69,
|
||||
0x49, 0x79, 0x4d, 0x44, 0x49, 0x7a, 0x4c, 0x54, 0x45, 0x77, 0x4c, 0x54, 0x41, 0x32, 0x56, 0x44,
|
||||
0x41, 0x78, 0x4f, 0x6a, 0x41, 0x79, 0x4f, 0x6a, 0x41, 0x35, 0x4b, 0x7a, 0x41, 0x79, 0x4f, 0x6a,
|
||||
0x41, 0x77, 0x49, 0x69, 0x77, 0x69, 0x61, 0x57, 0x46, 0x30, 0x49, 0x6a, 0x6f, 0x69, 0x4d, 0x6a,
|
||||
0x41, 0x79, 0x4d, 0x79, 0x30, 0x78, 0x4d, 0x43, 0x30, 0x77, 0x4e, 0x56, 0x51, 0x77, 0x4d, 0x54,
|
||||
0x6f, 0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4f, 0x53, 0x73, 0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4d, 0x43,
|
||||
0x49, 0x73, 0x49, 0x6d, 0x6c, 0x6b, 0x49, 0x6a, 0x6f, 0x69, 0x4e, 0x57, 0x55, 0x78, 0x5a, 0x44,
|
||||
0x59, 0x33, 0x5a, 0x47, 0x45, 0x74, 0x4e, 0x32, 0x4d, 0x35, 0x59, 0x69, 0x30, 0x30, 0x4d, 0x7a,
|
||||
0x59, 0x31, 0x4c, 0x57, 0x45, 0x30, 0x5a, 0x44, 0x55, 0x74, 0x4d, 0x32, 0x4e, 0x6a, 0x4d, 0x47,
|
||||
0x45, 0x77, 0x4e, 0x54, 0x45, 0x79, 0x4e, 0x44, 0x46, 0x6c, 0x49, 0x69, 0x77, 0x69, 0x62, 0x6d,
|
||||
0x4a, 0x6d, 0x49, 0x6a, 0x6f, 0x69, 0x4d, 0x6a, 0x41, 0x79, 0x4d, 0x79, 0x30, 0x78, 0x4d, 0x43,
|
||||
0x30, 0x77, 0x4e, 0x56, 0x51, 0x77, 0x4d, 0x54, 0x6f, 0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4f, 0x53,
|
||||
0x73, 0x77, 0x4d, 0x6a, 0x6f, 0x77, 0x4d, 0x43, 0x4a, 0x39, 0x42, 0x6f, 0x58, 0x33, 0x36, 0x77,
|
||||
0x30, 0x70, 0x6f, 0x31, 0x76, 0x76, 0x48, 0x53, 0x6a, 0x73, 0x42, 0x50, 0x5f, 0x4b, 0x57, 0x65,
|
||||
0x46, 0x78, 0x56, 0x31, 0x78, 0x52, 0x62, 0x51, 0x61, 0x79, 0x71, 0x62, 0x4a, 0x75, 0x49, 0x6f,
|
||||
0x4b, 0x32, 0x6a, 0x4b, 0x71, 0x79, 0x31, 0x42, 0x74, 0x32, 0x52, 0x6f, 0x48, 0x79, 0x4a, 0x62,
|
||||
0x4c, 0x6f, 0x43, 0x45, 0x4f, 0x31, 0x35, 0x43, 0x52, 0x54, 0x35, 0x44, 0x6e, 0x51, 0x36, 0x50,
|
||||
0x30, 0x41, 0x48, 0x6c, 0x42, 0x7a, 0x6a, 0x73, 0x58, 0x74, 0x36, 0x31, 0x61, 0x44, 0x44, 0x77,
|
||||
0x22, 0x2c, 0x20, 0x22, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 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, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x64, 0x5f, 0x61, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d,
|
||||
0x30, 0x35, 0x54, 0x30, 0x31, 0x3a, 0x32, 0x30, 0x3a, 0x31, 0x31, 0x5a, 0x22, 0x2c, 0x20, 0x22,
|
||||
0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x70, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x30, 0x2e,
|
||||
0x35, 0x36, 0x2e, 0x30, 0x2e, 0x31, 0x32, 0x22, 0x2c, 0x20, 0x22, 0x75, 0x73, 0x65, 0x72, 0x5f,
|
||||
0x61, 0x67, 0x65, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x4d, 0x6f, 0x7a, 0x69, 0x6c, 0x6c, 0x61,
|
||||
0x20, 0x46, 0x69, 0x72, 0x65, 0x66, 0x6f, 0x78, 0x22, 0x2c, 0x20, 0x22, 0x69, 0x73, 0x5f, 0x62,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 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 (
|
||||
|
@ -14,7 +14,7 @@ message Account {
|
||||
};
|
||||
example: "{\"id\": \"1\",\"email\": \"john.doe@example.com\", \"firstname\": \"John\", \"lastname\": \"Doe\", \"phone\": \"\", \"street\": \"Death Star 2\", \"zip\": \"0815\", \"city\": \"New York\", \"country\": \"USA\", \"birthday\": \"1990-10-05T00:00:00Z\", \"privacy_accepted\": false, \"privacy_accepted_date\": \"0001-01-01T00:00:00Z\", \"creator\": \"john.doe@example.com\", \"created\": \"2023-10-05T02:30:53Z\", \"changer\": \"john.doe@example.com\", \"changed\": \"2023-10-05T02:30:53Z\"}";
|
||||
};
|
||||
int64 id = 1;
|
||||
uint64 id = 1;
|
||||
string email = 2;
|
||||
string firstname = 3;
|
||||
string lastname = 4;
|
||||
|
36
bff/proto/document.proto
Normal file
36
bff/proto/document.proto
Normal file
@ -0,0 +1,36 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package pb;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/itsscb/df/pb";
|
||||
|
||||
message Document {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema: {
|
||||
title: "Document";
|
||||
};
|
||||
};
|
||||
optional uint64 person_id = 1;
|
||||
optional uint64 mail_id = 2;
|
||||
string name = 3;
|
||||
string type = 4;
|
||||
string path = 5;
|
||||
string url = 6;
|
||||
bool valid = 7;
|
||||
string validated_by = 8;
|
||||
google.protobuf.Timestamp valid_date = 9 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2023-10-05T00:00:00Z\""
|
||||
}];
|
||||
string creator = 10;
|
||||
google.protobuf.Timestamp created = 11 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2023-10-05T00:00:00Z\""
|
||||
}];
|
||||
string changer = 12;
|
||||
google.protobuf.Timestamp changed = 13 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2023-10-05T00:00:00Z\""
|
||||
}];
|
||||
uint64 id = 14;
|
||||
}
|
35
bff/proto/payment.proto
Normal file
35
bff/proto/payment.proto
Normal file
@ -0,0 +1,35 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package pb;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/itsscb/df/pb";
|
||||
|
||||
message Payment {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema: {
|
||||
title: "Payment";
|
||||
};
|
||||
example: "{\"id\": \"1\",\"account_id\": \"1\", \"payment_category\": \"TBD: paypal\", \"paypal_account\": \"john.doe@example.com\", \"paypal_id\": \"this-is-a-paypal-id\", \"payment_system\": \"TBD: paypal system\", \"type\": \"TBD: some type\", \"creator\": \"john.doe@example.com\", \"created\": \"2023-10-05T02:30:53Z\", \"changer\": \"john.doe@example.com\", \"changed\": \"2023-10-05T02:30:53Z\"}";
|
||||
};
|
||||
uint64 id = 1;
|
||||
uint64 account_id = 2;
|
||||
string payment_category = 3;
|
||||
optional string bankname = 4;
|
||||
optional string IBAN = 5;
|
||||
optional string BIC = 6;
|
||||
optional string paypal_account = 7;
|
||||
optional string paypal_id = 8;
|
||||
optional string payment_system = 9;
|
||||
string type = 10;
|
||||
string creator = 11;
|
||||
google.protobuf.Timestamp created = 12 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2023-10-05T00:00:00Z\""
|
||||
}];
|
||||
string changer = 13;
|
||||
google.protobuf.Timestamp changed = 14 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2023-10-05T00:00:00Z\""
|
||||
}];
|
||||
}
|
@ -14,7 +14,8 @@ message Person {
|
||||
};
|
||||
example: "{\"id\": \"1\",\"email\": \"john.doe@example.com\", \"firstname\": \"John\", \"lastname\": \"Doe\", \"phone\": \"\", \"street\": \"Death Star 2\", \"zip\": \"0815\", \"city\": \"New York\", \"country\": \"USA\", \"birthday\": \"1990-10-05T00:00:00Z\", \"privacy_accepted\": false, \"privacy_accepted_date\": \"0001-01-01T00:00:00Z\", \"creator\": \"john.doe@example.com\", \"created\": \"2023-10-05T02:30:53Z\", \"changer\": \"john.doe@example.com\", \"changed\": \"2023-10-05T02:30:53Z\"}";
|
||||
};
|
||||
int64 account_id = 1;
|
||||
uint64 id = 1;
|
||||
uint64 account_id = 2;
|
||||
string firstname = 3;
|
||||
string lastname = 4;
|
||||
string street = 5;
|
||||
|
29
bff/proto/returns_log.proto
Normal file
29
bff/proto/returns_log.proto
Normal file
@ -0,0 +1,29 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package pb;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
option go_package = "github.com/itsscb/df/pb";
|
||||
|
||||
message ReturnsLog {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema: {
|
||||
title: "ReturnsLog";
|
||||
};
|
||||
example: "{\"id\": \"1\",\"email\": \"john.doe@example.com\", \"firstname\": \"John\", \"lastname\": \"Doe\", \"phone\": \"\", \"street\": \"Death Star 2\", \"zip\": \"0815\", \"city\": \"New York\", \"country\": \"USA\", \"birthday\": \"1990-10-05T00:00:00Z\", \"privacy_accepted\": false, \"privacy_accepted_date\": \"0001-01-01T00:00:00Z\", \"creator\": \"john.doe@example.com\", \"created\": \"2023-10-05T02:30:53Z\", \"changer\": \"john.doe@example.com\", \"changed\": \"2023-10-05T02:30:53Z\"}";
|
||||
};
|
||||
uint64 id = 1;
|
||||
uint64 return_id = 2;
|
||||
uint64 mail_id = 3;
|
||||
string status = 4;
|
||||
string creator = 5;
|
||||
google.protobuf.Timestamp created = 6 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2023-10-05T00:00:00Z\""
|
||||
}];
|
||||
string changer = 7;
|
||||
google.protobuf.Timestamp changed = 8 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2023-10-05T00:00:00Z\""
|
||||
}];
|
||||
}
|
44
bff/proto/rpc_create_payment.proto
Normal file
44
bff/proto/rpc_create_payment.proto
Normal file
@ -0,0 +1,44 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package pb;
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
import "payment.proto";
|
||||
|
||||
option go_package = "github.com/itsscb/df/pb";
|
||||
|
||||
message CreatePaymentRequest {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema: {
|
||||
title: "Create Payment";
|
||||
description: "Create an Payment";
|
||||
required: [
|
||||
"account_id",
|
||||
"payment_category",
|
||||
"type"
|
||||
];
|
||||
};
|
||||
example: "{\"account_id\": \"1\", \"payment_category\": \"TBD: paypal\", \"paypal_account\": \"john.doe@example.com\", \"paypal_id\": \"this-is-a-paypal-id\", \"payment_system\": \"TBD: paypal system\", \"type\": \"TBD: some type\"}";
|
||||
};
|
||||
uint64 account_id = 1;
|
||||
string payment_category = 2;
|
||||
optional string bankname = 3;
|
||||
optional string IBAN = 4;
|
||||
optional string BIC = 5;
|
||||
optional string paypal_account = 6;
|
||||
optional string paypal_id = 7;
|
||||
optional string payment_system = 8;
|
||||
string type = 9;
|
||||
}
|
||||
|
||||
message CreatePaymentResponse {
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||
json_schema: {
|
||||
title: "Created Payment";
|
||||
description: "Returns the created Payment";
|
||||
};
|
||||
};
|
||||
Payment payment = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
}];
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user