Merge branch 'master' into itsscb/issue85
This commit is contained in:
commit
a31f8de478
@ -1,268 +0,0 @@
|
|||||||
package api
|
|
||||||
|
|
||||||
import (
|
|
||||||
"database/sql"
|
|
||||||
"errors"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
db "github.com/itsscb/df/bff/db/sqlc"
|
|
||||||
"github.com/itsscb/df/bff/token"
|
|
||||||
)
|
|
||||||
|
|
||||||
type createAccountRequest struct {
|
|
||||||
Passwordhash string `binding:"required" json:"passwordhash"`
|
|
||||||
PrivacyAccepted bool `json:"privacy_accepted"`
|
|
||||||
Firstname string `binding:"required" json:"firstname"`
|
|
||||||
Lastname string `binding:"required" json:"lastname"`
|
|
||||||
Birthday time.Time `binding:"required" json:"birthday"`
|
|
||||||
Email string `binding:"required" json:"email"`
|
|
||||||
Phone string `json:"phone"`
|
|
||||||
City string `binding:"required" json:"city"`
|
|
||||||
Zip string `binding:"required" json:"zip"`
|
|
||||||
Street string `binding:"required" json:"street"`
|
|
||||||
Country string `binding:"required" json:"country"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (server *Server) createAccount(ctx *gin.Context) {
|
|
||||||
var req createAccountRequest
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
ctx.JSON(http.StatusBadRequest, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
arg := db.CreateAccountTxParams{
|
|
||||||
Passwordhash: req.Passwordhash,
|
|
||||||
PrivacyAccepted: sql.NullBool{
|
|
||||||
Valid: true,
|
|
||||||
Bool: req.PrivacyAccepted,
|
|
||||||
},
|
|
||||||
Firstname: req.Firstname,
|
|
||||||
Lastname: req.Lastname,
|
|
||||||
Birthday: req.Birthday,
|
|
||||||
Email: req.Email,
|
|
||||||
City: req.City,
|
|
||||||
Zip: req.Zip,
|
|
||||||
Street: req.Street,
|
|
||||||
Country: req.Country,
|
|
||||||
Creator: req.Email,
|
|
||||||
Phone: sql.NullString{
|
|
||||||
Valid: req.Phone != "",
|
|
||||||
String: req.Phone,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
account, err := server.store.CreateAccountTx(ctx, arg)
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(http.StatusInternalServerError, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.JSON(http.StatusOK, account)
|
|
||||||
}
|
|
||||||
|
|
||||||
type getAccountRequest struct {
|
|
||||||
ID uint64 `uri:"id" binding:"required,min=1" json:"id"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (server *Server) getAccount(ctx *gin.Context) {
|
|
||||||
var req getAccountRequest
|
|
||||||
|
|
||||||
if err := ctx.ShouldBindUri(&req); err != nil {
|
|
||||||
ctx.JSON(http.StatusBadRequest, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
account, err := server.store.GetAccount(ctx, req.ID)
|
|
||||||
if err != nil {
|
|
||||||
if err == sql.ErrNoRows {
|
|
||||||
ctx.JSON(http.StatusNotFound, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.JSON(http.StatusInternalServerError, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
authPayload := ctx.MustGet(authorizationPayloadKey).(*token.Payload)
|
|
||||||
if account.ID != authPayload.AccountID {
|
|
||||||
err := errors.New("account doesn't belong to the authenticated user")
|
|
||||||
ctx.JSON(http.StatusUnauthorized, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.JSON(http.StatusOK, account)
|
|
||||||
}
|
|
||||||
|
|
||||||
type listAccountRequest struct {
|
|
||||||
PageID int32 `form:"page_id" binding:"required,min=1"`
|
|
||||||
PageSize int32 `form:"page_size" binding:"required,min=5,max=50"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (server *Server) listAccounts(ctx *gin.Context) {
|
|
||||||
var req listAccountRequest
|
|
||||||
|
|
||||||
if err := ctx.ShouldBindQuery(&req); err != nil {
|
|
||||||
ctx.JSON(http.StatusBadRequest, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
authPayload := ctx.MustGet(authorizationPayloadKey).(*token.Payload)
|
|
||||||
|
|
||||||
account, err := server.store.GetAccount(ctx, authPayload.AccountID)
|
|
||||||
if err != nil {
|
|
||||||
if err == sql.ErrNoRows {
|
|
||||||
ctx.JSON(http.StatusNotFound, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.JSON(http.StatusInternalServerError, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if account.PermissionLevel < 1 {
|
|
||||||
err := errors.New("only for admin users")
|
|
||||||
ctx.JSON(http.StatusUnauthorized, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
arg := db.ListAccountsParams{
|
|
||||||
Limit: req.PageSize,
|
|
||||||
Offset: (req.PageID - 1) * req.PageSize,
|
|
||||||
}
|
|
||||||
|
|
||||||
accounts, err := server.store.ListAccounts(ctx, arg)
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(http.StatusInternalServerError, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.JSON(http.StatusOK, accounts)
|
|
||||||
}
|
|
||||||
|
|
||||||
type updateAccountPrivacyRequest struct {
|
|
||||||
ID uint64 `binding:"required" json:"ID"`
|
|
||||||
PrivacyAccepted *bool `binding:"required" json:"privacy_accepted"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (server *Server) updateAccountPrivacy(ctx *gin.Context) {
|
|
||||||
var req updateAccountPrivacyRequest
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
ctx.JSON(http.StatusBadRequest, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
account, err := server.store.GetAccount(ctx, req.ID)
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(http.StatusNotFound, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
authPayload := ctx.MustGet(authorizationPayloadKey).(*token.Payload)
|
|
||||||
if account.ID != authPayload.AccountID {
|
|
||||||
err := errors.New("account doesn't belong to the authenticated user")
|
|
||||||
ctx.JSON(http.StatusUnauthorized, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
account, err = server.store.UpdateAccountPrivacyTx(ctx, db.UpdateAccountPrivacyTxParams{
|
|
||||||
ID: req.ID,
|
|
||||||
Changer: account.Email,
|
|
||||||
PrivacyAccepted: req.PrivacyAccepted,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(http.StatusInternalServerError, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.JSON(http.StatusOK, account)
|
|
||||||
}
|
|
||||||
|
|
||||||
type updateAccountRequest struct {
|
|
||||||
ID uint64 `binding:"required" json:"ID"`
|
|
||||||
NewPassword string `json:"new_password"`
|
|
||||||
Firstname string `json:"firstname"`
|
|
||||||
Lastname string `json:"lastname"`
|
|
||||||
Birthday time.Time `json:"birthday"`
|
|
||||||
Email string `json:"email"`
|
|
||||||
Phone string `json:"phone"`
|
|
||||||
City string `json:"city"`
|
|
||||||
Zip string `json:"zip"`
|
|
||||||
Street string `json:"street"`
|
|
||||||
Country string `json:"country"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (server *Server) updateAccount(ctx *gin.Context) {
|
|
||||||
var req updateAccountRequest
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
ctx.JSON(http.StatusBadRequest, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
account, err := server.store.GetAccount(ctx, req.ID)
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(http.StatusNotFound, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
authPayload := ctx.MustGet(authorizationPayloadKey).(*token.Payload)
|
|
||||||
if account.ID != authPayload.AccountID {
|
|
||||||
err := errors.New("account doesn't belong to the authenticated user")
|
|
||||||
ctx.JSON(http.StatusUnauthorized, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
arg := db.UpdateAccountTxParams{
|
|
||||||
ID: req.ID,
|
|
||||||
Changer: account.Email,
|
|
||||||
Passwordhash: sql.NullString{
|
|
||||||
String: req.NewPassword,
|
|
||||||
Valid: req.NewPassword != "",
|
|
||||||
},
|
|
||||||
Firstname: sql.NullString{
|
|
||||||
String: req.Firstname,
|
|
||||||
Valid: req.Firstname != "",
|
|
||||||
},
|
|
||||||
Lastname: sql.NullString{
|
|
||||||
String: req.Lastname,
|
|
||||||
Valid: req.Lastname != "",
|
|
||||||
},
|
|
||||||
Birthday: sql.NullTime{
|
|
||||||
Time: req.Birthday,
|
|
||||||
Valid: req.Birthday != time.Time{},
|
|
||||||
},
|
|
||||||
Email: sql.NullString{
|
|
||||||
String: req.Email,
|
|
||||||
Valid: req.Email != "",
|
|
||||||
},
|
|
||||||
City: sql.NullString{
|
|
||||||
String: req.City,
|
|
||||||
Valid: req.City != "",
|
|
||||||
},
|
|
||||||
Zip: sql.NullString{
|
|
||||||
String: req.Zip,
|
|
||||||
Valid: req.Zip != "",
|
|
||||||
},
|
|
||||||
Street: sql.NullString{
|
|
||||||
String: req.Street,
|
|
||||||
Valid: req.Street != "",
|
|
||||||
},
|
|
||||||
Country: sql.NullString{
|
|
||||||
String: req.Country,
|
|
||||||
Valid: req.Country != "",
|
|
||||||
},
|
|
||||||
Phone: sql.NullString{
|
|
||||||
String: req.Phone,
|
|
||||||
Valid: req.Phone != "",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
account, err = server.store.UpdateAccountTx(ctx, arg)
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(http.StatusInternalServerError, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.JSON(http.StatusOK, account)
|
|
||||||
}
|
|
@ -1,919 +0,0 @@
|
|||||||
package api
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"database/sql"
|
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"io"
|
|
||||||
"net/http"
|
|
||||||
"net/http/httptest"
|
|
||||||
"testing"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
mockdb "github.com/itsscb/df/bff/db/mock"
|
|
||||||
db "github.com/itsscb/df/bff/db/sqlc"
|
|
||||||
"github.com/itsscb/df/bff/token"
|
|
||||||
"github.com/itsscb/df/bff/util"
|
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
"go.uber.org/mock/gomock"
|
|
||||||
)
|
|
||||||
|
|
||||||
var timestamp = time.Now()
|
|
||||||
|
|
||||||
func TestCreateAccountAPI(t *testing.T) {
|
|
||||||
account := randomAccount()
|
|
||||||
|
|
||||||
testCases := []struct {
|
|
||||||
name string
|
|
||||||
body gin.H
|
|
||||||
setupAuth func(t *testing.T, request *http.Request, tokenMaker token.Maker)
|
|
||||||
buildStubs func(store *mockdb.MockStore)
|
|
||||||
checkResponse func(recorder *httptest.ResponseRecorder)
|
|
||||||
}{
|
|
||||||
{
|
|
||||||
name: "OK",
|
|
||||||
body: gin.H{
|
|
||||||
"passwordhash": account.Passwordhash,
|
|
||||||
"privacy_accepted": account.PrivacyAccepted.Bool,
|
|
||||||
"firstname": account.Firstname,
|
|
||||||
"lastname": account.Lastname,
|
|
||||||
"birthday": account.Birthday,
|
|
||||||
"email": account.Email,
|
|
||||||
"city": account.City,
|
|
||||||
"zip": account.Zip,
|
|
||||||
"street": account.Street,
|
|
||||||
"country": account.Country,
|
|
||||||
"phone": account.Phone.String,
|
|
||||||
"creator": account.Email,
|
|
||||||
},
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
arg := db.CreateAccountTxParams{
|
|
||||||
Passwordhash: account.Passwordhash,
|
|
||||||
PrivacyAccepted: account.PrivacyAccepted,
|
|
||||||
Firstname: account.Firstname,
|
|
||||||
Lastname: account.Lastname,
|
|
||||||
Birthday: account.Birthday,
|
|
||||||
Email: account.Email,
|
|
||||||
City: account.City,
|
|
||||||
Zip: account.Zip,
|
|
||||||
Street: account.Street,
|
|
||||||
Country: account.Country,
|
|
||||||
Phone: account.Phone,
|
|
||||||
Creator: account.Email,
|
|
||||||
}
|
|
||||||
|
|
||||||
store.EXPECT().
|
|
||||||
CreateAccountTx(gomock.Any(), gomock.Eq(arg)).
|
|
||||||
Times(1).
|
|
||||||
Return(account, nil)
|
|
||||||
},
|
|
||||||
checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusOK, recorder.Code)
|
|
||||||
requireBodyMatchAccount(t, recorder.Body, account)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// name: "NoAuthorization",
|
|
||||||
// body: gin.H{
|
|
||||||
// "passwordhash": account.Passwordhash,
|
|
||||||
// "privacy_accepted": account.PrivacyAccepted.Bool,
|
|
||||||
// "firstname": account.Firstname,
|
|
||||||
// "lastname": account.Lastname,
|
|
||||||
// "birthday": account.Birthday,
|
|
||||||
// "email": account.Email,
|
|
||||||
// "city": account.City,
|
|
||||||
// "zip": account.Zip,
|
|
||||||
// "street": account.Street,
|
|
||||||
// "country": account.Country,
|
|
||||||
// "phone": account.Phone.String,
|
|
||||||
// "creator": account.Email,
|
|
||||||
// },
|
|
||||||
// setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
// },
|
|
||||||
// buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
// store.EXPECT().
|
|
||||||
// CreateAccountTx(gomock.Any(), gomock.Any()).
|
|
||||||
// Times(0)
|
|
||||||
// },
|
|
||||||
// checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
// require.Equal(t, http.StatusUnauthorized, recorder.Code)
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
name: "BadRequest",
|
|
||||||
body: gin.H{
|
|
||||||
"email": account.Email,
|
|
||||||
},
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
store.EXPECT().
|
|
||||||
CreateAccountTx(gomock.Any(), gomock.Any()).
|
|
||||||
Times(0)
|
|
||||||
},
|
|
||||||
checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusBadRequest, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "InternalServerError",
|
|
||||||
body: gin.H{
|
|
||||||
"passwordhash": account.Passwordhash,
|
|
||||||
"privacy_accepted": account.PrivacyAccepted.Bool,
|
|
||||||
"privacy_accepted_date": account.PrivacyAcceptedDate.Time,
|
|
||||||
"firstname": account.Firstname,
|
|
||||||
"lastname": account.Lastname,
|
|
||||||
"birthday": account.Birthday,
|
|
||||||
"email": account.Email,
|
|
||||||
"city": account.City,
|
|
||||||
"zip": account.Zip,
|
|
||||||
"street": account.Street,
|
|
||||||
"country": account.Country,
|
|
||||||
"phone": account.Phone.String,
|
|
||||||
"creator": account.Email,
|
|
||||||
},
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
store.EXPECT().
|
|
||||||
CreateAccountTx(gomock.Any(), gomock.Any()).
|
|
||||||
Times(1).
|
|
||||||
Return(db.Account{}, sql.ErrConnDone)
|
|
||||||
},
|
|
||||||
checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusInternalServerError, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := range testCases {
|
|
||||||
tc := testCases[i]
|
|
||||||
|
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
|
||||||
ctrl := gomock.NewController(t)
|
|
||||||
defer ctrl.Finish()
|
|
||||||
|
|
||||||
store := mockdb.NewMockStore(ctrl)
|
|
||||||
tc.buildStubs(store)
|
|
||||||
|
|
||||||
server, err := NewServer(config, store, nil)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
recorder := httptest.NewRecorder()
|
|
||||||
|
|
||||||
// Marshal body data to JSON
|
|
||||||
data, err := json.Marshal(tc.body)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
url := "/accounts"
|
|
||||||
request, err := http.NewRequest(http.MethodPost, url, bytes.NewReader(data))
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
tc.setupAuth(t, request, server.tokenMaker)
|
|
||||||
server.router.ServeHTTP(recorder, request)
|
|
||||||
tc.checkResponse(recorder)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestGetAccountAPI(t *testing.T) {
|
|
||||||
account := randomAccount()
|
|
||||||
|
|
||||||
testCases := []struct {
|
|
||||||
name string
|
|
||||||
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)
|
|
||||||
}{
|
|
||||||
{
|
|
||||||
name: "OK",
|
|
||||||
accountID: account.ID,
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
store.EXPECT().
|
|
||||||
GetAccount(gomock.Any(), gomock.Eq(account.ID)).
|
|
||||||
Times(1).
|
|
||||||
Return(account, nil)
|
|
||||||
},
|
|
||||||
checkResponse: func(t *testing.T, recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusOK, recorder.Code)
|
|
||||||
requireBodyMatchAccount(t, recorder.Body, account)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "UnauthorizedUser",
|
|
||||||
accountID: account.ID,
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, 2, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
store.EXPECT().
|
|
||||||
GetAccount(gomock.Any(), gomock.Eq(account.ID)).
|
|
||||||
Times(1).
|
|
||||||
Return(account, nil)
|
|
||||||
},
|
|
||||||
checkResponse: func(t *testing.T, recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusUnauthorized, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "NoAuthorization",
|
|
||||||
accountID: account.ID,
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
store.EXPECT().
|
|
||||||
GetAccount(gomock.Any(), gomock.Any()).
|
|
||||||
Times(0)
|
|
||||||
},
|
|
||||||
checkResponse: func(t *testing.T, recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusUnauthorized, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "NotFound",
|
|
||||||
accountID: account.ID,
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
store.EXPECT().
|
|
||||||
GetAccount(gomock.Any(), gomock.Eq(account.ID)).
|
|
||||||
Times(1).
|
|
||||||
Return(db.Account{}, sql.ErrNoRows)
|
|
||||||
},
|
|
||||||
checkResponse: func(t *testing.T, recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusNotFound, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "InternalError",
|
|
||||||
accountID: account.ID,
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
store.EXPECT().
|
|
||||||
GetAccount(gomock.Any(), gomock.Eq(account.ID)).
|
|
||||||
Times(1).
|
|
||||||
Return(db.Account{}, sql.ErrConnDone)
|
|
||||||
},
|
|
||||||
checkResponse: func(t *testing.T, recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusInternalServerError, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "InvalidID",
|
|
||||||
accountID: 0,
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
store.EXPECT().
|
|
||||||
GetAccount(gomock.Any(), gomock.Any()).
|
|
||||||
Times(0)
|
|
||||||
},
|
|
||||||
checkResponse: func(t *testing.T, recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusBadRequest, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := range testCases {
|
|
||||||
tc := testCases[i]
|
|
||||||
|
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
|
||||||
ctrl := gomock.NewController(t)
|
|
||||||
defer ctrl.Finish()
|
|
||||||
|
|
||||||
store := mockdb.NewMockStore(ctrl)
|
|
||||||
tc.buildStubs(store)
|
|
||||||
|
|
||||||
server, err := NewServer(config, store, nil)
|
|
||||||
require.NoError(t, err)
|
|
||||||
recorder := httptest.NewRecorder()
|
|
||||||
|
|
||||||
url := fmt.Sprintf("/accounts/%d", tc.accountID)
|
|
||||||
request, err := http.NewRequest(http.MethodGet, url, nil)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
tc.setupAuth(t, request, server.tokenMaker)
|
|
||||||
server.router.ServeHTTP(recorder, request)
|
|
||||||
tc.checkResponse(t, recorder)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestUpdateAccountTxAPI(t *testing.T) {
|
|
||||||
account := randomAccount()
|
|
||||||
newLastname := util.RandomName()
|
|
||||||
|
|
||||||
testCases := []struct {
|
|
||||||
name string
|
|
||||||
body gin.H
|
|
||||||
accountID string
|
|
||||||
setupAuth func(t *testing.T, request *http.Request, tokenMaker token.Maker)
|
|
||||||
buildStubs func(store *mockdb.MockStore)
|
|
||||||
checkResponse func(recorder *httptest.ResponseRecorder)
|
|
||||||
}{
|
|
||||||
// {
|
|
||||||
// name: "OK_PasswordHash",
|
|
||||||
// body: gin.H{
|
|
||||||
// "id": account.ID,
|
|
||||||
// "passwordhash": newPassword,
|
|
||||||
// "changer": changer,
|
|
||||||
// },
|
|
||||||
// setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
// addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.Email, time.Minute)
|
|
||||||
// },
|
|
||||||
// buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
// var err error
|
|
||||||
// accountTemp := account
|
|
||||||
// accountTemp.Passwordhash, err = util.HashPassword(newPassword)
|
|
||||||
// require.NoError(t, err)
|
|
||||||
// accountTemp.Changer = changer
|
|
||||||
// arg := db.UpdateAccountTxParams{
|
|
||||||
// ID: account.ID,
|
|
||||||
// Passwordhash: sql.NullString{
|
|
||||||
// Valid: true,
|
|
||||||
// String: newPassword,
|
|
||||||
// },
|
|
||||||
// Changer: changer,
|
|
||||||
// }
|
|
||||||
|
|
||||||
// store.EXPECT().
|
|
||||||
// UpdateAccountTx(gomock.Any(), gomock.Eq(arg)).
|
|
||||||
// Times(1).
|
|
||||||
// Return(accountTemp, nil)
|
|
||||||
// },
|
|
||||||
// checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
// require.Equal(t, http.StatusOK, recorder.Code)
|
|
||||||
|
|
||||||
// accountTemp := account
|
|
||||||
// accountTemp.Passwordhash = newPassword
|
|
||||||
// accountTemp.Changer = changer
|
|
||||||
|
|
||||||
// requireBodyMatchAccount(t, recorder.Body, accountTemp)
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
name: "OK_Lastname",
|
|
||||||
body: gin.H{
|
|
||||||
"id": account.ID,
|
|
||||||
"lastname": newLastname,
|
|
||||||
},
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
arg := db.UpdateAccountTxParams{
|
|
||||||
ID: account.ID,
|
|
||||||
Lastname: sql.NullString{
|
|
||||||
Valid: true,
|
|
||||||
String: newLastname,
|
|
||||||
},
|
|
||||||
Changer: account.Email,
|
|
||||||
}
|
|
||||||
|
|
||||||
store.EXPECT().
|
|
||||||
GetAccount(gomock.Any(), gomock.Eq(account.ID)).
|
|
||||||
Times(1).
|
|
||||||
Return(account, nil)
|
|
||||||
|
|
||||||
store.EXPECT().
|
|
||||||
UpdateAccountTx(gomock.Any(), gomock.Eq(arg)).
|
|
||||||
Times(1).
|
|
||||||
Return(account, nil)
|
|
||||||
},
|
|
||||||
checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusOK, recorder.Code)
|
|
||||||
requireBodyMatchAccount(t, recorder.Body, account)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "NoAuthorization",
|
|
||||||
body: gin.H{
|
|
||||||
"id": account.ID,
|
|
||||||
"lastname": newLastname,
|
|
||||||
},
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
store.EXPECT().
|
|
||||||
CreateAccount(gomock.Any(), gomock.Any()).
|
|
||||||
Times(0)
|
|
||||||
},
|
|
||||||
checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusUnauthorized, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "BadRequest",
|
|
||||||
body: gin.H{
|
|
||||||
"email": account.Email,
|
|
||||||
},
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
store.EXPECT().
|
|
||||||
CreateAccount(gomock.Any(), gomock.Any()).
|
|
||||||
Times(0).
|
|
||||||
Return(db.Account{}, sql.ErrConnDone)
|
|
||||||
},
|
|
||||||
checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusBadRequest, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := range testCases {
|
|
||||||
tc := testCases[i]
|
|
||||||
|
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
|
||||||
ctrl := gomock.NewController(t)
|
|
||||||
defer ctrl.Finish()
|
|
||||||
|
|
||||||
store := mockdb.NewMockStore(ctrl)
|
|
||||||
tc.buildStubs(store)
|
|
||||||
|
|
||||||
server, err := NewServer(config, store, nil)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
recorder := httptest.NewRecorder()
|
|
||||||
|
|
||||||
// Marshal body data to JSON
|
|
||||||
data, err := json.Marshal(tc.body)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
url := "/accounts"
|
|
||||||
request, err := http.NewRequest(http.MethodPut, url, bytes.NewReader(data))
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
tc.setupAuth(t, request, server.tokenMaker)
|
|
||||||
server.router.ServeHTTP(recorder, request)
|
|
||||||
tc.checkResponse(recorder)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestListAccountsAPI(t *testing.T) {
|
|
||||||
|
|
||||||
n := 5
|
|
||||||
accounts := make([]db.Account, n)
|
|
||||||
for i := 0; i < n; i++ {
|
|
||||||
accounts[i] = randomAccount()
|
|
||||||
}
|
|
||||||
account := accounts[1]
|
|
||||||
|
|
||||||
type Query struct {
|
|
||||||
pageID int
|
|
||||||
pageSize int
|
|
||||||
}
|
|
||||||
|
|
||||||
testCases := []struct {
|
|
||||||
name string
|
|
||||||
query Query
|
|
||||||
setupAuth func(t *testing.T, request *http.Request, tokenMaker token.Maker)
|
|
||||||
buildStubs func(store *mockdb.MockStore)
|
|
||||||
checkResponse func(recorder *httptest.ResponseRecorder)
|
|
||||||
}{
|
|
||||||
{
|
|
||||||
name: "OK",
|
|
||||||
query: Query{
|
|
||||||
pageID: 1,
|
|
||||||
pageSize: n,
|
|
||||||
},
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
arg := db.ListAccountsParams{
|
|
||||||
Limit: int32(n),
|
|
||||||
Offset: 0,
|
|
||||||
}
|
|
||||||
|
|
||||||
accountAdmin := account
|
|
||||||
accountAdmin.PermissionLevel = 1
|
|
||||||
|
|
||||||
store.EXPECT().
|
|
||||||
GetAccount(gomock.Any(), gomock.Eq(account.ID)).
|
|
||||||
Times(1).
|
|
||||||
Return(accountAdmin, nil)
|
|
||||||
|
|
||||||
store.EXPECT().
|
|
||||||
ListAccounts(gomock.Any(), gomock.Eq(arg)).
|
|
||||||
Times(1).
|
|
||||||
Return(accounts, nil)
|
|
||||||
},
|
|
||||||
checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusOK, recorder.Code)
|
|
||||||
requireBodyMatchAccounts(t, recorder.Body, accounts)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "NoAuthorization",
|
|
||||||
query: Query{
|
|
||||||
pageID: 1,
|
|
||||||
pageSize: n,
|
|
||||||
},
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
store.EXPECT().
|
|
||||||
ListAccounts(gomock.Any(), gomock.Any()).
|
|
||||||
Times(0)
|
|
||||||
},
|
|
||||||
checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusUnauthorized, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "EmptyQuery",
|
|
||||||
query: Query{},
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
store.EXPECT().
|
|
||||||
ListAccounts(gomock.Any(), gomock.Any()).
|
|
||||||
Times(0)
|
|
||||||
},
|
|
||||||
checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusBadRequest, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "InvalidPageID",
|
|
||||||
query: Query{
|
|
||||||
pageID: -1,
|
|
||||||
pageSize: n,
|
|
||||||
},
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
store.EXPECT().
|
|
||||||
ListAccounts(gomock.Any(), gomock.Any()).
|
|
||||||
Times(0)
|
|
||||||
},
|
|
||||||
checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusBadRequest, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "InvalidPageSize",
|
|
||||||
query: Query{
|
|
||||||
pageID: 1,
|
|
||||||
pageSize: 100000,
|
|
||||||
},
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
store.EXPECT().
|
|
||||||
ListAccounts(gomock.Any(), gomock.Any()).
|
|
||||||
Times(0)
|
|
||||||
},
|
|
||||||
checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusBadRequest, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := range testCases {
|
|
||||||
tc := testCases[i]
|
|
||||||
|
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
|
||||||
ctrl := gomock.NewController(t)
|
|
||||||
defer ctrl.Finish()
|
|
||||||
|
|
||||||
store := mockdb.NewMockStore(ctrl)
|
|
||||||
tc.buildStubs(store)
|
|
||||||
|
|
||||||
server, err := NewServer(config, store, nil)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
recorder := httptest.NewRecorder()
|
|
||||||
|
|
||||||
url := "/accounts"
|
|
||||||
request, err := http.NewRequest(http.MethodGet, url, nil)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
// Add query parameters to request URL
|
|
||||||
q := request.URL.Query()
|
|
||||||
q.Add("page_id", fmt.Sprintf("%d", tc.query.pageID))
|
|
||||||
q.Add("page_size", fmt.Sprintf("%d", tc.query.pageSize))
|
|
||||||
request.URL.RawQuery = q.Encode()
|
|
||||||
|
|
||||||
tc.setupAuth(t, request, server.tokenMaker)
|
|
||||||
server.router.ServeHTTP(recorder, request)
|
|
||||||
tc.checkResponse(recorder)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestUpdateAccountPrivacyTxAPI(t *testing.T) {
|
|
||||||
account := randomAccount()
|
|
||||||
|
|
||||||
testCases := []struct {
|
|
||||||
name string
|
|
||||||
body gin.H
|
|
||||||
setupAuth func(t *testing.T, request *http.Request, tokenMaker token.Maker)
|
|
||||||
buildStubs func(store *mockdb.MockStore)
|
|
||||||
checkResponse func(recorder *httptest.ResponseRecorder)
|
|
||||||
}{
|
|
||||||
{
|
|
||||||
name: "OK",
|
|
||||||
body: gin.H{
|
|
||||||
"id": account.ID,
|
|
||||||
"privacy_accepted": true,
|
|
||||||
},
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
trueBool := true
|
|
||||||
arg := db.UpdateAccountPrivacyTxParams{
|
|
||||||
ID: account.ID,
|
|
||||||
PrivacyAccepted: &trueBool,
|
|
||||||
Changer: account.Email,
|
|
||||||
}
|
|
||||||
|
|
||||||
account2 := account
|
|
||||||
account2.PrivacyAccepted.Valid = true
|
|
||||||
account2.PrivacyAccepted.Bool = true
|
|
||||||
account2.Changer = account.Email
|
|
||||||
|
|
||||||
store.EXPECT().
|
|
||||||
GetAccount(gomock.Any(), gomock.Eq(account.ID)).
|
|
||||||
Times(1).
|
|
||||||
Return(account, nil)
|
|
||||||
|
|
||||||
store.EXPECT().
|
|
||||||
UpdateAccountPrivacyTx(gomock.Any(), gomock.Eq(arg)).
|
|
||||||
Times(1).
|
|
||||||
Return(account2, nil)
|
|
||||||
},
|
|
||||||
checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusOK, recorder.Code)
|
|
||||||
data, err := io.ReadAll(recorder.Body)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
var getAccount db.Account
|
|
||||||
err = json.Unmarshal(data, &getAccount)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
require.Equal(t, account.ID, getAccount.ID)
|
|
||||||
require.Equal(t, true, getAccount.PrivacyAccepted.Bool)
|
|
||||||
require.Equal(t, true, getAccount.PrivacyAccepted.Valid)
|
|
||||||
require.WithinDuration(t, timestamp, getAccount.PrivacyAcceptedDate.Time, time.Second)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "OK",
|
|
||||||
body: gin.H{
|
|
||||||
"id": account.ID,
|
|
||||||
"privacy_accepted": true,
|
|
||||||
},
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
trueBool := true
|
|
||||||
|
|
||||||
arg := db.UpdateAccountPrivacyTxParams{
|
|
||||||
ID: account.ID,
|
|
||||||
PrivacyAccepted: &trueBool,
|
|
||||||
Changer: account.Email,
|
|
||||||
}
|
|
||||||
|
|
||||||
account2 := account
|
|
||||||
account2.PrivacyAccepted.Valid = true
|
|
||||||
account2.PrivacyAccepted.Bool = true
|
|
||||||
account2.Changer = account.Email
|
|
||||||
|
|
||||||
store.EXPECT().
|
|
||||||
GetAccount(gomock.Any(), gomock.Eq(account.ID)).
|
|
||||||
Times(1).
|
|
||||||
Return(account, nil)
|
|
||||||
|
|
||||||
store.EXPECT().
|
|
||||||
UpdateAccountPrivacyTx(gomock.Any(), gomock.Eq(arg)).
|
|
||||||
Times(1).
|
|
||||||
Return(account2, nil)
|
|
||||||
},
|
|
||||||
checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusOK, recorder.Code)
|
|
||||||
data, err := io.ReadAll(recorder.Body)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
var getAccount db.Account
|
|
||||||
err = json.Unmarshal(data, &getAccount)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
require.Equal(t, account.ID, getAccount.ID)
|
|
||||||
require.Equal(t, true, getAccount.PrivacyAccepted.Bool)
|
|
||||||
require.Equal(t, true, getAccount.PrivacyAccepted.Valid)
|
|
||||||
require.WithinDuration(t, timestamp, getAccount.PrivacyAcceptedDate.Time, time.Second)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Revoked",
|
|
||||||
body: gin.H{
|
|
||||||
"id": account.ID,
|
|
||||||
"privacy_accepted": false,
|
|
||||||
},
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
falseBool := false
|
|
||||||
|
|
||||||
arg := db.UpdateAccountPrivacyTxParams{
|
|
||||||
ID: account.ID,
|
|
||||||
PrivacyAccepted: &falseBool,
|
|
||||||
Changer: account.Email,
|
|
||||||
}
|
|
||||||
|
|
||||||
account2 := account
|
|
||||||
account2.PrivacyAccepted.Valid = true
|
|
||||||
account2.PrivacyAccepted.Bool = false
|
|
||||||
account2.PrivacyAcceptedDate.Valid = true
|
|
||||||
account2.PrivacyAcceptedDate.Time = time.Time{}
|
|
||||||
account2.Changer = account.Email
|
|
||||||
|
|
||||||
store.EXPECT().
|
|
||||||
GetAccount(gomock.Any(), gomock.Eq(account.ID)).
|
|
||||||
Times(1).
|
|
||||||
Return(account, nil)
|
|
||||||
|
|
||||||
store.EXPECT().
|
|
||||||
UpdateAccountPrivacyTx(gomock.Any(), gomock.Eq(arg)).
|
|
||||||
Times(1).
|
|
||||||
Return(account2, nil)
|
|
||||||
},
|
|
||||||
checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusOK, recorder.Code)
|
|
||||||
data, err := io.ReadAll(recorder.Body)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
var getAccount db.Account
|
|
||||||
err = json.Unmarshal(data, &getAccount)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
require.Equal(t, account.ID, getAccount.ID)
|
|
||||||
require.Equal(t, false, getAccount.PrivacyAccepted.Bool)
|
|
||||||
require.Equal(t, true, getAccount.PrivacyAccepted.Valid)
|
|
||||||
require.Equal(t, time.Time{}, getAccount.PrivacyAcceptedDate.Time)
|
|
||||||
|
|
||||||
},
|
|
||||||
}, {
|
|
||||||
name: "InvalidRequest",
|
|
||||||
body: gin.H{
|
|
||||||
"id": account.ID,
|
|
||||||
},
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, account.ID, time.Minute)
|
|
||||||
},
|
|
||||||
buildStubs: func(store *mockdb.MockStore) {
|
|
||||||
store.EXPECT().
|
|
||||||
GetAccount(gomock.Any(), gomock.Eq(account.ID)).
|
|
||||||
Times(0)
|
|
||||||
|
|
||||||
store.EXPECT().
|
|
||||||
UpdateAccountPrivacyTx(gomock.Any(), gomock.Any()).
|
|
||||||
Times(0)
|
|
||||||
},
|
|
||||||
checkResponse: func(recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusBadRequest, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := range testCases {
|
|
||||||
tc := testCases[i]
|
|
||||||
|
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
|
||||||
ctrl := gomock.NewController(t)
|
|
||||||
defer ctrl.Finish()
|
|
||||||
|
|
||||||
store := mockdb.NewMockStore(ctrl)
|
|
||||||
tc.buildStubs(store)
|
|
||||||
|
|
||||||
server, err := NewServer(config, store, nil)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
recorder := httptest.NewRecorder()
|
|
||||||
|
|
||||||
// Marshal body data to JSON
|
|
||||||
data, err := json.Marshal(tc.body)
|
|
||||||
require.NoError(t, err)
|
|
||||||
fmt.Println("privacy revoked", "body", string(data))
|
|
||||||
|
|
||||||
url := "/accounts/privacy"
|
|
||||||
request, err := http.NewRequest(http.MethodPut, url, bytes.NewReader(data))
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
tc.setupAuth(t, request, server.tokenMaker)
|
|
||||||
server.router.ServeHTTP(recorder, request)
|
|
||||||
tc.checkResponse(recorder)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func randomAccount() db.Account {
|
|
||||||
password := util.RandomString(6)
|
|
||||||
hashedPassword, _ := util.HashPassword(password)
|
|
||||||
|
|
||||||
email := util.RandomEmail()
|
|
||||||
acc := db.Account{
|
|
||||||
ID: util.RandomInt(1, 1000),
|
|
||||||
Passwordhash: hashedPassword,
|
|
||||||
Firstname: util.RandomName(),
|
|
||||||
Lastname: util.RandomName(),
|
|
||||||
Email: email,
|
|
||||||
PrivacyAccepted: sql.NullBool{
|
|
||||||
Valid: true,
|
|
||||||
Bool: true,
|
|
||||||
},
|
|
||||||
PrivacyAcceptedDate: sql.NullTime{
|
|
||||||
Valid: true,
|
|
||||||
Time: timestamp,
|
|
||||||
},
|
|
||||||
Phone: sql.NullString{
|
|
||||||
String: util.RandomPhone(),
|
|
||||||
Valid: true,
|
|
||||||
},
|
|
||||||
Zip: util.RandomName(),
|
|
||||||
Street: util.RandomName(),
|
|
||||||
City: util.RandomName(),
|
|
||||||
Country: util.RandomName(),
|
|
||||||
Creator: email,
|
|
||||||
Changer: email,
|
|
||||||
Created: time.Date(1990, 1, 1, 0, 0, 0, 0, time.UTC),
|
|
||||||
Changed: time.Date(1990, 1, 1, 0, 0, 0, 0, time.UTC),
|
|
||||||
Birthday: time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC),
|
|
||||||
}
|
|
||||||
|
|
||||||
return acc
|
|
||||||
}
|
|
||||||
|
|
||||||
func requireBodyMatchAccount(t *testing.T, body *bytes.Buffer, account db.Account) {
|
|
||||||
data, err := io.ReadAll(body)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
var getAccount db.Account
|
|
||||||
err = json.Unmarshal(data, &getAccount)
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.Equal(t, account.Firstname, getAccount.Firstname)
|
|
||||||
require.Equal(t, account.Lastname, getAccount.Lastname)
|
|
||||||
require.Equal(t, account.Passwordhash, getAccount.Passwordhash)
|
|
||||||
require.Equal(t, account.Email, getAccount.Email)
|
|
||||||
require.Equal(t, account.Phone, getAccount.Phone)
|
|
||||||
require.Equal(t, account.City, getAccount.City)
|
|
||||||
require.Equal(t, account.Street, getAccount.Street)
|
|
||||||
require.Equal(t, account.Country, getAccount.Country)
|
|
||||||
require.Equal(t, account.Zip, getAccount.Zip)
|
|
||||||
require.Equal(t, account.Email, getAccount.Creator)
|
|
||||||
require.Equal(t, account.PrivacyAccepted, getAccount.PrivacyAccepted)
|
|
||||||
// require.WithinDuration(t, account.PrivacyAcceptedDate.Time, getAccount.PrivacyAcceptedDate.Time, time.Minute)
|
|
||||||
}
|
|
||||||
|
|
||||||
func requireBodyMatchAccounts(t *testing.T, body *bytes.Buffer, accounts []db.Account) {
|
|
||||||
data, err := io.ReadAll(body)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
var gotAccounts []db.Account
|
|
||||||
err = json.Unmarshal(data, &gotAccounts)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
for i := range accounts {
|
|
||||||
a := accounts[i]
|
|
||||||
b := gotAccounts[i]
|
|
||||||
|
|
||||||
require.Equal(t, a.Firstname, b.Firstname)
|
|
||||||
require.Equal(t, a.Lastname, b.Lastname)
|
|
||||||
require.Equal(t, a.Passwordhash, b.Passwordhash)
|
|
||||||
require.Equal(t, a.Email, b.Email)
|
|
||||||
require.Equal(t, a.Phone, b.Phone)
|
|
||||||
require.Equal(t, a.City, b.City)
|
|
||||||
require.Equal(t, a.Street, b.Street)
|
|
||||||
require.Equal(t, a.Country, b.Country)
|
|
||||||
require.Equal(t, a.Zip, b.Zip)
|
|
||||||
require.Equal(t, a.Creator, b.Creator)
|
|
||||||
require.Equal(t, a.PrivacyAccepted, b.PrivacyAccepted)
|
|
||||||
}
|
|
||||||
// require.Equal(t, accounts, gotAccounts)
|
|
||||||
|
|
||||||
}
|
|
@ -1,74 +0,0 @@
|
|||||||
package api
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"fmt"
|
|
||||||
"io"
|
|
||||||
"log/slog"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
)
|
|
||||||
|
|
||||||
type responseBodyWriter struct {
|
|
||||||
gin.ResponseWriter
|
|
||||||
body *bytes.Buffer
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r responseBodyWriter) Write(b []byte) (int, error) {
|
|
||||||
r.body.Write(b)
|
|
||||||
return r.ResponseWriter.Write(b)
|
|
||||||
}
|
|
||||||
|
|
||||||
func Logger() gin.HandlerFunc {
|
|
||||||
return func(c *gin.Context) {
|
|
||||||
t := time.Now()
|
|
||||||
|
|
||||||
var body []byte
|
|
||||||
var w *responseBodyWriter
|
|
||||||
|
|
||||||
if c.Request.Method != "GET" {
|
|
||||||
body, _ = io.ReadAll(c.Request.Body)
|
|
||||||
w = &responseBodyWriter{body: &bytes.Buffer{}, ResponseWriter: c.Writer}
|
|
||||||
c.Writer = w
|
|
||||||
c.Request.Body = io.NopCloser(bytes.NewReader(body))
|
|
||||||
}
|
|
||||||
c.Next()
|
|
||||||
|
|
||||||
duration := time.Since(t).Milliseconds()
|
|
||||||
|
|
||||||
if c.Request.Method != "GET" {
|
|
||||||
slog.LogAttrs(
|
|
||||||
c,
|
|
||||||
slog.LevelDebug,
|
|
||||||
"http",
|
|
||||||
slog.Group(
|
|
||||||
"request",
|
|
||||||
slog.Int("STATUS", c.Writer.Status()),
|
|
||||||
slog.String("METHOD", c.Request.Method),
|
|
||||||
slog.String("PATH", c.Request.RequestURI),
|
|
||||||
slog.String("DURATION", fmt.Sprintf("%d ms", duration)),
|
|
||||||
slog.String("BODY", string(body)),
|
|
||||||
),
|
|
||||||
slog.Group(
|
|
||||||
"response",
|
|
||||||
slog.String("BODY", w.body.String()),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
slog.LogAttrs(
|
|
||||||
c,
|
|
||||||
slog.LevelDebug,
|
|
||||||
"http",
|
|
||||||
slog.Group(
|
|
||||||
"request",
|
|
||||||
slog.Int("STATUS", c.Writer.Status()),
|
|
||||||
slog.String("METHOD", c.Request.Method),
|
|
||||||
slog.String("PATH", c.Request.RequestURI),
|
|
||||||
slog.String("DURATION", fmt.Sprintf("%d ms", duration)),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
package api
|
|
||||||
|
|
||||||
import (
|
|
||||||
"os"
|
|
||||||
"testing"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
"github.com/itsscb/df/bff/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
var config util.Config
|
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
|
||||||
config = util.Config{
|
|
||||||
Environment: "production",
|
|
||||||
TokenPrivateKeyHex: "099c0b96725b99e95719c92aec580809ac58fc14be2105ed2656f1f6c464593d8cacd6c7bed924b9cf207ab3cff1c59be4e5865260c4dafa29699244bd4ea2de",
|
|
||||||
AccessTokenDuration: time.Minute * 1,
|
|
||||||
RefreshTokenDuration: time.Minute * 2,
|
|
||||||
}
|
|
||||||
|
|
||||||
gin.SetMode(gin.TestMode)
|
|
||||||
|
|
||||||
os.Exit(m.Run())
|
|
||||||
}
|
|
@ -1,54 +0,0 @@
|
|||||||
package api
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
"github.com/itsscb/df/bff/token"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
authorizationHeaderKey = "authorization"
|
|
||||||
authorizationTypeBearer = "bearer"
|
|
||||||
authorizationPayloadKey = "authorization_payload"
|
|
||||||
)
|
|
||||||
|
|
||||||
// AuthMiddleware creates a gin middleware for authorization
|
|
||||||
func authMiddleware(tokenMaker token.Maker) gin.HandlerFunc {
|
|
||||||
return func(ctx *gin.Context) {
|
|
||||||
authorizationHeader := ctx.GetHeader(authorizationHeaderKey)
|
|
||||||
|
|
||||||
if len(authorizationHeader) == 0 {
|
|
||||||
err := errors.New("authorization header is not provided")
|
|
||||||
ctx.AbortWithStatusJSON(http.StatusUnauthorized, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
fields := strings.Fields(authorizationHeader)
|
|
||||||
if len(fields) < 2 {
|
|
||||||
err := errors.New("invalid authorization header format")
|
|
||||||
ctx.AbortWithStatusJSON(http.StatusUnauthorized, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
authorizationType := strings.ToLower(fields[0])
|
|
||||||
if authorizationType != authorizationTypeBearer {
|
|
||||||
err := fmt.Errorf("unsupported authorization type %s", authorizationType)
|
|
||||||
ctx.AbortWithStatusJSON(http.StatusUnauthorized, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
accessToken := fields[1]
|
|
||||||
payload, err := tokenMaker.VerifyToken(accessToken)
|
|
||||||
if err != nil {
|
|
||||||
ctx.AbortWithStatusJSON(http.StatusUnauthorized, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.Set(authorizationPayloadKey, payload)
|
|
||||||
ctx.Next()
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,117 +0,0 @@
|
|||||||
package api
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
|
||||||
"net/http/httptest"
|
|
||||||
"testing"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
mockdb "github.com/itsscb/df/bff/db/mock"
|
|
||||||
"github.com/itsscb/df/bff/token"
|
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
"go.uber.org/mock/gomock"
|
|
||||||
)
|
|
||||||
|
|
||||||
func addAuthorization(
|
|
||||||
t *testing.T,
|
|
||||||
request *http.Request,
|
|
||||||
tokenMaker token.Maker,
|
|
||||||
authorizationType string,
|
|
||||||
account_id uint64,
|
|
||||||
duration time.Duration,
|
|
||||||
) {
|
|
||||||
id, err := tokenMaker.NewTokenID()
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
token, payload, err := tokenMaker.CreateToken(account_id, id, duration)
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.NotEmpty(t, payload)
|
|
||||||
|
|
||||||
authorizationHeader := fmt.Sprintf("%s %s", authorizationType, token)
|
|
||||||
request.Header.Set(authorizationHeaderKey, authorizationHeader)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestAuthMiddleware(t *testing.T) {
|
|
||||||
testCases := []struct {
|
|
||||||
name string
|
|
||||||
setupAuth func(t *testing.T, request *http.Request, tokenMaker token.Maker)
|
|
||||||
checkResponse func(t *testing.T, recorder *httptest.ResponseRecorder)
|
|
||||||
}{
|
|
||||||
{
|
|
||||||
name: "OK",
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, 1, time.Minute)
|
|
||||||
},
|
|
||||||
checkResponse: func(t *testing.T, recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusOK, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "NoAuthorization",
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
},
|
|
||||||
checkResponse: func(t *testing.T, recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusUnauthorized, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "UnsupportedAuthorization",
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, "unsupported", 1, time.Minute)
|
|
||||||
},
|
|
||||||
checkResponse: func(t *testing.T, recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusUnauthorized, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "InvalidAuthorizationFormat",
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, "", 1, time.Minute)
|
|
||||||
},
|
|
||||||
checkResponse: func(t *testing.T, recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusUnauthorized, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "ExpiredToken",
|
|
||||||
setupAuth: func(t *testing.T, request *http.Request, tokenMaker token.Maker) {
|
|
||||||
addAuthorization(t, request, tokenMaker, authorizationTypeBearer, 1, -time.Minute)
|
|
||||||
},
|
|
||||||
checkResponse: func(t *testing.T, recorder *httptest.ResponseRecorder) {
|
|
||||||
require.Equal(t, http.StatusUnauthorized, recorder.Code)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
for i := range testCases {
|
|
||||||
tc := testCases[i]
|
|
||||||
|
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
|
||||||
ctrl := gomock.NewController(t)
|
|
||||||
defer ctrl.Finish()
|
|
||||||
|
|
||||||
store := mockdb.NewMockStore(ctrl)
|
|
||||||
|
|
||||||
server, err := NewServer(config, store, nil)
|
|
||||||
require.NoError(t, err)
|
|
||||||
authPath := "/auth"
|
|
||||||
server.router.GET(
|
|
||||||
authPath,
|
|
||||||
authMiddleware(server.tokenMaker),
|
|
||||||
func(ctx *gin.Context) {
|
|
||||||
ctx.JSON(http.StatusOK, gin.H{})
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
recorder := httptest.NewRecorder()
|
|
||||||
request, err := http.NewRequest(http.MethodGet, authPath, nil)
|
|
||||||
require.NoError(t, err)
|
|
||||||
|
|
||||||
tc.setupAuth(t, request, server.tokenMaker)
|
|
||||||
server.router.ServeHTTP(recorder, request)
|
|
||||||
tc.checkResponse(t, recorder)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,84 +0,0 @@
|
|||||||
package api
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"log/slog"
|
|
||||||
"net/http"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
db "github.com/itsscb/df/bff/db/sqlc"
|
|
||||||
"github.com/itsscb/df/bff/token"
|
|
||||||
"github.com/itsscb/df/bff/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Server serves HTTP requests for df service
|
|
||||||
type Server struct {
|
|
||||||
store db.Store
|
|
||||||
router *gin.Engine
|
|
||||||
config util.Config
|
|
||||||
tokenMaker token.Maker
|
|
||||||
swaggerFiles http.FileSystem
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewServer creates a new HTTP server and sets up routing
|
|
||||||
func NewServer(config util.Config, store db.Store, swaggerFS http.FileSystem) (*Server, error) {
|
|
||||||
tokenMaker, err := token.NewPasetoMaker(config.TokenPrivateKeyHex)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("cannot create token maker: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
server := &Server{
|
|
||||||
store: store,
|
|
||||||
config: config,
|
|
||||||
tokenMaker: tokenMaker,
|
|
||||||
swaggerFiles: swaggerFS,
|
|
||||||
}
|
|
||||||
router := gin.New()
|
|
||||||
|
|
||||||
router.Use(gin.Recovery())
|
|
||||||
|
|
||||||
logLevel := slog.LevelError
|
|
||||||
if config.Environment == "development" {
|
|
||||||
logLevel = slog.LevelDebug
|
|
||||||
}
|
|
||||||
|
|
||||||
if swaggerFS != nil {
|
|
||||||
router.StaticFS("/swagger/", swaggerFS)
|
|
||||||
}
|
|
||||||
|
|
||||||
opts := slog.HandlerOptions{
|
|
||||||
Level: logLevel,
|
|
||||||
}
|
|
||||||
logger := slog.New(slog.NewTextHandler(os.Stdout, &opts))
|
|
||||||
|
|
||||||
if config.LogOutput == "json" {
|
|
||||||
logger = slog.New(slog.NewJSONHandler(os.Stdout, &opts))
|
|
||||||
}
|
|
||||||
|
|
||||||
slog.SetDefault(logger)
|
|
||||||
|
|
||||||
router.Use(Logger())
|
|
||||||
|
|
||||||
router.POST("/login", server.loginAccount)
|
|
||||||
router.POST("/tokens/renew_access", server.renewAccessToken)
|
|
||||||
router.POST("/accounts", server.createAccount)
|
|
||||||
|
|
||||||
authRoutes := router.Group("/").Use(authMiddleware(server.tokenMaker))
|
|
||||||
authRoutes.PUT("/accounts", server.updateAccount)
|
|
||||||
authRoutes.PUT("/accounts/privacy", server.updateAccountPrivacy)
|
|
||||||
authRoutes.GET("/accounts/:id", server.getAccount)
|
|
||||||
authRoutes.GET("/accounts", server.listAccounts)
|
|
||||||
authRoutes.POST("/sessions", server.blockSession)
|
|
||||||
|
|
||||||
server.router = router
|
|
||||||
return server, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (server *Server) Start(address string) error {
|
|
||||||
return server.router.Run(address)
|
|
||||||
}
|
|
||||||
|
|
||||||
func errorResponse(err error) gin.H {
|
|
||||||
return gin.H{"error": err.Error()}
|
|
||||||
}
|
|
@ -1,151 +0,0 @@
|
|||||||
package api
|
|
||||||
|
|
||||||
import (
|
|
||||||
"database/sql"
|
|
||||||
"errors"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
"github.com/google/uuid"
|
|
||||||
db "github.com/itsscb/df/bff/db/sqlc"
|
|
||||||
"github.com/itsscb/df/bff/token"
|
|
||||||
"github.com/itsscb/df/bff/util"
|
|
||||||
)
|
|
||||||
|
|
||||||
type loginAccountRequest struct {
|
|
||||||
Email string `json:"email" binding:"required"`
|
|
||||||
Password string `json:"password" binding:"required,min=6"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type loginAccountResponse struct {
|
|
||||||
SessionID uuid.UUID `json:"session_id"`
|
|
||||||
AccessToken string `json:"access_token"`
|
|
||||||
AccessTokenExpiresAt time.Time `json:"access_token_expires_at"`
|
|
||||||
RefreshToken string `json:"refresh_token"`
|
|
||||||
RefreshTokenExpiresAt time.Time `json:"refresh_token_expires_at"`
|
|
||||||
AccountID uint64 `json:"account_id"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (server *Server) loginAccount(ctx *gin.Context) {
|
|
||||||
var req loginAccountRequest
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
ctx.JSON(http.StatusBadRequest, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
account, err := server.store.GetAccountByEmail(ctx, req.Email)
|
|
||||||
if err != nil {
|
|
||||||
if errors.Is(err, sql.ErrNoRows) {
|
|
||||||
ctx.JSON(http.StatusNotFound, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
ctx.JSON(http.StatusInternalServerError, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
err = util.CheckPassword(req.Password, account.Passwordhash)
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(http.StatusUnauthorized, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
id, err := server.tokenMaker.NewTokenID()
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(http.StatusInternalServerError, errorResponse(errors.New("failed to create session token")))
|
|
||||||
}
|
|
||||||
refreshToken, refreshPayload, err := server.tokenMaker.CreateToken(
|
|
||||||
account.ID,
|
|
||||||
id,
|
|
||||||
server.config.RefreshTokenDuration,
|
|
||||||
)
|
|
||||||
|
|
||||||
accessToken, accessPayload, err := server.tokenMaker.CreateToken(
|
|
||||||
account.ID,
|
|
||||||
id,
|
|
||||||
server.config.AccessTokenDuration,
|
|
||||||
)
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(http.StatusInternalServerError, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
session, err := server.store.CreateSession(ctx, db.CreateSessionParams{
|
|
||||||
ID: refreshPayload.ID,
|
|
||||||
AccountID: refreshPayload.AccountID,
|
|
||||||
RefreshToken: refreshToken,
|
|
||||||
UserAgent: ctx.Request.UserAgent(),
|
|
||||||
ClientIp: ctx.ClientIP(),
|
|
||||||
IsBlocked: false,
|
|
||||||
ExpiresAt: refreshPayload.ExpiredAt,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(http.StatusInternalServerError, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
rsp := loginAccountResponse{
|
|
||||||
SessionID: session.ID,
|
|
||||||
AccessToken: accessToken,
|
|
||||||
AccessTokenExpiresAt: accessPayload.ExpiredAt,
|
|
||||||
RefreshToken: refreshToken,
|
|
||||||
RefreshTokenExpiresAt: refreshPayload.ExpiredAt,
|
|
||||||
AccountID: refreshPayload.AccountID,
|
|
||||||
}
|
|
||||||
ctx.JSON(http.StatusOK, rsp)
|
|
||||||
}
|
|
||||||
|
|
||||||
type blockSessionRequest struct {
|
|
||||||
ID uuid.UUID `json:"session_id"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (server *Server) blockSession(ctx *gin.Context) {
|
|
||||||
var req blockSessionRequest
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
ctx.JSON(http.StatusBadRequest, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
authorizationPayload, ok := ctx.Get(authorizationPayloadKey)
|
|
||||||
if !ok {
|
|
||||||
ctx.JSON(http.StatusUnauthorized, nil)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
payload := authorizationPayload.(*token.Payload)
|
|
||||||
|
|
||||||
session, err := server.store.GetSession(ctx, req.ID)
|
|
||||||
if err != nil {
|
|
||||||
if errors.Is(err, sql.ErrNoRows) {
|
|
||||||
ctx.JSON(http.StatusUnauthorized, errorResponse(errors.New("unauthorized")))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
ctx.JSON(http.StatusInternalServerError, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if session.IsBlocked {
|
|
||||||
ctx.JSON(http.StatusAlreadyReported, errorResponse(errors.New("already blocked")))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if session.AccountID != payload.AccountID {
|
|
||||||
ctx.JSON(http.StatusUnauthorized, errorResponse(errors.New("unauthorized")))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
err = server.store.BlockSession(ctx, session.ID)
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(http.StatusInternalServerError, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
rsp := struct {
|
|
||||||
Ok bool
|
|
||||||
}{
|
|
||||||
Ok: true,
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.JSON(http.StatusOK, rsp)
|
|
||||||
}
|
|
@ -1,89 +0,0 @@
|
|||||||
package api
|
|
||||||
|
|
||||||
import (
|
|
||||||
"database/sql"
|
|
||||||
"errors"
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
)
|
|
||||||
|
|
||||||
type renewAccessTokenRequest struct {
|
|
||||||
RefreshToken string `json:"refresh_token" binding:"required"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type renewAccessTokenResponse struct {
|
|
||||||
AccessToken string `json:"access_token"`
|
|
||||||
AccessTokenExpiresAt time.Time `json:"access_token_expires_at"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (server *Server) renewAccessToken(ctx *gin.Context) {
|
|
||||||
var req renewAccessTokenRequest
|
|
||||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
||||||
ctx.JSON(http.StatusBadRequest, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
refreshPayload, err := server.tokenMaker.VerifyToken(req.RefreshToken)
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(http.StatusUnauthorized, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
session, err := server.store.GetSession(ctx, refreshPayload.ID)
|
|
||||||
if err != nil {
|
|
||||||
if errors.Is(err, sql.ErrNoRows) {
|
|
||||||
ctx.JSON(http.StatusNotFound, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
ctx.JSON(http.StatusInternalServerError, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if session.IsBlocked {
|
|
||||||
err := fmt.Errorf("blocked session")
|
|
||||||
ctx.JSON(http.StatusUnauthorized, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if session.AccountID != refreshPayload.AccountID {
|
|
||||||
err := fmt.Errorf("incorrect session user")
|
|
||||||
ctx.JSON(http.StatusUnauthorized, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if session.RefreshToken != req.RefreshToken {
|
|
||||||
err := fmt.Errorf("mismatched session token")
|
|
||||||
ctx.JSON(http.StatusUnauthorized, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if time.Now().After(session.ExpiresAt) {
|
|
||||||
err := fmt.Errorf("expired session")
|
|
||||||
ctx.JSON(http.StatusUnauthorized, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
id, err := server.tokenMaker.NewTokenID()
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(http.StatusInternalServerError, errorResponse(errors.New("failed to create session token")))
|
|
||||||
}
|
|
||||||
accessToken, accessPayload, err := server.tokenMaker.CreateToken(
|
|
||||||
refreshPayload.AccountID,
|
|
||||||
id,
|
|
||||||
server.config.AccessTokenDuration,
|
|
||||||
)
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
ctx.JSON(http.StatusInternalServerError, errorResponse(err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
rsp := renewAccessTokenResponse{
|
|
||||||
AccessToken: accessToken,
|
|
||||||
AccessTokenExpiresAt: accessPayload.ExpiredAt,
|
|
||||||
}
|
|
||||||
ctx.JSON(http.StatusOK, rsp)
|
|
||||||
}
|
|
@ -8,4 +8,7 @@ ACCESS_TOKEN_DURATION=15m
|
|||||||
MIGRATION_URL=file://db/migration
|
MIGRATION_URL=file://db/migration
|
||||||
MIGRATION_RETRIES=5
|
MIGRATION_RETRIES=5
|
||||||
REFRESH_TOKEN_DURATION=24h
|
REFRESH_TOKEN_DURATION=24h
|
||||||
TOKEN_PRIVATEKEY_HEX=099c0b96725b99e95719c92aec580809ac58fc14be2105ed2656f1f6c464593d8cacd6c7bed924b9cf207ab3cff1c59be4e5865260c4dafa29699244bd4ea2de
|
TOKEN_PRIVATEKEY_HEX=099c0b96725b99e95719c92aec580809ac58fc14be2105ed2656f1f6c464593d8cacd6c7bed924b9cf207ab3cff1c59be4e5865260c4dafa29699244bd4ea2de
|
||||||
|
SMTP_ADDRESS=smtp.gmail.com:587
|
||||||
|
SMTP_PASSWORD=P@$$w0Rd
|
||||||
|
SMTP_MAIL=info@df.com
|
@ -6,6 +6,7 @@ DROP TABLE IF EXISTS "mails";
|
|||||||
DROP TABLE IF EXISTS "persons";
|
DROP TABLE IF EXISTS "persons";
|
||||||
DROP TABLE IF EXISTS "providers";
|
DROP TABLE IF EXISTS "providers";
|
||||||
DROP TABLE IF EXISTS "sessions";
|
DROP TABLE IF EXISTS "sessions";
|
||||||
|
DROP TABLE IF EXISTS "account_info";
|
||||||
DROP TABLE IF EXISTS "accounts";
|
DROP TABLE IF EXISTS "accounts";
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
CREATE TABLE "mails" (
|
CREATE TABLE "mails" (
|
||||||
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
|
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
|
||||||
"from" varchar NOT NULL,
|
"from" varchar NOT NULL,
|
||||||
"to" varchar[] NOT NULL,
|
"to" varchar[] NOT NULL,
|
||||||
"cc" varchar[],
|
"cc" varchar[],
|
||||||
@ -13,15 +13,22 @@ CREATE TABLE "mails" (
|
|||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE "accounts" (
|
CREATE TABLE "accounts" (
|
||||||
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
|
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
|
||||||
"permission_level" int NOT NULL DEFAULT 0,
|
"permission_level" int NOT NULL DEFAULT 0,
|
||||||
"passwordhash" varchar NOT NULL,
|
"passwordhash" varchar NOT NULL,
|
||||||
|
"email" varchar UNIQUE NOT NULL,
|
||||||
|
"secret_key" varchar,
|
||||||
|
"email_verified" boolean DEFAULT false,
|
||||||
|
"email_verified_time" timestamptz
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE "account_info" (
|
||||||
|
"account_id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
|
||||||
"firstname" varchar NOT NULL,
|
"firstname" varchar NOT NULL,
|
||||||
"lastname" varchar NOT NULL,
|
"lastname" varchar NOT NULL,
|
||||||
"birthday" timestamptz NOT NULL,
|
"birthday" timestamptz NOT NULL,
|
||||||
"privacy_accepted" boolean DEFAULT false,
|
"privacy_accepted" boolean DEFAULT false,
|
||||||
"privacy_accepted_date" timestamptz,
|
"privacy_accepted_date" timestamptz,
|
||||||
"email" varchar UNIQUE NOT NULL,
|
|
||||||
"phone" varchar,
|
"phone" varchar,
|
||||||
"city" varchar NOT NULL,
|
"city" varchar NOT NULL,
|
||||||
"zip" varchar NOT NULL,
|
"zip" varchar NOT NULL,
|
||||||
@ -45,7 +52,7 @@ CREATE TABLE "sessions" (
|
|||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE "persons" (
|
CREATE TABLE "persons" (
|
||||||
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
|
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
|
||||||
"account_id" bigint NOT NULL,
|
"account_id" bigint NOT NULL,
|
||||||
"firstname" varchar NOT NULL,
|
"firstname" varchar NOT NULL,
|
||||||
"lastname" varchar NOT NULL,
|
"lastname" varchar NOT NULL,
|
||||||
@ -61,7 +68,7 @@ CREATE TABLE "persons" (
|
|||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE "documents" (
|
CREATE TABLE "documents" (
|
||||||
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
|
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
|
||||||
"person_id" bigint,
|
"person_id" bigint,
|
||||||
"name" varchar NOT NULL,
|
"name" varchar NOT NULL,
|
||||||
"type" varchar NOT NULL,
|
"type" varchar NOT NULL,
|
||||||
@ -78,7 +85,7 @@ CREATE TABLE "documents" (
|
|||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE "payments" (
|
CREATE TABLE "payments" (
|
||||||
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
|
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
|
||||||
"account_id" bigint NOT NULL,
|
"account_id" bigint NOT NULL,
|
||||||
"payment_category" varchar NOT NULL,
|
"payment_category" varchar NOT NULL,
|
||||||
"bankname" varchar,
|
"bankname" varchar,
|
||||||
@ -95,7 +102,7 @@ CREATE TABLE "payments" (
|
|||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE "providers" (
|
CREATE TABLE "providers" (
|
||||||
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
|
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
|
||||||
"name" varchar NOT NULL,
|
"name" varchar NOT NULL,
|
||||||
"description" text NOT NULL,
|
"description" text NOT NULL,
|
||||||
"category" varchar NOT NULL,
|
"category" varchar NOT NULL,
|
||||||
@ -107,7 +114,7 @@ CREATE TABLE "providers" (
|
|||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE "returns" (
|
CREATE TABLE "returns" (
|
||||||
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
|
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
|
||||||
"person_id" bigint NOT NULL,
|
"person_id" bigint NOT NULL,
|
||||||
"provider_id" bigint NOT NULL,
|
"provider_id" bigint NOT NULL,
|
||||||
"name" varchar NOT NULL,
|
"name" varchar NOT NULL,
|
||||||
@ -122,7 +129,7 @@ CREATE TABLE "returns" (
|
|||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE "returnsLog" (
|
CREATE TABLE "returnsLog" (
|
||||||
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
|
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
|
||||||
"return_id" bigint NOT NULL,
|
"return_id" bigint NOT NULL,
|
||||||
"mail_id" bigint NOT NULL,
|
"mail_id" bigint NOT NULL,
|
||||||
"status" varchar NOT NULL DEFAULT 'created',
|
"status" varchar NOT NULL DEFAULT 'created',
|
||||||
@ -132,6 +139,9 @@ CREATE TABLE "returnsLog" (
|
|||||||
"changed" timestamptz NOT NULL DEFAULT (now())
|
"changed" timestamptz NOT NULL DEFAULT (now())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE "account_info" ADD FOREIGN KEY ("account_id") REFERENCES "accounts" ("id");
|
||||||
|
|
||||||
ALTER TABLE "sessions" ADD FOREIGN KEY ("account_id") REFERENCES "accounts" ("id");
|
ALTER TABLE "sessions" ADD FOREIGN KEY ("account_id") REFERENCES "accounts" ("id");
|
||||||
|
|
||||||
ALTER TABLE "persons" ADD FOREIGN KEY ("account_id") REFERENCES "accounts" ("id");
|
ALTER TABLE "persons" ADD FOREIGN KEY ("account_id") REFERENCES "accounts" ("id");
|
||||||
|
@ -85,6 +85,21 @@ func (mr *MockStoreMockRecorder) CreateAccount(arg0, arg1 any) *gomock.Call {
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateAccount", reflect.TypeOf((*MockStore)(nil).CreateAccount), arg0, arg1)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateAccount", reflect.TypeOf((*MockStore)(nil).CreateAccount), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CreateAccountInfo mocks base method.
|
||||||
|
func (m *MockStore) CreateAccountInfo(arg0 context.Context, arg1 db.CreateAccountInfoParams) (db.AccountInfo, error) {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "CreateAccountInfo", arg0, arg1)
|
||||||
|
ret0, _ := ret[0].(db.AccountInfo)
|
||||||
|
ret1, _ := ret[1].(error)
|
||||||
|
return ret0, ret1
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateAccountInfo indicates an expected call of CreateAccountInfo.
|
||||||
|
func (mr *MockStoreMockRecorder) CreateAccountInfo(arg0, arg1 any) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateAccountInfo", reflect.TypeOf((*MockStore)(nil).CreateAccountInfo), arg0, arg1)
|
||||||
|
}
|
||||||
|
|
||||||
// CreateAccountTx mocks base method.
|
// CreateAccountTx mocks base method.
|
||||||
func (m *MockStore) CreateAccountTx(arg0 context.Context, arg1 db.CreateAccountTxParams) (db.Account, error) {
|
func (m *MockStore) CreateAccountTx(arg0 context.Context, arg1 db.CreateAccountTxParams) (db.Account, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
@ -295,6 +310,20 @@ func (mr *MockStoreMockRecorder) DeleteAccount(arg0, arg1 any) *gomock.Call {
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAccount", reflect.TypeOf((*MockStore)(nil).DeleteAccount), arg0, arg1)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAccount", reflect.TypeOf((*MockStore)(nil).DeleteAccount), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeleteAccountInfo mocks base method.
|
||||||
|
func (m *MockStore) DeleteAccountInfo(arg0 context.Context, arg1 uint64) error {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "DeleteAccountInfo", arg0, arg1)
|
||||||
|
ret0, _ := ret[0].(error)
|
||||||
|
return ret0
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteAccountInfo indicates an expected call of DeleteAccountInfo.
|
||||||
|
func (mr *MockStoreMockRecorder) DeleteAccountInfo(arg0, arg1 any) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAccountInfo", reflect.TypeOf((*MockStore)(nil).DeleteAccountInfo), arg0, arg1)
|
||||||
|
}
|
||||||
|
|
||||||
// DeleteDocument mocks base method.
|
// DeleteDocument mocks base method.
|
||||||
func (m *MockStore) DeleteDocument(arg0 context.Context, arg1 uint64) error {
|
func (m *MockStore) DeleteDocument(arg0 context.Context, arg1 uint64) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
@ -494,19 +523,19 @@ func (mr *MockStoreMockRecorder) GetAccountByEmail(arg0, arg1 any) *gomock.Call
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountByEmail", reflect.TypeOf((*MockStore)(nil).GetAccountByEmail), arg0, arg1)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountByEmail", reflect.TypeOf((*MockStore)(nil).GetAccountByEmail), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetAccountForUpdate mocks base method.
|
// GetAccountInfo mocks base method.
|
||||||
func (m *MockStore) GetAccountForUpdate(arg0 context.Context, arg1 uint64) (db.Account, error) {
|
func (m *MockStore) GetAccountInfo(arg0 context.Context, arg1 uint64) (db.AccountInfo, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "GetAccountForUpdate", arg0, arg1)
|
ret := m.ctrl.Call(m, "GetAccountInfo", arg0, arg1)
|
||||||
ret0, _ := ret[0].(db.Account)
|
ret0, _ := ret[0].(db.AccountInfo)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetAccountForUpdate indicates an expected call of GetAccountForUpdate.
|
// GetAccountInfo indicates an expected call of GetAccountInfo.
|
||||||
func (mr *MockStoreMockRecorder) GetAccountForUpdate(arg0, arg1 any) *gomock.Call {
|
func (mr *MockStoreMockRecorder) GetAccountInfo(arg0, arg1 any) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountForUpdate", reflect.TypeOf((*MockStore)(nil).GetAccountForUpdate), arg0, arg1)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountInfo", reflect.TypeOf((*MockStore)(nil).GetAccountInfo), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetDocument mocks base method.
|
// GetDocument mocks base method.
|
||||||
@ -719,6 +748,21 @@ func (mr *MockStoreMockRecorder) InvalidateDocument(arg0, arg1 any) *gomock.Call
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvalidateDocument", reflect.TypeOf((*MockStore)(nil).InvalidateDocument), arg0, arg1)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InvalidateDocument", reflect.TypeOf((*MockStore)(nil).InvalidateDocument), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ListAccountInfo mocks base method.
|
||||||
|
func (m *MockStore) ListAccountInfo(arg0 context.Context, arg1 db.ListAccountInfoParams) ([]db.AccountInfo, error) {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "ListAccountInfo", arg0, arg1)
|
||||||
|
ret0, _ := ret[0].([]db.AccountInfo)
|
||||||
|
ret1, _ := ret[1].(error)
|
||||||
|
return ret0, ret1
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListAccountInfo indicates an expected call of ListAccountInfo.
|
||||||
|
func (mr *MockStoreMockRecorder) ListAccountInfo(arg0, arg1 any) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAccountInfo", reflect.TypeOf((*MockStore)(nil).ListAccountInfo), arg0, arg1)
|
||||||
|
}
|
||||||
|
|
||||||
// ListAccounts mocks base method.
|
// ListAccounts mocks base method.
|
||||||
func (m *MockStore) ListAccounts(arg0 context.Context, arg1 db.ListAccountsParams) ([]db.Account, error) {
|
func (m *MockStore) ListAccounts(arg0 context.Context, arg1 db.ListAccountsParams) ([]db.Account, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
@ -889,26 +933,41 @@ func (mr *MockStoreMockRecorder) Query(arg0, arg1 any, arg2 ...any) *gomock.Call
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Query", reflect.TypeOf((*MockStore)(nil).Query), varargs...)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Query", reflect.TypeOf((*MockStore)(nil).Query), varargs...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateAccount mocks base method.
|
// UpdateAccountInfo mocks base method.
|
||||||
func (m *MockStore) UpdateAccount(arg0 context.Context, arg1 db.UpdateAccountParams) (db.Account, error) {
|
func (m *MockStore) UpdateAccountInfo(arg0 context.Context, arg1 db.UpdateAccountInfoParams) (db.AccountInfo, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "UpdateAccount", arg0, arg1)
|
ret := m.ctrl.Call(m, "UpdateAccountInfo", arg0, arg1)
|
||||||
ret0, _ := ret[0].(db.Account)
|
ret0, _ := ret[0].(db.AccountInfo)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateAccount indicates an expected call of UpdateAccount.
|
// UpdateAccountInfo indicates an expected call of UpdateAccountInfo.
|
||||||
func (mr *MockStoreMockRecorder) UpdateAccount(arg0, arg1 any) *gomock.Call {
|
func (mr *MockStoreMockRecorder) UpdateAccountInfo(arg0, arg1 any) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAccount", reflect.TypeOf((*MockStore)(nil).UpdateAccount), arg0, arg1)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAccountInfo", reflect.TypeOf((*MockStore)(nil).UpdateAccountInfo), arg0, arg1)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateAccountInfoTx mocks base method.
|
||||||
|
func (m *MockStore) UpdateAccountInfoTx(arg0 context.Context, arg1 db.UpdateAccountInfoTxParams) (db.AccountInfo, error) {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "UpdateAccountInfoTx", arg0, arg1)
|
||||||
|
ret0, _ := ret[0].(db.AccountInfo)
|
||||||
|
ret1, _ := ret[1].(error)
|
||||||
|
return ret0, ret1
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateAccountInfoTx indicates an expected call of UpdateAccountInfoTx.
|
||||||
|
func (mr *MockStoreMockRecorder) UpdateAccountInfoTx(arg0, arg1 any) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAccountInfoTx", reflect.TypeOf((*MockStore)(nil).UpdateAccountInfoTx), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateAccountPrivacy mocks base method.
|
// UpdateAccountPrivacy mocks base method.
|
||||||
func (m *MockStore) UpdateAccountPrivacy(arg0 context.Context, arg1 db.UpdateAccountPrivacyParams) (db.Account, error) {
|
func (m *MockStore) UpdateAccountPrivacy(arg0 context.Context, arg1 db.UpdateAccountPrivacyParams) (db.AccountInfo, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "UpdateAccountPrivacy", arg0, arg1)
|
ret := m.ctrl.Call(m, "UpdateAccountPrivacy", arg0, arg1)
|
||||||
ret0, _ := ret[0].(db.Account)
|
ret0, _ := ret[0].(db.AccountInfo)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
@ -920,10 +979,10 @@ func (mr *MockStoreMockRecorder) UpdateAccountPrivacy(arg0, arg1 any) *gomock.Ca
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UpdateAccountPrivacyTx mocks base method.
|
// UpdateAccountPrivacyTx mocks base method.
|
||||||
func (m *MockStore) UpdateAccountPrivacyTx(arg0 context.Context, arg1 db.UpdateAccountPrivacyTxParams) (db.Account, error) {
|
func (m *MockStore) UpdateAccountPrivacyTx(arg0 context.Context, arg1 db.UpdateAccountPrivacyTxParams) (db.AccountInfo, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "UpdateAccountPrivacyTx", arg0, arg1)
|
ret := m.ctrl.Call(m, "UpdateAccountPrivacyTx", arg0, arg1)
|
||||||
ret0, _ := ret[0].(db.Account)
|
ret0, _ := ret[0].(db.AccountInfo)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
@ -934,21 +993,6 @@ func (mr *MockStoreMockRecorder) UpdateAccountPrivacyTx(arg0, arg1 any) *gomock.
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAccountPrivacyTx", reflect.TypeOf((*MockStore)(nil).UpdateAccountPrivacyTx), arg0, arg1)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAccountPrivacyTx", reflect.TypeOf((*MockStore)(nil).UpdateAccountPrivacyTx), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateAccountTx mocks base method.
|
|
||||||
func (m *MockStore) UpdateAccountTx(arg0 context.Context, arg1 db.UpdateAccountTxParams) (db.Account, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "UpdateAccountTx", arg0, arg1)
|
|
||||||
ret0, _ := ret[0].(db.Account)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateAccountTx indicates an expected call of UpdateAccountTx.
|
|
||||||
func (mr *MockStoreMockRecorder) UpdateAccountTx(arg0, arg1 any) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAccountTx", reflect.TypeOf((*MockStore)(nil).UpdateAccountTx), arg0, arg1)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateDocument mocks base method.
|
// UpdateDocument mocks base method.
|
||||||
func (m *MockStore) UpdateDocument(arg0 context.Context, arg1 db.UpdateDocumentParams) (db.Document, error) {
|
func (m *MockStore) UpdateDocument(arg0 context.Context, arg1 db.UpdateDocumentParams) (db.Document, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
@ -1053,3 +1097,17 @@ func (mr *MockStoreMockRecorder) ValidateDocument(arg0, arg1 any) *gomock.Call {
|
|||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateDocument", reflect.TypeOf((*MockStore)(nil).ValidateDocument), arg0, arg1)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateDocument", reflect.TypeOf((*MockStore)(nil).ValidateDocument), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// VerifyAccountEmail mocks base method.
|
||||||
|
func (m *MockStore) VerifyAccountEmail(arg0 context.Context, arg1 db.VerifyAccountEmailParams) error {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "VerifyAccountEmail", arg0, arg1)
|
||||||
|
ret0, _ := ret[0].(error)
|
||||||
|
return ret0
|
||||||
|
}
|
||||||
|
|
||||||
|
// VerifyAccountEmail indicates an expected call of VerifyAccountEmail.
|
||||||
|
func (mr *MockStoreMockRecorder) VerifyAccountEmail(arg0, arg1 any) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyAccountEmail", reflect.TypeOf((*MockStore)(nil).VerifyAccountEmail), arg0, arg1)
|
||||||
|
}
|
||||||
|
@ -1,83 +1,47 @@
|
|||||||
-- name: GetAccount :one
|
-- name: GetAccount :one
|
||||||
SELECT * FROM accounts
|
SELECT * FROM accounts
|
||||||
WHERE "id" = $1 LIMIT 1;
|
WHERE "id" = sqlc.arg(id);
|
||||||
|
|
||||||
-- name: GetAccountByEmail :one
|
-- name: GetAccountByEmail :one
|
||||||
SELECT * FROM accounts
|
SELECT * FROM accounts
|
||||||
WHERE "email" = $1 LIMIT 1;
|
WHERE "email" = sqlc.arg(email);
|
||||||
|
|
||||||
-- name: GetAccountForUpdate :one
|
|
||||||
SELECT * FROM accounts
|
|
||||||
WHERE "id" = $1 LIMIT 1
|
|
||||||
FOR NO KEY UPDATE;
|
|
||||||
|
|
||||||
-- name: CreateAccount :one
|
-- name: CreateAccount :one
|
||||||
INSERT INTO accounts (
|
INSERT INTO accounts (
|
||||||
"passwordhash",
|
|
||||||
"privacy_accepted",
|
|
||||||
"privacy_accepted_date",
|
|
||||||
"firstname",
|
|
||||||
"lastname",
|
|
||||||
"birthday",
|
|
||||||
"email",
|
"email",
|
||||||
"phone",
|
"passwordhash",
|
||||||
"city",
|
"secret_key"
|
||||||
"zip",
|
)
|
||||||
"street",
|
VALUES (
|
||||||
"country",
|
|
||||||
"creator",
|
|
||||||
"changer"
|
|
||||||
) VALUES (
|
|
||||||
sqlc.arg(passwordhash),
|
|
||||||
sqlc.arg(privacy_accepted),
|
|
||||||
sqlc.arg(privacy_accepted_date),
|
|
||||||
sqlc.arg(firstname),
|
|
||||||
sqlc.arg(lastname),
|
|
||||||
sqlc.arg(birthday),
|
|
||||||
sqlc.arg(email),
|
sqlc.arg(email),
|
||||||
sqlc.arg(phone),
|
sqlc.arg(passwordhash),
|
||||||
sqlc.arg(city),
|
sqlc.arg(secret_key)
|
||||||
sqlc.arg(zip),
|
)
|
||||||
sqlc.arg(street),
|
|
||||||
sqlc.arg(country),
|
|
||||||
sqlc.arg(creator),
|
|
||||||
sqlc.arg(creator)
|
|
||||||
) RETURNING *;
|
|
||||||
|
|
||||||
-- name: ListAccounts :many
|
|
||||||
SELECT * FROM accounts
|
|
||||||
ORDER BY "lastname", "firstname"
|
|
||||||
LIMIT $1
|
|
||||||
OFFSET $2;
|
|
||||||
|
|
||||||
-- name: UpdateAccount :one
|
|
||||||
UPDATE accounts
|
|
||||||
SET
|
|
||||||
"passwordhash" = COALESCE(sqlc.narg(passwordhash), "passwordhash"),
|
|
||||||
"firstname" = COALESCE(sqlc.narg(firstname), "firstname"),
|
|
||||||
"lastname" = COALESCE(sqlc.narg(lastname), "lastname"),
|
|
||||||
"birthday" = COALESCE(sqlc.narg(birthday), "birthday"),
|
|
||||||
"email" = COALESCE(sqlc.narg(email), "email"),
|
|
||||||
"phone" = COALESCE(sqlc.narg(phone), "phone"),
|
|
||||||
"city" = COALESCE(sqlc.narg(city), "city"),
|
|
||||||
"zip" = COALESCE(sqlc.narg(zip), "zip"),
|
|
||||||
"street" = COALESCE(sqlc.narg(street), "street"),
|
|
||||||
"country" = COALESCE(sqlc.narg(country), "country"),
|
|
||||||
"changer" = $2,
|
|
||||||
"changed" = now()
|
|
||||||
WHERE "id" = $1
|
|
||||||
RETURNING *;
|
RETURNING *;
|
||||||
|
|
||||||
-- name: UpdateAccountPrivacy :one
|
-- name: UpdateAccount :one
|
||||||
UPDATE accounts
|
UPDATE accounts
|
||||||
SET
|
SET
|
||||||
"privacy_accepted" = sqlc.arg(privacy_accepted),
|
"email" = COALESCE(sqlc.narg(email), "email"),
|
||||||
"privacy_accepted_date" = sqlc.arg(privacy_accepted_date),
|
"passwordhash" = COALESCE(sqlc.narg(passwordhash), "passwordhash"),
|
||||||
"changer" = sqlc.arg(changer),
|
"secret_key" = COALESCE(sqlc.narg(secret_key), "secret_key")
|
||||||
"changed" = now()
|
|
||||||
WHERE "id" = sqlc.arg(id)
|
WHERE "id" = sqlc.arg(id)
|
||||||
RETURNING *;
|
RETURNING *;
|
||||||
|
|
||||||
|
-- name: ListAccounts :many
|
||||||
|
SELECT * FROM accounts
|
||||||
|
ORDER BY "email"
|
||||||
|
LIMIT $1
|
||||||
|
OFFSET $2;
|
||||||
|
|
||||||
|
-- name: VerifyAccountEmail :exec
|
||||||
|
UPDATE accounts
|
||||||
|
SET
|
||||||
|
"email_verified" = sqlc.arg(email_verified),
|
||||||
|
"email_verified_time" = sqlc.arg(email_verified_time),
|
||||||
|
"secret_key" = ''
|
||||||
|
WHERE "id" = sqlc.arg(id);
|
||||||
|
|
||||||
-- name: DeleteAccount :exec
|
-- name: DeleteAccount :exec
|
||||||
DELETE FROM accounts
|
DELETE FROM accounts
|
||||||
WHERE "id" = $1;
|
WHERE "id" = sqlc.arg(id);
|
70
bff/db/query/account_info.sql
Normal file
70
bff/db/query/account_info.sql
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
-- name: GetAccountInfo :one
|
||||||
|
SELECT * FROM account_info
|
||||||
|
WHERE "account_id" = $1 LIMIT 1;
|
||||||
|
|
||||||
|
-- name: CreateAccountInfo :one
|
||||||
|
INSERT INTO account_info (
|
||||||
|
"account_id",
|
||||||
|
"privacy_accepted",
|
||||||
|
"privacy_accepted_date",
|
||||||
|
"firstname",
|
||||||
|
"lastname",
|
||||||
|
"birthday",
|
||||||
|
"phone",
|
||||||
|
"city",
|
||||||
|
"zip",
|
||||||
|
"street",
|
||||||
|
"country",
|
||||||
|
"creator",
|
||||||
|
"changer"
|
||||||
|
) VALUES (
|
||||||
|
sqlc.arg(account_id),
|
||||||
|
sqlc.arg(privacy_accepted),
|
||||||
|
sqlc.arg(privacy_accepted_date),
|
||||||
|
sqlc.arg(firstname),
|
||||||
|
sqlc.arg(lastname),
|
||||||
|
sqlc.arg(birthday),
|
||||||
|
sqlc.arg(phone),
|
||||||
|
sqlc.arg(city),
|
||||||
|
sqlc.arg(zip),
|
||||||
|
sqlc.arg(street),
|
||||||
|
sqlc.arg(country),
|
||||||
|
sqlc.arg(creator),
|
||||||
|
sqlc.arg(creator)
|
||||||
|
) RETURNING *;
|
||||||
|
|
||||||
|
-- name: ListAccountInfo :many
|
||||||
|
SELECT * FROM account_info
|
||||||
|
ORDER BY "lastname", "firstname"
|
||||||
|
LIMIT $1
|
||||||
|
OFFSET $2;
|
||||||
|
|
||||||
|
-- name: UpdateAccountInfo :one
|
||||||
|
UPDATE account_info
|
||||||
|
SET
|
||||||
|
"firstname" = COALESCE(sqlc.narg(firstname), "firstname"),
|
||||||
|
"lastname" = COALESCE(sqlc.narg(lastname), "lastname"),
|
||||||
|
"birthday" = COALESCE(sqlc.narg(birthday), "birthday"),
|
||||||
|
"phone" = COALESCE(sqlc.narg(phone), "phone"),
|
||||||
|
"city" = COALESCE(sqlc.narg(city), "city"),
|
||||||
|
"zip" = COALESCE(sqlc.narg(zip), "zip"),
|
||||||
|
"street" = COALESCE(sqlc.narg(street), "street"),
|
||||||
|
"country" = COALESCE(sqlc.narg(country), "country"),
|
||||||
|
"changer" = $2,
|
||||||
|
"changed" = now()
|
||||||
|
WHERE "account_id" = $1
|
||||||
|
RETURNING *;
|
||||||
|
|
||||||
|
-- name: UpdateAccountPrivacy :one
|
||||||
|
UPDATE account_info
|
||||||
|
SET
|
||||||
|
"privacy_accepted" = sqlc.arg(privacy_accepted),
|
||||||
|
"privacy_accepted_date" = sqlc.arg(privacy_accepted_date),
|
||||||
|
"changer" = sqlc.arg(changer),
|
||||||
|
"changed" = now()
|
||||||
|
WHERE "account_id" = sqlc.arg(id)
|
||||||
|
RETURNING *;
|
||||||
|
|
||||||
|
-- name: DeleteAccountInfo :exec
|
||||||
|
DELETE FROM account_info
|
||||||
|
WHERE "account_id" = $1;
|
@ -8,95 +8,39 @@ package db
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const createAccount = `-- name: CreateAccount :one
|
const createAccount = `-- name: CreateAccount :one
|
||||||
INSERT INTO accounts (
|
INSERT INTO accounts (
|
||||||
"passwordhash",
|
|
||||||
"privacy_accepted",
|
|
||||||
"privacy_accepted_date",
|
|
||||||
"firstname",
|
|
||||||
"lastname",
|
|
||||||
"birthday",
|
|
||||||
"email",
|
"email",
|
||||||
"phone",
|
"passwordhash",
|
||||||
"city",
|
"secret_key"
|
||||||
"zip",
|
)
|
||||||
"street",
|
VALUES (
|
||||||
"country",
|
|
||||||
"creator",
|
|
||||||
"changer"
|
|
||||||
) VALUES (
|
|
||||||
$1,
|
$1,
|
||||||
$2,
|
$2,
|
||||||
$3,
|
$3
|
||||||
$4,
|
)
|
||||||
$5,
|
RETURNING id, permission_level, passwordhash, email, secret_key, email_verified, email_verified_time
|
||||||
$6,
|
|
||||||
$7,
|
|
||||||
$8,
|
|
||||||
$9,
|
|
||||||
$10,
|
|
||||||
$11,
|
|
||||||
$12,
|
|
||||||
$13,
|
|
||||||
$13
|
|
||||||
) RETURNING id, permission_level, passwordhash, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, email, phone, city, zip, street, country, creator, created, changer, changed
|
|
||||||
`
|
`
|
||||||
|
|
||||||
type CreateAccountParams struct {
|
type CreateAccountParams struct {
|
||||||
Passwordhash string `json:"passwordhash"`
|
Email string `json:"email"`
|
||||||
PrivacyAccepted sql.NullBool `json:"privacy_accepted"`
|
Passwordhash string `json:"passwordhash"`
|
||||||
PrivacyAcceptedDate sql.NullTime `json:"privacy_accepted_date"`
|
SecretKey sql.NullString `json:"secret_key"`
|
||||||
Firstname string `json:"firstname"`
|
|
||||||
Lastname string `json:"lastname"`
|
|
||||||
Birthday time.Time `json:"birthday"`
|
|
||||||
Email string `json:"email"`
|
|
||||||
Phone sql.NullString `json:"phone"`
|
|
||||||
City string `json:"city"`
|
|
||||||
Zip string `json:"zip"`
|
|
||||||
Street string `json:"street"`
|
|
||||||
Country string `json:"country"`
|
|
||||||
Creator string `json:"creator"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (q *Queries) CreateAccount(ctx context.Context, arg CreateAccountParams) (Account, error) {
|
func (q *Queries) CreateAccount(ctx context.Context, arg CreateAccountParams) (Account, error) {
|
||||||
row := q.db.QueryRowContext(ctx, createAccount,
|
row := q.db.QueryRowContext(ctx, createAccount, arg.Email, arg.Passwordhash, arg.SecretKey)
|
||||||
arg.Passwordhash,
|
|
||||||
arg.PrivacyAccepted,
|
|
||||||
arg.PrivacyAcceptedDate,
|
|
||||||
arg.Firstname,
|
|
||||||
arg.Lastname,
|
|
||||||
arg.Birthday,
|
|
||||||
arg.Email,
|
|
||||||
arg.Phone,
|
|
||||||
arg.City,
|
|
||||||
arg.Zip,
|
|
||||||
arg.Street,
|
|
||||||
arg.Country,
|
|
||||||
arg.Creator,
|
|
||||||
)
|
|
||||||
var i Account
|
var i Account
|
||||||
err := row.Scan(
|
err := row.Scan(
|
||||||
&i.ID,
|
&i.ID,
|
||||||
&i.PermissionLevel,
|
&i.PermissionLevel,
|
||||||
&i.Passwordhash,
|
&i.Passwordhash,
|
||||||
&i.Firstname,
|
|
||||||
&i.Lastname,
|
|
||||||
&i.Birthday,
|
|
||||||
&i.PrivacyAccepted,
|
|
||||||
&i.PrivacyAcceptedDate,
|
|
||||||
&i.Email,
|
&i.Email,
|
||||||
&i.Phone,
|
&i.SecretKey,
|
||||||
&i.City,
|
&i.EmailVerified,
|
||||||
&i.Zip,
|
&i.EmailVerifiedTime,
|
||||||
&i.Street,
|
|
||||||
&i.Country,
|
|
||||||
&i.Creator,
|
|
||||||
&i.Created,
|
|
||||||
&i.Changer,
|
|
||||||
&i.Changed,
|
|
||||||
)
|
)
|
||||||
return i, err
|
return i, err
|
||||||
}
|
}
|
||||||
@ -112,8 +56,8 @@ func (q *Queries) DeleteAccount(ctx context.Context, id uint64) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getAccount = `-- name: GetAccount :one
|
const getAccount = `-- name: GetAccount :one
|
||||||
SELECT id, permission_level, passwordhash, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, email, phone, city, zip, street, country, creator, created, changer, changed FROM accounts
|
SELECT id, permission_level, passwordhash, email, secret_key, email_verified, email_verified_time FROM accounts
|
||||||
WHERE "id" = $1 LIMIT 1
|
WHERE "id" = $1
|
||||||
`
|
`
|
||||||
|
|
||||||
func (q *Queries) GetAccount(ctx context.Context, id uint64) (Account, error) {
|
func (q *Queries) GetAccount(ctx context.Context, id uint64) (Account, error) {
|
||||||
@ -123,28 +67,17 @@ func (q *Queries) GetAccount(ctx context.Context, id uint64) (Account, error) {
|
|||||||
&i.ID,
|
&i.ID,
|
||||||
&i.PermissionLevel,
|
&i.PermissionLevel,
|
||||||
&i.Passwordhash,
|
&i.Passwordhash,
|
||||||
&i.Firstname,
|
|
||||||
&i.Lastname,
|
|
||||||
&i.Birthday,
|
|
||||||
&i.PrivacyAccepted,
|
|
||||||
&i.PrivacyAcceptedDate,
|
|
||||||
&i.Email,
|
&i.Email,
|
||||||
&i.Phone,
|
&i.SecretKey,
|
||||||
&i.City,
|
&i.EmailVerified,
|
||||||
&i.Zip,
|
&i.EmailVerifiedTime,
|
||||||
&i.Street,
|
|
||||||
&i.Country,
|
|
||||||
&i.Creator,
|
|
||||||
&i.Created,
|
|
||||||
&i.Changer,
|
|
||||||
&i.Changed,
|
|
||||||
)
|
)
|
||||||
return i, err
|
return i, err
|
||||||
}
|
}
|
||||||
|
|
||||||
const getAccountByEmail = `-- name: GetAccountByEmail :one
|
const getAccountByEmail = `-- name: GetAccountByEmail :one
|
||||||
SELECT id, permission_level, passwordhash, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, email, phone, city, zip, street, country, creator, created, changer, changed FROM accounts
|
SELECT id, permission_level, passwordhash, email, secret_key, email_verified, email_verified_time FROM accounts
|
||||||
WHERE "email" = $1 LIMIT 1
|
WHERE "email" = $1
|
||||||
`
|
`
|
||||||
|
|
||||||
func (q *Queries) GetAccountByEmail(ctx context.Context, email string) (Account, error) {
|
func (q *Queries) GetAccountByEmail(ctx context.Context, email string) (Account, error) {
|
||||||
@ -154,60 +87,17 @@ func (q *Queries) GetAccountByEmail(ctx context.Context, email string) (Account,
|
|||||||
&i.ID,
|
&i.ID,
|
||||||
&i.PermissionLevel,
|
&i.PermissionLevel,
|
||||||
&i.Passwordhash,
|
&i.Passwordhash,
|
||||||
&i.Firstname,
|
|
||||||
&i.Lastname,
|
|
||||||
&i.Birthday,
|
|
||||||
&i.PrivacyAccepted,
|
|
||||||
&i.PrivacyAcceptedDate,
|
|
||||||
&i.Email,
|
&i.Email,
|
||||||
&i.Phone,
|
&i.SecretKey,
|
||||||
&i.City,
|
&i.EmailVerified,
|
||||||
&i.Zip,
|
&i.EmailVerifiedTime,
|
||||||
&i.Street,
|
|
||||||
&i.Country,
|
|
||||||
&i.Creator,
|
|
||||||
&i.Created,
|
|
||||||
&i.Changer,
|
|
||||||
&i.Changed,
|
|
||||||
)
|
|
||||||
return i, err
|
|
||||||
}
|
|
||||||
|
|
||||||
const getAccountForUpdate = `-- name: GetAccountForUpdate :one
|
|
||||||
SELECT id, permission_level, passwordhash, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, email, phone, city, zip, street, country, creator, created, changer, changed FROM accounts
|
|
||||||
WHERE "id" = $1 LIMIT 1
|
|
||||||
FOR NO KEY UPDATE
|
|
||||||
`
|
|
||||||
|
|
||||||
func (q *Queries) GetAccountForUpdate(ctx context.Context, id uint64) (Account, error) {
|
|
||||||
row := q.db.QueryRowContext(ctx, getAccountForUpdate, id)
|
|
||||||
var i Account
|
|
||||||
err := row.Scan(
|
|
||||||
&i.ID,
|
|
||||||
&i.PermissionLevel,
|
|
||||||
&i.Passwordhash,
|
|
||||||
&i.Firstname,
|
|
||||||
&i.Lastname,
|
|
||||||
&i.Birthday,
|
|
||||||
&i.PrivacyAccepted,
|
|
||||||
&i.PrivacyAcceptedDate,
|
|
||||||
&i.Email,
|
|
||||||
&i.Phone,
|
|
||||||
&i.City,
|
|
||||||
&i.Zip,
|
|
||||||
&i.Street,
|
|
||||||
&i.Country,
|
|
||||||
&i.Creator,
|
|
||||||
&i.Created,
|
|
||||||
&i.Changer,
|
|
||||||
&i.Changed,
|
|
||||||
)
|
)
|
||||||
return i, err
|
return i, err
|
||||||
}
|
}
|
||||||
|
|
||||||
const listAccounts = `-- name: ListAccounts :many
|
const listAccounts = `-- name: ListAccounts :many
|
||||||
SELECT id, permission_level, passwordhash, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, email, phone, city, zip, street, country, creator, created, changer, changed FROM accounts
|
SELECT id, permission_level, passwordhash, email, secret_key, email_verified, email_verified_time FROM accounts
|
||||||
ORDER BY "lastname", "firstname"
|
ORDER BY "email"
|
||||||
LIMIT $1
|
LIMIT $1
|
||||||
OFFSET $2
|
OFFSET $2
|
||||||
`
|
`
|
||||||
@ -230,21 +120,10 @@ func (q *Queries) ListAccounts(ctx context.Context, arg ListAccountsParams) ([]A
|
|||||||
&i.ID,
|
&i.ID,
|
||||||
&i.PermissionLevel,
|
&i.PermissionLevel,
|
||||||
&i.Passwordhash,
|
&i.Passwordhash,
|
||||||
&i.Firstname,
|
|
||||||
&i.Lastname,
|
|
||||||
&i.Birthday,
|
|
||||||
&i.PrivacyAccepted,
|
|
||||||
&i.PrivacyAcceptedDate,
|
|
||||||
&i.Email,
|
&i.Email,
|
||||||
&i.Phone,
|
&i.SecretKey,
|
||||||
&i.City,
|
&i.EmailVerified,
|
||||||
&i.Zip,
|
&i.EmailVerifiedTime,
|
||||||
&i.Street,
|
|
||||||
&i.Country,
|
|
||||||
&i.Creator,
|
|
||||||
&i.Created,
|
|
||||||
&i.Changer,
|
|
||||||
&i.Changed,
|
|
||||||
); err != nil {
|
); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -260,123 +139,58 @@ func (q *Queries) ListAccounts(ctx context.Context, arg ListAccountsParams) ([]A
|
|||||||
}
|
}
|
||||||
|
|
||||||
const updateAccount = `-- name: UpdateAccount :one
|
const updateAccount = `-- name: UpdateAccount :one
|
||||||
UPDATE accounts
|
UPDATE accounts
|
||||||
SET
|
SET
|
||||||
"passwordhash" = COALESCE($3, "passwordhash"),
|
"email" = COALESCE($1, "email"),
|
||||||
"firstname" = COALESCE($4, "firstname"),
|
"passwordhash" = COALESCE($2, "passwordhash"),
|
||||||
"lastname" = COALESCE($5, "lastname"),
|
"secret_key" = COALESCE($3, "secret_key")
|
||||||
"birthday" = COALESCE($6, "birthday"),
|
WHERE "id" = $4
|
||||||
"email" = COALESCE($7, "email"),
|
RETURNING id, permission_level, passwordhash, email, secret_key, email_verified, email_verified_time
|
||||||
"phone" = COALESCE($8, "phone"),
|
|
||||||
"city" = COALESCE($9, "city"),
|
|
||||||
"zip" = COALESCE($10, "zip"),
|
|
||||||
"street" = COALESCE($11, "street"),
|
|
||||||
"country" = COALESCE($12, "country"),
|
|
||||||
"changer" = $2,
|
|
||||||
"changed" = now()
|
|
||||||
WHERE "id" = $1
|
|
||||||
RETURNING id, permission_level, passwordhash, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, email, phone, city, zip, street, country, creator, created, changer, changed
|
|
||||||
`
|
`
|
||||||
|
|
||||||
type UpdateAccountParams struct {
|
type UpdateAccountParams struct {
|
||||||
ID uint64 `json:"id"`
|
|
||||||
Changer string `json:"changer"`
|
|
||||||
Passwordhash sql.NullString `json:"passwordhash"`
|
|
||||||
Firstname sql.NullString `json:"firstname"`
|
|
||||||
Lastname sql.NullString `json:"lastname"`
|
|
||||||
Birthday sql.NullTime `json:"birthday"`
|
|
||||||
Email sql.NullString `json:"email"`
|
Email sql.NullString `json:"email"`
|
||||||
Phone sql.NullString `json:"phone"`
|
Passwordhash sql.NullString `json:"passwordhash"`
|
||||||
City sql.NullString `json:"city"`
|
SecretKey sql.NullString `json:"secret_key"`
|
||||||
Zip sql.NullString `json:"zip"`
|
ID uint64 `json:"id"`
|
||||||
Street sql.NullString `json:"street"`
|
|
||||||
Country sql.NullString `json:"country"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (q *Queries) UpdateAccount(ctx context.Context, arg UpdateAccountParams) (Account, error) {
|
func (q *Queries) UpdateAccount(ctx context.Context, arg UpdateAccountParams) (Account, error) {
|
||||||
row := q.db.QueryRowContext(ctx, updateAccount,
|
row := q.db.QueryRowContext(ctx, updateAccount,
|
||||||
arg.ID,
|
|
||||||
arg.Changer,
|
|
||||||
arg.Passwordhash,
|
|
||||||
arg.Firstname,
|
|
||||||
arg.Lastname,
|
|
||||||
arg.Birthday,
|
|
||||||
arg.Email,
|
arg.Email,
|
||||||
arg.Phone,
|
arg.Passwordhash,
|
||||||
arg.City,
|
arg.SecretKey,
|
||||||
arg.Zip,
|
arg.ID,
|
||||||
arg.Street,
|
|
||||||
arg.Country,
|
|
||||||
)
|
)
|
||||||
var i Account
|
var i Account
|
||||||
err := row.Scan(
|
err := row.Scan(
|
||||||
&i.ID,
|
&i.ID,
|
||||||
&i.PermissionLevel,
|
&i.PermissionLevel,
|
||||||
&i.Passwordhash,
|
&i.Passwordhash,
|
||||||
&i.Firstname,
|
|
||||||
&i.Lastname,
|
|
||||||
&i.Birthday,
|
|
||||||
&i.PrivacyAccepted,
|
|
||||||
&i.PrivacyAcceptedDate,
|
|
||||||
&i.Email,
|
&i.Email,
|
||||||
&i.Phone,
|
&i.SecretKey,
|
||||||
&i.City,
|
&i.EmailVerified,
|
||||||
&i.Zip,
|
&i.EmailVerifiedTime,
|
||||||
&i.Street,
|
|
||||||
&i.Country,
|
|
||||||
&i.Creator,
|
|
||||||
&i.Created,
|
|
||||||
&i.Changer,
|
|
||||||
&i.Changed,
|
|
||||||
)
|
)
|
||||||
return i, err
|
return i, err
|
||||||
}
|
}
|
||||||
|
|
||||||
const updateAccountPrivacy = `-- name: UpdateAccountPrivacy :one
|
const verifyAccountEmail = `-- name: VerifyAccountEmail :exec
|
||||||
UPDATE accounts
|
UPDATE accounts
|
||||||
SET
|
SET
|
||||||
"privacy_accepted" = $1,
|
"email_verified" = $1,
|
||||||
"privacy_accepted_date" = $2,
|
"email_verified_time" = $2,
|
||||||
"changer" = $3,
|
"secret_key" = ''
|
||||||
"changed" = now()
|
WHERE "id" = $3
|
||||||
WHERE "id" = $4
|
|
||||||
RETURNING id, permission_level, passwordhash, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, email, phone, city, zip, street, country, creator, created, changer, changed
|
|
||||||
`
|
`
|
||||||
|
|
||||||
type UpdateAccountPrivacyParams struct {
|
type VerifyAccountEmailParams struct {
|
||||||
PrivacyAccepted sql.NullBool `json:"privacy_accepted"`
|
EmailVerified sql.NullBool `json:"email_verified"`
|
||||||
PrivacyAcceptedDate sql.NullTime `json:"privacy_accepted_date"`
|
EmailVerifiedTime sql.NullTime `json:"email_verified_time"`
|
||||||
Changer string `json:"changer"`
|
ID uint64 `json:"id"`
|
||||||
ID uint64 `json:"id"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (q *Queries) UpdateAccountPrivacy(ctx context.Context, arg UpdateAccountPrivacyParams) (Account, error) {
|
func (q *Queries) VerifyAccountEmail(ctx context.Context, arg VerifyAccountEmailParams) error {
|
||||||
row := q.db.QueryRowContext(ctx, updateAccountPrivacy,
|
_, err := q.db.ExecContext(ctx, verifyAccountEmail, arg.EmailVerified, arg.EmailVerifiedTime, arg.ID)
|
||||||
arg.PrivacyAccepted,
|
return err
|
||||||
arg.PrivacyAcceptedDate,
|
|
||||||
arg.Changer,
|
|
||||||
arg.ID,
|
|
||||||
)
|
|
||||||
var i Account
|
|
||||||
err := row.Scan(
|
|
||||||
&i.ID,
|
|
||||||
&i.PermissionLevel,
|
|
||||||
&i.Passwordhash,
|
|
||||||
&i.Firstname,
|
|
||||||
&i.Lastname,
|
|
||||||
&i.Birthday,
|
|
||||||
&i.PrivacyAccepted,
|
|
||||||
&i.PrivacyAcceptedDate,
|
|
||||||
&i.Email,
|
|
||||||
&i.Phone,
|
|
||||||
&i.City,
|
|
||||||
&i.Zip,
|
|
||||||
&i.Street,
|
|
||||||
&i.Country,
|
|
||||||
&i.Creator,
|
|
||||||
&i.Created,
|
|
||||||
&i.Changer,
|
|
||||||
&i.Changed,
|
|
||||||
)
|
|
||||||
return i, err
|
|
||||||
}
|
}
|
||||||
|
294
bff/db/sqlc/account_info.sql.go
Normal file
294
bff/db/sqlc/account_info.sql.go
Normal file
@ -0,0 +1,294 @@
|
|||||||
|
// Code generated by sqlc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// sqlc v1.22.0
|
||||||
|
// source: account_info.sql
|
||||||
|
|
||||||
|
package db
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"database/sql"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
const createAccountInfo = `-- name: CreateAccountInfo :one
|
||||||
|
INSERT INTO account_info (
|
||||||
|
"account_id",
|
||||||
|
"privacy_accepted",
|
||||||
|
"privacy_accepted_date",
|
||||||
|
"firstname",
|
||||||
|
"lastname",
|
||||||
|
"birthday",
|
||||||
|
"phone",
|
||||||
|
"city",
|
||||||
|
"zip",
|
||||||
|
"street",
|
||||||
|
"country",
|
||||||
|
"creator",
|
||||||
|
"changer"
|
||||||
|
) VALUES (
|
||||||
|
$1,
|
||||||
|
$2,
|
||||||
|
$3,
|
||||||
|
$4,
|
||||||
|
$5,
|
||||||
|
$6,
|
||||||
|
$7,
|
||||||
|
$8,
|
||||||
|
$9,
|
||||||
|
$10,
|
||||||
|
$11,
|
||||||
|
$12,
|
||||||
|
$12
|
||||||
|
) RETURNING account_id, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, phone, city, zip, street, country, creator, created, changer, changed
|
||||||
|
`
|
||||||
|
|
||||||
|
type CreateAccountInfoParams struct {
|
||||||
|
AccountID uint64 `json:"account_id"`
|
||||||
|
PrivacyAccepted sql.NullBool `json:"privacy_accepted"`
|
||||||
|
PrivacyAcceptedDate sql.NullTime `json:"privacy_accepted_date"`
|
||||||
|
Firstname string `json:"firstname"`
|
||||||
|
Lastname string `json:"lastname"`
|
||||||
|
Birthday time.Time `json:"birthday"`
|
||||||
|
Phone sql.NullString `json:"phone"`
|
||||||
|
City string `json:"city"`
|
||||||
|
Zip string `json:"zip"`
|
||||||
|
Street string `json:"street"`
|
||||||
|
Country string `json:"country"`
|
||||||
|
Creator string `json:"creator"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (q *Queries) CreateAccountInfo(ctx context.Context, arg CreateAccountInfoParams) (AccountInfo, error) {
|
||||||
|
row := q.db.QueryRowContext(ctx, createAccountInfo,
|
||||||
|
arg.AccountID,
|
||||||
|
arg.PrivacyAccepted,
|
||||||
|
arg.PrivacyAcceptedDate,
|
||||||
|
arg.Firstname,
|
||||||
|
arg.Lastname,
|
||||||
|
arg.Birthday,
|
||||||
|
arg.Phone,
|
||||||
|
arg.City,
|
||||||
|
arg.Zip,
|
||||||
|
arg.Street,
|
||||||
|
arg.Country,
|
||||||
|
arg.Creator,
|
||||||
|
)
|
||||||
|
var i AccountInfo
|
||||||
|
err := row.Scan(
|
||||||
|
&i.AccountID,
|
||||||
|
&i.Firstname,
|
||||||
|
&i.Lastname,
|
||||||
|
&i.Birthday,
|
||||||
|
&i.PrivacyAccepted,
|
||||||
|
&i.PrivacyAcceptedDate,
|
||||||
|
&i.Phone,
|
||||||
|
&i.City,
|
||||||
|
&i.Zip,
|
||||||
|
&i.Street,
|
||||||
|
&i.Country,
|
||||||
|
&i.Creator,
|
||||||
|
&i.Created,
|
||||||
|
&i.Changer,
|
||||||
|
&i.Changed,
|
||||||
|
)
|
||||||
|
return i, err
|
||||||
|
}
|
||||||
|
|
||||||
|
const deleteAccountInfo = `-- name: DeleteAccountInfo :exec
|
||||||
|
DELETE FROM account_info
|
||||||
|
WHERE "account_id" = $1
|
||||||
|
`
|
||||||
|
|
||||||
|
func (q *Queries) DeleteAccountInfo(ctx context.Context, accountID uint64) error {
|
||||||
|
_, err := q.db.ExecContext(ctx, deleteAccountInfo, accountID)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
const getAccountInfo = `-- name: GetAccountInfo :one
|
||||||
|
SELECT account_id, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, phone, city, zip, street, country, creator, created, changer, changed FROM account_info
|
||||||
|
WHERE "account_id" = $1 LIMIT 1
|
||||||
|
`
|
||||||
|
|
||||||
|
func (q *Queries) GetAccountInfo(ctx context.Context, accountID uint64) (AccountInfo, error) {
|
||||||
|
row := q.db.QueryRowContext(ctx, getAccountInfo, accountID)
|
||||||
|
var i AccountInfo
|
||||||
|
err := row.Scan(
|
||||||
|
&i.AccountID,
|
||||||
|
&i.Firstname,
|
||||||
|
&i.Lastname,
|
||||||
|
&i.Birthday,
|
||||||
|
&i.PrivacyAccepted,
|
||||||
|
&i.PrivacyAcceptedDate,
|
||||||
|
&i.Phone,
|
||||||
|
&i.City,
|
||||||
|
&i.Zip,
|
||||||
|
&i.Street,
|
||||||
|
&i.Country,
|
||||||
|
&i.Creator,
|
||||||
|
&i.Created,
|
||||||
|
&i.Changer,
|
||||||
|
&i.Changed,
|
||||||
|
)
|
||||||
|
return i, err
|
||||||
|
}
|
||||||
|
|
||||||
|
const listAccountInfo = `-- name: ListAccountInfo :many
|
||||||
|
SELECT account_id, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, phone, city, zip, street, country, creator, created, changer, changed FROM account_info
|
||||||
|
ORDER BY "lastname", "firstname"
|
||||||
|
LIMIT $1
|
||||||
|
OFFSET $2
|
||||||
|
`
|
||||||
|
|
||||||
|
type ListAccountInfoParams struct {
|
||||||
|
Limit int32 `json:"limit"`
|
||||||
|
Offset int32 `json:"offset"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (q *Queries) ListAccountInfo(ctx context.Context, arg ListAccountInfoParams) ([]AccountInfo, error) {
|
||||||
|
rows, err := q.db.QueryContext(ctx, listAccountInfo, arg.Limit, arg.Offset)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
defer rows.Close()
|
||||||
|
items := []AccountInfo{}
|
||||||
|
for rows.Next() {
|
||||||
|
var i AccountInfo
|
||||||
|
if err := rows.Scan(
|
||||||
|
&i.AccountID,
|
||||||
|
&i.Firstname,
|
||||||
|
&i.Lastname,
|
||||||
|
&i.Birthday,
|
||||||
|
&i.PrivacyAccepted,
|
||||||
|
&i.PrivacyAcceptedDate,
|
||||||
|
&i.Phone,
|
||||||
|
&i.City,
|
||||||
|
&i.Zip,
|
||||||
|
&i.Street,
|
||||||
|
&i.Country,
|
||||||
|
&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 updateAccountInfo = `-- name: UpdateAccountInfo :one
|
||||||
|
UPDATE account_info
|
||||||
|
SET
|
||||||
|
"firstname" = COALESCE($3, "firstname"),
|
||||||
|
"lastname" = COALESCE($4, "lastname"),
|
||||||
|
"birthday" = COALESCE($5, "birthday"),
|
||||||
|
"phone" = COALESCE($6, "phone"),
|
||||||
|
"city" = COALESCE($7, "city"),
|
||||||
|
"zip" = COALESCE($8, "zip"),
|
||||||
|
"street" = COALESCE($9, "street"),
|
||||||
|
"country" = COALESCE($10, "country"),
|
||||||
|
"changer" = $2,
|
||||||
|
"changed" = now()
|
||||||
|
WHERE "account_id" = $1
|
||||||
|
RETURNING account_id, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, phone, city, zip, street, country, creator, created, changer, changed
|
||||||
|
`
|
||||||
|
|
||||||
|
type UpdateAccountInfoParams struct {
|
||||||
|
AccountID uint64 `json:"account_id"`
|
||||||
|
Changer string `json:"changer"`
|
||||||
|
Firstname sql.NullString `json:"firstname"`
|
||||||
|
Lastname sql.NullString `json:"lastname"`
|
||||||
|
Birthday sql.NullTime `json:"birthday"`
|
||||||
|
Phone sql.NullString `json:"phone"`
|
||||||
|
City sql.NullString `json:"city"`
|
||||||
|
Zip sql.NullString `json:"zip"`
|
||||||
|
Street sql.NullString `json:"street"`
|
||||||
|
Country sql.NullString `json:"country"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (q *Queries) UpdateAccountInfo(ctx context.Context, arg UpdateAccountInfoParams) (AccountInfo, error) {
|
||||||
|
row := q.db.QueryRowContext(ctx, updateAccountInfo,
|
||||||
|
arg.AccountID,
|
||||||
|
arg.Changer,
|
||||||
|
arg.Firstname,
|
||||||
|
arg.Lastname,
|
||||||
|
arg.Birthday,
|
||||||
|
arg.Phone,
|
||||||
|
arg.City,
|
||||||
|
arg.Zip,
|
||||||
|
arg.Street,
|
||||||
|
arg.Country,
|
||||||
|
)
|
||||||
|
var i AccountInfo
|
||||||
|
err := row.Scan(
|
||||||
|
&i.AccountID,
|
||||||
|
&i.Firstname,
|
||||||
|
&i.Lastname,
|
||||||
|
&i.Birthday,
|
||||||
|
&i.PrivacyAccepted,
|
||||||
|
&i.PrivacyAcceptedDate,
|
||||||
|
&i.Phone,
|
||||||
|
&i.City,
|
||||||
|
&i.Zip,
|
||||||
|
&i.Street,
|
||||||
|
&i.Country,
|
||||||
|
&i.Creator,
|
||||||
|
&i.Created,
|
||||||
|
&i.Changer,
|
||||||
|
&i.Changed,
|
||||||
|
)
|
||||||
|
return i, err
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateAccountPrivacy = `-- name: UpdateAccountPrivacy :one
|
||||||
|
UPDATE account_info
|
||||||
|
SET
|
||||||
|
"privacy_accepted" = $1,
|
||||||
|
"privacy_accepted_date" = $2,
|
||||||
|
"changer" = $3,
|
||||||
|
"changed" = now()
|
||||||
|
WHERE "account_id" = $4
|
||||||
|
RETURNING account_id, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, phone, city, zip, street, country, creator, created, changer, changed
|
||||||
|
`
|
||||||
|
|
||||||
|
type UpdateAccountPrivacyParams struct {
|
||||||
|
PrivacyAccepted sql.NullBool `json:"privacy_accepted"`
|
||||||
|
PrivacyAcceptedDate sql.NullTime `json:"privacy_accepted_date"`
|
||||||
|
Changer string `json:"changer"`
|
||||||
|
ID uint64 `json:"id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (q *Queries) UpdateAccountPrivacy(ctx context.Context, arg UpdateAccountPrivacyParams) (AccountInfo, error) {
|
||||||
|
row := q.db.QueryRowContext(ctx, updateAccountPrivacy,
|
||||||
|
arg.PrivacyAccepted,
|
||||||
|
arg.PrivacyAcceptedDate,
|
||||||
|
arg.Changer,
|
||||||
|
arg.ID,
|
||||||
|
)
|
||||||
|
var i AccountInfo
|
||||||
|
err := row.Scan(
|
||||||
|
&i.AccountID,
|
||||||
|
&i.Firstname,
|
||||||
|
&i.Lastname,
|
||||||
|
&i.Birthday,
|
||||||
|
&i.PrivacyAccepted,
|
||||||
|
&i.PrivacyAcceptedDate,
|
||||||
|
&i.Phone,
|
||||||
|
&i.City,
|
||||||
|
&i.Zip,
|
||||||
|
&i.Street,
|
||||||
|
&i.Country,
|
||||||
|
&i.Creator,
|
||||||
|
&i.Created,
|
||||||
|
&i.Changer,
|
||||||
|
&i.Changed,
|
||||||
|
)
|
||||||
|
return i, err
|
||||||
|
}
|
@ -14,31 +14,13 @@ var timestamp = time.Now()
|
|||||||
|
|
||||||
func createRandomAccount(t *testing.T) Account {
|
func createRandomAccount(t *testing.T) Account {
|
||||||
|
|
||||||
creator := util.RandomName()
|
|
||||||
|
|
||||||
arg := CreateAccountParams{
|
arg := CreateAccountParams{
|
||||||
Passwordhash: util.RandomString(30),
|
Passwordhash: util.RandomString(30),
|
||||||
Firstname: util.RandomName(),
|
|
||||||
Lastname: util.RandomName(),
|
|
||||||
Birthday: time.Date(1990, 1, 1, 0, 0, 0, 0, time.UTC),
|
|
||||||
Email: util.RandomEmail(),
|
Email: util.RandomEmail(),
|
||||||
Phone: sql.NullString{
|
SecretKey: sql.NullString{
|
||||||
|
String: util.RandomString(100),
|
||||||
Valid: true,
|
Valid: true,
|
||||||
String: util.RandomPhone(),
|
|
||||||
},
|
},
|
||||||
PrivacyAccepted: sql.NullBool{
|
|
||||||
Valid: true,
|
|
||||||
Bool: true,
|
|
||||||
},
|
|
||||||
PrivacyAcceptedDate: sql.NullTime{
|
|
||||||
Valid: true,
|
|
||||||
Time: timestamp,
|
|
||||||
},
|
|
||||||
City: util.RandomString(15),
|
|
||||||
Zip: util.RandomString(5),
|
|
||||||
Street: util.RandomString(20),
|
|
||||||
Country: util.RandomString(15),
|
|
||||||
Creator: creator,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
account, err := testQueries.CreateAccount(context.Background(), arg)
|
account, err := testQueries.CreateAccount(context.Background(), arg)
|
||||||
@ -46,20 +28,10 @@ func createRandomAccount(t *testing.T) Account {
|
|||||||
require.NotEmpty(t, account)
|
require.NotEmpty(t, account)
|
||||||
|
|
||||||
require.Equal(t, arg.Passwordhash, account.Passwordhash)
|
require.Equal(t, arg.Passwordhash, account.Passwordhash)
|
||||||
require.Equal(t, arg.Firstname, account.Firstname)
|
|
||||||
require.Equal(t, arg.Lastname, account.Lastname)
|
|
||||||
require.Equal(t, arg.Birthday, account.Birthday)
|
|
||||||
require.Equal(t, arg.Email, account.Email)
|
require.Equal(t, arg.Email, account.Email)
|
||||||
require.Equal(t, arg.Phone, account.Phone)
|
require.Equal(t, arg.SecretKey, account.SecretKey)
|
||||||
require.Equal(t, arg.City, account.City)
|
|
||||||
require.Equal(t, arg.Zip, account.Zip)
|
|
||||||
require.Equal(t, arg.Street, account.Street)
|
|
||||||
require.Equal(t, arg.Country, account.Country)
|
|
||||||
require.Equal(t, arg.Creator, account.Creator)
|
|
||||||
require.Equal(t, arg.Creator, account.Changer)
|
|
||||||
|
|
||||||
require.NotZero(t, account.ID)
|
require.NotZero(t, account.ID)
|
||||||
require.NotZero(t, account.Created)
|
|
||||||
|
|
||||||
return account
|
return account
|
||||||
}
|
}
|
||||||
@ -77,19 +49,8 @@ func TestGetAccount(t *testing.T) {
|
|||||||
require.NotEmpty(t, account)
|
require.NotEmpty(t, account)
|
||||||
|
|
||||||
require.Equal(t, newAccount.Passwordhash, account.Passwordhash)
|
require.Equal(t, newAccount.Passwordhash, account.Passwordhash)
|
||||||
require.Equal(t, newAccount.Firstname, account.Firstname)
|
|
||||||
require.Equal(t, newAccount.Lastname, account.Lastname)
|
|
||||||
require.Equal(t, newAccount.Birthday, account.Birthday)
|
|
||||||
require.Equal(t, newAccount.Email, account.Email)
|
require.Equal(t, newAccount.Email, account.Email)
|
||||||
require.Equal(t, newAccount.Phone, account.Phone)
|
require.Equal(t, newAccount.SecretKey, account.SecretKey)
|
||||||
require.Equal(t, newAccount.City, account.City)
|
|
||||||
require.Equal(t, newAccount.Zip, account.Zip)
|
|
||||||
require.Equal(t, newAccount.Street, account.Street)
|
|
||||||
require.Equal(t, newAccount.Country, account.Country)
|
|
||||||
require.Equal(t, newAccount.Creator, account.Creator)
|
|
||||||
require.Equal(t, newAccount.Changer, account.Changer)
|
|
||||||
|
|
||||||
require.WithinDuration(t, newAccount.Created, account.Created, time.Second)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDeleteAccount(t *testing.T) {
|
func TestDeleteAccount(t *testing.T) {
|
||||||
@ -103,78 +64,6 @@ func TestDeleteAccount(t *testing.T) {
|
|||||||
require.Empty(t, account2)
|
require.Empty(t, account2)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestUpdateAccount(t *testing.T) {
|
|
||||||
account1 := createRandomAccount(t)
|
|
||||||
require.NotEmpty(t, account1)
|
|
||||||
|
|
||||||
arg := UpdateAccountParams{
|
|
||||||
ID: account1.ID,
|
|
||||||
Phone: sql.NullString{
|
|
||||||
String: util.RandomPhone(),
|
|
||||||
Valid: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
account2, err := testQueries.UpdateAccount(context.Background(), arg)
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.NotEmpty(t, account2)
|
|
||||||
|
|
||||||
require.Equal(t, account1.ID, account2.ID)
|
|
||||||
require.Equal(t, account1.Lastname, account2.Lastname)
|
|
||||||
require.NotEqual(t, account1.Phone, account2.Phone)
|
|
||||||
require.NotEqual(t, account1.Changer, account2.Changer)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestUpdateAccountPrivacy(t *testing.T) {
|
|
||||||
account1 := createRandomAccount(t)
|
|
||||||
require.NotEmpty(t, account1)
|
|
||||||
|
|
||||||
changer1 := util.RandomName()
|
|
||||||
|
|
||||||
arg := UpdateAccountPrivacyParams{
|
|
||||||
ID: account1.ID,
|
|
||||||
PrivacyAccepted: sql.NullBool{
|
|
||||||
Valid: true,
|
|
||||||
Bool: false,
|
|
||||||
},
|
|
||||||
PrivacyAcceptedDate: sql.NullTime{
|
|
||||||
Valid: true,
|
|
||||||
Time: time.Time{},
|
|
||||||
},
|
|
||||||
Changer: changer1,
|
|
||||||
}
|
|
||||||
|
|
||||||
account2, err := testQueries.UpdateAccountPrivacy(context.Background(), arg)
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.NotEmpty(t, account2)
|
|
||||||
|
|
||||||
require.Equal(t, account1.ID, account2.ID)
|
|
||||||
require.Equal(t, account1.Lastname, account2.Lastname)
|
|
||||||
require.WithinDuration(t, time.Time{}, account2.PrivacyAcceptedDate.Time, time.Second)
|
|
||||||
require.NotEqual(t, account1.PrivacyAccepted.Bool, account2.PrivacyAccepted.Bool)
|
|
||||||
require.NotEqual(t, account1.PrivacyAcceptedDate.Time, account2.PrivacyAcceptedDate.Time)
|
|
||||||
|
|
||||||
arg.PrivacyAccepted = sql.NullBool{
|
|
||||||
Valid: true,
|
|
||||||
Bool: true,
|
|
||||||
}
|
|
||||||
|
|
||||||
arg.PrivacyAcceptedDate = sql.NullTime{
|
|
||||||
Valid: true,
|
|
||||||
Time: timestamp.UTC(),
|
|
||||||
}
|
|
||||||
|
|
||||||
account1, err = testQueries.UpdateAccountPrivacy(context.Background(), arg)
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.NotEmpty(t, account2)
|
|
||||||
|
|
||||||
require.Equal(t, account1.ID, account2.ID)
|
|
||||||
require.Equal(t, account1.Lastname, account2.Lastname)
|
|
||||||
require.WithinDuration(t, timestamp.UTC(), account1.PrivacyAcceptedDate.Time, time.Second)
|
|
||||||
require.NotEqual(t, account1.PrivacyAccepted.Bool, account2.PrivacyAccepted.Bool)
|
|
||||||
require.NotEqual(t, account1.PrivacyAcceptedDate.Time, account2.PrivacyAcceptedDate.Time)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestListAccounts(t *testing.T) {
|
func TestListAccounts(t *testing.T) {
|
||||||
for i := 0; i < 10; i++ {
|
for i := 0; i < 10; i++ {
|
||||||
createRandomAccount(t)
|
createRandomAccount(t)
|
||||||
|
@ -12,15 +12,22 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Account struct {
|
type Account struct {
|
||||||
ID uint64 `json:"id"`
|
ID uint64 `json:"id"`
|
||||||
PermissionLevel int32 `json:"permission_level"`
|
PermissionLevel int32 `json:"permission_level"`
|
||||||
Passwordhash string `json:"passwordhash"`
|
Passwordhash string `json:"passwordhash"`
|
||||||
|
Email string `json:"email"`
|
||||||
|
SecretKey sql.NullString `json:"secret_key"`
|
||||||
|
EmailVerified sql.NullBool `json:"email_verified"`
|
||||||
|
EmailVerifiedTime sql.NullTime `json:"email_verified_time"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type AccountInfo struct {
|
||||||
|
AccountID uint64 `json:"account_id"`
|
||||||
Firstname string `json:"firstname"`
|
Firstname string `json:"firstname"`
|
||||||
Lastname string `json:"lastname"`
|
Lastname string `json:"lastname"`
|
||||||
Birthday time.Time `json:"birthday"`
|
Birthday time.Time `json:"birthday"`
|
||||||
PrivacyAccepted sql.NullBool `json:"privacy_accepted"`
|
PrivacyAccepted sql.NullBool `json:"privacy_accepted"`
|
||||||
PrivacyAcceptedDate sql.NullTime `json:"privacy_accepted_date"`
|
PrivacyAcceptedDate sql.NullTime `json:"privacy_accepted_date"`
|
||||||
Email string `json:"email"`
|
|
||||||
Phone sql.NullString `json:"phone"`
|
Phone sql.NullString `json:"phone"`
|
||||||
City string `json:"city"`
|
City string `json:"city"`
|
||||||
Zip string `json:"zip"`
|
Zip string `json:"zip"`
|
||||||
|
@ -15,6 +15,7 @@ type Querier interface {
|
|||||||
BlockSession(ctx context.Context, id uuid.UUID) error
|
BlockSession(ctx context.Context, id uuid.UUID) error
|
||||||
CloneProviders(ctx context.Context, arg CloneProvidersParams) error
|
CloneProviders(ctx context.Context, arg CloneProvidersParams) error
|
||||||
CreateAccount(ctx context.Context, arg CreateAccountParams) (Account, error)
|
CreateAccount(ctx context.Context, arg CreateAccountParams) (Account, error)
|
||||||
|
CreateAccountInfo(ctx context.Context, arg CreateAccountInfoParams) (AccountInfo, error)
|
||||||
CreateDocument(ctx context.Context, arg CreateDocumentParams) (Document, error)
|
CreateDocument(ctx context.Context, arg CreateDocumentParams) (Document, error)
|
||||||
CreateDocumentMail(ctx context.Context, arg CreateDocumentMailParams) (Document, error)
|
CreateDocumentMail(ctx context.Context, arg CreateDocumentMailParams) (Document, error)
|
||||||
CreateDocumentUpload(ctx context.Context, arg CreateDocumentUploadParams) (Document, error)
|
CreateDocumentUpload(ctx context.Context, arg CreateDocumentUploadParams) (Document, error)
|
||||||
@ -26,6 +27,7 @@ type Querier interface {
|
|||||||
CreateReturnsLog(ctx context.Context, arg CreateReturnsLogParams) (ReturnsLog, error)
|
CreateReturnsLog(ctx context.Context, arg CreateReturnsLogParams) (ReturnsLog, error)
|
||||||
CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error)
|
CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error)
|
||||||
DeleteAccount(ctx context.Context, id uint64) error
|
DeleteAccount(ctx context.Context, id uint64) error
|
||||||
|
DeleteAccountInfo(ctx context.Context, accountID uint64) error
|
||||||
DeleteDocument(ctx context.Context, id uint64) error
|
DeleteDocument(ctx context.Context, id uint64) error
|
||||||
DeleteDocumentsByPersonID(ctx context.Context, personID sql.NullInt64) error
|
DeleteDocumentsByPersonID(ctx context.Context, personID sql.NullInt64) error
|
||||||
// -- name: UpdateMail :one
|
// -- name: UpdateMail :one
|
||||||
@ -51,7 +53,7 @@ type Querier interface {
|
|||||||
DeleteReturnsLogsByPersonID(ctx context.Context, personID uint64) error
|
DeleteReturnsLogsByPersonID(ctx context.Context, personID uint64) error
|
||||||
GetAccount(ctx context.Context, id uint64) (Account, error)
|
GetAccount(ctx context.Context, id uint64) (Account, error)
|
||||||
GetAccountByEmail(ctx context.Context, email string) (Account, error)
|
GetAccountByEmail(ctx context.Context, email string) (Account, error)
|
||||||
GetAccountForUpdate(ctx context.Context, id uint64) (Account, error)
|
GetAccountInfo(ctx context.Context, accountID uint64) (AccountInfo, error)
|
||||||
GetDocument(ctx context.Context, id uint64) (Document, error)
|
GetDocument(ctx context.Context, id uint64) (Document, error)
|
||||||
GetDocumentByHash(ctx context.Context, arg GetDocumentByHashParams) ([]uint64, error)
|
GetDocumentByHash(ctx context.Context, arg GetDocumentByHashParams) ([]uint64, error)
|
||||||
GetDocumentByIDWithAccountID(ctx context.Context, arg GetDocumentByIDWithAccountIDParams) (Document, error)
|
GetDocumentByIDWithAccountID(ctx context.Context, arg GetDocumentByIDWithAccountIDParams) (Document, error)
|
||||||
@ -66,6 +68,7 @@ type Querier interface {
|
|||||||
GetReturnsLog(ctx context.Context, id uint64) (ReturnsLog, error)
|
GetReturnsLog(ctx context.Context, id uint64) (ReturnsLog, error)
|
||||||
GetSession(ctx context.Context, id uuid.UUID) (Session, error)
|
GetSession(ctx context.Context, id uuid.UUID) (Session, error)
|
||||||
InvalidateDocument(ctx context.Context, arg InvalidateDocumentParams) (Document, error)
|
InvalidateDocument(ctx context.Context, arg InvalidateDocumentParams) (Document, error)
|
||||||
|
ListAccountInfo(ctx context.Context, arg ListAccountInfoParams) ([]AccountInfo, error)
|
||||||
ListAccounts(ctx context.Context, arg ListAccountsParams) ([]Account, error)
|
ListAccounts(ctx context.Context, arg ListAccountsParams) ([]Account, error)
|
||||||
ListDocuments(ctx context.Context, arg ListDocumentsParams) ([]Document, error)
|
ListDocuments(ctx context.Context, arg ListDocumentsParams) ([]Document, error)
|
||||||
ListMails(ctx context.Context, arg ListMailsParams) ([]Mail, error)
|
ListMails(ctx context.Context, arg ListMailsParams) ([]Mail, error)
|
||||||
@ -77,7 +80,8 @@ type Querier interface {
|
|||||||
ListReturnsLogsByPersonID(ctx context.Context, personID uint64) ([]ReturnsLog, error)
|
ListReturnsLogsByPersonID(ctx context.Context, personID uint64) ([]ReturnsLog, error)
|
||||||
ListSessions(ctx context.Context, accountID uint64) ([]Session, error)
|
ListSessions(ctx context.Context, accountID uint64) ([]Session, error)
|
||||||
UpdateAccount(ctx context.Context, arg UpdateAccountParams) (Account, error)
|
UpdateAccount(ctx context.Context, arg UpdateAccountParams) (Account, error)
|
||||||
UpdateAccountPrivacy(ctx context.Context, arg UpdateAccountPrivacyParams) (Account, error)
|
UpdateAccountInfo(ctx context.Context, arg UpdateAccountInfoParams) (AccountInfo, error)
|
||||||
|
UpdateAccountPrivacy(ctx context.Context, arg UpdateAccountPrivacyParams) (AccountInfo, error)
|
||||||
UpdateDocument(ctx context.Context, arg UpdateDocumentParams) (Document, error)
|
UpdateDocument(ctx context.Context, arg UpdateDocumentParams) (Document, error)
|
||||||
UpdatePayment(ctx context.Context, arg UpdatePaymentParams) (Payment, error)
|
UpdatePayment(ctx context.Context, arg UpdatePaymentParams) (Payment, error)
|
||||||
UpdatePerson(ctx context.Context, arg UpdatePersonParams) (Person, error)
|
UpdatePerson(ctx context.Context, arg UpdatePersonParams) (Person, error)
|
||||||
@ -85,6 +89,7 @@ type Querier interface {
|
|||||||
UpdateReturn(ctx context.Context, arg UpdateReturnParams) (Return, error)
|
UpdateReturn(ctx context.Context, arg UpdateReturnParams) (Return, error)
|
||||||
UpdateReturnsLog(ctx context.Context, arg UpdateReturnsLogParams) (ReturnsLog, error)
|
UpdateReturnsLog(ctx context.Context, arg UpdateReturnsLogParams) (ReturnsLog, error)
|
||||||
ValidateDocument(ctx context.Context, arg ValidateDocumentParams) (Document, error)
|
ValidateDocument(ctx context.Context, arg ValidateDocumentParams) (Document, error)
|
||||||
|
VerifyAccountEmail(ctx context.Context, arg VerifyAccountEmailParams) error
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ Querier = (*Queries)(nil)
|
var _ Querier = (*Queries)(nil)
|
||||||
|
@ -11,13 +11,14 @@ import (
|
|||||||
type Store interface {
|
type Store interface {
|
||||||
Querier
|
Querier
|
||||||
CreateAccountTx(ctx context.Context, arg CreateAccountTxParams) (Account, error)
|
CreateAccountTx(ctx context.Context, arg CreateAccountTxParams) (Account, error)
|
||||||
UpdateAccountTx(ctx context.Context, arg UpdateAccountTxParams) (Account, error)
|
UpdateAccountInfoTx(ctx context.Context, arg UpdateAccountInfoTxParams) (AccountInfo, error)
|
||||||
UpdateAccountPrivacyTx(ctx context.Context, arg UpdateAccountPrivacyTxParams) (Account, error)
|
UpdateAccountPrivacyTx(ctx context.Context, arg UpdateAccountPrivacyTxParams) (AccountInfo, error)
|
||||||
CreatePersonTx(ctx context.Context, arg CreatePersonTxParams) (Person, error)
|
CreatePersonTx(ctx context.Context, arg CreatePersonTxParams) (Person, error)
|
||||||
DeletePersonTx(ctx context.Context, id uint64) error
|
DeletePersonTx(ctx context.Context, id uint64) error
|
||||||
CreateDocumentTx(ctx context.Context, arg CreateDocumentTxParams) (doc Document, code int, err error)
|
CreateDocumentTx(ctx context.Context, arg CreateDocumentTxParams) (doc Document, code int, err error)
|
||||||
DeleteDocumentTx(ctx context.Context, id uint64) (code codes.Code, err error)
|
DeleteDocumentTx(ctx context.Context, id uint64) (code codes.Code, err error)
|
||||||
Query(ctx context.Context, statement string, args ...interface{}) (result []map[string]interface{}, err error)
|
Query(ctx context.Context, statement string, args ...interface{}) (result []map[string]interface{}, err error)
|
||||||
|
UpdateAccountTx(ctx context.Context, arg UpdateAccountTxParams) (Account, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store provides all functions to execute db queries and transactions
|
// Store provides all functions to execute db queries and transactions
|
||||||
|
@ -3,23 +3,13 @@ package db
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"time"
|
|
||||||
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CreateAccountTxParams struct {
|
type CreateAccountTxParams struct {
|
||||||
Passwordhash string `json:"passwordhash"`
|
CreateAccountParams
|
||||||
PrivacyAccepted sql.NullBool `json:"privacy_accepted"`
|
AfterCreate func(Account) error
|
||||||
PrivacyAcceptedDate sql.NullTime `json:"privacy_accepted_date"`
|
|
||||||
Firstname string `json:"firstname"`
|
|
||||||
Lastname string `json:"lastname"`
|
|
||||||
Birthday time.Time `json:"birthday"`
|
|
||||||
Email string `json:"email"`
|
|
||||||
Phone sql.NullString `json:"phone"`
|
|
||||||
City string `json:"city"`
|
|
||||||
Zip string `json:"zip"`
|
|
||||||
Street string `json:"street"`
|
|
||||||
Country string `json:"country"`
|
|
||||||
Creator string `json:"creator"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateAccountTxResult struct {
|
type CreateAccountTxResult struct {
|
||||||
@ -30,11 +20,11 @@ func (store *SQLStore) CreateAccountTx(ctx context.Context, arg CreateAccountTxP
|
|||||||
var result CreateAccountTxResult
|
var result CreateAccountTxResult
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
if arg.PrivacyAccepted.Bool && arg.PrivacyAccepted.Valid && !arg.PrivacyAcceptedDate.Valid {
|
uid, _ := uuid.NewUUID()
|
||||||
arg.PrivacyAcceptedDate = sql.NullTime{
|
|
||||||
Valid: true,
|
arg.SecretKey = sql.NullString{
|
||||||
Time: time.Now(),
|
Valid: uid.String() != "",
|
||||||
}
|
String: uid.String(),
|
||||||
}
|
}
|
||||||
|
|
||||||
// arg.Passwordhash, err = util.HashPassword(arg.Passwordhash)
|
// arg.Passwordhash, err = util.HashPassword(arg.Passwordhash)
|
||||||
@ -45,9 +35,12 @@ func (store *SQLStore) CreateAccountTx(ctx context.Context, arg CreateAccountTxP
|
|||||||
err = store.execTx(ctx, func(q *Queries) error {
|
err = store.execTx(ctx, func(q *Queries) error {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
result.Account, err = q.CreateAccount(ctx, CreateAccountParams(arg))
|
result.Account, err = q.CreateAccount(ctx, arg.CreateAccountParams)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
return err
|
return arg.AfterCreate(result.Account)
|
||||||
})
|
})
|
||||||
|
|
||||||
return result.Account, err
|
return result.Account, err
|
||||||
|
@ -5,27 +5,25 @@ import (
|
|||||||
"database/sql"
|
"database/sql"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UpdateAccountTxParams struct {
|
type UpdateAccountInfoTxParams struct {
|
||||||
ID uint64 `json:"ID"`
|
AccountID uint64 `json:"account_id"`
|
||||||
Changer string `json:"changer"`
|
Changer string `json:"changer"`
|
||||||
Passwordhash sql.NullString `json:"passwordhash"`
|
Firstname sql.NullString `json:"firstname"`
|
||||||
Firstname sql.NullString `json:"firstname"`
|
Lastname sql.NullString `json:"lastname"`
|
||||||
Lastname sql.NullString `json:"lastname"`
|
Birthday sql.NullTime `json:"birthday"`
|
||||||
Birthday sql.NullTime `json:"birthday"`
|
Phone sql.NullString `json:"phone"`
|
||||||
Email sql.NullString `json:"email"`
|
City sql.NullString `json:"city"`
|
||||||
Phone sql.NullString `json:"phone"`
|
Zip sql.NullString `json:"zip"`
|
||||||
City sql.NullString `json:"city"`
|
Street sql.NullString `json:"street"`
|
||||||
Zip sql.NullString `json:"zip"`
|
Country sql.NullString `json:"country"`
|
||||||
Street sql.NullString `json:"street"`
|
|
||||||
Country sql.NullString `json:"country"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type UpdateAccountTxResult struct {
|
type UpdateAccountInfoTxResult struct {
|
||||||
Account Account `json:"account"`
|
AccountInfo AccountInfo `json:"account_info"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (store *SQLStore) UpdateAccountTx(ctx context.Context, arg UpdateAccountTxParams) (Account, error) {
|
func (store *SQLStore) UpdateAccountInfoTx(ctx context.Context, arg UpdateAccountInfoTxParams) (AccountInfo, error) {
|
||||||
var result UpdateAccountTxResult
|
var result UpdateAccountInfoTxResult
|
||||||
|
|
||||||
// if arg.Passwordhash.Valid {
|
// if arg.Passwordhash.Valid {
|
||||||
// arg.Passwordhash.String, err = util.HashPassword(arg.Passwordhash.String)
|
// arg.Passwordhash.String, err = util.HashPassword(arg.Passwordhash.String)
|
||||||
@ -36,9 +34,9 @@ func (store *SQLStore) UpdateAccountTx(ctx context.Context, arg UpdateAccountTxP
|
|||||||
|
|
||||||
err := store.execTx(ctx, func(q *Queries) error {
|
err := store.execTx(ctx, func(q *Queries) error {
|
||||||
var err error
|
var err error
|
||||||
result.Account, err = q.UpdateAccount(ctx, UpdateAccountParams(arg))
|
result.AccountInfo, err = q.UpdateAccountInfo(ctx, UpdateAccountInfoParams(arg))
|
||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
|
|
||||||
return result.Account, err
|
return result.AccountInfo, err
|
||||||
}
|
}
|
||||||
|
@ -16,9 +16,9 @@ type UpdateAccountPrivacyTxResult struct {
|
|||||||
Account Account `json:"account"`
|
Account Account `json:"account"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (store *SQLStore) UpdateAccountPrivacyTx(ctx context.Context, arg UpdateAccountPrivacyTxParams) (Account, error) {
|
func (store *SQLStore) UpdateAccountPrivacyTx(ctx context.Context, arg UpdateAccountPrivacyTxParams) (AccountInfo, error) {
|
||||||
var date sql.NullTime
|
var date sql.NullTime
|
||||||
var account Account
|
var account AccountInfo
|
||||||
|
|
||||||
if *arg.PrivacyAccepted {
|
if *arg.PrivacyAccepted {
|
||||||
date = sql.NullTime{
|
date = sql.NullTime{
|
||||||
|
42
bff/db/sqlc/tx_update_accountt.go
Normal file
42
bff/db/sqlc/tx_update_accountt.go
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
package db
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"database/sql"
|
||||||
|
|
||||||
|
"github.com/google/uuid"
|
||||||
|
)
|
||||||
|
|
||||||
|
type UpdateAccountTxParams struct {
|
||||||
|
UpdateAccountParams
|
||||||
|
AfterUpdate func(Account) error
|
||||||
|
}
|
||||||
|
|
||||||
|
type UpdateAccountTxResult struct {
|
||||||
|
Account Account `json:"account"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (store *SQLStore) UpdateAccountTx(ctx context.Context, arg UpdateAccountTxParams) (Account, error) {
|
||||||
|
var result UpdateAccountTxResult
|
||||||
|
var err error
|
||||||
|
|
||||||
|
uid, _ := uuid.NewUUID()
|
||||||
|
|
||||||
|
arg.SecretKey = sql.NullString{
|
||||||
|
Valid: uid.String() != "",
|
||||||
|
String: uid.String(),
|
||||||
|
}
|
||||||
|
|
||||||
|
err = store.execTx(ctx, func(q *Queries) error {
|
||||||
|
var err error
|
||||||
|
|
||||||
|
result.Account, err = q.UpdateAccount(ctx, arg.UpdateAccountParams)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return arg.AfterUpdate(result.Account)
|
||||||
|
})
|
||||||
|
|
||||||
|
return result.Account, err
|
||||||
|
}
|
@ -68,7 +68,7 @@
|
|||||||
},
|
},
|
||||||
"/v1/accounts/create_account": {
|
"/v1/accounts/create_account": {
|
||||||
"post": {
|
"post": {
|
||||||
"summary": "Create Account",
|
"summary": "Create AccountInfo",
|
||||||
"operationId": "df_CreateAccount",
|
"operationId": "df_CreateAccount",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
@ -100,6 +100,45 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/v1/accounts/create_account_info": {
|
||||||
|
"post": {
|
||||||
|
"summary": "Create AccountInfo",
|
||||||
|
"operationId": "df_CreateAccountInfo",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "A successful response.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/pbCreateAccountInfoResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"description": "An unexpected error response.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/rpcStatus"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "body",
|
||||||
|
"description": "Create an AccountInfo",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/pbCreateAccountInfoRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"df"
|
||||||
|
],
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"BearerAuth": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/v1/accounts/get_account/{id}": {
|
"/v1/accounts/get_account/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"summary": "Get Account by account_id",
|
"summary": "Get Account by account_id",
|
||||||
@ -137,6 +176,87 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/v1/accounts/get_account_info/{accountId}": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Get AccountInfo by account_id",
|
||||||
|
"operationId": "df_GetAccountInfo",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "A successful response.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/pbGetAccountInfoResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"description": "An unexpected error response.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/rpcStatus"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "accountId",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"type": "string",
|
||||||
|
"format": "uint64"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"df"
|
||||||
|
],
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"BearerAuth": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/v1/accounts/list_account_info": {
|
||||||
|
"get": {
|
||||||
|
"summary": "List AccountInfos [admin only]",
|
||||||
|
"operationId": "df_ListAccountInfo",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "A successful response.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/pbListAccountInfoResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"description": "An unexpected error response.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/rpcStatus"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "pageId",
|
||||||
|
"in": "query",
|
||||||
|
"required": true,
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pageSize",
|
||||||
|
"in": "query",
|
||||||
|
"required": true,
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int64"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"df"
|
||||||
|
],
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"BearerAuth": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/v1/accounts/list_accounts": {
|
"/v1/accounts/list_accounts": {
|
||||||
"get": {
|
"get": {
|
||||||
"summary": "List Accounts [admin only]",
|
"summary": "List Accounts [admin only]",
|
||||||
@ -220,6 +340,45 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/v1/accounts/update_account_info": {
|
||||||
|
"patch": {
|
||||||
|
"summary": "Update AccountInfo",
|
||||||
|
"operationId": "df_UpdateAccountInfo",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "A successful response.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/pbUpdateAccountInfoResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"description": "An unexpected error response.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/rpcStatus"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "body",
|
||||||
|
"description": "Update an AccountInfo",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/pbUpdateAccountInfoRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"df"
|
||||||
|
],
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"BearerAuth": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/v1/accounts/update_account_privacy": {
|
"/v1/accounts/update_account_privacy": {
|
||||||
"patch": {
|
"patch": {
|
||||||
"summary": "Update Account Privacy Settings",
|
"summary": "Update Account Privacy Settings",
|
||||||
@ -241,7 +400,7 @@
|
|||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "body",
|
"name": "body",
|
||||||
"description": "Update the Privacy Consent of an Account",
|
"description": "Update the Privacy Consent of an AccountInfo",
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
@ -852,6 +1011,44 @@
|
|||||||
"df"
|
"df"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"/v1/verify_email/{accountId}/{secretKey}": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Verify Email with account_id and secret_key",
|
||||||
|
"operationId": "df_VerifyEmail",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "A successful response.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/pbVerifyEmailResponse"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"description": "An unexpected error response.",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/rpcStatus"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "accountId",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"type": "string",
|
||||||
|
"format": "uint64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "secretKey",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"df"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
@ -883,6 +1080,54 @@
|
|||||||
"email": {
|
"email": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"secretKey": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"emailVerifiedTime": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"example": "2023-10-05T00:00:00Z"
|
||||||
|
},
|
||||||
|
"emailVerified": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"privacyAcceptedDate": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"example": "2023-10-05T00:00:00Z"
|
||||||
|
},
|
||||||
|
"permissionLevel": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32",
|
||||||
|
"description": "Default is 0 (non-priviledged)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"title": "Account"
|
||||||
|
},
|
||||||
|
"pbAccountInfo": {
|
||||||
|
"type": "object",
|
||||||
|
"example": {
|
||||||
|
"account_id": "1",
|
||||||
|
"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"
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"accountId": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "uint64"
|
||||||
|
},
|
||||||
"firstname": {
|
"firstname": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -939,7 +1184,7 @@
|
|||||||
"example": "2023-10-05T00:00:00Z"
|
"example": "2023-10-05T00:00:00Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"title": "Account"
|
"title": "AccountInfo"
|
||||||
},
|
},
|
||||||
"pbBlockSessionRequest": {
|
"pbBlockSessionRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -978,11 +1223,10 @@
|
|||||||
},
|
},
|
||||||
"title": "Blocked Session"
|
"title": "Blocked Session"
|
||||||
},
|
},
|
||||||
"pbCreateAccountRequest": {
|
"pbCreateAccountInfoRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"example": {
|
"example": {
|
||||||
"email": "john.doe@example.com",
|
"account_id": "1",
|
||||||
"password": "MayTheForceBeWithYou!",
|
|
||||||
"firstname": "John",
|
"firstname": "John",
|
||||||
"lastname": "Doe",
|
"lastname": "Doe",
|
||||||
"street": "Main Street 1",
|
"street": "Main Street 1",
|
||||||
@ -992,11 +1236,9 @@
|
|||||||
"birthday": "1990-10-05T00:00:00Z"
|
"birthday": "1990-10-05T00:00:00Z"
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
"email": {
|
"accountId": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
},
|
"format": "uint64"
|
||||||
"password": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
},
|
||||||
"firstname": {
|
"firstname": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@ -1029,11 +1271,10 @@
|
|||||||
"example": true
|
"example": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description": "Create an Account",
|
"description": "Create an AccountInfo",
|
||||||
"title": "Create Account",
|
"title": "Create AccountInfo",
|
||||||
"required": [
|
"required": [
|
||||||
"email",
|
"accountId",
|
||||||
"password",
|
|
||||||
"firstname",
|
"firstname",
|
||||||
"lastname",
|
"lastname",
|
||||||
"street",
|
"street",
|
||||||
@ -1043,6 +1284,37 @@
|
|||||||
"birthday"
|
"birthday"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"pbCreateAccountInfoResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"accountInfo": {
|
||||||
|
"$ref": "#/definitions/pbAccountInfo"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Returns the created AccountInfo",
|
||||||
|
"title": "Created AccountInfo"
|
||||||
|
},
|
||||||
|
"pbCreateAccountRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"example": {
|
||||||
|
"email": "john.doe@example.com",
|
||||||
|
"password": "MayTheForceBeWithYou!"
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"email": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Create an Account",
|
||||||
|
"title": "Create Account",
|
||||||
|
"required": [
|
||||||
|
"email",
|
||||||
|
"password"
|
||||||
|
]
|
||||||
|
},
|
||||||
"pbCreateAccountResponse": {
|
"pbCreateAccountResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -1283,6 +1555,16 @@
|
|||||||
},
|
},
|
||||||
"title": "Document"
|
"title": "Document"
|
||||||
},
|
},
|
||||||
|
"pbGetAccountInfoResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"accountInfo": {
|
||||||
|
"$ref": "#/definitions/pbAccountInfo"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Returns the AccountInfo",
|
||||||
|
"title": "GetAccountInfo Response"
|
||||||
|
},
|
||||||
"pbGetAccountResponse": {
|
"pbGetAccountResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -1290,7 +1572,7 @@
|
|||||||
"$ref": "#/definitions/pbAccount"
|
"$ref": "#/definitions/pbAccount"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description": "Returns the Account",
|
"description": "Returns the AccountInfo",
|
||||||
"title": "GetAccount Response"
|
"title": "GetAccount Response"
|
||||||
},
|
},
|
||||||
"pbGetPaymentResponse": {
|
"pbGetPaymentResponse": {
|
||||||
@ -1313,6 +1595,20 @@
|
|||||||
"description": "Returns the Person",
|
"description": "Returns the Person",
|
||||||
"title": "GetPerson Response"
|
"title": "GetPerson Response"
|
||||||
},
|
},
|
||||||
|
"pbListAccountInfoResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"accountInfo": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"$ref": "#/definitions/pbAccountInfo"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Returns the AccountInfo",
|
||||||
|
"title": "ListAccountInfo Response"
|
||||||
|
},
|
||||||
"pbListAccountsResponse": {
|
"pbListAccountsResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -1713,57 +2009,17 @@
|
|||||||
},
|
},
|
||||||
"title": "Session"
|
"title": "Session"
|
||||||
},
|
},
|
||||||
"pbUpdateAccountPrivacyRequest": {
|
"pbUpdateAccountInfoRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"example": {
|
"example": {
|
||||||
"id": "1",
|
"account_id": "1",
|
||||||
"privacy_accepted": true
|
|
||||||
},
|
|
||||||
"properties": {
|
|
||||||
"id": {
|
|
||||||
"type": "string",
|
|
||||||
"format": "int64",
|
|
||||||
"example": 1
|
|
||||||
},
|
|
||||||
"privacyAccepted": {
|
|
||||||
"type": "boolean",
|
|
||||||
"example": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"description": "Update the Privacy Consent of an Account",
|
|
||||||
"title": "Update Account Privacy Consent",
|
|
||||||
"required": [
|
|
||||||
"id",
|
|
||||||
"privacyAccepted"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"pbUpdateAccountPrivacyResponse": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"account": {
|
|
||||||
"$ref": "#/definitions/pbAccount",
|
|
||||||
"title": "Updated Account"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"title": "Update Account Privacy Response"
|
|
||||||
},
|
|
||||||
"pbUpdateAccountRequest": {
|
|
||||||
"type": "object",
|
|
||||||
"example": {
|
|
||||||
"id": "1",
|
|
||||||
"street": "Death Star 2"
|
"street": "Death Star 2"
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"accountId": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "uint64"
|
"format": "uint64"
|
||||||
},
|
},
|
||||||
"email": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"password": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"firstname": {
|
"firstname": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -1791,10 +2047,79 @@
|
|||||||
"example": "1990-10-05T00:00:00Z"
|
"example": "1990-10-05T00:00:00Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"description": "Update an AccountInfo",
|
||||||
|
"title": "Update AccountInfo",
|
||||||
|
"required": [
|
||||||
|
"id"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"pbUpdateAccountInfoResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"accountInfo": {
|
||||||
|
"$ref": "#/definitions/pbAccountInfo"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Returns the updated Account",
|
||||||
|
"title": "Updated Account"
|
||||||
|
},
|
||||||
|
"pbUpdateAccountPrivacyRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"example": {
|
||||||
|
"account_id": "1",
|
||||||
|
"privacy_accepted": true
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"accountId": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "int64",
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"privacyAccepted": {
|
||||||
|
"type": "boolean",
|
||||||
|
"example": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "Update the Privacy Consent of an AccountInfo",
|
||||||
|
"title": "Update Account Info Privacy Consent",
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"privacyAccepted"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"pbUpdateAccountPrivacyResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"accountInfo": {
|
||||||
|
"$ref": "#/definitions/pbAccountInfo",
|
||||||
|
"title": "Updated AccountInfo"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"title": "Update Account Info Privacy Response"
|
||||||
|
},
|
||||||
|
"pbUpdateAccountRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"example": {
|
||||||
|
"account_id": "1",
|
||||||
|
"email": "john.doe@example.com"
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"accountId": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "uint64"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
"description": "Update an Account",
|
"description": "Update an Account",
|
||||||
"title": "Update Account",
|
"title": "Update Account",
|
||||||
"required": [
|
"required": [
|
||||||
"id"
|
"email",
|
||||||
|
"password"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pbUpdateAccountResponse": {
|
"pbUpdateAccountResponse": {
|
||||||
@ -1955,6 +2280,15 @@
|
|||||||
},
|
},
|
||||||
"title": "UploadDocument Response"
|
"title": "UploadDocument Response"
|
||||||
},
|
},
|
||||||
|
"pbVerifyEmailResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"verified": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"title": "VerifyEmail Response"
|
||||||
|
},
|
||||||
"protobufAny": {
|
"protobufAny": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -8,23 +8,32 @@ import (
|
|||||||
|
|
||||||
func convertAccount(account db.Account) *pb.Account {
|
func convertAccount(account db.Account) *pb.Account {
|
||||||
return &pb.Account{
|
return &pb.Account{
|
||||||
Id: account.ID,
|
Id: account.ID,
|
||||||
PermissionLevel: account.PermissionLevel,
|
PermissionLevel: account.PermissionLevel,
|
||||||
Email: account.Email,
|
Email: account.Email,
|
||||||
Firstname: account.Firstname,
|
EmailVerified: account.EmailVerified.Bool,
|
||||||
Lastname: account.Lastname,
|
EmailVerifiedTime: timestamppb.New(account.EmailVerifiedTime.Time),
|
||||||
City: account.City,
|
SecretKey: &account.SecretKey.String,
|
||||||
Street: account.Street,
|
}
|
||||||
Zip: account.Zip,
|
}
|
||||||
Country: account.Country,
|
|
||||||
Creator: account.Creator,
|
func convertAccountInfo(account_info db.AccountInfo) *pb.AccountInfo {
|
||||||
Changer: account.Changer,
|
return &pb.AccountInfo{
|
||||||
PrivacyAccepted: account.PrivacyAccepted.Bool,
|
AccountId: account_info.AccountID,
|
||||||
PrivacyAcceptedDate: timestamppb.New(account.PrivacyAcceptedDate.Time),
|
Firstname: account_info.Firstname,
|
||||||
Birthday: timestamppb.New(account.Birthday),
|
Lastname: account_info.Lastname,
|
||||||
Created: timestamppb.New(account.Created),
|
City: account_info.City,
|
||||||
Changed: timestamppb.New(account.Changed),
|
Street: account_info.Street,
|
||||||
Phone: account.Phone.String,
|
Zip: account_info.Zip,
|
||||||
|
Country: account_info.Country,
|
||||||
|
Creator: account_info.Creator,
|
||||||
|
Changer: account_info.Changer,
|
||||||
|
PrivacyAccepted: account_info.PrivacyAccepted.Bool,
|
||||||
|
PrivacyAcceptedDate: timestamppb.New(account_info.PrivacyAcceptedDate.Time),
|
||||||
|
Birthday: timestamppb.New(account_info.Birthday),
|
||||||
|
Created: timestamppb.New(account_info.Created),
|
||||||
|
Changed: timestamppb.New(account_info.Changed),
|
||||||
|
Phone: account_info.Phone.String,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,8 +2,7 @@ package gapi
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"database/sql"
|
"fmt"
|
||||||
"errors"
|
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
|
||||||
db "github.com/itsscb/df/bff/db/sqlc"
|
db "github.com/itsscb/df/bff/db/sqlc"
|
||||||
@ -28,23 +27,12 @@ func (server *Server) CreateAccount(ctx context.Context, req *pb.CreateAccountRe
|
|||||||
}
|
}
|
||||||
|
|
||||||
arg := db.CreateAccountTxParams{
|
arg := db.CreateAccountTxParams{
|
||||||
Passwordhash: hashedPassword,
|
CreateAccountParams: db.CreateAccountParams{
|
||||||
PrivacyAccepted: sql.NullBool{
|
Passwordhash: hashedPassword,
|
||||||
Valid: true,
|
Email: req.GetEmail(),
|
||||||
Bool: req.GetPrivacyAccepted(),
|
|
||||||
},
|
},
|
||||||
Firstname: req.GetFirstname(),
|
AfterCreate: func(a db.Account) error {
|
||||||
Lastname: req.GetLastname(),
|
return server.mailSender.SendEmail("Verify your E-Mail Address", fmt.Sprintf("Hello %s,</br></br>please verify your E-Mail Addres by clicking on the following link:</br><a href=\"http://localhost:8080/v1/verify_email/%d/%s\">Verification Link</a></br></br></br>Your Team of DF", req.GetEmail(), a.ID, a.SecretKey.String), []string{req.GetEmail()}, nil, nil, nil)
|
||||||
Birthday: req.GetBirthday().AsTime(),
|
|
||||||
Email: req.GetEmail(),
|
|
||||||
City: req.GetCity(),
|
|
||||||
Zip: req.GetZip(),
|
|
||||||
Street: req.GetStreet(),
|
|
||||||
Country: req.GetCountry(),
|
|
||||||
Creator: req.GetEmail(),
|
|
||||||
Phone: sql.NullString{
|
|
||||||
Valid: req.GetPhone() != "",
|
|
||||||
String: req.GetPhone(),
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,21 +58,5 @@ func validateCreateAccountRequest(req *pb.CreateAccountRequest) (violations []*e
|
|||||||
violations = append(violations, fieldViolation("password", err))
|
violations = append(violations, fieldViolation("password", err))
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := val.ValidateName(req.GetFirstname()); err != nil {
|
|
||||||
violations = append(violations, fieldViolation("first_name", err))
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := val.ValidateName(req.GetLastname()); err != nil {
|
|
||||||
violations = append(violations, fieldViolation("last_name", err))
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := val.ValidateName(req.GetCity()); err != nil {
|
|
||||||
violations = append(violations, fieldViolation("city", err))
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(req.GetZip()) < 4 {
|
|
||||||
violations = append(violations, fieldViolation("zip", errors.New("must be at least 4 characters long")))
|
|
||||||
}
|
|
||||||
|
|
||||||
return violations
|
return violations
|
||||||
}
|
}
|
||||||
|
113
bff/gapi/rpc_create_account_info.go
Normal file
113
bff/gapi/rpc_create_account_info.go
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
package gapi
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"database/sql"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"log/slog"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
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) CreateAccountInfo(ctx context.Context, req *pb.CreateAccountInfoRequest) (*pb.CreateAccountInfoResponse, error) {
|
||||||
|
authPayload, err := server.authorizeUser(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, unauthenticatedError(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
violations := validateCreateAccountInfoRequest(req)
|
||||||
|
if violations != nil {
|
||||||
|
return nil, invalidArgumentError(violations)
|
||||||
|
}
|
||||||
|
|
||||||
|
account, err := server.store.GetAccount(ctx, req.GetAccountId())
|
||||||
|
if err != nil {
|
||||||
|
slog.Error("create_account_info (get account)", slog.Int64("invoked_by", int64(req.GetAccountId())), slog.String("error", err.Error()))
|
||||||
|
return nil, status.Error(codes.Internal, "failed to get account")
|
||||||
|
}
|
||||||
|
|
||||||
|
admin := server.isAdmin(ctx, authPayload)
|
||||||
|
|
||||||
|
if authPayload.AccountID != account.ID {
|
||||||
|
if !admin {
|
||||||
|
return nil, status.Error(codes.NotFound, "account not found")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if !account.EmailVerified.Bool {
|
||||||
|
if !admin {
|
||||||
|
return nil, status.Error(codes.Unauthenticated, "account not verified")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ai, err := server.store.GetAccountInfo(ctx, req.GetAccountId())
|
||||||
|
if err == nil {
|
||||||
|
fmt.Printf("%#v", ai)
|
||||||
|
return nil, status.Error(codes.AlreadyExists, "account_info already exists for this account")
|
||||||
|
}
|
||||||
|
|
||||||
|
arg := db.CreateAccountInfoParams{
|
||||||
|
AccountID: req.GetAccountId(),
|
||||||
|
Firstname: req.GetFirstname(),
|
||||||
|
Lastname: req.GetLastname(),
|
||||||
|
Street: req.GetStreet(),
|
||||||
|
City: req.GetCity(),
|
||||||
|
Zip: req.GetZip(),
|
||||||
|
Country: req.GetCountry(),
|
||||||
|
Phone: sql.NullString{
|
||||||
|
Valid: req.GetPhone() != "",
|
||||||
|
String: req.GetPhone(),
|
||||||
|
},
|
||||||
|
Birthday: req.GetBirthday().AsTime(),
|
||||||
|
PrivacyAccepted: sql.NullBool{
|
||||||
|
Valid: req.PrivacyAccepted != nil,
|
||||||
|
Bool: req.GetPrivacyAccepted(),
|
||||||
|
},
|
||||||
|
PrivacyAcceptedDate: sql.NullTime{
|
||||||
|
Valid: req.PrivacyAccepted != nil,
|
||||||
|
Time: time.Now(),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
account_info, err := server.store.CreateAccountInfo(ctx, arg)
|
||||||
|
if err != nil {
|
||||||
|
slog.Error("create_account_info (db)", slog.Int64("invoked_by", int64(req.GetAccountId())), slog.String("error", err.Error()))
|
||||||
|
return nil, status.Error(codes.Internal, "failed to create account info")
|
||||||
|
}
|
||||||
|
|
||||||
|
rsp := &pb.CreateAccountInfoResponse{
|
||||||
|
AccountInfo: convertAccountInfo(account_info),
|
||||||
|
}
|
||||||
|
|
||||||
|
return rsp, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func validateCreateAccountInfoRequest(req *pb.CreateAccountInfoRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||||
|
if !val.IsValidName(req.GetFirstname()) {
|
||||||
|
violations = append(violations, fieldViolation("firstname", errors.New("invalid input")))
|
||||||
|
}
|
||||||
|
if !val.IsValidName(req.GetLastname()) {
|
||||||
|
violations = append(violations, fieldViolation("lastname", errors.New("invalid input")))
|
||||||
|
}
|
||||||
|
if !val.IsValidAlphaNumSpace(req.GetStreet()) {
|
||||||
|
violations = append(violations, fieldViolation("street", errors.New("invalid input")))
|
||||||
|
}
|
||||||
|
if !val.IsValidAlphaNumSpace(req.GetZip()) {
|
||||||
|
violations = append(violations, fieldViolation("zip", errors.New("invalid input")))
|
||||||
|
}
|
||||||
|
if !val.IsValidName(req.GetCity()) {
|
||||||
|
violations = append(violations, fieldViolation("city", errors.New("invalid input")))
|
||||||
|
}
|
||||||
|
if !val.IsValidName(req.GetCountry()) {
|
||||||
|
violations = append(violations, fieldViolation("country", errors.New("invalid input")))
|
||||||
|
}
|
||||||
|
|
||||||
|
return violations
|
||||||
|
}
|
54
bff/gapi/rpc_get_account_info.go
Normal file
54
bff/gapi/rpc_get_account_info.go
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
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) GetAccountInfo(ctx context.Context, req *pb.GetAccountInfoRequest) (*pb.GetAccountInfoResponse, error) {
|
||||||
|
authPayload, err := server.authorizeUser(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, unauthenticatedError(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
violations := validateGetAccountInfoRequest(req)
|
||||||
|
if violations != nil {
|
||||||
|
return nil, invalidArgumentError(violations)
|
||||||
|
}
|
||||||
|
|
||||||
|
account, err := server.store.GetAccountInfo(ctx, req.GetAccountId())
|
||||||
|
if err != nil {
|
||||||
|
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.GetAccountId())), slog.String("error", err.Error()))
|
||||||
|
return nil, status.Error(codes.Internal, "failed to get account")
|
||||||
|
}
|
||||||
|
|
||||||
|
if authPayload.AccountID != account.AccountID {
|
||||||
|
if !server.isAdmin(ctx, authPayload) {
|
||||||
|
return nil, status.Error(codes.NotFound, "account not found")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rsp := &pb.GetAccountInfoResponse{
|
||||||
|
AccountInfo: convertAccountInfo(account),
|
||||||
|
}
|
||||||
|
|
||||||
|
return rsp, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func validateGetAccountInfoRequest(req *pb.GetAccountInfoRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||||
|
if req.GetAccountId() < 1 {
|
||||||
|
violations = append(violations, fieldViolation("id", errors.New("must be greater than 0")))
|
||||||
|
}
|
||||||
|
|
||||||
|
return violations
|
||||||
|
}
|
@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
|
||||||
db "github.com/itsscb/df/bff/db/sqlc"
|
db "github.com/itsscb/df/bff/db/sqlc"
|
||||||
@ -26,74 +27,49 @@ func (server *Server) UpdateAccount(ctx context.Context, req *pb.UpdateAccountRe
|
|||||||
return nil, invalidArgumentError(violations)
|
return nil, invalidArgumentError(violations)
|
||||||
}
|
}
|
||||||
|
|
||||||
if authPayload.AccountID != req.GetId() {
|
if authPayload.AccountID != req.GetAccountId() {
|
||||||
if !server.isAdmin(ctx, authPayload) {
|
if !server.isAdmin(ctx, authPayload) {
|
||||||
return nil, status.Error(codes.NotFound, "account not found")
|
return nil, status.Error(codes.NotFound, "account not found")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
account, err := server.store.GetAccount(ctx, req.GetId())
|
_, err = server.store.GetAccount(ctx, req.GetAccountId())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, status.Error(codes.NotFound, "account not found")
|
return nil, status.Error(codes.NotFound, "account not found")
|
||||||
}
|
}
|
||||||
|
|
||||||
arg := db.UpdateAccountTxParams{
|
var hashedPassword string
|
||||||
ID: req.GetId(),
|
|
||||||
Changer: account.Email,
|
|
||||||
Email: sql.NullString{
|
|
||||||
Valid: req.GetEmail() != "",
|
|
||||||
String: req.GetEmail(),
|
|
||||||
},
|
|
||||||
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(),
|
|
||||||
},
|
|
||||||
Phone: sql.NullString{
|
|
||||||
Valid: req.GetPhone() != "",
|
|
||||||
String: req.GetPhone(),
|
|
||||||
},
|
|
||||||
Birthday: sql.NullTime{
|
|
||||||
Valid: req.GetBirthday().IsValid(),
|
|
||||||
Time: req.GetBirthday().AsTime(),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
if req.Password != nil {
|
if req.Password != nil {
|
||||||
hashedPassword, err := util.HashPassword(req.GetPassword())
|
hashedPassword, err = util.HashPassword(req.GetPassword())
|
||||||
if err != nil {
|
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()))
|
slog.Error("create_account (hash_password)", slog.String("invoked_by", req.GetEmail()), slog.String("error", err.Error()))
|
||||||
return nil, status.Error(codes.Internal, "failed to hash password")
|
return nil, status.Errorf(codes.Internal, "failed to hash password: %s", err)
|
||||||
}
|
|
||||||
|
|
||||||
arg.Passwordhash = sql.NullString{
|
|
||||||
Valid: true,
|
|
||||||
String: hashedPassword,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
account, err = server.store.UpdateAccountTx(ctx, arg)
|
arg := db.UpdateAccountTxParams{
|
||||||
|
UpdateAccountParams: db.UpdateAccountParams{
|
||||||
|
ID: req.GetAccountId(),
|
||||||
|
Email: sql.NullString{
|
||||||
|
Valid: req.Email != nil,
|
||||||
|
String: req.GetEmail(),
|
||||||
|
},
|
||||||
|
Passwordhash: sql.NullString{
|
||||||
|
Valid: req.Password != nil,
|
||||||
|
String: hashedPassword,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
if req.Email != nil {
|
||||||
|
arg.AfterUpdate = func(a db.Account) error {
|
||||||
|
return server.mailSender.SendEmail("Verify your E-Mail Address", fmt.Sprintf("Hello %s,</br></br>please verify your E-Mail Addres by clicking on the following link:</br><a href=\"http://localhost:8080/v1/verify_email/%d/%s\">Verification Link</a></br></br></br>Your Team of DF", req.GetEmail(), a.ID, a.SecretKey.String), []string{req.GetEmail()}, nil, nil, nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
account, err := server.store.UpdateAccountTx(ctx, arg)
|
||||||
if err != nil {
|
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()))
|
slog.Error("update_account (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.Internal, "failed to update account")
|
return nil, status.Error(codes.Internal, "failed to update account")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,44 +81,15 @@ func (server *Server) UpdateAccount(ctx context.Context, req *pb.UpdateAccountRe
|
|||||||
}
|
}
|
||||||
|
|
||||||
func validateUpdateAccountRequest(req *pb.UpdateAccountRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
func validateUpdateAccountRequest(req *pb.UpdateAccountRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||||
if req.GetId() < 1 {
|
if req.GetAccountId() < 1 {
|
||||||
violations = append(violations, fieldViolation("id", errors.New("must be greater than 0")))
|
violations = append(violations, fieldViolation("id", errors.New("must be greater than 0")))
|
||||||
}
|
}
|
||||||
|
if err := val.ValidateEmail(req.GetEmail()); err != nil {
|
||||||
|
violations = append(violations, fieldViolation("email", err))
|
||||||
|
}
|
||||||
|
|
||||||
if req.GetEmail() != "" {
|
if err := val.ValidatePassword(req.GetPassword()); err != nil {
|
||||||
if err := val.ValidateEmail(req.GetEmail()); err != nil {
|
violations = append(violations, fieldViolation("password", err))
|
||||||
violations = append(violations, fieldViolation("email", err))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if req.GetPassword() != "" {
|
|
||||||
if err := val.ValidatePassword(req.GetPassword()); err != nil {
|
|
||||||
violations = append(violations, fieldViolation("password", err))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if req.GetFirstname() != "" {
|
|
||||||
if err := val.ValidateName(req.GetFirstname()); err != nil {
|
|
||||||
violations = append(violations, fieldViolation("first_name", err))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if req.GetLastname() != "" {
|
|
||||||
if err := val.ValidateName(req.GetLastname()); err != nil {
|
|
||||||
violations = append(violations, fieldViolation("last_name", err))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if req.GetCity() != "" {
|
|
||||||
if err := val.ValidateName(req.GetCity()); err != nil {
|
|
||||||
violations = append(violations, fieldViolation("city", err))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if req.GetZip() != "" {
|
|
||||||
if err := val.ValidateName(req.GetZip()); err != nil {
|
|
||||||
violations = append(violations, fieldViolation("zip", err))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if req.GetStreet() != "" {
|
|
||||||
if err := val.ValidateStreet(req.GetStreet()); err != nil {
|
|
||||||
violations = append(violations, fieldViolation("street", err))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return violations
|
return violations
|
||||||
|
121
bff/gapi/rpc_update_account_info.go
Normal file
121
bff/gapi/rpc_update_account_info.go
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
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) UpdateAccountInfo(ctx context.Context, req *pb.UpdateAccountInfoRequest) (*pb.UpdateAccountInfoResponse, error) {
|
||||||
|
authPayload, err := server.authorizeUser(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, unauthenticatedError(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
violations := validateUpdateAccountInfoRequest(req)
|
||||||
|
if violations != nil {
|
||||||
|
return nil, invalidArgumentError(violations)
|
||||||
|
}
|
||||||
|
|
||||||
|
if authPayload.AccountID != req.GetAccountId() {
|
||||||
|
if !server.isAdmin(ctx, authPayload) {
|
||||||
|
return nil, status.Error(codes.NotFound, "account not found")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
changer, err := server.store.GetAccount(ctx, authPayload.AccountID)
|
||||||
|
if err != nil {
|
||||||
|
return nil, status.Error(codes.NotFound, "account not found")
|
||||||
|
}
|
||||||
|
|
||||||
|
arg := db.UpdateAccountInfoTxParams{
|
||||||
|
AccountID: req.GetAccountId(),
|
||||||
|
Changer: changer.Email,
|
||||||
|
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(),
|
||||||
|
},
|
||||||
|
Phone: sql.NullString{
|
||||||
|
Valid: req.GetPhone() != "",
|
||||||
|
String: req.GetPhone(),
|
||||||
|
},
|
||||||
|
Birthday: sql.NullTime{
|
||||||
|
Valid: req.GetBirthday().IsValid(),
|
||||||
|
Time: req.GetBirthday().AsTime(),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
account_info, err := server.store.UpdateAccountInfoTx(ctx, arg)
|
||||||
|
if err != nil {
|
||||||
|
slog.Error("update_account (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.Internal, "failed to update account")
|
||||||
|
}
|
||||||
|
|
||||||
|
rsp := &pb.UpdateAccountInfoResponse{
|
||||||
|
AccountInfo: convertAccountInfo(account_info),
|
||||||
|
}
|
||||||
|
|
||||||
|
return rsp, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func validateUpdateAccountInfoRequest(req *pb.UpdateAccountInfoRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||||
|
if req.GetAccountId() < 1 {
|
||||||
|
violations = append(violations, fieldViolation("id", errors.New("must be greater than 0")))
|
||||||
|
}
|
||||||
|
|
||||||
|
if req.GetFirstname() != "" {
|
||||||
|
if err := val.ValidateName(req.GetFirstname()); err != nil {
|
||||||
|
violations = append(violations, fieldViolation("first_name", err))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if req.GetLastname() != "" {
|
||||||
|
if err := val.ValidateName(req.GetLastname()); err != nil {
|
||||||
|
violations = append(violations, fieldViolation("last_name", err))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if req.GetCity() != "" {
|
||||||
|
if err := val.ValidateName(req.GetCity()); err != nil {
|
||||||
|
violations = append(violations, fieldViolation("city", err))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if req.GetZip() != "" {
|
||||||
|
if err := val.ValidateName(req.GetZip()); err != nil {
|
||||||
|
violations = append(violations, fieldViolation("zip", err))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if req.GetStreet() != "" {
|
||||||
|
if err := val.ValidateStreet(req.GetStreet()); err != nil {
|
||||||
|
violations = append(violations, fieldViolation("street", err))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return violations
|
||||||
|
}
|
@ -24,12 +24,12 @@ func (server *Server) UpdateAccountPrivacy(ctx context.Context, req *pb.UpdateAc
|
|||||||
return nil, invalidArgumentError(violations)
|
return nil, invalidArgumentError(violations)
|
||||||
}
|
}
|
||||||
|
|
||||||
account, err := server.store.GetAccount(ctx, req.GetId())
|
account, err := server.store.GetAccount(ctx, req.GetAccountId())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err, sql.ErrNoRows) {
|
if errors.Is(err, sql.ErrNoRows) {
|
||||||
return nil, status.Errorf(codes.NotFound, "account not found")
|
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()))
|
slog.Error("update_account_privacy (get_account)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetAccountId())), slog.String("error", err.Error()))
|
||||||
return nil, status.Errorf(codes.Internal, "failed to get account")
|
return nil, status.Errorf(codes.Internal, "failed to get account")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,25 +42,25 @@ func (server *Server) UpdateAccountPrivacy(ctx context.Context, req *pb.UpdateAc
|
|||||||
|
|
||||||
arg := db.UpdateAccountPrivacyTxParams{
|
arg := db.UpdateAccountPrivacyTxParams{
|
||||||
Changer: account.Email,
|
Changer: account.Email,
|
||||||
ID: req.GetId(),
|
ID: req.GetAccountId(),
|
||||||
PrivacyAccepted: &privacyAccepted,
|
PrivacyAccepted: &privacyAccepted,
|
||||||
}
|
}
|
||||||
|
|
||||||
account, err = server.store.UpdateAccountPrivacyTx(ctx, arg)
|
account_info, err := server.store.UpdateAccountPrivacyTx(ctx, arg)
|
||||||
if err != nil {
|
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()))
|
slog.Error("update_account_privacy (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.Internal, "failed to update account privacy")
|
return nil, status.Error(codes.Internal, "failed to update account privacy")
|
||||||
}
|
}
|
||||||
|
|
||||||
rsp := &pb.UpdateAccountPrivacyResponse{
|
rsp := &pb.UpdateAccountPrivacyResponse{
|
||||||
Account: convertAccount(account),
|
AccountInfo: convertAccountInfo(account_info),
|
||||||
}
|
}
|
||||||
|
|
||||||
return rsp, nil
|
return rsp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func validateUpdateAccountPrivacyRequest(req *pb.UpdateAccountPrivacyRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
func validateUpdateAccountPrivacyRequest(req *pb.UpdateAccountPrivacyRequest) (violations []*errdetails.BadRequest_FieldViolation) {
|
||||||
if req.GetId() < 1 {
|
if req.GetAccountId() < 1 {
|
||||||
violations = append(violations, fieldViolation("id", errors.New("must be greater than 0")))
|
violations = append(violations, fieldViolation("id", errors.New("must be greater than 0")))
|
||||||
}
|
}
|
||||||
return violations
|
return violations
|
||||||
|
53
bff/gapi/rpc_verify_email.go
Normal file
53
bff/gapi/rpc_verify_email.go
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
package gapi
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"database/sql"
|
||||||
|
"errors"
|
||||||
|
"log/slog"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
db "github.com/itsscb/df/bff/db/sqlc"
|
||||||
|
"github.com/itsscb/df/bff/pb"
|
||||||
|
"google.golang.org/grpc/codes"
|
||||||
|
"google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (server *Server) VerifyEmail(ctx context.Context, req *pb.VerifyEmailRequest) (*pb.VerifyEmailResponse, error) {
|
||||||
|
|
||||||
|
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("verify_email (get_account)", slog.Int64("account_id", int64(req.GetAccountId())), slog.String("error", err.Error()))
|
||||||
|
return nil, status.Error(codes.Internal, "failed to get account")
|
||||||
|
}
|
||||||
|
|
||||||
|
if account.ID != req.GetAccountId() {
|
||||||
|
return nil, status.Error(codes.NotFound, "account not found")
|
||||||
|
}
|
||||||
|
|
||||||
|
if account.SecretKey.String != req.GetSecretKey() {
|
||||||
|
return nil, status.Error(codes.NotFound, "unknown secret_key: "+req.GetSecretKey())
|
||||||
|
}
|
||||||
|
|
||||||
|
arg := db.VerifyAccountEmailParams{
|
||||||
|
ID: account.ID,
|
||||||
|
EmailVerified: sql.NullBool{
|
||||||
|
Valid: true,
|
||||||
|
Bool: true,
|
||||||
|
},
|
||||||
|
EmailVerifiedTime: sql.NullTime{
|
||||||
|
Valid: true,
|
||||||
|
Time: time.Now(),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
err = server.store.VerifyAccountEmail(ctx, arg)
|
||||||
|
|
||||||
|
rsp := &pb.VerifyEmailResponse{
|
||||||
|
Verified: err == nil,
|
||||||
|
}
|
||||||
|
return rsp, err
|
||||||
|
}
|
@ -6,6 +6,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
|
|
||||||
db "github.com/itsscb/df/bff/db/sqlc"
|
db "github.com/itsscb/df/bff/db/sqlc"
|
||||||
|
"github.com/itsscb/df/bff/mail"
|
||||||
"github.com/itsscb/df/bff/pb"
|
"github.com/itsscb/df/bff/pb"
|
||||||
"github.com/itsscb/df/bff/token"
|
"github.com/itsscb/df/bff/token"
|
||||||
"github.com/itsscb/df/bff/util"
|
"github.com/itsscb/df/bff/util"
|
||||||
@ -17,6 +18,7 @@ type Server struct {
|
|||||||
store db.Store
|
store db.Store
|
||||||
config util.Config
|
config util.Config
|
||||||
tokenMaker token.Maker
|
tokenMaker token.Maker
|
||||||
|
mailSender mail.EmailSender
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewServer(config util.Config, store db.Store) (*Server, error) {
|
func NewServer(config util.Config, store db.Store) (*Server, error) {
|
||||||
@ -25,10 +27,13 @@ func NewServer(config util.Config, store db.Store) (*Server, error) {
|
|||||||
return nil, fmt.Errorf("cannot create token maker: %w", err)
|
return nil, fmt.Errorf("cannot create token maker: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mailSender := mail.NewGmailSender("df", config.SMTPMail, config.SMTPPassword)
|
||||||
|
|
||||||
server := &Server{
|
server := &Server{
|
||||||
store: store,
|
store: store,
|
||||||
config: config,
|
config: config,
|
||||||
tokenMaker: tokenMaker,
|
tokenMaker: tokenMaker,
|
||||||
|
mailSender: mailSender,
|
||||||
}
|
}
|
||||||
|
|
||||||
logLevel := slog.LevelError
|
logLevel := slog.LevelError
|
||||||
|
@ -10,6 +10,7 @@ require (
|
|||||||
github.com/golang-migrate/migrate/v4 v4.16.2
|
github.com/golang-migrate/migrate/v4 v4.16.2
|
||||||
github.com/google/uuid v1.3.0
|
github.com/google/uuid v1.3.0
|
||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0
|
||||||
|
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible
|
||||||
github.com/lib/pq v1.10.9
|
github.com/lib/pq v1.10.9
|
||||||
github.com/spf13/viper v1.16.0
|
github.com/spf13/viper v1.16.0
|
||||||
github.com/stretchr/testify v1.8.4
|
github.com/stretchr/testify v1.8.4
|
||||||
|
@ -188,6 +188,8 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
|||||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||||
|
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible h1:jdpOPRN1zP63Td1hDQbZW73xKmzDvZHzVdNYxhnTMDA=
|
||||||
|
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible/go.mod h1:1c7szIrayyPPB/987hsnvNzLushdWf4o/79s3P08L8A=
|
||||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||||
|
65
bff/mail/sender.go
Normal file
65
bff/mail/sender.go
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
package mail
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"net/smtp"
|
||||||
|
|
||||||
|
"github.com/jordan-wright/email"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
smtpAuthAddress = "smtp.gmail.com"
|
||||||
|
smtpServerAddress = "smtp.gmail.com:587"
|
||||||
|
)
|
||||||
|
|
||||||
|
type EmailSender interface {
|
||||||
|
SendEmail(
|
||||||
|
subject string,
|
||||||
|
content string,
|
||||||
|
to []string,
|
||||||
|
cc []string,
|
||||||
|
bcc []string,
|
||||||
|
attachFiles []string,
|
||||||
|
) error
|
||||||
|
}
|
||||||
|
|
||||||
|
type GmailSender struct {
|
||||||
|
displayName string
|
||||||
|
fromEmailAddress string
|
||||||
|
fromEmailPassword string
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewGmailSender(displayName string, fromEmailAddress string, fromEmailPassword string) EmailSender {
|
||||||
|
return &GmailSender{
|
||||||
|
displayName: displayName,
|
||||||
|
fromEmailAddress: fromEmailAddress,
|
||||||
|
fromEmailPassword: fromEmailPassword,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (sender *GmailSender) SendEmail(
|
||||||
|
subject string,
|
||||||
|
content string,
|
||||||
|
to []string,
|
||||||
|
cc []string,
|
||||||
|
bcc []string,
|
||||||
|
attachFiles []string,
|
||||||
|
) error {
|
||||||
|
e := email.NewEmail()
|
||||||
|
e.From = fmt.Sprintf("%s <%s>", sender.displayName, sender.fromEmailAddress)
|
||||||
|
e.Subject = subject
|
||||||
|
e.HTML = []byte(content)
|
||||||
|
e.To = to
|
||||||
|
e.Cc = cc
|
||||||
|
e.Bcc = bcc
|
||||||
|
|
||||||
|
for _, f := range attachFiles {
|
||||||
|
_, err := e.AttachFile(f)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to attach file %s: %w", f, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
smtpAuth := smtp.PlainAuth("", sender.fromEmailAddress, sender.fromEmailPassword, smtpAuthAddress)
|
||||||
|
return e.Send(smtpServerAddress, smtpAuth)
|
||||||
|
}
|
13
bff/main.go
13
bff/main.go
@ -13,7 +13,6 @@ import (
|
|||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||||
"github.com/itsscb/df/bff/api"
|
|
||||||
db "github.com/itsscb/df/bff/db/sqlc"
|
db "github.com/itsscb/df/bff/db/sqlc"
|
||||||
"github.com/itsscb/df/bff/gapi"
|
"github.com/itsscb/df/bff/gapi"
|
||||||
"github.com/itsscb/df/bff/gw"
|
"github.com/itsscb/df/bff/gw"
|
||||||
@ -159,15 +158,3 @@ func runGatewayServer(config util.Config, store db.Store, swaggerFS http.FileSys
|
|||||||
log.Fatal("cannot start HTTP gateway server")
|
log.Fatal("cannot start HTTP gateway server")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func runHTTPServer(config util.Config, store db.Store, swaggerFS http.FileSystem) {
|
|
||||||
server, err := api.NewServer(config, store, swaggerFS)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("could not start server: %s", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
err = server.Start(config.HTTPServerAddress)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal("cannot start server:", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -29,21 +29,11 @@ type Account struct {
|
|||||||
|
|
||||||
Id uint64 `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"`
|
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
|
||||||
Firstname string `protobuf:"bytes,3,opt,name=firstname,proto3" json:"firstname,omitempty"`
|
SecretKey *string `protobuf:"bytes,3,opt,name=secret_key,json=secretKey,proto3,oneof" json:"secret_key,omitempty"`
|
||||||
Lastname string `protobuf:"bytes,4,opt,name=lastname,proto3" json:"lastname,omitempty"`
|
EmailVerifiedTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=email_verified_time,json=emailVerifiedTime,proto3" json:"email_verified_time,omitempty"`
|
||||||
Street string `protobuf:"bytes,5,opt,name=street,proto3" json:"street,omitempty"`
|
EmailVerified bool `protobuf:"varint,10,opt,name=email_verified,json=emailVerified,proto3" json:"email_verified,omitempty"`
|
||||||
City string `protobuf:"bytes,6,opt,name=city,proto3" json:"city,omitempty"`
|
|
||||||
Zip string `protobuf:"bytes,7,opt,name=zip,proto3" json:"zip,omitempty"`
|
|
||||||
Country string `protobuf:"bytes,8,opt,name=country,proto3" json:"country,omitempty"`
|
|
||||||
Birthday *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=birthday,proto3" json:"birthday,omitempty"`
|
|
||||||
Phone string `protobuf:"bytes,10,opt,name=phone,proto3" json:"phone,omitempty"`
|
|
||||||
PrivacyAccepted bool `protobuf:"varint,11,opt,name=privacy_accepted,json=privacyAccepted,proto3" json:"privacy_accepted,omitempty"`
|
|
||||||
PrivacyAcceptedDate *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=privacy_accepted_date,json=privacyAcceptedDate,proto3" json:"privacy_accepted_date,omitempty"`
|
PrivacyAcceptedDate *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=privacy_accepted_date,json=privacyAcceptedDate,proto3" json:"privacy_accepted_date,omitempty"`
|
||||||
PermissionLevel int32 `protobuf:"varint,13,opt,name=permission_level,json=permissionLevel,proto3" json:"permission_level,omitempty"`
|
PermissionLevel int32 `protobuf:"varint,13,opt,name=permission_level,json=permissionLevel,proto3" json:"permission_level,omitempty"`
|
||||||
Creator string `protobuf:"bytes,14,opt,name=creator,proto3" json:"creator,omitempty"`
|
|
||||||
Created *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=created,proto3" json:"created,omitempty"`
|
|
||||||
Changer string `protobuf:"bytes,16,opt,name=changer,proto3" json:"changer,omitempty"`
|
|
||||||
Changed *timestamppb.Timestamp `protobuf:"bytes,17,opt,name=changed,proto3" json:"changed,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Account) Reset() {
|
func (x *Account) Reset() {
|
||||||
@ -92,65 +82,23 @@ func (x *Account) GetEmail() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Account) GetFirstname() string {
|
func (x *Account) GetSecretKey() string {
|
||||||
if x != nil {
|
if x != nil && x.SecretKey != nil {
|
||||||
return x.Firstname
|
return *x.SecretKey
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Account) GetLastname() string {
|
func (x *Account) GetEmailVerifiedTime() *timestamppb.Timestamp {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Lastname
|
return x.EmailVerifiedTime
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Account) GetStreet() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Street
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Account) GetCity() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.City
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Account) GetZip() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Zip
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Account) GetCountry() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Country
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Account) GetBirthday() *timestamppb.Timestamp {
|
|
||||||
if x != nil {
|
|
||||||
return x.Birthday
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Account) GetPhone() string {
|
func (x *Account) GetEmailVerified() bool {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Phone
|
return x.EmailVerified
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Account) GetPrivacyAccepted() bool {
|
|
||||||
if x != nil {
|
|
||||||
return x.PrivacyAccepted
|
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -169,34 +117,6 @@ func (x *Account) GetPermissionLevel() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Account) GetCreator() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Creator
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Account) GetCreated() *timestamppb.Timestamp {
|
|
||||||
if x != nil {
|
|
||||||
return x.Created
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Account) GetChanger() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Changer
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *Account) GetChanged() *timestamppb.Timestamp {
|
|
||||||
if x != nil {
|
|
||||||
return x.Changed
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
var File_account_proto protoreflect.FileDescriptor
|
var File_account_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_account_proto_rawDesc = []byte{
|
var file_account_proto_rawDesc = []byte{
|
||||||
@ -206,84 +126,64 @@ var file_account_proto_rawDesc = []byte{
|
|||||||
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e,
|
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,
|
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,
|
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,
|
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xef, 0x06, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 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,
|
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,
|
0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74,
|
||||||
0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74,
|
0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x65,
|
||||||
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65,
|
0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x12, 0x67, 0x0a, 0x13, 0x65, 0x6d,
|
||||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65,
|
0x61, 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d,
|
||||||
0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||||
0x52, 0x06, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79,
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
|
||||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03,
|
0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d,
|
||||||
0x7a, 0x69, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x7a, 0x69, 0x70, 0x12, 0x18,
|
0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22,
|
||||||
0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x52, 0x11, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x54,
|
||||||
0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x53, 0x0a, 0x08, 0x62, 0x69, 0x72, 0x74,
|
0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72,
|
||||||
0x68, 0x64, 0x61, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
|
0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6d, 0x61,
|
||||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
|
0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x6b, 0x0a, 0x15, 0x70, 0x72,
|
||||||
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x31, 0x39,
|
0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64,
|
||||||
0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30,
|
0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||||
0x30, 0x5a, 0x22, 0x52, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x12, 0x14, 0x0a,
|
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
|
||||||
0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68,
|
0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x32, 0x30, 0x32,
|
||||||
0x6f, 0x6e, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61,
|
0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30,
|
||||||
0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x70,
|
0x5a, 0x22, 0x52, 0x13, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70,
|
||||||
0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x12, 0x6b,
|
0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x6d, 0x69,
|
||||||
0x0a, 0x15, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74,
|
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28,
|
||||||
0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
|
0x05, 0x42, 0x23, 0x92, 0x41, 0x20, 0x32, 0x1e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20,
|
||||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
|
0x69, 0x73, 0x20, 0x30, 0x20, 0x28, 0x6e, 0x6f, 0x6e, 0x2d, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c,
|
||||||
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16,
|
0x65, 0x64, 0x67, 0x65, 0x64, 0x29, 0x52, 0x0f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69,
|
||||||
0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30,
|
0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0xbd, 0x03, 0x92, 0x41, 0xb9, 0x03, 0x0a, 0x09,
|
||||||
0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x13, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x41,
|
0x2a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xab, 0x03, 0x7b, 0x22, 0x69, 0x64,
|
||||||
0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x10, 0x70,
|
0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x3a, 0x20,
|
||||||
0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18,
|
0x22, 0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
|
||||||
0x0d, 0x20, 0x01, 0x28, 0x05, 0x42, 0x23, 0x92, 0x41, 0x20, 0x32, 0x1e, 0x44, 0x65, 0x66, 0x61,
|
0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61,
|
||||||
0x75, 0x6c, 0x74, 0x20, 0x69, 0x73, 0x20, 0x30, 0x20, 0x28, 0x6e, 0x6f, 0x6e, 0x2d, 0x70, 0x72,
|
0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x4a, 0x6f, 0x68, 0x6e, 0x22, 0x2c, 0x20, 0x22, 0x6c, 0x61,
|
||||||
0x69, 0x76, 0x69, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x64, 0x29, 0x52, 0x0f, 0x70, 0x65, 0x72, 0x6d,
|
0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x6f, 0x65, 0x22, 0x2c, 0x20,
|
||||||
0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63,
|
0x22, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x74,
|
||||||
0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72,
|
0x72, 0x65, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x65, 0x61, 0x74, 0x68, 0x20, 0x53, 0x74,
|
||||||
0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
|
0x61, 0x72, 0x20, 0x32, 0x22, 0x2c, 0x20, 0x22, 0x7a, 0x69, 0x70, 0x22, 0x3a, 0x20, 0x22, 0x30,
|
||||||
0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
0x38, 0x31, 0x35, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x4e,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
|
0x65, 0x77, 0x20, 0x59, 0x6f, 0x72, 0x6b, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31,
|
0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x55, 0x53, 0x41, 0x22, 0x2c, 0x20, 0x22, 0x62, 0x69, 0x72,
|
||||||
0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52,
|
0x74, 0x68, 0x64, 0x61, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30,
|
||||||
0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e,
|
0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x20,
|
||||||
0x67, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67,
|
0x22, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65,
|
||||||
0x65, 0x72, 0x12, 0x51, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x11, 0x20,
|
0x64, 0x22, 0x3a, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x20, 0x22, 0x70, 0x72, 0x69, 0x76,
|
||||||
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74,
|
||||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42,
|
0x65, 0x22, 0x3a, 0x20, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54,
|
||||||
0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30,
|
0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x72, 0x65,
|
||||||
0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x07, 0x63, 0x68,
|
0x61, 0x74, 0x6f, 0x72, 0x22, 0x3a, 0x20, 0x22, 0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65,
|
||||||
0x61, 0x6e, 0x67, 0x65, 0x64, 0x3a, 0xbd, 0x03, 0x92, 0x41, 0xb9, 0x03, 0x0a, 0x09, 0x2a, 0x07,
|
0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22,
|
||||||
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xab, 0x03, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a,
|
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d,
|
||||||
0x20, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x3a, 0x20, 0x22, 0x6a,
|
0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x32, 0x3a, 0x33, 0x30, 0x3a, 0x35, 0x33, 0x5a, 0x22,
|
||||||
0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e,
|
0x2c, 0x20, 0x22, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x22, 0x3a, 0x20, 0x22, 0x6a, 0x6f,
|
||||||
0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65,
|
0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
|
||||||
0x22, 0x3a, 0x20, 0x22, 0x4a, 0x6f, 0x68, 0x6e, 0x22, 0x2c, 0x20, 0x22, 0x6c, 0x61, 0x73, 0x74,
|
0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0x3a, 0x20,
|
||||||
0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x6f, 0x65, 0x22, 0x2c, 0x20, 0x22, 0x70,
|
0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x32, 0x3a, 0x33,
|
||||||
0x68, 0x6f, 0x6e, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x74, 0x72, 0x65,
|
0x30, 0x3a, 0x35, 0x33, 0x5a, 0x22, 0x7d, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x65, 0x63, 0x72,
|
||||||
0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x65, 0x61, 0x74, 0x68, 0x20, 0x53, 0x74, 0x61, 0x72,
|
0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||||
0x20, 0x32, 0x22, 0x2c, 0x20, 0x22, 0x7a, 0x69, 0x70, 0x22, 0x3a, 0x20, 0x22, 0x30, 0x38, 0x31,
|
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70,
|
||||||
0x35, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x4e, 0x65, 0x77,
|
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
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 (
|
var (
|
||||||
@ -304,15 +204,13 @@ var file_account_proto_goTypes = []interface{}{
|
|||||||
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
|
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
|
||||||
}
|
}
|
||||||
var file_account_proto_depIdxs = []int32{
|
var file_account_proto_depIdxs = []int32{
|
||||||
1, // 0: pb.Account.birthday:type_name -> google.protobuf.Timestamp
|
1, // 0: pb.Account.email_verified_time:type_name -> google.protobuf.Timestamp
|
||||||
1, // 1: pb.Account.privacy_accepted_date:type_name -> google.protobuf.Timestamp
|
1, // 1: pb.Account.privacy_accepted_date:type_name -> google.protobuf.Timestamp
|
||||||
1, // 2: pb.Account.created:type_name -> google.protobuf.Timestamp
|
2, // [2:2] is the sub-list for method output_type
|
||||||
1, // 3: pb.Account.changed:type_name -> google.protobuf.Timestamp
|
2, // [2:2] is the sub-list for method input_type
|
||||||
4, // [4:4] is the sub-list for method output_type
|
2, // [2:2] is the sub-list for extension type_name
|
||||||
4, // [4:4] is the sub-list for method input_type
|
2, // [2:2] is the sub-list for extension extendee
|
||||||
4, // [4:4] is the sub-list for extension type_name
|
0, // [0:2] is the sub-list for field type_name
|
||||||
4, // [4:4] is the sub-list for extension extendee
|
|
||||||
0, // [0:4] is the sub-list for field type_name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_account_proto_init() }
|
func init() { file_account_proto_init() }
|
||||||
@ -334,6 +232,7 @@ func file_account_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_account_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
346
bff/pb/account_info.pb.go
Normal file
346
bff/pb/account_info.pb.go
Normal file
@ -0,0 +1,346 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.31.0
|
||||||
|
// protoc v4.24.4
|
||||||
|
// source: account_info.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 AccountInfo 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"`
|
||||||
|
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"`
|
||||||
|
City string `protobuf:"bytes,6,opt,name=city,proto3" json:"city,omitempty"`
|
||||||
|
Zip string `protobuf:"bytes,7,opt,name=zip,proto3" json:"zip,omitempty"`
|
||||||
|
Country string `protobuf:"bytes,8,opt,name=country,proto3" json:"country,omitempty"`
|
||||||
|
Birthday *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=birthday,proto3" json:"birthday,omitempty"`
|
||||||
|
Phone string `protobuf:"bytes,10,opt,name=phone,proto3" json:"phone,omitempty"`
|
||||||
|
PrivacyAccepted bool `protobuf:"varint,11,opt,name=privacy_accepted,json=privacyAccepted,proto3" json:"privacy_accepted,omitempty"`
|
||||||
|
PrivacyAcceptedDate *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=privacy_accepted_date,json=privacyAcceptedDate,proto3" json:"privacy_accepted_date,omitempty"`
|
||||||
|
PermissionLevel int32 `protobuf:"varint,13,opt,name=permission_level,json=permissionLevel,proto3" json:"permission_level,omitempty"`
|
||||||
|
Creator string `protobuf:"bytes,14,opt,name=creator,proto3" json:"creator,omitempty"`
|
||||||
|
Created *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=created,proto3" json:"created,omitempty"`
|
||||||
|
Changer string `protobuf:"bytes,16,opt,name=changer,proto3" json:"changer,omitempty"`
|
||||||
|
Changed *timestamppb.Timestamp `protobuf:"bytes,17,opt,name=changed,proto3" json:"changed,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) Reset() {
|
||||||
|
*x = AccountInfo{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_account_info_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*AccountInfo) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *AccountInfo) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_account_info_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 AccountInfo.ProtoReflect.Descriptor instead.
|
||||||
|
func (*AccountInfo) Descriptor() ([]byte, []int) {
|
||||||
|
return file_account_info_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetAccountId() uint64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.AccountId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetFirstname() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Firstname
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetLastname() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Lastname
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetStreet() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Street
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetCity() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.City
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetZip() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Zip
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetCountry() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Country
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetBirthday() *timestamppb.Timestamp {
|
||||||
|
if x != nil {
|
||||||
|
return x.Birthday
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetPhone() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Phone
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetPrivacyAccepted() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.PrivacyAccepted
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetPrivacyAcceptedDate() *timestamppb.Timestamp {
|
||||||
|
if x != nil {
|
||||||
|
return x.PrivacyAcceptedDate
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetPermissionLevel() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.PermissionLevel
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetCreator() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Creator
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetCreated() *timestamppb.Timestamp {
|
||||||
|
if x != nil {
|
||||||
|
return x.Created
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetChanger() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Changer
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AccountInfo) GetChanged() *timestamppb.Timestamp {
|
||||||
|
if x != nil {
|
||||||
|
return x.Changed
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_account_info_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_account_info_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x12, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 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, 0x97, 0x09, 0x0a, 0x0b, 0x41, 0x63,
|
||||||
|
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 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, 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, 0x61, 0x73, 0x74, 0x6e, 0x61,
|
||||||
|
0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69,
|
||||||
|
0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x10,
|
||||||
|
0x0a, 0x03, 0x7a, 0x69, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x7a, 0x69, 0x70,
|
||||||
|
0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x53, 0x0a, 0x08, 0x62, 0x69,
|
||||||
|
0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
|
||||||
|
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
|
||||||
|
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, 0x12,
|
||||||
|
0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
||||||
|
0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79,
|
||||||
|
0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||||
|
0x0f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64,
|
||||||
|
0x12, 0x6b, 0x0a, 0x15, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65,
|
||||||
|
0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
|
0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||||
|
0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18,
|
||||||
|
0x4a, 0x16, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30,
|
||||||
|
0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x13, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63,
|
||||||
|
0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a,
|
||||||
|
0x10, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65,
|
||||||
|
0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x42, 0x23, 0x92, 0x41, 0x20, 0x32, 0x1e, 0x44, 0x65,
|
||||||
|
0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x69, 0x73, 0x20, 0x30, 0x20, 0x28, 0x6e, 0x6f, 0x6e, 0x2d,
|
||||||
|
0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x64, 0x29, 0x52, 0x0f, 0x70, 0x65,
|
||||||
|
0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x18, 0x0a,
|
||||||
|
0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
||||||
|
0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x51, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||||
|
0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||||
|
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
|
||||||
|
0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x32, 0x30, 0x32, 0x33,
|
||||||
|
0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a,
|
||||||
|
0x22, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68,
|
||||||
|
0x61, 0x6e, 0x67, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61,
|
||||||
|
0x6e, 0x67, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18,
|
||||||
|
0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
||||||
|
0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30,
|
||||||
|
0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x07,
|
||||||
|
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x3a, 0xa9, 0x03, 0x92, 0x41, 0xa5, 0x03, 0x0a, 0x0d,
|
||||||
|
0x2a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x32, 0x93, 0x03,
|
||||||
|
0x7b, 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, 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_account_info_proto_rawDescOnce sync.Once
|
||||||
|
file_account_info_proto_rawDescData = file_account_info_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_account_info_proto_rawDescGZIP() []byte {
|
||||||
|
file_account_info_proto_rawDescOnce.Do(func() {
|
||||||
|
file_account_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_account_info_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_account_info_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_account_info_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
|
var file_account_info_proto_goTypes = []interface{}{
|
||||||
|
(*AccountInfo)(nil), // 0: pb.AccountInfo
|
||||||
|
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
|
||||||
|
}
|
||||||
|
var file_account_info_proto_depIdxs = []int32{
|
||||||
|
1, // 0: pb.AccountInfo.birthday:type_name -> google.protobuf.Timestamp
|
||||||
|
1, // 1: pb.AccountInfo.privacy_accepted_date:type_name -> google.protobuf.Timestamp
|
||||||
|
1, // 2: pb.AccountInfo.created:type_name -> google.protobuf.Timestamp
|
||||||
|
1, // 3: pb.AccountInfo.changed:type_name -> google.protobuf.Timestamp
|
||||||
|
4, // [4:4] is the sub-list for method output_type
|
||||||
|
4, // [4:4] is the sub-list for method input_type
|
||||||
|
4, // [4:4] is the sub-list for extension type_name
|
||||||
|
4, // [4:4] is the sub-list for extension extendee
|
||||||
|
0, // [0:4] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_account_info_proto_init() }
|
||||||
|
func file_account_info_proto_init() {
|
||||||
|
if File_account_info_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_account_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*AccountInfo); 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_account_info_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 1,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_account_info_proto_goTypes,
|
||||||
|
DependencyIndexes: file_account_info_proto_depIdxs,
|
||||||
|
MessageInfos: file_account_info_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_account_info_proto = out.File
|
||||||
|
file_account_info_proto_rawDesc = nil
|
||||||
|
file_account_info_proto_goTypes = nil
|
||||||
|
file_account_info_proto_depIdxs = nil
|
||||||
|
}
|
@ -10,7 +10,6 @@ import (
|
|||||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
sync "sync"
|
sync "sync"
|
||||||
)
|
)
|
||||||
@ -27,17 +26,8 @@ type CreateAccountRequest struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
|
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
|
||||||
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
|
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,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"`
|
|
||||||
City string `protobuf:"bytes,6,opt,name=city,proto3" json:"city,omitempty"`
|
|
||||||
Zip string `protobuf:"bytes,7,opt,name=zip,proto3" json:"zip,omitempty"`
|
|
||||||
Country string `protobuf:"bytes,8,opt,name=country,proto3" json:"country,omitempty"`
|
|
||||||
Phone string `protobuf:"bytes,9,opt,name=phone,proto3" json:"phone,omitempty"`
|
|
||||||
Birthday *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=birthday,proto3" json:"birthday,omitempty"`
|
|
||||||
PrivacyAccepted *bool `protobuf:"varint,11,opt,name=privacy_accepted,json=privacyAccepted,proto3,oneof" json:"privacy_accepted,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CreateAccountRequest) Reset() {
|
func (x *CreateAccountRequest) Reset() {
|
||||||
@ -86,69 +76,6 @@ func (x *CreateAccountRequest) GetPassword() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CreateAccountRequest) GetFirstname() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Firstname
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *CreateAccountRequest) GetLastname() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Lastname
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *CreateAccountRequest) GetStreet() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Street
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *CreateAccountRequest) GetCity() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.City
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *CreateAccountRequest) GetZip() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Zip
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *CreateAccountRequest) GetCountry() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Country
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *CreateAccountRequest) GetPhone() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Phone
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *CreateAccountRequest) GetBirthday() *timestamppb.Timestamp {
|
|
||||||
if x != nil {
|
|
||||||
return x.Birthday
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *CreateAccountRequest) GetPrivacyAccepted() bool {
|
|
||||||
if x != nil && x.PrivacyAccepted != nil {
|
|
||||||
return *x.PrivacyAccepted
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
type CreateAccountResponse struct {
|
type CreateAccountResponse struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -200,71 +127,34 @@ var File_rpc_create_account_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
var file_rpc_create_account_proto_rawDesc = []byte{
|
var file_rpc_create_account_proto_rawDesc = []byte{
|
||||||
0x0a, 0x18, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63,
|
0x0a, 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, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1f,
|
0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e,
|
||||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61,
|
||||||
0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e,
|
||||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e,
|
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d,
|
||||||
0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e,
|
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x01,
|
||||||
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
|
||||||
0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfb,
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18,
|
||||||
0x05, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08,
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
|
0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a,
|
0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x3a, 0x84, 0x01, 0x92, 0x41, 0x80, 0x01, 0x0a,
|
||||||
0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x36, 0x2a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||||
0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x72,
|
0x74, 0x32, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63,
|
||||||
0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69,
|
0x6f, 0x75, 0x6e, 0x74, 0xd2, 0x01, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0xd2, 0x01, 0x08, 0x70,
|
||||||
0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x6e,
|
0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x32, 0x46, 0x7b, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c,
|
||||||
0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x6e,
|
0x22, 0x3a, 0x20, 0x22, 0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61,
|
||||||
0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x18, 0x05, 0x20,
|
0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x73, 0x73,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63,
|
0x77, 0x6f, 0x72, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x4d, 0x61, 0x79, 0x54, 0x68, 0x65, 0x46, 0x6f,
|
||||||
0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12,
|
0x72, 0x63, 0x65, 0x42, 0x65, 0x57, 0x69, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x21, 0x22, 0x7d, 0x22,
|
||||||
0x10, 0x0a, 0x03, 0x7a, 0x69, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x7a, 0x69,
|
0x78, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01,
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f,
|
||||||
0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70,
|
0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x41,
|
||||||
0x68, 0x6f, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e,
|
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x61, 0x63, 0x63,
|
||||||
0x65, 0x12, 0x53, 0x0a, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x18, 0x0a, 0x20,
|
0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x0f, 0x43, 0x72, 0x65,
|
||||||
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
0x61, 0x74, 0x65, 0x64, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x1b, 0x52, 0x65,
|
||||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42,
|
0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||||
0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30,
|
0x64, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74,
|
||||||
0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x08, 0x62, 0x69,
|
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64,
|
||||||
0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x12, 0x39, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63,
|
0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08,
|
|
||||||
0x42, 0x09, 0x92, 0x41, 0x06, 0x4a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x70,
|
|
||||||
0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x88, 0x01,
|
|
||||||
0x01, 0x3a, 0xe3, 0x02, 0x92, 0x41, 0xdf, 0x02, 0x0a, 0x78, 0x2a, 0x0e, 0x43, 0x72, 0x65, 0x61,
|
|
||||||
0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x11, 0x43, 0x72, 0x65, 0x61,
|
|
||||||
0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0xd2, 0x01, 0x05,
|
|
||||||
0x65, 0x6d, 0x61, 0x69, 0x6c, 0xd2, 0x01, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
|
|
||||||
0xd2, 0x01, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x08, 0x6c,
|
|
||||||
0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x06, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74,
|
|
||||||
0xd2, 0x01, 0x04, 0x63, 0x69, 0x74, 0x79, 0xd2, 0x01, 0x03, 0x7a, 0x69, 0x70, 0xd2, 0x01, 0x07,
|
|
||||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0xd2, 0x01, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64,
|
|
||||||
0x61, 0x79, 0x32, 0xe2, 0x01, 0x7b, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x3a, 0x20, 0x22,
|
|
||||||
0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
|
|
||||||
0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
|
|
||||||
0x22, 0x3a, 0x20, 0x22, 0x4d, 0x61, 0x79, 0x54, 0x68, 0x65, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x42,
|
|
||||||
0x65, 0x57, 0x69, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x21, 0x22, 0x2c, 0x20, 0x22, 0x66, 0x69, 0x72,
|
|
||||||
0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x4a, 0x6f, 0x68, 0x6e, 0x22, 0x2c,
|
|
||||||
0x20, 0x22, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x6f,
|
|
||||||
0x65, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x4d,
|
|
||||||
0x61, 0x69, 0x6e, 0x20, 0x53, 0x74, 0x72, 0x65, 0x65, 0x74, 0x20, 0x31, 0x22, 0x2c, 0x20, 0x22,
|
|
||||||
0x7a, 0x69, 0x70, 0x22, 0x3a, 0x20, 0x22, 0x30, 0x38, 0x31, 0x35, 0x22, 0x2c, 0x20, 0x22, 0x63,
|
|
||||||
0x69, 0x74, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x4e, 0x65, 0x77, 0x20, 0x59, 0x6f, 0x72, 0x6b, 0x22,
|
|
||||||
0x2c, 0x20, 0x22, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x55, 0x53,
|
|
||||||
0x41, 0x22, 0x2c, 0x20, 0x22, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x22, 0x3a, 0x20,
|
|
||||||
0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30,
|
|
||||||
0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x72, 0x69, 0x76,
|
|
||||||
0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x78, 0x0a, 0x15,
|
|
||||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73,
|
|
||||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x63, 0x63, 0x6f,
|
|
||||||
0x75, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
|
||||||
0x74, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
|
||||||
0x64, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x1b, 0x52, 0x65, 0x74, 0x75, 0x72,
|
|
||||||
0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x41,
|
|
||||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
|
||||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70,
|
|
||||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -283,17 +173,15 @@ var file_rpc_create_account_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|||||||
var file_rpc_create_account_proto_goTypes = []interface{}{
|
var file_rpc_create_account_proto_goTypes = []interface{}{
|
||||||
(*CreateAccountRequest)(nil), // 0: pb.CreateAccountRequest
|
(*CreateAccountRequest)(nil), // 0: pb.CreateAccountRequest
|
||||||
(*CreateAccountResponse)(nil), // 1: pb.CreateAccountResponse
|
(*CreateAccountResponse)(nil), // 1: pb.CreateAccountResponse
|
||||||
(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
|
(*Account)(nil), // 2: pb.Account
|
||||||
(*Account)(nil), // 3: pb.Account
|
|
||||||
}
|
}
|
||||||
var file_rpc_create_account_proto_depIdxs = []int32{
|
var file_rpc_create_account_proto_depIdxs = []int32{
|
||||||
2, // 0: pb.CreateAccountRequest.birthday:type_name -> google.protobuf.Timestamp
|
2, // 0: pb.CreateAccountResponse.account:type_name -> pb.Account
|
||||||
3, // 1: pb.CreateAccountResponse.account:type_name -> pb.Account
|
1, // [1:1] is the sub-list for method output_type
|
||||||
2, // [2:2] is the sub-list for method output_type
|
1, // [1:1] is the sub-list for method input_type
|
||||||
2, // [2:2] is the sub-list for method input_type
|
1, // [1:1] is the sub-list for extension type_name
|
||||||
2, // [2:2] is the sub-list for extension type_name
|
1, // [1:1] is the sub-list for extension extendee
|
||||||
2, // [2:2] is the sub-list for extension extendee
|
0, // [0:1] is the sub-list for field type_name
|
||||||
0, // [0:2] is the sub-list for field type_name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_rpc_create_account_proto_init() }
|
func init() { file_rpc_create_account_proto_init() }
|
||||||
@ -328,7 +216,6 @@ func file_rpc_create_account_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_rpc_create_account_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
340
bff/pb/rpc_create_account_info.pb.go
Normal file
340
bff/pb/rpc_create_account_info.pb.go
Normal file
@ -0,0 +1,340 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.31.0
|
||||||
|
// protoc v4.24.4
|
||||||
|
// source: rpc_create_account_info.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 CreateAccountInfoRequest 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"`
|
||||||
|
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"`
|
||||||
|
City string `protobuf:"bytes,6,opt,name=city,proto3" json:"city,omitempty"`
|
||||||
|
Zip string `protobuf:"bytes,7,opt,name=zip,proto3" json:"zip,omitempty"`
|
||||||
|
Country string `protobuf:"bytes,8,opt,name=country,proto3" json:"country,omitempty"`
|
||||||
|
Phone string `protobuf:"bytes,9,opt,name=phone,proto3" json:"phone,omitempty"`
|
||||||
|
Birthday *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=birthday,proto3" json:"birthday,omitempty"`
|
||||||
|
PrivacyAccepted *bool `protobuf:"varint,11,opt,name=privacy_accepted,json=privacyAccepted,proto3,oneof" json:"privacy_accepted,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoRequest) Reset() {
|
||||||
|
*x = CreateAccountInfoRequest{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_rpc_create_account_info_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*CreateAccountInfoRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_rpc_create_account_info_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 CreateAccountInfoRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*CreateAccountInfoRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_rpc_create_account_info_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoRequest) GetAccountId() uint64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.AccountId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoRequest) GetFirstname() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Firstname
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoRequest) GetLastname() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Lastname
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoRequest) GetStreet() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Street
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoRequest) GetCity() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.City
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoRequest) GetZip() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Zip
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoRequest) GetCountry() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Country
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoRequest) GetPhone() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Phone
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoRequest) GetBirthday() *timestamppb.Timestamp {
|
||||||
|
if x != nil {
|
||||||
|
return x.Birthday
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoRequest) GetPrivacyAccepted() bool {
|
||||||
|
if x != nil && x.PrivacyAccepted != nil {
|
||||||
|
return *x.PrivacyAccepted
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateAccountInfoResponse struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
AccountInfo *AccountInfo `protobuf:"bytes,1,opt,name=account_info,json=accountInfo,proto3" json:"account_info,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoResponse) Reset() {
|
||||||
|
*x = CreateAccountInfoResponse{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_rpc_create_account_info_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*CreateAccountInfoResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_rpc_create_account_info_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 CreateAccountInfoResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*CreateAccountInfoResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_rpc_create_account_info_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CreateAccountInfoResponse) GetAccountInfo() *AccountInfo {
|
||||||
|
if x != nil {
|
||||||
|
return x.AccountInfo
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_rpc_create_account_info_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_rpc_create_account_info_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x1d, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63,
|
||||||
|
0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 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, 0x12, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e,
|
||||||
|
0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x05, 0x0a, 0x18, 0x43, 0x72, 0x65,
|
||||||
|
0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 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, 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, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16,
|
||||||
|
0x0a, 0x06, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
||||||
|
0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x06,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x7a, 0x69,
|
||||||
|
0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x7a, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x07,
|
||||||
|
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
|
||||||
|
0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18,
|
||||||
|
0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x53, 0x0a, 0x08,
|
||||||
|
0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
|
||||||
|
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||||
|
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a,
|
||||||
|
0x16, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a,
|
||||||
|
0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x52, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61,
|
||||||
|
0x79, 0x12, 0x39, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63,
|
||||||
|
0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x09, 0x92, 0x41, 0x06,
|
||||||
|
0x4a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63,
|
||||||
|
0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x3a, 0xb2, 0x02, 0x92,
|
||||||
|
0x41, 0xae, 0x02, 0x0a, 0x7a, 0x2a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63,
|
||||||
|
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x32, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||||
|
0x65, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f,
|
||||||
|
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,
|
||||||
|
0xaf, 0x01, 0x7b, 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, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63,
|
||||||
|
0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x91, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||||
|
0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70,
|
||||||
|
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f,
|
||||||
|
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e,
|
||||||
|
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x03, 0x92, 0x41, 0x00,
|
||||||
|
0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x3b, 0x92,
|
||||||
|
0x41, 0x38, 0x0a, 0x36, 0x2a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x41, 0x63,
|
||||||
|
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x32, 0x1f, 0x52, 0x65, 0x74, 0x75, 0x72,
|
||||||
|
0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x41,
|
||||||
|
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 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_account_info_proto_rawDescOnce sync.Once
|
||||||
|
file_rpc_create_account_info_proto_rawDescData = file_rpc_create_account_info_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_rpc_create_account_info_proto_rawDescGZIP() []byte {
|
||||||
|
file_rpc_create_account_info_proto_rawDescOnce.Do(func() {
|
||||||
|
file_rpc_create_account_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_create_account_info_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_rpc_create_account_info_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_rpc_create_account_info_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
|
var file_rpc_create_account_info_proto_goTypes = []interface{}{
|
||||||
|
(*CreateAccountInfoRequest)(nil), // 0: pb.CreateAccountInfoRequest
|
||||||
|
(*CreateAccountInfoResponse)(nil), // 1: pb.CreateAccountInfoResponse
|
||||||
|
(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
|
||||||
|
(*AccountInfo)(nil), // 3: pb.AccountInfo
|
||||||
|
}
|
||||||
|
var file_rpc_create_account_info_proto_depIdxs = []int32{
|
||||||
|
2, // 0: pb.CreateAccountInfoRequest.birthday:type_name -> google.protobuf.Timestamp
|
||||||
|
3, // 1: pb.CreateAccountInfoResponse.account_info:type_name -> pb.AccountInfo
|
||||||
|
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_create_account_info_proto_init() }
|
||||||
|
func file_rpc_create_account_info_proto_init() {
|
||||||
|
if File_rpc_create_account_info_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file_account_info_proto_init()
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_rpc_create_account_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*CreateAccountInfoRequest); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_rpc_create_account_info_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*CreateAccountInfoResponse); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_rpc_create_account_info_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_rpc_create_account_info_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 2,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_rpc_create_account_info_proto_goTypes,
|
||||||
|
DependencyIndexes: file_rpc_create_account_info_proto_depIdxs,
|
||||||
|
MessageInfos: file_rpc_create_account_info_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_rpc_create_account_info_proto = out.File
|
||||||
|
file_rpc_create_account_info_proto_rawDesc = nil
|
||||||
|
file_rpc_create_account_info_proto_goTypes = nil
|
||||||
|
file_rpc_create_account_info_proto_depIdxs = nil
|
||||||
|
}
|
@ -123,23 +123,23 @@ var file_rpc_get_account_proto_rawDesc = []byte{
|
|||||||
0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
|
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,
|
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,
|
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,
|
0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x68, 0x0a, 0x11, 0x47, 0x65,
|
||||||
0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
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, 0x04, 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,
|
0x43, 0x92, 0x41, 0x40, 0x0a, 0x30, 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, 0x32, 0x1d, 0x47, 0x65, 0x74, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49,
|
||||||
0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x0c, 0x7b,
|
0x6e, 0x66, 0x6f, 0x20, 0x62, 0x79, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69,
|
||||||
0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x20, 0x7d, 0x22, 0x71, 0x0a, 0x12, 0x47,
|
0x64, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x0c, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22,
|
||||||
0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
0x31, 0x22, 0x20, 0x7d, 0x22, 0x75, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||||
0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
|
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63,
|
||||||
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42,
|
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62,
|
||||||
0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x2f, 0x92,
|
0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x61,
|
||||||
0x41, 0x2c, 0x0a, 0x2a, 0x2a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x13, 0x47,
|
||||||
0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x13, 0x52, 0x65, 0x74, 0x75, 0x72,
|
0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x19,
|
0x73, 0x65, 0x32, 0x17, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20,
|
||||||
0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73,
|
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x19, 0x5a, 0x17, 0x67,
|
||||||
0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62,
|
||||||
0x33,
|
0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
227
bff/pb/rpc_get_account_info.pb.go
Normal file
227
bff/pb/rpc_get_account_info.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_get_account_info.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 GetAccountInfoRequest 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 *GetAccountInfoRequest) Reset() {
|
||||||
|
*x = GetAccountInfoRequest{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_rpc_get_account_info_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetAccountInfoRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetAccountInfoRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetAccountInfoRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_rpc_get_account_info_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 GetAccountInfoRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetAccountInfoRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_rpc_get_account_info_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetAccountInfoRequest) GetAccountId() uint64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.AccountId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetAccountInfoResponse struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
AccountInfo *AccountInfo `protobuf:"bytes,1,opt,name=account_info,json=accountInfo,proto3" json:"account_info,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetAccountInfoResponse) Reset() {
|
||||||
|
*x = GetAccountInfoResponse{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_rpc_get_account_info_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetAccountInfoResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetAccountInfoResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetAccountInfoResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_rpc_get_account_info_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 GetAccountInfoResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetAccountInfoResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_rpc_get_account_info_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetAccountInfoResponse) GetAccountInfo() *AccountInfo {
|
||||||
|
if x != nil {
|
||||||
|
return x.AccountInfo
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_rpc_get_account_info_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_rpc_get_account_info_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x1a, 0x72, 0x70, 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||||
|
0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 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, 0x12, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f,
|
||||||
|
0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 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, 0x57, 0x92,
|
||||||
|
0x41, 0x54, 0x0a, 0x3c, 0x2a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
|
0x49, 0x6e, 0x66, 0x6f, 0x32, 0x1d, 0x47, 0x65, 0x74, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||||
|
0x74, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x62, 0x79, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
|
0x5f, 0x69, 0x64, 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, 0x8a, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x63,
|
||||||
|
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
|
0x65, 0x12, 0x37, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66,
|
||||||
|
0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x63, 0x63,
|
||||||
|
0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x0b, 0x61,
|
||||||
|
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x37, 0x92, 0x41, 0x34, 0x0a,
|
||||||
|
0x32, 0x2a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66,
|
||||||
|
0x6f, 0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x17, 0x52, 0x65, 0x74, 0x75,
|
||||||
|
0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49,
|
||||||
|
0x6e, 0x66, 0x6f, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||||
|
0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_rpc_get_account_info_proto_rawDescOnce sync.Once
|
||||||
|
file_rpc_get_account_info_proto_rawDescData = file_rpc_get_account_info_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_rpc_get_account_info_proto_rawDescGZIP() []byte {
|
||||||
|
file_rpc_get_account_info_proto_rawDescOnce.Do(func() {
|
||||||
|
file_rpc_get_account_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_get_account_info_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_rpc_get_account_info_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_rpc_get_account_info_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
|
var file_rpc_get_account_info_proto_goTypes = []interface{}{
|
||||||
|
(*GetAccountInfoRequest)(nil), // 0: pb.GetAccountInfoRequest
|
||||||
|
(*GetAccountInfoResponse)(nil), // 1: pb.GetAccountInfoResponse
|
||||||
|
(*AccountInfo)(nil), // 2: pb.AccountInfo
|
||||||
|
}
|
||||||
|
var file_rpc_get_account_info_proto_depIdxs = []int32{
|
||||||
|
2, // 0: pb.GetAccountInfoResponse.account_info:type_name -> pb.AccountInfo
|
||||||
|
1, // [1:1] is the sub-list for method output_type
|
||||||
|
1, // [1:1] is the sub-list for method input_type
|
||||||
|
1, // [1:1] is the sub-list for extension type_name
|
||||||
|
1, // [1:1] is the sub-list for extension extendee
|
||||||
|
0, // [0:1] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_rpc_get_account_info_proto_init() }
|
||||||
|
func file_rpc_get_account_info_proto_init() {
|
||||||
|
if File_rpc_get_account_info_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file_account_info_proto_init()
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_rpc_get_account_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*GetAccountInfoRequest); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_rpc_get_account_info_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*GetAccountInfoResponse); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_rpc_get_account_info_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 2,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_rpc_get_account_info_proto_goTypes,
|
||||||
|
DependencyIndexes: file_rpc_get_account_info_proto_depIdxs,
|
||||||
|
MessageInfos: file_rpc_get_account_info_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_rpc_get_account_info_proto = out.File
|
||||||
|
file_rpc_get_account_info_proto_rawDesc = nil
|
||||||
|
file_rpc_get_account_info_proto_goTypes = nil
|
||||||
|
file_rpc_get_account_info_proto_depIdxs = nil
|
||||||
|
}
|
238
bff/pb/rpc_list_account_info.pb.go
Normal file
238
bff/pb/rpc_list_account_info.pb.go
Normal file
@ -0,0 +1,238 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.31.0
|
||||||
|
// protoc v4.24.4
|
||||||
|
// source: rpc_list_account_info.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 ListAccountInfoRequest struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
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 *ListAccountInfoRequest) Reset() {
|
||||||
|
*x = ListAccountInfoRequest{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_rpc_list_account_info_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListAccountInfoRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ListAccountInfoRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ListAccountInfoRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_rpc_list_account_info_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 ListAccountInfoRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ListAccountInfoRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_rpc_list_account_info_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListAccountInfoRequest) GetPageId() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.PageId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListAccountInfoRequest) GetPageSize() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.PageSize
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListAccountInfoResponse struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
AccountInfo []*AccountInfo `protobuf:"bytes,1,rep,name=account_info,json=accountInfo,proto3" json:"account_info,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListAccountInfoResponse) Reset() {
|
||||||
|
*x = ListAccountInfoResponse{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_rpc_list_account_info_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListAccountInfoResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ListAccountInfoResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ListAccountInfoResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_rpc_list_account_info_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 ListAccountInfoResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ListAccountInfoResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_rpc_list_account_info_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListAccountInfoResponse) GetAccountInfo() []*AccountInfo {
|
||||||
|
if x != nil {
|
||||||
|
return x.AccountInfo
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_rpc_list_account_info_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_rpc_list_account_info_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x1b, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||||
|
0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 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, 0x12, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63,
|
||||||
|
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
|
0x12, 0x17, 0x0a, 0x07, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 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, 0x6a, 0x92, 0x41, 0x67, 0x0a, 0x43, 0x2a, 0x0f, 0x4c,
|
||||||
|
0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 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, 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, 0x8c, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||||
|
0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37,
|
||||||
|
0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01,
|
||||||
|
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||||
|
0x74, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f,
|
||||||
|
0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x38, 0x92, 0x41, 0x35, 0x0a, 0x33, 0x2a, 0x18,
|
||||||
|
0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x20,
|
||||||
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x17, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e,
|
||||||
|
0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66,
|
||||||
|
0x6f, 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_account_info_proto_rawDescOnce sync.Once
|
||||||
|
file_rpc_list_account_info_proto_rawDescData = file_rpc_list_account_info_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_rpc_list_account_info_proto_rawDescGZIP() []byte {
|
||||||
|
file_rpc_list_account_info_proto_rawDescOnce.Do(func() {
|
||||||
|
file_rpc_list_account_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_list_account_info_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_rpc_list_account_info_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_rpc_list_account_info_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
|
var file_rpc_list_account_info_proto_goTypes = []interface{}{
|
||||||
|
(*ListAccountInfoRequest)(nil), // 0: pb.ListAccountInfoRequest
|
||||||
|
(*ListAccountInfoResponse)(nil), // 1: pb.ListAccountInfoResponse
|
||||||
|
(*AccountInfo)(nil), // 2: pb.AccountInfo
|
||||||
|
}
|
||||||
|
var file_rpc_list_account_info_proto_depIdxs = []int32{
|
||||||
|
2, // 0: pb.ListAccountInfoResponse.account_info:type_name -> pb.AccountInfo
|
||||||
|
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_account_info_proto_init() }
|
||||||
|
func file_rpc_list_account_info_proto_init() {
|
||||||
|
if File_rpc_list_account_info_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file_account_info_proto_init()
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_rpc_list_account_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*ListAccountInfoRequest); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_rpc_list_account_info_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*ListAccountInfoResponse); 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_account_info_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 2,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_rpc_list_account_info_proto_goTypes,
|
||||||
|
DependencyIndexes: file_rpc_list_account_info_proto_depIdxs,
|
||||||
|
MessageInfos: file_rpc_list_account_info_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_rpc_list_account_info_proto = out.File
|
||||||
|
file_rpc_list_account_info_proto_rawDesc = nil
|
||||||
|
file_rpc_list_account_info_proto_goTypes = nil
|
||||||
|
file_rpc_list_account_info_proto_depIdxs = nil
|
||||||
|
}
|
@ -10,7 +10,6 @@ import (
|
|||||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
sync "sync"
|
sync "sync"
|
||||||
)
|
)
|
||||||
@ -27,17 +26,9 @@ type UpdateAccountRequest struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
AccountId uint64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
|
||||||
Email *string `protobuf:"bytes,2,opt,name=email,proto3,oneof" json:"email,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"`
|
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"`
|
|
||||||
Lastname *string `protobuf:"bytes,5,opt,name=lastname,proto3,oneof" json:"lastname,omitempty"`
|
|
||||||
Street *string `protobuf:"bytes,6,opt,name=street,proto3,oneof" json:"street,omitempty"`
|
|
||||||
City *string `protobuf:"bytes,7,opt,name=city,proto3,oneof" json:"city,omitempty"`
|
|
||||||
Zip *string `protobuf:"bytes,8,opt,name=zip,proto3,oneof" json:"zip,omitempty"`
|
|
||||||
Country *string `protobuf:"bytes,9,opt,name=country,proto3,oneof" json:"country,omitempty"`
|
|
||||||
Phone *string `protobuf:"bytes,10,opt,name=phone,proto3,oneof" json:"phone,omitempty"`
|
|
||||||
Birthday *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=birthday,proto3,oneof" json:"birthday,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UpdateAccountRequest) Reset() {
|
func (x *UpdateAccountRequest) Reset() {
|
||||||
@ -72,9 +63,9 @@ func (*UpdateAccountRequest) Descriptor() ([]byte, []int) {
|
|||||||
return file_rpc_update_account_proto_rawDescGZIP(), []int{0}
|
return file_rpc_update_account_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UpdateAccountRequest) GetId() uint64 {
|
func (x *UpdateAccountRequest) GetAccountId() uint64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Id
|
return x.AccountId
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -93,62 +84,6 @@ func (x *UpdateAccountRequest) GetPassword() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UpdateAccountRequest) GetFirstname() string {
|
|
||||||
if x != nil && x.Firstname != nil {
|
|
||||||
return *x.Firstname
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UpdateAccountRequest) GetLastname() string {
|
|
||||||
if x != nil && x.Lastname != nil {
|
|
||||||
return *x.Lastname
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UpdateAccountRequest) GetStreet() string {
|
|
||||||
if x != nil && x.Street != nil {
|
|
||||||
return *x.Street
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UpdateAccountRequest) GetCity() string {
|
|
||||||
if x != nil && x.City != nil {
|
|
||||||
return *x.City
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UpdateAccountRequest) GetZip() string {
|
|
||||||
if x != nil && x.Zip != nil {
|
|
||||||
return *x.Zip
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UpdateAccountRequest) GetCountry() string {
|
|
||||||
if x != nil && x.Country != nil {
|
|
||||||
return *x.Country
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UpdateAccountRequest) GetPhone() string {
|
|
||||||
if x != nil && x.Phone != nil {
|
|
||||||
return *x.Phone
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UpdateAccountRequest) GetBirthday() *timestamppb.Timestamp {
|
|
||||||
if x != nil {
|
|
||||||
return x.Birthday
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type UpdateAccountResponse struct {
|
type UpdateAccountResponse struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -200,60 +135,37 @@ var File_rpc_update_account_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
var file_rpc_update_account_proto_rawDesc = []byte{
|
var file_rpc_update_account_proto_rawDesc = []byte{
|
||||||
0x0a, 0x18, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63,
|
0x0a, 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, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1f,
|
0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e,
|
||||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61,
|
||||||
0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e,
|
||||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e,
|
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d,
|
||||||
0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e,
|
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfb, 0x01,
|
||||||
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
|
||||||
0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xce,
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||||
0x04, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f,
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02,
|
||||||
0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
|
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x88,
|
0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01,
|
||||||
0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03,
|
0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x88, 0x01,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
|
0x01, 0x3a, 0x71, 0x92, 0x41, 0x6e, 0x0a, 0x36, 0x2a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||||
0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65,
|
0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e,
|
0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0xd2, 0x01, 0x05, 0x65, 0x6d,
|
||||||
0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61,
|
0x61, 0x69, 0x6c, 0xd2, 0x01, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x32, 0x34,
|
||||||
0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74,
|
0x7b, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22,
|
||||||
0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x65, 0x65,
|
0x31, 0x22, 0x2c, 0x20, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x3a, 0x20, 0x22, 0x6a, 0x6f,
|
||||||
0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x06, 0x73, 0x74, 0x72, 0x65, 0x65,
|
0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
|
||||||
0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01,
|
0x6f, 0x6d, 0x22, 0x7d, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0x0b,
|
||||||
0x28, 0x09, 0x48, 0x05, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a,
|
0x0a, 0x09, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x78, 0x0a, 0x15, 0x55,
|
||||||
0x03, 0x7a, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x03, 0x7a, 0x69,
|
0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x70, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18,
|
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
|
||||||
0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x07, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79,
|
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||||
0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x0a, 0x20, 0x01,
|
0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
0x28, 0x09, 0x48, 0x08, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x12, 0x58,
|
0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64,
|
||||||
0x0a, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b,
|
0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x1b, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e,
|
||||||
0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x20, 0x41, 0x63,
|
||||||
0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41,
|
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
||||||
0x18, 0x4a, 0x16, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30,
|
0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62,
|
||||||
0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x48, 0x09, 0x52, 0x08, 0x62, 0x69, 0x72,
|
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x74, 0x68, 0x64, 0x61, 0x79, 0x88, 0x01, 0x01, 0x3a, 0x54, 0x92, 0x41, 0x51, 0x0a, 0x28, 0x2a,
|
|
||||||
0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32,
|
|
||||||
0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
|
||||||
0x6e, 0x74, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x25, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20,
|
|
||||||
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 (
|
var (
|
||||||
@ -272,17 +184,15 @@ var file_rpc_update_account_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|||||||
var file_rpc_update_account_proto_goTypes = []interface{}{
|
var file_rpc_update_account_proto_goTypes = []interface{}{
|
||||||
(*UpdateAccountRequest)(nil), // 0: pb.UpdateAccountRequest
|
(*UpdateAccountRequest)(nil), // 0: pb.UpdateAccountRequest
|
||||||
(*UpdateAccountResponse)(nil), // 1: pb.UpdateAccountResponse
|
(*UpdateAccountResponse)(nil), // 1: pb.UpdateAccountResponse
|
||||||
(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
|
(*Account)(nil), // 2: pb.Account
|
||||||
(*Account)(nil), // 3: pb.Account
|
|
||||||
}
|
}
|
||||||
var file_rpc_update_account_proto_depIdxs = []int32{
|
var file_rpc_update_account_proto_depIdxs = []int32{
|
||||||
2, // 0: pb.UpdateAccountRequest.birthday:type_name -> google.protobuf.Timestamp
|
2, // 0: pb.UpdateAccountResponse.account:type_name -> pb.Account
|
||||||
3, // 1: pb.UpdateAccountResponse.account:type_name -> pb.Account
|
1, // [1:1] is the sub-list for method output_type
|
||||||
2, // [2:2] is the sub-list for method output_type
|
1, // [1:1] is the sub-list for method input_type
|
||||||
2, // [2:2] is the sub-list for method input_type
|
1, // [1:1] is the sub-list for extension type_name
|
||||||
2, // [2:2] is the sub-list for extension type_name
|
1, // [1:1] is the sub-list for extension extendee
|
||||||
2, // [2:2] is the sub-list for extension extendee
|
0, // [0:1] is the sub-list for field type_name
|
||||||
0, // [0:2] is the sub-list for field type_name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_rpc_update_account_proto_init() }
|
func init() { file_rpc_update_account_proto_init() }
|
||||||
|
322
bff/pb/rpc_update_account_info.pb.go
Normal file
322
bff/pb/rpc_update_account_info.pb.go
Normal file
@ -0,0 +1,322 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.31.0
|
||||||
|
// protoc v4.24.4
|
||||||
|
// source: rpc_update_account_info.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 UpdateAccountInfoRequest 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"`
|
||||||
|
Firstname *string `protobuf:"bytes,4,opt,name=firstname,proto3,oneof" json:"firstname,omitempty"`
|
||||||
|
Lastname *string `protobuf:"bytes,5,opt,name=lastname,proto3,oneof" json:"lastname,omitempty"`
|
||||||
|
Street *string `protobuf:"bytes,6,opt,name=street,proto3,oneof" json:"street,omitempty"`
|
||||||
|
City *string `protobuf:"bytes,7,opt,name=city,proto3,oneof" json:"city,omitempty"`
|
||||||
|
Zip *string `protobuf:"bytes,8,opt,name=zip,proto3,oneof" json:"zip,omitempty"`
|
||||||
|
Country *string `protobuf:"bytes,9,opt,name=country,proto3,oneof" json:"country,omitempty"`
|
||||||
|
Phone *string `protobuf:"bytes,10,opt,name=phone,proto3,oneof" json:"phone,omitempty"`
|
||||||
|
Birthday *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=birthday,proto3,oneof" json:"birthday,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoRequest) Reset() {
|
||||||
|
*x = UpdateAccountInfoRequest{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_rpc_update_account_info_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpdateAccountInfoRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_rpc_update_account_info_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 UpdateAccountInfoRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*UpdateAccountInfoRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_rpc_update_account_info_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoRequest) GetAccountId() uint64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.AccountId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoRequest) GetFirstname() string {
|
||||||
|
if x != nil && x.Firstname != nil {
|
||||||
|
return *x.Firstname
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoRequest) GetLastname() string {
|
||||||
|
if x != nil && x.Lastname != nil {
|
||||||
|
return *x.Lastname
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoRequest) GetStreet() string {
|
||||||
|
if x != nil && x.Street != nil {
|
||||||
|
return *x.Street
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoRequest) GetCity() string {
|
||||||
|
if x != nil && x.City != nil {
|
||||||
|
return *x.City
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoRequest) GetZip() string {
|
||||||
|
if x != nil && x.Zip != nil {
|
||||||
|
return *x.Zip
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoRequest) GetCountry() string {
|
||||||
|
if x != nil && x.Country != nil {
|
||||||
|
return *x.Country
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoRequest) GetPhone() string {
|
||||||
|
if x != nil && x.Phone != nil {
|
||||||
|
return *x.Phone
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoRequest) GetBirthday() *timestamppb.Timestamp {
|
||||||
|
if x != nil {
|
||||||
|
return x.Birthday
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type UpdateAccountInfoResponse struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
AccountInfo *AccountInfo `protobuf:"bytes,1,opt,name=account_info,json=accountInfo,proto3" json:"account_info,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoResponse) Reset() {
|
||||||
|
*x = UpdateAccountInfoResponse{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_rpc_update_account_info_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpdateAccountInfoResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_rpc_update_account_info_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 UpdateAccountInfoResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*UpdateAccountInfoResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_rpc_update_account_info_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UpdateAccountInfoResponse) GetAccountInfo() *AccountInfo {
|
||||||
|
if x != nil {
|
||||||
|
return x.AccountInfo
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_rpc_update_account_info_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_rpc_update_account_info_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x1d, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63,
|
||||||
|
0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 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, 0x12, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e,
|
||||||
|
0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9e, 0x04, 0x0a, 0x18, 0x55, 0x70, 0x64,
|
||||||
|
0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 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, 0x21, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d,
|
||||||
|
0x65, 0x18, 0x04, 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, 0x05, 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, 0x06, 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, 0x07, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x15,
|
||||||
|
0x0a, 0x03, 0x7a, 0x69, 0x70, 0x18, 0x08, 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, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72,
|
||||||
|
0x79, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x0a, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x12,
|
||||||
|
0x58, 0x0a, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28,
|
||||||
|
0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
|
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 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, 0x07, 0x52, 0x08, 0x62, 0x69,
|
||||||
|
0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x88, 0x01, 0x01, 0x3a, 0x64, 0x92, 0x41, 0x61, 0x0a, 0x30,
|
||||||
|
0x2a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
|
0x49, 0x6e, 0x66, 0x6f, 0x32, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20,
|
||||||
|
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0xd2, 0x01, 0x02, 0x69, 0x64,
|
||||||
|
0x32, 0x2d, 0x7b, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 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,
|
||||||
|
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, 0x89, 0x01, 0x0a, 0x19, 0x55, 0x70,
|
||||||
|
0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||||
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||||
|
0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
|
||||||
|
0x70, 0x62, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x03,
|
||||||
|
0x92, 0x41, 0x00, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f,
|
||||||
|
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 (
|
||||||
|
file_rpc_update_account_info_proto_rawDescOnce sync.Once
|
||||||
|
file_rpc_update_account_info_proto_rawDescData = file_rpc_update_account_info_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_rpc_update_account_info_proto_rawDescGZIP() []byte {
|
||||||
|
file_rpc_update_account_info_proto_rawDescOnce.Do(func() {
|
||||||
|
file_rpc_update_account_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_update_account_info_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_rpc_update_account_info_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_rpc_update_account_info_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
|
var file_rpc_update_account_info_proto_goTypes = []interface{}{
|
||||||
|
(*UpdateAccountInfoRequest)(nil), // 0: pb.UpdateAccountInfoRequest
|
||||||
|
(*UpdateAccountInfoResponse)(nil), // 1: pb.UpdateAccountInfoResponse
|
||||||
|
(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
|
||||||
|
(*AccountInfo)(nil), // 3: pb.AccountInfo
|
||||||
|
}
|
||||||
|
var file_rpc_update_account_info_proto_depIdxs = []int32{
|
||||||
|
2, // 0: pb.UpdateAccountInfoRequest.birthday:type_name -> google.protobuf.Timestamp
|
||||||
|
3, // 1: pb.UpdateAccountInfoResponse.account_info:type_name -> pb.AccountInfo
|
||||||
|
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_account_info_proto_init() }
|
||||||
|
func file_rpc_update_account_info_proto_init() {
|
||||||
|
if File_rpc_update_account_info_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file_account_info_proto_init()
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_rpc_update_account_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*UpdateAccountInfoRequest); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_rpc_update_account_info_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*UpdateAccountInfoResponse); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_rpc_update_account_info_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_rpc_update_account_info_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 2,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_rpc_update_account_info_proto_goTypes,
|
||||||
|
DependencyIndexes: file_rpc_update_account_info_proto_depIdxs,
|
||||||
|
MessageInfos: file_rpc_update_account_info_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_rpc_update_account_info_proto = out.File
|
||||||
|
file_rpc_update_account_info_proto_rawDesc = nil
|
||||||
|
file_rpc_update_account_info_proto_goTypes = nil
|
||||||
|
file_rpc_update_account_info_proto_depIdxs = nil
|
||||||
|
}
|
@ -26,7 +26,7 @@ type UpdateAccountPrivacyRequest struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
AccountId uint64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
|
||||||
PrivacyAccepted bool `protobuf:"varint,2,opt,name=privacy_accepted,json=privacyAccepted,proto3" json:"privacy_accepted,omitempty"`
|
PrivacyAccepted bool `protobuf:"varint,2,opt,name=privacy_accepted,json=privacyAccepted,proto3" json:"privacy_accepted,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,9 +62,9 @@ func (*UpdateAccountPrivacyRequest) Descriptor() ([]byte, []int) {
|
|||||||
return file_rpc_update_account_privacy_proto_rawDescGZIP(), []int{0}
|
return file_rpc_update_account_privacy_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UpdateAccountPrivacyRequest) GetId() uint64 {
|
func (x *UpdateAccountPrivacyRequest) GetAccountId() uint64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Id
|
return x.AccountId
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -81,7 +81,7 @@ type UpdateAccountPrivacyResponse struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
|
AccountInfo *AccountInfo `protobuf:"bytes,1,opt,name=account_info,json=accountInfo,proto3" json:"account_info,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UpdateAccountPrivacyResponse) Reset() {
|
func (x *UpdateAccountPrivacyResponse) Reset() {
|
||||||
@ -116,9 +116,9 @@ func (*UpdateAccountPrivacyResponse) Descriptor() ([]byte, []int) {
|
|||||||
return file_rpc_update_account_privacy_proto_rawDescGZIP(), []int{1}
|
return file_rpc_update_account_privacy_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UpdateAccountPrivacyResponse) GetAccount() *Account {
|
func (x *UpdateAccountPrivacyResponse) GetAccountInfo() *AccountInfo {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Account
|
return x.AccountInfo
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -131,35 +131,39 @@ var file_rpc_update_account_privacy_proto_rawDesc = []byte{
|
|||||||
0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67,
|
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,
|
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,
|
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,
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x02, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x02, 0x0a, 0x1b, 0x55,
|
||||||
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x52, 0x65,
|
0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76,
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x61, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x61, 0x63,
|
||||||
0x04, 0x42, 0x0e, 0x92, 0x41, 0x0b, 0x4a, 0x01, 0x31, 0xa2, 0x02, 0x05, 0x69, 0x6e, 0x74, 0x36,
|
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0e,
|
||||||
0x34, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79,
|
0x92, 0x41, 0x0b, 0x4a, 0x01, 0x31, 0xa2, 0x02, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x09,
|
||||||
0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42,
|
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x10, 0x70, 0x72, 0x69,
|
||||||
0x0a, 0x92, 0x41, 0x07, 0x4a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x70, 0x72, 0x69,
|
0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20,
|
||||||
0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x3a, 0x90, 0x01, 0x92,
|
0x01, 0x28, 0x08, 0x42, 0x0a, 0x92, 0x41, 0x07, 0x4a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52,
|
||||||
0x41, 0x8c, 0x01, 0x0a, 0x62, 0x2a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63,
|
0x0f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64,
|
||||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x43, 0x6f,
|
0x3a, 0xa1, 0x01, 0x92, 0x41, 0x9d, 0x01, 0x0a, 0x6b, 0x2a, 0x23, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||||
0x6e, 0x73, 0x65, 0x6e, 0x74, 0x32, 0x28, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68,
|
0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x50,
|
||||||
0x65, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e,
|
0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x32, 0x2c,
|
||||||
0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0xd2,
|
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61,
|
||||||
0x01, 0x02, 0x69, 0x64, 0xd2, 0x01, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61,
|
0x63, 0x79, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e,
|
||||||
0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x32, 0x26, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20,
|
0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0xd2, 0x01, 0x02, 0x69,
|
||||||
0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63,
|
0x64, 0xd2, 0x01, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65,
|
||||||
0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0x20, 0x7d, 0x22,
|
0x70, 0x74, 0x65, 0x64, 0x32, 0x2e, 0x7b, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f,
|
||||||
0x83, 0x01, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x72, 0x69, 0x76, 0x61,
|
||||||
0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72,
|
||||||
0x12, 0x3b, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x75, 0x65, 0x20, 0x7d, 0x22, 0x99, 0x01, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41,
|
||||||
0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x14,
|
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x52, 0x65, 0x73,
|
||||||
0x92, 0x41, 0x11, 0x2a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x20, 0x41, 0x63, 0x63,
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x26, 0x92,
|
0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62,
|
||||||
0x41, 0x23, 0x0a, 0x21, 0x2a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63,
|
0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x18, 0x92, 0x41,
|
||||||
0x6f, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x52, 0x65, 0x73,
|
0x15, 0x2a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49,
|
||||||
0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62,
|
0x6e, 0x66, 0x6f, 0x3a, 0x2b, 0x92, 0x41, 0x28, 0x0a, 0x26, 0x2a, 0x24, 0x55, 0x70, 0x64, 0x61,
|
||||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x49, 0x6e, 0x66, 0x6f, 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 (
|
var (
|
||||||
@ -178,10 +182,10 @@ var file_rpc_update_account_privacy_proto_msgTypes = make([]protoimpl.MessageInf
|
|||||||
var file_rpc_update_account_privacy_proto_goTypes = []interface{}{
|
var file_rpc_update_account_privacy_proto_goTypes = []interface{}{
|
||||||
(*UpdateAccountPrivacyRequest)(nil), // 0: pb.UpdateAccountPrivacyRequest
|
(*UpdateAccountPrivacyRequest)(nil), // 0: pb.UpdateAccountPrivacyRequest
|
||||||
(*UpdateAccountPrivacyResponse)(nil), // 1: pb.UpdateAccountPrivacyResponse
|
(*UpdateAccountPrivacyResponse)(nil), // 1: pb.UpdateAccountPrivacyResponse
|
||||||
(*Account)(nil), // 2: pb.Account
|
(*AccountInfo)(nil), // 2: pb.AccountInfo
|
||||||
}
|
}
|
||||||
var file_rpc_update_account_privacy_proto_depIdxs = []int32{
|
var file_rpc_update_account_privacy_proto_depIdxs = []int32{
|
||||||
2, // 0: pb.UpdateAccountPrivacyResponse.account:type_name -> pb.Account
|
2, // 0: pb.UpdateAccountPrivacyResponse.account_info:type_name -> pb.AccountInfo
|
||||||
1, // [1:1] is the sub-list for method output_type
|
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 method input_type
|
||||||
1, // [1:1] is the sub-list for extension type_name
|
1, // [1:1] is the sub-list for extension type_name
|
||||||
@ -194,7 +198,7 @@ func file_rpc_update_account_privacy_proto_init() {
|
|||||||
if File_rpc_update_account_privacy_proto != nil {
|
if File_rpc_update_account_privacy_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_account_proto_init()
|
file_account_info_proto_init()
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_rpc_update_account_privacy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_rpc_update_account_privacy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*UpdateAccountPrivacyRequest); i {
|
switch v := v.(*UpdateAccountPrivacyRequest); i {
|
||||||
|
229
bff/pb/rpc_verify_email.pb.go
Normal file
229
bff/pb/rpc_verify_email.pb.go
Normal file
@ -0,0 +1,229 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.31.0
|
||||||
|
// protoc v4.24.4
|
||||||
|
// source: rpc_verify_email.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 VerifyEmailRequest 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"`
|
||||||
|
SecretKey string `protobuf:"bytes,2,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VerifyEmailRequest) Reset() {
|
||||||
|
*x = VerifyEmailRequest{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_rpc_verify_email_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VerifyEmailRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*VerifyEmailRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *VerifyEmailRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_rpc_verify_email_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 VerifyEmailRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*VerifyEmailRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_rpc_verify_email_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VerifyEmailRequest) GetAccountId() uint64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.AccountId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VerifyEmailRequest) GetSecretKey() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.SecretKey
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type VerifyEmailResponse struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Verified bool `protobuf:"varint,1,opt,name=verified,proto3" json:"verified,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VerifyEmailResponse) Reset() {
|
||||||
|
*x = VerifyEmailResponse{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_rpc_verify_email_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VerifyEmailResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*VerifyEmailResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *VerifyEmailResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_rpc_verify_email_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 VerifyEmailResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*VerifyEmailResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_rpc_verify_email_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VerifyEmailResponse) GetVerified() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Verified
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_rpc_verify_email_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_rpc_verify_email_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x16, 0x72, 0x70, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x65, 0x6d, 0x61,
|
||||||
|
0x69, 0x6c, 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, 0xb0, 0x01, 0x0a,
|
||||||
|
0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 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, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79,
|
||||||
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65,
|
||||||
|
0x79, 0x3a, 0x5c, 0x92, 0x41, 0x59, 0x0a, 0x27, 0x2a, 0x0b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79,
|
||||||
|
0x45, 0x6d, 0x61, 0x69, 0x6c, 0xd2, 0x01, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f,
|
||||||
|
0x69, 0x64, 0xd2, 0x01, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x32,
|
||||||
|
0x2e, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x65,
|
||||||
|
0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x74, 0x68, 0x69, 0x73,
|
||||||
|
0x69, 0x73, 0x61, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x6b, 0x65, 0x79, 0x22, 0x20, 0x7d, 0x22,
|
||||||
|
0x53, 0x0a, 0x13, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65,
|
||||||
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69,
|
||||||
|
0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x08, 0x76,
|
||||||
|
0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a, 0x1b, 0x92, 0x41, 0x18, 0x0a, 0x16, 0x2a, 0x14,
|
||||||
|
0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 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_verify_email_proto_rawDescOnce sync.Once
|
||||||
|
file_rpc_verify_email_proto_rawDescData = file_rpc_verify_email_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_rpc_verify_email_proto_rawDescGZIP() []byte {
|
||||||
|
file_rpc_verify_email_proto_rawDescOnce.Do(func() {
|
||||||
|
file_rpc_verify_email_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpc_verify_email_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_rpc_verify_email_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_rpc_verify_email_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
|
var file_rpc_verify_email_proto_goTypes = []interface{}{
|
||||||
|
(*VerifyEmailRequest)(nil), // 0: pb.VerifyEmailRequest
|
||||||
|
(*VerifyEmailResponse)(nil), // 1: pb.VerifyEmailResponse
|
||||||
|
}
|
||||||
|
var file_rpc_verify_email_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_verify_email_proto_init() }
|
||||||
|
func file_rpc_verify_email_proto_init() {
|
||||||
|
if File_rpc_verify_email_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_rpc_verify_email_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*VerifyEmailRequest); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_rpc_verify_email_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*VerifyEmailResponse); 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_verify_email_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 2,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_rpc_verify_email_proto_goTypes,
|
||||||
|
DependencyIndexes: file_rpc_verify_email_proto_depIdxs,
|
||||||
|
MessageInfos: file_rpc_verify_email_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_rpc_verify_email_proto = out.File
|
||||||
|
file_rpc_verify_email_proto_rawDesc = nil
|
||||||
|
file_rpc_verify_email_proto_goTypes = nil
|
||||||
|
file_rpc_verify_email_proto_depIdxs = nil
|
||||||
|
}
|
@ -54,245 +54,308 @@ var file_service_df_proto_rawDesc = []byte{
|
|||||||
0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
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,
|
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,
|
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,
|
0x6f, 0x1a, 0x1d, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63,
|
||||||
0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x73,
|
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63,
|
0x1a, 0x1a, 0x72, 0x70, 0x63, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||||
0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70,
|
0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x72, 0x70,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f,
|
0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69,
|
||||||
0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x72,
|
0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x72, 0x70, 0x63, 0x5f, 0x75,
|
||||||
0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x5f,
|
0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e,
|
||||||
0x6c, 0x6f, 0x67, 0x5f, 0x62, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64,
|
0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x6f,
|
||||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x6c, 0x6f,
|
0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x6c,
|
||||||
0x61, 0x64, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f,
|
||||||
0x6f, 0x1a, 0x19, 0x72, 0x70, 0x63, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x64, 0x6f,
|
0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f,
|
||||||
0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xf0, 0x1a, 0x0a,
|
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63,
|
||||||
0x02, 0x64, 0x66, 0x12, 0x42, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x2e, 0x70,
|
0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70,
|
||||||
0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11,
|
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x72,
|
||||||
0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x62, 0x79, 0x5f, 0x70, 0x65,
|
||||||
0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x3a, 0x01, 0x2a, 0x22, 0x09, 0x2f, 0x76,
|
0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x72,
|
||||||
0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x68, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65,
|
0x70, 0x63, 0x5f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65,
|
||||||
0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66,
|
0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x72, 0x70, 0x63, 0x5f, 0x64, 0x65,
|
||||||
0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
0x6c, 0x65, 0x74, 0x65, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72,
|
||||||
0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b,
|
0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x72, 0x70, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f,
|
||||||
0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93,
|
0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xc8, 0x21, 0x0a, 0x02,
|
||||||
0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69,
|
0x64, 0x66, 0x12, 0x42, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x2e, 0x70, 0x62,
|
||||||
0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65,
|
0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e,
|
||||||
0x6e, 0x12, 0xa4, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,
|
0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
0x6e, 0x73, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73,
|
0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x3a, 0x01, 0x2a, 0x22, 0x09, 0x2f, 0x76, 0x31,
|
||||||
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62,
|
0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x68, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73,
|
||||||
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73,
|
0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x72,
|
||||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x61, 0x92, 0x41, 0x2f, 0x12, 0x1b, 0x4c, 0x69, 0x73, 0x74,
|
0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||||
0x20, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x62, 0x79, 0x20, 0x61, 0x63, 0x63,
|
0x18, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65,
|
||||||
0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61,
|
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||||
0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12,
|
0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f,
|
||||||
0x27, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x69,
|
0x6e, 0x73, 0x2f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
|
||||||
0x73, 0x74, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63,
|
0x12, 0xa4, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
||||||
0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x0c, 0x42, 0x6c, 0x6f,
|
0x73, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69,
|
||||||
0x63, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x42,
|
0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e,
|
||||||
0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73,
|
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x61, 0x92, 0x41, 0x2f, 0x12, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x20,
|
||||||
0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x92, 0x41,
|
0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x62, 0x79, 0x20, 0x61, 0x63, 0x63, 0x6f,
|
||||||
0x27, 0x12, 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72,
|
||||||
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, 0x29, 0x12, 0x27,
|
||||||
0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01,
|
0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x69, 0x73,
|
||||||
0x2a, 0x32, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
|
0x74, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f,
|
||||||
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x92, 0x01,
|
0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63,
|
||||||
0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x15, 0x2e, 0x70,
|
0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c,
|
||||||
0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75,
|
0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f,
|
0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73,
|
||||||
0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x55, 0x92, 0x41, 0x2d,
|
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x92, 0x41, 0x27,
|
||||||
0x12, 0x19, 0x47, 0x65, 0x74, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x62, 0x79,
|
0x12, 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20,
|
||||||
0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x62, 0x10, 0x0a, 0x0e, 0x0a,
|
0x62, 0x79, 0x20, 0x49, 0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65,
|
||||||
0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4,
|
0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a,
|
||||||
0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
0x32, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x62,
|
||||||
0x73, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x7b, 0x69,
|
0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x92, 0x01, 0x0a,
|
||||||
0x64, 0x7d, 0x12, 0x96, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x15, 0x2e, 0x70, 0x62,
|
||||||
0x6e, 0x74, 0x73, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63,
|
0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||||
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70,
|
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||||
0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65,
|
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x55, 0x92, 0x41, 0x2d, 0x12,
|
||||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x92, 0x41, 0x2e, 0x12, 0x1a, 0x4c, 0x69, 0x73,
|
0x19, 0x47, 0x65, 0x74, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x62, 0x79, 0x20,
|
||||||
0x74, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x20, 0x5b, 0x61, 0x64, 0x6d, 0x69,
|
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a,
|
||||||
0x6e, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x5d, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61,
|
0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93,
|
||||||
0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12,
|
0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
|
||||||
0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x6c, 0x69,
|
0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x7b, 0x69, 0x64,
|
||||||
0x73, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x7f, 0x0a, 0x0d, 0x43,
|
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, 0x83, 0x01, 0x0a, 0x0d, 0x43,
|
||||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70,
|
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,
|
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,
|
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,
|
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,
|
0x65, 0x22, 0x3d, 0x92, 0x41, 0x14, 0x12, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x41,
|
||||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22,
|
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20,
|
||||||
0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x72,
|
0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x91, 0x01, 0x0a,
|
0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18,
|
0x12, 0x91, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||||
0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63,
|
||||||
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70,
|
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70,
|
||||||
0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
|
||||||
0x6e, 0x73, 0x65, 0x22, 0x4b, 0x92, 0x41, 0x22, 0x12, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x92, 0x41, 0x22, 0x12, 0x0e, 0x55, 0x70,
|
||||||
0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65,
|
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, 0xaf, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f,
|
||||||
|
0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74,
|
||||||
|
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||||
|
0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||||
|
0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66,
|
||||||
|
0x92, 0x41, 0x31, 0x12, 0x1d, 0x47, 0x65, 0x74, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
|
0x49, 0x6e, 0x66, 0x6f, 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, 0x2c, 0x12, 0x2a, 0x2f, 0x76, 0x31, 0x2f,
|
||||||
|
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63,
|
||||||
|
0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||||
|
0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xa7, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x41,
|
||||||
|
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e,
|
||||||
|
0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||||
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
||||||
|
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
|
0x6e, 0x73, 0x65, 0x22, 0x5b, 0x92, 0x41, 0x32, 0x12, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x41,
|
||||||
|
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 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, 0x20,
|
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,
|
0x12, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x6c,
|
||||||
0x73, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
0x69, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
|
||||||
0x12, 0xbf, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
0x12, 0xa6, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||||
0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x55,
|
0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61,
|
||||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76,
|
0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71,
|
||||||
0x61, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e,
|
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69,
|
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
0x76, 0x61, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x64, 0x92, 0x41,
|
0x6e, 0x73, 0x65, 0x22, 0x54, 0x92, 0x41, 0x26, 0x12, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||||
0x33, 0x12, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x62, 0x10, 0x0a, 0x0e,
|
||||||
0x74, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
|
0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3,
|
||||||
0x67, 0x73, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75,
|
0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63,
|
||||||
0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x32, 0x23, 0x2f,
|
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63,
|
||||||
0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x70, 0x64, 0x61,
|
0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0xa6, 0x01, 0x0a, 0x11, 0x55, 0x70,
|
||||||
0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61,
|
0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
||||||
0x63, 0x79, 0x12, 0x8b, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72,
|
0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||||
0x73, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50,
|
0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e,
|
||||||
|
0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
|
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x54, 0x92, 0x41,
|
||||||
|
0x26, 0x12, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||||
|
0x74, 0x49, 0x6e, 0x66, 0x6f, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65,
|
||||||
|
0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a,
|
||||||
|
0x32, 0x20, 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, 0x69, 0x6e,
|
||||||
|
0x66, 0x6f, 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, 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,
|
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,
|
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, 0x43, 0x72, 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,
|
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,
|
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,
|
0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x32, 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,
|
0x6e, 0x73, 0x2f, 0x75, 0x70, 0x64, 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,
|
0x12, 0x84, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x14,
|
||||||
0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72,
|
0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71,
|
||||||
0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e,
|
0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72,
|
||||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0x92, 0x41, 0x24,
|
||||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x92, 0x41, 0x21, 0x12, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74,
|
0x12, 0x10, 0x47, 0x65, 0x74, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x20, 0x62, 0x79, 0x20,
|
||||||
0x65, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65,
|
0x49, 0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75,
|
||||||
0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e,
|
0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x76, 0x31, 0x2f,
|
||||||
0x3a, 0x01, 0x2a, 0x32, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73,
|
0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x73,
|
||||||
0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x84,
|
0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65,
|
||||||
0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x14, 0x2e, 0x70,
|
0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65,
|
||||||
0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f,
|
0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x72,
|
||||||
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0x92, 0x41, 0x24, 0x12, 0x10,
|
0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x92, 0x41, 0x27,
|
||||||
0x47, 0x65, 0x74, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44,
|
0x12, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x20,
|
||||||
0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68,
|
0x62, 0x79, 0x20, 0x49, 0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65,
|
||||||
0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65,
|
0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x2a, 0x1e, 0x2f,
|
||||||
0x72, 0x73, 0x6f, 0x6e, 0x73, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
|
0x76, 0x31, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74,
|
||||||
0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
0x65, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9e, 0x01,
|
||||||
0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65,
|
0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x2e,
|
||||||
0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65,
|
||||||
0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f,
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50,
|
||||||
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x92, 0x41, 0x27, 0x12, 0x13,
|
0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e,
|
||||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x20, 0x62, 0x79,
|
0x92, 0x41, 0x2e, 0x12, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e,
|
||||||
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,
|
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,
|
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,
|
0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65, 0x72,
|
||||||
0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
0x73, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
|
||||||
0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d,
|
0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x91,
|
||||||
0x12, 0x91, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65,
|
0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||||
0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61,
|
0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d,
|
||||||
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70,
|
0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e,
|
||||||
0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52,
|
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73,
|
||||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x92, 0x41, 0x22, 0x12, 0x0e, 0x55, 0x70,
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x92, 0x41, 0x22, 0x12, 0x0e, 0x43, 0x72, 0x65, 0x61,
|
||||||
0x64, 0x61, 0x74, 0x65, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x10, 0x0a, 0x0e,
|
0x74, 0x65, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a,
|
||||||
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,
|
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,
|
0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||||
0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,
|
0x6e, 0x74, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||||
0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x1a, 0x07, 0x92, 0x41, 0x04, 0x12, 0x02, 0x64, 0x66, 0x42,
|
0x6e, 0x74, 0x12, 0x8a, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||||
0xb0, 0x01, 0x92, 0x41, 0x93, 0x01, 0x12, 0x44, 0x0a, 0x06, 0x64, 0x66, 0x20, 0x41, 0x50, 0x49,
|
0x74, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||||
0x22, 0x35, 0x0a, 0x06, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x12, 0x1c, 0x68, 0x74, 0x74, 0x70,
|
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65,
|
||||||
0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69,
|
0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x1a, 0x0d, 0x64, 0x65, 0x76, 0x40, 0x69, 0x74,
|
0x22, 0x4d, 0x92, 0x41, 0x25, 0x12, 0x11, 0x47, 0x65, 0x74, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65,
|
||||||
0x73, 0x73, 0x63, 0x62, 0x2e, 0x64, 0x65, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02,
|
0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65,
|
||||||
0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73,
|
0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f,
|
||||||
0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,
|
0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x67,
|
||||||
0x6a, 0x73, 0x6f, 0x6e, 0x5a, 0x23, 0x0a, 0x21, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72,
|
0x65, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12,
|
||||||
0x41, 0x75, 0x74, 0x68, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
|
0x99, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||||
0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75,
|
0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79,
|
||||||
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f,
|
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62,
|
||||||
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
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, 0x12, 0xa2, 0x01, 0x0a, 0x0b, 0x56, 0x65, 0x72,
|
||||||
|
0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x56, 0x65,
|
||||||
|
0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
|
0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x45, 0x6d, 0x61, 0x69,
|
||||||
|
0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x92, 0x41, 0x2d, 0x12, 0x2b,
|
||||||
|
0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x20, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x77, 0x69, 0x74,
|
||||||
|
0x68, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x20, 0x61, 0x6e, 0x64,
|
||||||
|
0x20, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||||
|
0x2c, 0x12, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x65, 0x6d,
|
||||||
|
0x61, 0x69, 0x6c, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d,
|
||||||
|
0x2f, 0x7b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 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{}{
|
var file_service_df_proto_goTypes = []interface{}{
|
||||||
@ -304,42 +367,52 @@ var file_service_df_proto_goTypes = []interface{}{
|
|||||||
(*ListAccountsRequest)(nil), // 5: pb.ListAccountsRequest
|
(*ListAccountsRequest)(nil), // 5: pb.ListAccountsRequest
|
||||||
(*CreateAccountRequest)(nil), // 6: pb.CreateAccountRequest
|
(*CreateAccountRequest)(nil), // 6: pb.CreateAccountRequest
|
||||||
(*UpdateAccountRequest)(nil), // 7: pb.UpdateAccountRequest
|
(*UpdateAccountRequest)(nil), // 7: pb.UpdateAccountRequest
|
||||||
(*UpdateAccountPrivacyRequest)(nil), // 8: pb.UpdateAccountPrivacyRequest
|
(*GetAccountInfoRequest)(nil), // 8: pb.GetAccountInfoRequest
|
||||||
(*CreatePersonRequest)(nil), // 9: pb.CreatePersonRequest
|
(*ListAccountInfoRequest)(nil), // 9: pb.ListAccountInfoRequest
|
||||||
(*UpdatePersonRequest)(nil), // 10: pb.UpdatePersonRequest
|
(*CreateAccountInfoRequest)(nil), // 10: pb.CreateAccountInfoRequest
|
||||||
(*GetPersonRequest)(nil), // 11: pb.GetPersonRequest
|
(*UpdateAccountInfoRequest)(nil), // 11: pb.UpdateAccountInfoRequest
|
||||||
(*DeletePersonRequest)(nil), // 12: pb.DeletePersonRequest
|
(*UpdateAccountPrivacyRequest)(nil), // 12: pb.UpdateAccountPrivacyRequest
|
||||||
(*ListPersonsRequest)(nil), // 13: pb.ListPersonsRequest
|
(*CreatePersonRequest)(nil), // 13: pb.CreatePersonRequest
|
||||||
(*CreatePaymentRequest)(nil), // 14: pb.CreatePaymentRequest
|
(*UpdatePersonRequest)(nil), // 14: pb.UpdatePersonRequest
|
||||||
(*GetPaymentRequest)(nil), // 15: pb.GetPaymentRequest
|
(*GetPersonRequest)(nil), // 15: pb.GetPersonRequest
|
||||||
(*DeletePaymentRequest)(nil), // 16: pb.DeletePaymentRequest
|
(*DeletePersonRequest)(nil), // 16: pb.DeletePersonRequest
|
||||||
(*ListPaymentsRequest)(nil), // 17: pb.ListPaymentsRequest
|
(*ListPersonsRequest)(nil), // 17: pb.ListPersonsRequest
|
||||||
(*UpdatePaymentRequest)(nil), // 18: pb.UpdatePaymentRequest
|
(*CreatePaymentRequest)(nil), // 18: pb.CreatePaymentRequest
|
||||||
(*ListReturnsLogRequest)(nil), // 19: pb.ListReturnsLogRequest
|
(*GetPaymentRequest)(nil), // 19: pb.GetPaymentRequest
|
||||||
(*UploadDocumentRequest)(nil), // 20: pb.UploadDocumentRequest
|
(*DeletePaymentRequest)(nil), // 20: pb.DeletePaymentRequest
|
||||||
(*DeleteDocumentRequest)(nil), // 21: pb.DeleteDocumentRequest
|
(*ListPaymentsRequest)(nil), // 21: pb.ListPaymentsRequest
|
||||||
(*LoginResponse)(nil), // 22: pb.LoginResponse
|
(*UpdatePaymentRequest)(nil), // 22: pb.UpdatePaymentRequest
|
||||||
(*RefreshTokenResponse)(nil), // 23: pb.RefreshTokenResponse
|
(*ListReturnsLogRequest)(nil), // 23: pb.ListReturnsLogRequest
|
||||||
(*ListSessionsResponse)(nil), // 24: pb.ListSessionsResponse
|
(*UploadDocumentRequest)(nil), // 24: pb.UploadDocumentRequest
|
||||||
(*BlockSessionResponse)(nil), // 25: pb.BlockSessionResponse
|
(*DeleteDocumentRequest)(nil), // 25: pb.DeleteDocumentRequest
|
||||||
(*GetAccountResponse)(nil), // 26: pb.GetAccountResponse
|
(*VerifyEmailRequest)(nil), // 26: pb.VerifyEmailRequest
|
||||||
(*ListAccountsResponse)(nil), // 27: pb.ListAccountsResponse
|
(*LoginResponse)(nil), // 27: pb.LoginResponse
|
||||||
(*CreateAccountResponse)(nil), // 28: pb.CreateAccountResponse
|
(*RefreshTokenResponse)(nil), // 28: pb.RefreshTokenResponse
|
||||||
(*UpdateAccountResponse)(nil), // 29: pb.UpdateAccountResponse
|
(*ListSessionsResponse)(nil), // 29: pb.ListSessionsResponse
|
||||||
(*UpdateAccountPrivacyResponse)(nil), // 30: pb.UpdateAccountPrivacyResponse
|
(*BlockSessionResponse)(nil), // 30: pb.BlockSessionResponse
|
||||||
(*CreatePersonResponse)(nil), // 31: pb.CreatePersonResponse
|
(*GetAccountResponse)(nil), // 31: pb.GetAccountResponse
|
||||||
(*UpdatePersonResponse)(nil), // 32: pb.UpdatePersonResponse
|
(*ListAccountsResponse)(nil), // 32: pb.ListAccountsResponse
|
||||||
(*GetPersonResponse)(nil), // 33: pb.GetPersonResponse
|
(*CreateAccountResponse)(nil), // 33: pb.CreateAccountResponse
|
||||||
(*DeletePersonResponse)(nil), // 34: pb.DeletePersonResponse
|
(*UpdateAccountResponse)(nil), // 34: pb.UpdateAccountResponse
|
||||||
(*ListPersonsResponse)(nil), // 35: pb.ListPersonsResponse
|
(*GetAccountInfoResponse)(nil), // 35: pb.GetAccountInfoResponse
|
||||||
(*CreatePaymentResponse)(nil), // 36: pb.CreatePaymentResponse
|
(*ListAccountInfoResponse)(nil), // 36: pb.ListAccountInfoResponse
|
||||||
(*GetPaymentResponse)(nil), // 37: pb.GetPaymentResponse
|
(*CreateAccountInfoResponse)(nil), // 37: pb.CreateAccountInfoResponse
|
||||||
(*DeletePaymentResponse)(nil), // 38: pb.DeletePaymentResponse
|
(*UpdateAccountInfoResponse)(nil), // 38: pb.UpdateAccountInfoResponse
|
||||||
(*ListPaymentsResponse)(nil), // 39: pb.ListPaymentsResponse
|
(*UpdateAccountPrivacyResponse)(nil), // 39: pb.UpdateAccountPrivacyResponse
|
||||||
(*UpdatePaymentResponse)(nil), // 40: pb.UpdatePaymentResponse
|
(*CreatePersonResponse)(nil), // 40: pb.CreatePersonResponse
|
||||||
(*ListReturnsLogResponse)(nil), // 41: pb.ListReturnsLogResponse
|
(*UpdatePersonResponse)(nil), // 41: pb.UpdatePersonResponse
|
||||||
(*UploadDocumentResponse)(nil), // 42: pb.UploadDocumentResponse
|
(*GetPersonResponse)(nil), // 42: pb.GetPersonResponse
|
||||||
(*DeleteDocumentResponse)(nil), // 43: pb.DeleteDocumentResponse
|
(*DeletePersonResponse)(nil), // 43: pb.DeletePersonResponse
|
||||||
|
(*ListPersonsResponse)(nil), // 44: pb.ListPersonsResponse
|
||||||
|
(*CreatePaymentResponse)(nil), // 45: pb.CreatePaymentResponse
|
||||||
|
(*GetPaymentResponse)(nil), // 46: pb.GetPaymentResponse
|
||||||
|
(*DeletePaymentResponse)(nil), // 47: pb.DeletePaymentResponse
|
||||||
|
(*ListPaymentsResponse)(nil), // 48: pb.ListPaymentsResponse
|
||||||
|
(*UpdatePaymentResponse)(nil), // 49: pb.UpdatePaymentResponse
|
||||||
|
(*ListReturnsLogResponse)(nil), // 50: pb.ListReturnsLogResponse
|
||||||
|
(*UploadDocumentResponse)(nil), // 51: pb.UploadDocumentResponse
|
||||||
|
(*DeleteDocumentResponse)(nil), // 52: pb.DeleteDocumentResponse
|
||||||
|
(*VerifyEmailResponse)(nil), // 53: pb.VerifyEmailResponse
|
||||||
}
|
}
|
||||||
var file_service_df_proto_depIdxs = []int32{
|
var file_service_df_proto_depIdxs = []int32{
|
||||||
0, // 0: pb.df.Login:input_type -> pb.LoginRequest
|
0, // 0: pb.df.Login:input_type -> pb.LoginRequest
|
||||||
@ -350,44 +423,54 @@ var file_service_df_proto_depIdxs = []int32{
|
|||||||
5, // 5: pb.df.ListAccounts:input_type -> pb.ListAccountsRequest
|
5, // 5: pb.df.ListAccounts:input_type -> pb.ListAccountsRequest
|
||||||
6, // 6: pb.df.CreateAccount:input_type -> pb.CreateAccountRequest
|
6, // 6: pb.df.CreateAccount:input_type -> pb.CreateAccountRequest
|
||||||
7, // 7: pb.df.UpdateAccount:input_type -> pb.UpdateAccountRequest
|
7, // 7: pb.df.UpdateAccount:input_type -> pb.UpdateAccountRequest
|
||||||
8, // 8: pb.df.UpdateAccountPrivacy:input_type -> pb.UpdateAccountPrivacyRequest
|
8, // 8: pb.df.GetAccountInfo:input_type -> pb.GetAccountInfoRequest
|
||||||
9, // 9: pb.df.CreatePerson:input_type -> pb.CreatePersonRequest
|
9, // 9: pb.df.ListAccountInfo:input_type -> pb.ListAccountInfoRequest
|
||||||
10, // 10: pb.df.UpdatePerson:input_type -> pb.UpdatePersonRequest
|
10, // 10: pb.df.CreateAccountInfo:input_type -> pb.CreateAccountInfoRequest
|
||||||
11, // 11: pb.df.GetPerson:input_type -> pb.GetPersonRequest
|
11, // 11: pb.df.UpdateAccountInfo:input_type -> pb.UpdateAccountInfoRequest
|
||||||
12, // 12: pb.df.DeletePerson:input_type -> pb.DeletePersonRequest
|
12, // 12: pb.df.UpdateAccountPrivacy:input_type -> pb.UpdateAccountPrivacyRequest
|
||||||
13, // 13: pb.df.ListPersons:input_type -> pb.ListPersonsRequest
|
13, // 13: pb.df.CreatePerson:input_type -> pb.CreatePersonRequest
|
||||||
14, // 14: pb.df.CreatePayment:input_type -> pb.CreatePaymentRequest
|
14, // 14: pb.df.UpdatePerson:input_type -> pb.UpdatePersonRequest
|
||||||
15, // 15: pb.df.GetPayment:input_type -> pb.GetPaymentRequest
|
15, // 15: pb.df.GetPerson:input_type -> pb.GetPersonRequest
|
||||||
16, // 16: pb.df.DeletePayment:input_type -> pb.DeletePaymentRequest
|
16, // 16: pb.df.DeletePerson:input_type -> pb.DeletePersonRequest
|
||||||
17, // 17: pb.df.ListPayments:input_type -> pb.ListPaymentsRequest
|
17, // 17: pb.df.ListPersons:input_type -> pb.ListPersonsRequest
|
||||||
18, // 18: pb.df.UpdatePayment:input_type -> pb.UpdatePaymentRequest
|
18, // 18: pb.df.CreatePayment:input_type -> pb.CreatePaymentRequest
|
||||||
19, // 19: pb.df.ListReturnsLog:input_type -> pb.ListReturnsLogRequest
|
19, // 19: pb.df.GetPayment:input_type -> pb.GetPaymentRequest
|
||||||
20, // 20: pb.df.UploadDocument:input_type -> pb.UploadDocumentRequest
|
20, // 20: pb.df.DeletePayment:input_type -> pb.DeletePaymentRequest
|
||||||
21, // 21: pb.df.DeleteDocument:input_type -> pb.DeleteDocumentRequest
|
21, // 21: pb.df.ListPayments:input_type -> pb.ListPaymentsRequest
|
||||||
22, // 22: pb.df.Login:output_type -> pb.LoginResponse
|
22, // 22: pb.df.UpdatePayment:input_type -> pb.UpdatePaymentRequest
|
||||||
23, // 23: pb.df.RefreshToken:output_type -> pb.RefreshTokenResponse
|
23, // 23: pb.df.ListReturnsLog:input_type -> pb.ListReturnsLogRequest
|
||||||
24, // 24: pb.df.ListSessions:output_type -> pb.ListSessionsResponse
|
24, // 24: pb.df.UploadDocument:input_type -> pb.UploadDocumentRequest
|
||||||
25, // 25: pb.df.BlockSession:output_type -> pb.BlockSessionResponse
|
25, // 25: pb.df.DeleteDocument:input_type -> pb.DeleteDocumentRequest
|
||||||
26, // 26: pb.df.GetAccount:output_type -> pb.GetAccountResponse
|
26, // 26: pb.df.VerifyEmail:input_type -> pb.VerifyEmailRequest
|
||||||
27, // 27: pb.df.ListAccounts:output_type -> pb.ListAccountsResponse
|
27, // 27: pb.df.Login:output_type -> pb.LoginResponse
|
||||||
28, // 28: pb.df.CreateAccount:output_type -> pb.CreateAccountResponse
|
28, // 28: pb.df.RefreshToken:output_type -> pb.RefreshTokenResponse
|
||||||
29, // 29: pb.df.UpdateAccount:output_type -> pb.UpdateAccountResponse
|
29, // 29: pb.df.ListSessions:output_type -> pb.ListSessionsResponse
|
||||||
30, // 30: pb.df.UpdateAccountPrivacy:output_type -> pb.UpdateAccountPrivacyResponse
|
30, // 30: pb.df.BlockSession:output_type -> pb.BlockSessionResponse
|
||||||
31, // 31: pb.df.CreatePerson:output_type -> pb.CreatePersonResponse
|
31, // 31: pb.df.GetAccount:output_type -> pb.GetAccountResponse
|
||||||
32, // 32: pb.df.UpdatePerson:output_type -> pb.UpdatePersonResponse
|
32, // 32: pb.df.ListAccounts:output_type -> pb.ListAccountsResponse
|
||||||
33, // 33: pb.df.GetPerson:output_type -> pb.GetPersonResponse
|
33, // 33: pb.df.CreateAccount:output_type -> pb.CreateAccountResponse
|
||||||
34, // 34: pb.df.DeletePerson:output_type -> pb.DeletePersonResponse
|
34, // 34: pb.df.UpdateAccount:output_type -> pb.UpdateAccountResponse
|
||||||
35, // 35: pb.df.ListPersons:output_type -> pb.ListPersonsResponse
|
35, // 35: pb.df.GetAccountInfo:output_type -> pb.GetAccountInfoResponse
|
||||||
36, // 36: pb.df.CreatePayment:output_type -> pb.CreatePaymentResponse
|
36, // 36: pb.df.ListAccountInfo:output_type -> pb.ListAccountInfoResponse
|
||||||
37, // 37: pb.df.GetPayment:output_type -> pb.GetPaymentResponse
|
37, // 37: pb.df.CreateAccountInfo:output_type -> pb.CreateAccountInfoResponse
|
||||||
38, // 38: pb.df.DeletePayment:output_type -> pb.DeletePaymentResponse
|
38, // 38: pb.df.UpdateAccountInfo:output_type -> pb.UpdateAccountInfoResponse
|
||||||
39, // 39: pb.df.ListPayments:output_type -> pb.ListPaymentsResponse
|
39, // 39: pb.df.UpdateAccountPrivacy:output_type -> pb.UpdateAccountPrivacyResponse
|
||||||
40, // 40: pb.df.UpdatePayment:output_type -> pb.UpdatePaymentResponse
|
40, // 40: pb.df.CreatePerson:output_type -> pb.CreatePersonResponse
|
||||||
41, // 41: pb.df.ListReturnsLog:output_type -> pb.ListReturnsLogResponse
|
41, // 41: pb.df.UpdatePerson:output_type -> pb.UpdatePersonResponse
|
||||||
42, // 42: pb.df.UploadDocument:output_type -> pb.UploadDocumentResponse
|
42, // 42: pb.df.GetPerson:output_type -> pb.GetPersonResponse
|
||||||
43, // 43: pb.df.DeleteDocument:output_type -> pb.DeleteDocumentResponse
|
43, // 43: pb.df.DeletePerson:output_type -> pb.DeletePersonResponse
|
||||||
22, // [22:44] is the sub-list for method output_type
|
44, // 44: pb.df.ListPersons:output_type -> pb.ListPersonsResponse
|
||||||
0, // [0:22] is the sub-list for method input_type
|
45, // 45: pb.df.CreatePayment:output_type -> pb.CreatePaymentResponse
|
||||||
|
46, // 46: pb.df.GetPayment:output_type -> pb.GetPaymentResponse
|
||||||
|
47, // 47: pb.df.DeletePayment:output_type -> pb.DeletePaymentResponse
|
||||||
|
48, // 48: pb.df.ListPayments:output_type -> pb.ListPaymentsResponse
|
||||||
|
49, // 49: pb.df.UpdatePayment:output_type -> pb.UpdatePaymentResponse
|
||||||
|
50, // 50: pb.df.ListReturnsLog:output_type -> pb.ListReturnsLogResponse
|
||||||
|
51, // 51: pb.df.UploadDocument:output_type -> pb.UploadDocumentResponse
|
||||||
|
52, // 52: pb.df.DeleteDocument:output_type -> pb.DeleteDocumentResponse
|
||||||
|
53, // 53: pb.df.VerifyEmail:output_type -> pb.VerifyEmailResponse
|
||||||
|
27, // [27:54] is the sub-list for method output_type
|
||||||
|
0, // [0:27] 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 type_name
|
||||||
0, // [0:0] is the sub-list for extension extendee
|
0, // [0:0] is the sub-list for extension extendee
|
||||||
0, // [0:0] is the sub-list for field type_name
|
0, // [0:0] is the sub-list for field type_name
|
||||||
@ -413,6 +496,10 @@ func file_service_df_proto_init() {
|
|||||||
file_rpc_list_accounts_proto_init()
|
file_rpc_list_accounts_proto_init()
|
||||||
file_rpc_update_account_proto_init()
|
file_rpc_update_account_proto_init()
|
||||||
file_rpc_update_account_privacy_proto_init()
|
file_rpc_update_account_privacy_proto_init()
|
||||||
|
file_rpc_create_account_info_proto_init()
|
||||||
|
file_rpc_get_account_info_proto_init()
|
||||||
|
file_rpc_list_account_info_proto_init()
|
||||||
|
file_rpc_update_account_info_proto_init()
|
||||||
file_rpc_login_proto_init()
|
file_rpc_login_proto_init()
|
||||||
file_rpc_list_sessions_proto_init()
|
file_rpc_list_sessions_proto_init()
|
||||||
file_rpc_refresh_token_proto_init()
|
file_rpc_refresh_token_proto_init()
|
||||||
@ -420,6 +507,7 @@ func file_service_df_proto_init() {
|
|||||||
file_rpc_list_returns_log_by_person_id_proto_init()
|
file_rpc_list_returns_log_by_person_id_proto_init()
|
||||||
file_rpc_upload_document_proto_init()
|
file_rpc_upload_document_proto_init()
|
||||||
file_rpc_delete_document_proto_init()
|
file_rpc_delete_document_proto_init()
|
||||||
|
file_rpc_verify_email_proto_init()
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@ -341,6 +341,162 @@ func local_request_Df_UpdateAccount_0(ctx context.Context, marshaler runtime.Mar
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func request_Df_GetAccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, client DfClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq GetAccountInfoRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["account_id"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "account_id")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.AccountId, err = runtime.Uint64(val)
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "account_id", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.GetAccountInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Df_GetAccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, server DfServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq GetAccountInfoRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["account_id"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "account_id")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.AccountId, err = runtime.Uint64(val)
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "account_id", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.GetAccountInfo(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
filter_Df_ListAccountInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||||
|
)
|
||||||
|
|
||||||
|
func request_Df_ListAccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, client DfClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq ListAccountInfoRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
if err := req.ParseForm(); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Df_ListAccountInfo_0); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.ListAccountInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Df_ListAccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, server DfServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq ListAccountInfoRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
if err := req.ParseForm(); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Df_ListAccountInfo_0); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.ListAccountInfo(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func request_Df_CreateAccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, client DfClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq CreateAccountInfoRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.CreateAccountInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Df_CreateAccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, server DfServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq CreateAccountInfoRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.CreateAccountInfo(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func request_Df_UpdateAccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, client DfClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq UpdateAccountInfoRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.UpdateAccountInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Df_UpdateAccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, server DfServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq UpdateAccountInfoRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||||
|
if berr != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||||
|
}
|
||||||
|
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.UpdateAccountInfo(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func request_Df_UpdateAccountPrivacy_0(ctx context.Context, marshaler runtime.Marshaler, client DfClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
func request_Df_UpdateAccountPrivacy_0(ctx context.Context, marshaler runtime.Marshaler, client DfClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
var protoReq UpdateAccountPrivacyRequest
|
var protoReq UpdateAccountPrivacyRequest
|
||||||
var metadata runtime.ServerMetadata
|
var metadata runtime.ServerMetadata
|
||||||
@ -961,6 +1117,78 @@ func local_request_Df_DeleteDocument_0(ctx context.Context, marshaler runtime.Ma
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func request_Df_VerifyEmail_0(ctx context.Context, marshaler runtime.Marshaler, client DfClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq VerifyEmailRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["account_id"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "account_id")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.AccountId, err = runtime.Uint64(val)
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "account_id", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
val, ok = pathParams["secret_key"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "secret_key")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.SecretKey, err = runtime.String(val)
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secret_key", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.VerifyEmail(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Df_VerifyEmail_0(ctx context.Context, marshaler runtime.Marshaler, server DfServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq VerifyEmailRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["account_id"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "account_id")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.AccountId, err = runtime.Uint64(val)
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "account_id", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
val, ok = pathParams["secret_key"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "secret_key")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.SecretKey, err = runtime.String(val)
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secret_key", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.VerifyEmail(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// RegisterDfHandlerServer registers the http handlers for service Df to "mux".
|
// RegisterDfHandlerServer registers the http handlers for service Df to "mux".
|
||||||
// UnaryRPC :call DfServer directly.
|
// UnaryRPC :call DfServer directly.
|
||||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||||
@ -1167,6 +1395,106 @@ func RegisterDfHandlerServer(ctx context.Context, mux *runtime.ServeMux, server
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Df_GetAccountInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
var stream runtime.ServerTransportStream
|
||||||
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
var err error
|
||||||
|
var annotatedContext context.Context
|
||||||
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pb.Df/GetAccountInfo", runtime.WithHTTPPathPattern("/v1/accounts/get_account_info/{account_id}"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Df_GetAccountInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||||
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Df_GetAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Df_ListAccountInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
var stream runtime.ServerTransportStream
|
||||||
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
var err error
|
||||||
|
var annotatedContext context.Context
|
||||||
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pb.Df/ListAccountInfo", runtime.WithHTTPPathPattern("/v1/accounts/list_account_info"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Df_ListAccountInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||||
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Df_ListAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("POST", pattern_Df_CreateAccountInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
var stream runtime.ServerTransportStream
|
||||||
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
var err error
|
||||||
|
var annotatedContext context.Context
|
||||||
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pb.Df/CreateAccountInfo", runtime.WithHTTPPathPattern("/v1/accounts/create_account_info"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Df_CreateAccountInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||||
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Df_CreateAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("PATCH", pattern_Df_UpdateAccountInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
var stream runtime.ServerTransportStream
|
||||||
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
var err error
|
||||||
|
var annotatedContext context.Context
|
||||||
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pb.Df/UpdateAccountInfo", runtime.WithHTTPPathPattern("/v1/accounts/update_account_info"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Df_UpdateAccountInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||||
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Df_UpdateAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
mux.Handle("PATCH", pattern_Df_UpdateAccountPrivacy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("PATCH", pattern_Df_UpdateAccountPrivacy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
@ -1517,6 +1845,31 @@ func RegisterDfHandlerServer(ctx context.Context, mux *runtime.ServeMux, server
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Df_VerifyEmail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
var stream runtime.ServerTransportStream
|
||||||
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
var err error
|
||||||
|
var annotatedContext context.Context
|
||||||
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pb.Df/VerifyEmail", runtime.WithHTTPPathPattern("/v1/verify_email/{account_id}/{secret_key}"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Df_VerifyEmail_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||||
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Df_VerifyEmail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1734,6 +2087,94 @@ func RegisterDfHandlerClient(ctx context.Context, mux *runtime.ServeMux, client
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Df_GetAccountInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
var err error
|
||||||
|
var annotatedContext context.Context
|
||||||
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pb.Df/GetAccountInfo", runtime.WithHTTPPathPattern("/v1/accounts/get_account_info/{account_id}"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_Df_GetAccountInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Df_GetAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Df_ListAccountInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
var err error
|
||||||
|
var annotatedContext context.Context
|
||||||
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pb.Df/ListAccountInfo", runtime.WithHTTPPathPattern("/v1/accounts/list_account_info"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_Df_ListAccountInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Df_ListAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("POST", pattern_Df_CreateAccountInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
var err error
|
||||||
|
var annotatedContext context.Context
|
||||||
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pb.Df/CreateAccountInfo", runtime.WithHTTPPathPattern("/v1/accounts/create_account_info"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_Df_CreateAccountInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Df_CreateAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("PATCH", pattern_Df_UpdateAccountInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
var err error
|
||||||
|
var annotatedContext context.Context
|
||||||
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pb.Df/UpdateAccountInfo", runtime.WithHTTPPathPattern("/v1/accounts/update_account_info"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_Df_UpdateAccountInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Df_UpdateAccountInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
mux.Handle("PATCH", pattern_Df_UpdateAccountPrivacy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("PATCH", pattern_Df_UpdateAccountPrivacy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
@ -2042,6 +2483,28 @@ func RegisterDfHandlerClient(ctx context.Context, mux *runtime.ServeMux, client
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Df_VerifyEmail_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
var err error
|
||||||
|
var annotatedContext context.Context
|
||||||
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pb.Df/VerifyEmail", runtime.WithHTTPPathPattern("/v1/verify_email/{account_id}/{secret_key}"))
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_Df_VerifyEmail_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||||
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Df_VerifyEmail_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2062,6 +2525,14 @@ var (
|
|||||||
|
|
||||||
pattern_Df_UpdateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "accounts", "update_account"}, ""))
|
pattern_Df_UpdateAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "accounts", "update_account"}, ""))
|
||||||
|
|
||||||
|
pattern_Df_GetAccountInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "accounts", "get_account_info", "account_id"}, ""))
|
||||||
|
|
||||||
|
pattern_Df_ListAccountInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "accounts", "list_account_info"}, ""))
|
||||||
|
|
||||||
|
pattern_Df_CreateAccountInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "accounts", "create_account_info"}, ""))
|
||||||
|
|
||||||
|
pattern_Df_UpdateAccountInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "accounts", "update_account_info"}, ""))
|
||||||
|
|
||||||
pattern_Df_UpdateAccountPrivacy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "accounts", "update_account_privacy"}, ""))
|
pattern_Df_UpdateAccountPrivacy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "accounts", "update_account_privacy"}, ""))
|
||||||
|
|
||||||
pattern_Df_CreatePerson_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "persons", "create_person"}, ""))
|
pattern_Df_CreatePerson_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "persons", "create_person"}, ""))
|
||||||
@ -2089,6 +2560,8 @@ var (
|
|||||||
pattern_Df_UploadDocument_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"documents", "upload"}, ""))
|
pattern_Df_UploadDocument_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"documents", "upload"}, ""))
|
||||||
|
|
||||||
pattern_Df_DeleteDocument_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "documents", "delete_document", "id"}, ""))
|
pattern_Df_DeleteDocument_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "documents", "delete_document", "id"}, ""))
|
||||||
|
|
||||||
|
pattern_Df_VerifyEmail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "verify_email", "account_id", "secret_key"}, ""))
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -2108,6 +2581,14 @@ var (
|
|||||||
|
|
||||||
forward_Df_UpdateAccount_0 = runtime.ForwardResponseMessage
|
forward_Df_UpdateAccount_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
|
forward_Df_GetAccountInfo_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
|
forward_Df_ListAccountInfo_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
|
forward_Df_CreateAccountInfo_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
|
forward_Df_UpdateAccountInfo_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
forward_Df_UpdateAccountPrivacy_0 = runtime.ForwardResponseMessage
|
forward_Df_UpdateAccountPrivacy_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
forward_Df_CreatePerson_0 = runtime.ForwardResponseMessage
|
forward_Df_CreatePerson_0 = runtime.ForwardResponseMessage
|
||||||
@ -2135,4 +2616,6 @@ var (
|
|||||||
forward_Df_UploadDocument_0 = runtime.ForwardResponseMessage
|
forward_Df_UploadDocument_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
forward_Df_DeleteDocument_0 = runtime.ForwardResponseMessage
|
forward_Df_DeleteDocument_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
|
forward_Df_VerifyEmail_0 = runtime.ForwardResponseMessage
|
||||||
)
|
)
|
||||||
|
@ -27,6 +27,10 @@ const (
|
|||||||
Df_ListAccounts_FullMethodName = "/pb.df/ListAccounts"
|
Df_ListAccounts_FullMethodName = "/pb.df/ListAccounts"
|
||||||
Df_CreateAccount_FullMethodName = "/pb.df/CreateAccount"
|
Df_CreateAccount_FullMethodName = "/pb.df/CreateAccount"
|
||||||
Df_UpdateAccount_FullMethodName = "/pb.df/UpdateAccount"
|
Df_UpdateAccount_FullMethodName = "/pb.df/UpdateAccount"
|
||||||
|
Df_GetAccountInfo_FullMethodName = "/pb.df/GetAccountInfo"
|
||||||
|
Df_ListAccountInfo_FullMethodName = "/pb.df/ListAccountInfo"
|
||||||
|
Df_CreateAccountInfo_FullMethodName = "/pb.df/CreateAccountInfo"
|
||||||
|
Df_UpdateAccountInfo_FullMethodName = "/pb.df/UpdateAccountInfo"
|
||||||
Df_UpdateAccountPrivacy_FullMethodName = "/pb.df/UpdateAccountPrivacy"
|
Df_UpdateAccountPrivacy_FullMethodName = "/pb.df/UpdateAccountPrivacy"
|
||||||
Df_CreatePerson_FullMethodName = "/pb.df/CreatePerson"
|
Df_CreatePerson_FullMethodName = "/pb.df/CreatePerson"
|
||||||
Df_UpdatePerson_FullMethodName = "/pb.df/UpdatePerson"
|
Df_UpdatePerson_FullMethodName = "/pb.df/UpdatePerson"
|
||||||
@ -41,6 +45,7 @@ const (
|
|||||||
Df_ListReturnsLog_FullMethodName = "/pb.df/ListReturnsLog"
|
Df_ListReturnsLog_FullMethodName = "/pb.df/ListReturnsLog"
|
||||||
Df_UploadDocument_FullMethodName = "/pb.df/UploadDocument"
|
Df_UploadDocument_FullMethodName = "/pb.df/UploadDocument"
|
||||||
Df_DeleteDocument_FullMethodName = "/pb.df/DeleteDocument"
|
Df_DeleteDocument_FullMethodName = "/pb.df/DeleteDocument"
|
||||||
|
Df_VerifyEmail_FullMethodName = "/pb.df/VerifyEmail"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DfClient is the client API for Df service.
|
// DfClient is the client API for Df service.
|
||||||
@ -55,6 +60,10 @@ type DfClient interface {
|
|||||||
ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error)
|
ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error)
|
||||||
CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error)
|
CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error)
|
||||||
UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error)
|
UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error)
|
||||||
|
GetAccountInfo(ctx context.Context, in *GetAccountInfoRequest, opts ...grpc.CallOption) (*GetAccountInfoResponse, error)
|
||||||
|
ListAccountInfo(ctx context.Context, in *ListAccountInfoRequest, opts ...grpc.CallOption) (*ListAccountInfoResponse, error)
|
||||||
|
CreateAccountInfo(ctx context.Context, in *CreateAccountInfoRequest, opts ...grpc.CallOption) (*CreateAccountInfoResponse, error)
|
||||||
|
UpdateAccountInfo(ctx context.Context, in *UpdateAccountInfoRequest, opts ...grpc.CallOption) (*UpdateAccountInfoResponse, error)
|
||||||
UpdateAccountPrivacy(ctx context.Context, in *UpdateAccountPrivacyRequest, opts ...grpc.CallOption) (*UpdateAccountPrivacyResponse, error)
|
UpdateAccountPrivacy(ctx context.Context, in *UpdateAccountPrivacyRequest, opts ...grpc.CallOption) (*UpdateAccountPrivacyResponse, error)
|
||||||
CreatePerson(ctx context.Context, in *CreatePersonRequest, opts ...grpc.CallOption) (*CreatePersonResponse, error)
|
CreatePerson(ctx context.Context, in *CreatePersonRequest, opts ...grpc.CallOption) (*CreatePersonResponse, error)
|
||||||
UpdatePerson(ctx context.Context, in *UpdatePersonRequest, opts ...grpc.CallOption) (*UpdatePersonResponse, error)
|
UpdatePerson(ctx context.Context, in *UpdatePersonRequest, opts ...grpc.CallOption) (*UpdatePersonResponse, error)
|
||||||
@ -69,6 +78,7 @@ type DfClient interface {
|
|||||||
ListReturnsLog(ctx context.Context, in *ListReturnsLogRequest, opts ...grpc.CallOption) (*ListReturnsLogResponse, error)
|
ListReturnsLog(ctx context.Context, in *ListReturnsLogRequest, opts ...grpc.CallOption) (*ListReturnsLogResponse, error)
|
||||||
UploadDocument(ctx context.Context, in *UploadDocumentRequest, opts ...grpc.CallOption) (*UploadDocumentResponse, error)
|
UploadDocument(ctx context.Context, in *UploadDocumentRequest, opts ...grpc.CallOption) (*UploadDocumentResponse, error)
|
||||||
DeleteDocument(ctx context.Context, in *DeleteDocumentRequest, opts ...grpc.CallOption) (*DeleteDocumentResponse, error)
|
DeleteDocument(ctx context.Context, in *DeleteDocumentRequest, opts ...grpc.CallOption) (*DeleteDocumentResponse, error)
|
||||||
|
VerifyEmail(ctx context.Context, in *VerifyEmailRequest, opts ...grpc.CallOption) (*VerifyEmailResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type dfClient struct {
|
type dfClient struct {
|
||||||
@ -151,6 +161,42 @@ func (c *dfClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequest,
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *dfClient) GetAccountInfo(ctx context.Context, in *GetAccountInfoRequest, opts ...grpc.CallOption) (*GetAccountInfoResponse, error) {
|
||||||
|
out := new(GetAccountInfoResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Df_GetAccountInfo_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *dfClient) ListAccountInfo(ctx context.Context, in *ListAccountInfoRequest, opts ...grpc.CallOption) (*ListAccountInfoResponse, error) {
|
||||||
|
out := new(ListAccountInfoResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Df_ListAccountInfo_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *dfClient) CreateAccountInfo(ctx context.Context, in *CreateAccountInfoRequest, opts ...grpc.CallOption) (*CreateAccountInfoResponse, error) {
|
||||||
|
out := new(CreateAccountInfoResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Df_CreateAccountInfo_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *dfClient) UpdateAccountInfo(ctx context.Context, in *UpdateAccountInfoRequest, opts ...grpc.CallOption) (*UpdateAccountInfoResponse, error) {
|
||||||
|
out := new(UpdateAccountInfoResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Df_UpdateAccountInfo_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (c *dfClient) UpdateAccountPrivacy(ctx context.Context, in *UpdateAccountPrivacyRequest, opts ...grpc.CallOption) (*UpdateAccountPrivacyResponse, error) {
|
func (c *dfClient) UpdateAccountPrivacy(ctx context.Context, in *UpdateAccountPrivacyRequest, opts ...grpc.CallOption) (*UpdateAccountPrivacyResponse, error) {
|
||||||
out := new(UpdateAccountPrivacyResponse)
|
out := new(UpdateAccountPrivacyResponse)
|
||||||
err := c.cc.Invoke(ctx, Df_UpdateAccountPrivacy_FullMethodName, in, out, opts...)
|
err := c.cc.Invoke(ctx, Df_UpdateAccountPrivacy_FullMethodName, in, out, opts...)
|
||||||
@ -277,6 +323,15 @@ func (c *dfClient) DeleteDocument(ctx context.Context, in *DeleteDocumentRequest
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *dfClient) VerifyEmail(ctx context.Context, in *VerifyEmailRequest, opts ...grpc.CallOption) (*VerifyEmailResponse, error) {
|
||||||
|
out := new(VerifyEmailResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Df_VerifyEmail_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// DfServer is the server API for Df service.
|
// DfServer is the server API for Df service.
|
||||||
// All implementations must embed UnimplementedDfServer
|
// All implementations must embed UnimplementedDfServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
@ -289,6 +344,10 @@ type DfServer interface {
|
|||||||
ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error)
|
ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error)
|
||||||
CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error)
|
CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error)
|
||||||
UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error)
|
UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error)
|
||||||
|
GetAccountInfo(context.Context, *GetAccountInfoRequest) (*GetAccountInfoResponse, error)
|
||||||
|
ListAccountInfo(context.Context, *ListAccountInfoRequest) (*ListAccountInfoResponse, error)
|
||||||
|
CreateAccountInfo(context.Context, *CreateAccountInfoRequest) (*CreateAccountInfoResponse, error)
|
||||||
|
UpdateAccountInfo(context.Context, *UpdateAccountInfoRequest) (*UpdateAccountInfoResponse, error)
|
||||||
UpdateAccountPrivacy(context.Context, *UpdateAccountPrivacyRequest) (*UpdateAccountPrivacyResponse, error)
|
UpdateAccountPrivacy(context.Context, *UpdateAccountPrivacyRequest) (*UpdateAccountPrivacyResponse, error)
|
||||||
CreatePerson(context.Context, *CreatePersonRequest) (*CreatePersonResponse, error)
|
CreatePerson(context.Context, *CreatePersonRequest) (*CreatePersonResponse, error)
|
||||||
UpdatePerson(context.Context, *UpdatePersonRequest) (*UpdatePersonResponse, error)
|
UpdatePerson(context.Context, *UpdatePersonRequest) (*UpdatePersonResponse, error)
|
||||||
@ -303,6 +362,7 @@ type DfServer interface {
|
|||||||
ListReturnsLog(context.Context, *ListReturnsLogRequest) (*ListReturnsLogResponse, error)
|
ListReturnsLog(context.Context, *ListReturnsLogRequest) (*ListReturnsLogResponse, error)
|
||||||
UploadDocument(context.Context, *UploadDocumentRequest) (*UploadDocumentResponse, error)
|
UploadDocument(context.Context, *UploadDocumentRequest) (*UploadDocumentResponse, error)
|
||||||
DeleteDocument(context.Context, *DeleteDocumentRequest) (*DeleteDocumentResponse, error)
|
DeleteDocument(context.Context, *DeleteDocumentRequest) (*DeleteDocumentResponse, error)
|
||||||
|
VerifyEmail(context.Context, *VerifyEmailRequest) (*VerifyEmailResponse, error)
|
||||||
mustEmbedUnimplementedDfServer()
|
mustEmbedUnimplementedDfServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -334,6 +394,18 @@ func (UnimplementedDfServer) CreateAccount(context.Context, *CreateAccountReques
|
|||||||
func (UnimplementedDfServer) UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error) {
|
func (UnimplementedDfServer) UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateAccount not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateAccount not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedDfServer) GetAccountInfo(context.Context, *GetAccountInfoRequest) (*GetAccountInfoResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetAccountInfo not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDfServer) ListAccountInfo(context.Context, *ListAccountInfoRequest) (*ListAccountInfoResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ListAccountInfo not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDfServer) CreateAccountInfo(context.Context, *CreateAccountInfoRequest) (*CreateAccountInfoResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method CreateAccountInfo not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDfServer) UpdateAccountInfo(context.Context, *UpdateAccountInfoRequest) (*UpdateAccountInfoResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateAccountInfo not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedDfServer) UpdateAccountPrivacy(context.Context, *UpdateAccountPrivacyRequest) (*UpdateAccountPrivacyResponse, error) {
|
func (UnimplementedDfServer) UpdateAccountPrivacy(context.Context, *UpdateAccountPrivacyRequest) (*UpdateAccountPrivacyResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateAccountPrivacy not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateAccountPrivacy not implemented")
|
||||||
}
|
}
|
||||||
@ -376,6 +448,9 @@ func (UnimplementedDfServer) UploadDocument(context.Context, *UploadDocumentRequ
|
|||||||
func (UnimplementedDfServer) DeleteDocument(context.Context, *DeleteDocumentRequest) (*DeleteDocumentResponse, error) {
|
func (UnimplementedDfServer) DeleteDocument(context.Context, *DeleteDocumentRequest) (*DeleteDocumentResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteDocument not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteDocument not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedDfServer) VerifyEmail(context.Context, *VerifyEmailRequest) (*VerifyEmailResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method VerifyEmail not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedDfServer) mustEmbedUnimplementedDfServer() {}
|
func (UnimplementedDfServer) mustEmbedUnimplementedDfServer() {}
|
||||||
|
|
||||||
// UnsafeDfServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeDfServer may be embedded to opt out of forward compatibility for this service.
|
||||||
@ -533,6 +608,78 @@ func _Df_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(in
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Df_GetAccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetAccountInfoRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DfServer).GetAccountInfo(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Df_GetAccountInfo_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DfServer).GetAccountInfo(ctx, req.(*GetAccountInfoRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Df_ListAccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ListAccountInfoRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DfServer).ListAccountInfo(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Df_ListAccountInfo_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DfServer).ListAccountInfo(ctx, req.(*ListAccountInfoRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Df_CreateAccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(CreateAccountInfoRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DfServer).CreateAccountInfo(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Df_CreateAccountInfo_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DfServer).CreateAccountInfo(ctx, req.(*CreateAccountInfoRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Df_UpdateAccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UpdateAccountInfoRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DfServer).UpdateAccountInfo(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Df_UpdateAccountInfo_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DfServer).UpdateAccountInfo(ctx, req.(*UpdateAccountInfoRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _Df_UpdateAccountPrivacy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Df_UpdateAccountPrivacy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(UpdateAccountPrivacyRequest)
|
in := new(UpdateAccountPrivacyRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -785,6 +932,24 @@ func _Df_DeleteDocument_Handler(srv interface{}, ctx context.Context, dec func(i
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Df_VerifyEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(VerifyEmailRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DfServer).VerifyEmail(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Df_VerifyEmail_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DfServer).VerifyEmail(ctx, req.(*VerifyEmailRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// Df_ServiceDesc is the grpc.ServiceDesc for Df service.
|
// Df_ServiceDesc is the grpc.ServiceDesc for Df service.
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@ -824,6 +989,22 @@ var Df_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "UpdateAccount",
|
MethodName: "UpdateAccount",
|
||||||
Handler: _Df_UpdateAccount_Handler,
|
Handler: _Df_UpdateAccount_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetAccountInfo",
|
||||||
|
Handler: _Df_GetAccountInfo_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ListAccountInfo",
|
||||||
|
Handler: _Df_ListAccountInfo_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "CreateAccountInfo",
|
||||||
|
Handler: _Df_CreateAccountInfo_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateAccountInfo",
|
||||||
|
Handler: _Df_UpdateAccountInfo_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "UpdateAccountPrivacy",
|
MethodName: "UpdateAccountPrivacy",
|
||||||
Handler: _Df_UpdateAccountPrivacy_Handler,
|
Handler: _Df_UpdateAccountPrivacy_Handler,
|
||||||
@ -880,6 +1061,10 @@ var Df_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "DeleteDocument",
|
MethodName: "DeleteDocument",
|
||||||
Handler: _Df_DeleteDocument_Handler,
|
Handler: _Df_DeleteDocument_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "VerifyEmail",
|
||||||
|
Handler: _Df_VerifyEmail_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "service_df.proto",
|
Metadata: "service_df.proto",
|
||||||
|
@ -16,29 +16,15 @@ message Account {
|
|||||||
};
|
};
|
||||||
uint64 id = 1;
|
uint64 id = 1;
|
||||||
string email = 2;
|
string email = 2;
|
||||||
string firstname = 3;
|
optional string secret_key = 3;
|
||||||
string lastname = 4;
|
google.protobuf.Timestamp email_verified_time = 9 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
string street = 5;
|
example: "\"2023-10-05T00:00:00Z\""
|
||||||
string city = 6;
|
|
||||||
string zip = 7;
|
|
||||||
string country = 8;
|
|
||||||
google.protobuf.Timestamp birthday = 9 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
||||||
example: "\"1990-10-05T00:00:00Z\""
|
|
||||||
}];
|
}];
|
||||||
string phone = 10;
|
bool email_verified = 10;
|
||||||
bool privacy_accepted = 11;
|
|
||||||
google.protobuf.Timestamp privacy_accepted_date = 12 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
google.protobuf.Timestamp privacy_accepted_date = 12 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
example: "\"2023-10-05T00:00:00Z\""
|
example: "\"2023-10-05T00:00:00Z\""
|
||||||
}];
|
}];
|
||||||
int32 permission_level = 13 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
int32 permission_level = 13 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
description: "Default is 0 (non-priviledged)"
|
description: "Default is 0 (non-priviledged)"
|
||||||
}];
|
}];
|
||||||
string creator = 14;
|
|
||||||
google.protobuf.Timestamp created = 15 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
||||||
example: "\"2023-10-05T00:00:00Z\""
|
|
||||||
}];
|
|
||||||
string changer = 16;
|
|
||||||
google.protobuf.Timestamp changed = 17 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
||||||
example: "\"2023-10-05T00:00:00Z\""
|
|
||||||
}];
|
|
||||||
}
|
}
|
43
bff/proto/account_info.proto
Normal file
43
bff/proto/account_info.proto
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
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 AccountInfo {
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
|
json_schema: {
|
||||||
|
title: "AccountInfo";
|
||||||
|
};
|
||||||
|
example: "{\"account_id\": \"1\", \"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 account_id = 1;
|
||||||
|
string firstname = 3;
|
||||||
|
string lastname = 4;
|
||||||
|
string street = 5;
|
||||||
|
string city = 6;
|
||||||
|
string zip = 7;
|
||||||
|
string country = 8;
|
||||||
|
google.protobuf.Timestamp birthday = 9 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
example: "\"1990-10-05T00:00:00Z\""
|
||||||
|
}];
|
||||||
|
string phone = 10;
|
||||||
|
bool privacy_accepted = 11;
|
||||||
|
google.protobuf.Timestamp privacy_accepted_date = 12 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
example: "\"2023-10-05T00:00:00Z\""
|
||||||
|
}];
|
||||||
|
int32 permission_level = 13 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
description: "Default is 0 (non-priviledged)"
|
||||||
|
}];
|
||||||
|
string creator = 14;
|
||||||
|
google.protobuf.Timestamp created = 15 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
example: "\"2023-10-05T00:00:00Z\""
|
||||||
|
}];
|
||||||
|
string changer = 16;
|
||||||
|
google.protobuf.Timestamp changed = 17 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
example: "\"2023-10-05T00:00:00Z\""
|
||||||
|
}];
|
||||||
|
}
|
@ -2,7 +2,6 @@ syntax = "proto3";
|
|||||||
|
|
||||||
package pb;
|
package pb;
|
||||||
|
|
||||||
import "google/protobuf/timestamp.proto";
|
|
||||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||||
|
|
||||||
import "account.proto";
|
import "account.proto";
|
||||||
@ -16,33 +15,13 @@ message CreateAccountRequest {
|
|||||||
description: "Create an Account";
|
description: "Create an Account";
|
||||||
required: [
|
required: [
|
||||||
"email",
|
"email",
|
||||||
"password",
|
"password"
|
||||||
"firstname",
|
|
||||||
"lastname",
|
|
||||||
"street",
|
|
||||||
"city",
|
|
||||||
"zip",
|
|
||||||
"country",
|
|
||||||
"birthday"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
example: "{\"email\": \"john.doe@example.com\", \"password\": \"MayTheForceBeWithYou!\", \"firstname\": \"John\", \"lastname\": \"Doe\", \"street\": \"Main Street 1\", \"zip\": \"0815\", \"city\": \"New York\", \"country\": \"USA\", \"birthday\": \"1990-10-05T00:00:00Z\"}";
|
example: "{\"email\": \"john.doe@example.com\", \"password\": \"MayTheForceBeWithYou!\"}";
|
||||||
};
|
};
|
||||||
string email = 1;
|
string email = 1;
|
||||||
string password = 2;
|
string password = 2;
|
||||||
string firstname = 3;
|
|
||||||
string lastname = 4;
|
|
||||||
string street = 5;
|
|
||||||
string city = 6;
|
|
||||||
string zip = 7;
|
|
||||||
string country = 8;
|
|
||||||
string phone = 9;
|
|
||||||
google.protobuf.Timestamp birthday = 10 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
||||||
example: "\"1990-10-05T00:00:00Z\""
|
|
||||||
}];
|
|
||||||
optional bool privacy_accepted = 11 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
||||||
example: "true"
|
|
||||||
}];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message CreateAccountResponse {
|
message CreateAccountResponse {
|
||||||
|
55
bff/proto/rpc_create_account_info.proto
Normal file
55
bff/proto/rpc_create_account_info.proto
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package pb;
|
||||||
|
|
||||||
|
import "google/protobuf/timestamp.proto";
|
||||||
|
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||||
|
|
||||||
|
import "account_info.proto";
|
||||||
|
|
||||||
|
option go_package = "github.com/itsscb/df/pb";
|
||||||
|
|
||||||
|
message CreateAccountInfoRequest {
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
|
json_schema: {
|
||||||
|
title: "Create AccountInfo";
|
||||||
|
description: "Create an AccountInfo";
|
||||||
|
required: [
|
||||||
|
"account_id",
|
||||||
|
"firstname",
|
||||||
|
"lastname",
|
||||||
|
"street",
|
||||||
|
"city",
|
||||||
|
"zip",
|
||||||
|
"country",
|
||||||
|
"birthday"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
example: "{\"account_id\": \"1\", \"firstname\": \"John\", \"lastname\": \"Doe\", \"street\": \"Main Street 1\", \"zip\": \"0815\", \"city\": \"New York\", \"country\": \"USA\", \"birthday\": \"1990-10-05T00:00:00Z\"}";
|
||||||
|
};
|
||||||
|
uint64 account_id = 1;
|
||||||
|
string firstname = 3;
|
||||||
|
string lastname = 4;
|
||||||
|
string street = 5;
|
||||||
|
string city = 6;
|
||||||
|
string zip = 7;
|
||||||
|
string country = 8;
|
||||||
|
string phone = 9;
|
||||||
|
google.protobuf.Timestamp birthday = 10 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
example: "\"1990-10-05T00:00:00Z\""
|
||||||
|
}];
|
||||||
|
optional bool privacy_accepted = 11 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
example: "true"
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
message CreateAccountInfoResponse {
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
|
json_schema: {
|
||||||
|
title: "Created AccountInfo";
|
||||||
|
description: "Returns the created AccountInfo";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
AccountInfo account_info = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
}];
|
||||||
|
}
|
@ -12,7 +12,7 @@ message GetAccountRequest {
|
|||||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
json_schema: {
|
json_schema: {
|
||||||
title: "GetAccount";
|
title: "GetAccount";
|
||||||
description: "Get an Account by ID";
|
description: "Get AccountInfo by account_id";
|
||||||
required: [
|
required: [
|
||||||
"id"
|
"id"
|
||||||
];
|
];
|
||||||
@ -26,7 +26,7 @@ message GetAccountResponse {
|
|||||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
json_schema: {
|
json_schema: {
|
||||||
title: "GetAccount Response";
|
title: "GetAccount Response";
|
||||||
description: "Returns the Account";
|
description: "Returns the AccountInfo";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
Account account = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
Account account = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
34
bff/proto/rpc_get_account_info.proto
Normal file
34
bff/proto/rpc_get_account_info.proto
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package pb;
|
||||||
|
|
||||||
|
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||||
|
|
||||||
|
import "account_info.proto";
|
||||||
|
|
||||||
|
option go_package = "github.com/itsscb/df/pb";
|
||||||
|
|
||||||
|
message GetAccountInfoRequest {
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
|
json_schema: {
|
||||||
|
title: "GetAccountInfo";
|
||||||
|
description: "Get AccountInfo by account_id";
|
||||||
|
required: [
|
||||||
|
"account_id"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
example: "{\"account_id\": \"1\" }";
|
||||||
|
};
|
||||||
|
uint64 account_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetAccountInfoResponse {
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
|
json_schema: {
|
||||||
|
title: "GetAccountInfo Response";
|
||||||
|
description: "Returns the AccountInfo";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
AccountInfo account_info = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
}];
|
||||||
|
}
|
36
bff/proto/rpc_list_account_info.proto
Normal file
36
bff/proto/rpc_list_account_info.proto
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package pb;
|
||||||
|
|
||||||
|
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||||
|
|
||||||
|
import "account_info.proto";
|
||||||
|
|
||||||
|
option go_package = "github.com/itsscb/df/pb";
|
||||||
|
|
||||||
|
message ListAccountInfoRequest {
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
|
json_schema: {
|
||||||
|
title: "ListAccountInfo";
|
||||||
|
description: "Returns a List of Accounts";
|
||||||
|
required: [
|
||||||
|
"page_id",
|
||||||
|
"page_size"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
example: "{\"page_id\": 1, \"page_size\": 10 }";
|
||||||
|
};
|
||||||
|
uint32 page_id = 1;
|
||||||
|
uint32 page_size = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListAccountInfoResponse {
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
|
json_schema: {
|
||||||
|
title: "ListAccountInfo Response";
|
||||||
|
description: "Returns the AccountInfo";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
repeated AccountInfo account_info = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
}];
|
||||||
|
}
|
@ -2,7 +2,6 @@ syntax = "proto3";
|
|||||||
|
|
||||||
package pb;
|
package pb;
|
||||||
|
|
||||||
import "google/protobuf/timestamp.proto";
|
|
||||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||||
|
|
||||||
import "account.proto";
|
import "account.proto";
|
||||||
@ -15,24 +14,15 @@ message UpdateAccountRequest {
|
|||||||
title: "Update Account";
|
title: "Update Account";
|
||||||
description: "Update an Account";
|
description: "Update an Account";
|
||||||
required: [
|
required: [
|
||||||
"id"
|
"email",
|
||||||
|
"password"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
example: "{\"id\": \"1\", \"street\": \"Death Star 2\"}";
|
example: "{\"account_id\": \"1\", \"email\": \"john.doe@example.com\"}";
|
||||||
};
|
};
|
||||||
uint64 id = 1;
|
uint64 account_id = 1;
|
||||||
optional string email = 2;
|
optional string email = 2;
|
||||||
optional string password = 3;
|
optional string password = 3;
|
||||||
optional string firstname = 4;
|
|
||||||
optional string lastname = 5;
|
|
||||||
optional string street = 6;
|
|
||||||
optional string city = 7;
|
|
||||||
optional string zip = 8;
|
|
||||||
optional string country = 9;
|
|
||||||
optional string phone = 10;
|
|
||||||
optional google.protobuf.Timestamp birthday = 11 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
|
||||||
example: "\"1990-10-05T00:00:00Z\""
|
|
||||||
}];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message UpdateAccountResponse {
|
message UpdateAccountResponse {
|
||||||
|
45
bff/proto/rpc_update_account_info.proto
Normal file
45
bff/proto/rpc_update_account_info.proto
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package pb;
|
||||||
|
|
||||||
|
import "google/protobuf/timestamp.proto";
|
||||||
|
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||||
|
|
||||||
|
import "account_info.proto";
|
||||||
|
|
||||||
|
option go_package = "github.com/itsscb/df/pb";
|
||||||
|
|
||||||
|
message UpdateAccountInfoRequest {
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
|
json_schema: {
|
||||||
|
title: "Update AccountInfo";
|
||||||
|
description: "Update an AccountInfo";
|
||||||
|
required: [
|
||||||
|
"id"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
example: "{\"account_id\": \"1\", \"street\": \"Death Star 2\"}";
|
||||||
|
};
|
||||||
|
uint64 account_id = 1;
|
||||||
|
optional string firstname = 4;
|
||||||
|
optional string lastname = 5;
|
||||||
|
optional string street = 6;
|
||||||
|
optional string city = 7;
|
||||||
|
optional string zip = 8;
|
||||||
|
optional string country = 9;
|
||||||
|
optional string phone = 10;
|
||||||
|
optional google.protobuf.Timestamp birthday = 11 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
example: "\"1990-10-05T00:00:00Z\""
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateAccountInfoResponse {
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
|
json_schema: {
|
||||||
|
title: "Updated Account";
|
||||||
|
description: "Returns the updated Account";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
AccountInfo account_info = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
}];
|
||||||
|
}
|
@ -4,23 +4,23 @@ package pb;
|
|||||||
|
|
||||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||||
|
|
||||||
import "account.proto";
|
import "account_info.proto";
|
||||||
|
|
||||||
option go_package = "github.com/itsscb/df/pb";
|
option go_package = "github.com/itsscb/df/pb";
|
||||||
|
|
||||||
message UpdateAccountPrivacyRequest {
|
message UpdateAccountPrivacyRequest {
|
||||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
json_schema: {
|
json_schema: {
|
||||||
title: "Update Account Privacy Consent";
|
title: "Update Account Info Privacy Consent";
|
||||||
description: "Update the Privacy Consent of an Account";
|
description: "Update the Privacy Consent of an AccountInfo";
|
||||||
required: [
|
required: [
|
||||||
"id",
|
"id",
|
||||||
"privacy_accepted"
|
"privacy_accepted"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
example: "{\"id\": \"1\", \"privacy_accepted\": true }"
|
example: "{\"account_id\": \"1\", \"privacy_accepted\": true }"
|
||||||
};
|
};
|
||||||
uint64 id = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
uint64 account_id = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
example: "1",
|
example: "1",
|
||||||
format: "int64"
|
format: "int64"
|
||||||
}];
|
}];
|
||||||
@ -32,10 +32,10 @@ message UpdateAccountPrivacyRequest {
|
|||||||
message UpdateAccountPrivacyResponse {
|
message UpdateAccountPrivacyResponse {
|
||||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
json_schema: {
|
json_schema: {
|
||||||
title: "Update Account Privacy Response";
|
title: "Update Account Info Privacy Response";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
Account account = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
AccountInfo account_info = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
title: "Updated Account"
|
title: "Updated AccountInfo"
|
||||||
}];
|
}];
|
||||||
}
|
}
|
32
bff/proto/rpc_verify_email.proto
Normal file
32
bff/proto/rpc_verify_email.proto
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package pb;
|
||||||
|
|
||||||
|
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||||
|
|
||||||
|
option go_package = "github.com/itsscb/df/pb";
|
||||||
|
|
||||||
|
message VerifyEmailRequest {
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
|
json_schema: {
|
||||||
|
title: "VerifyEmail";
|
||||||
|
required: [
|
||||||
|
"account_id",
|
||||||
|
"secret_key"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
example: "{\"id\": \"1\", \"secret_key\": \"thisisasecretkey\" }";
|
||||||
|
};
|
||||||
|
uint64 account_id = 1;
|
||||||
|
string secret_key = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message VerifyEmailResponse {
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
|
json_schema: {
|
||||||
|
title: "VerifyEmail Response";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
bool verified = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||||
|
}];
|
||||||
|
}
|
@ -23,6 +23,11 @@ import "rpc_list_accounts.proto";
|
|||||||
import "rpc_update_account.proto";
|
import "rpc_update_account.proto";
|
||||||
import "rpc_update_account_privacy.proto";
|
import "rpc_update_account_privacy.proto";
|
||||||
|
|
||||||
|
import "rpc_create_account_info.proto";
|
||||||
|
import "rpc_get_account_info.proto";
|
||||||
|
import "rpc_list_account_info.proto";
|
||||||
|
import "rpc_update_account_info.proto";
|
||||||
|
|
||||||
import "rpc_login.proto";
|
import "rpc_login.proto";
|
||||||
import "rpc_list_sessions.proto";
|
import "rpc_list_sessions.proto";
|
||||||
import "rpc_refresh_token.proto";
|
import "rpc_refresh_token.proto";
|
||||||
@ -33,6 +38,8 @@ import "rpc_list_returns_log_by_person_id.proto";
|
|||||||
import "rpc_upload_document.proto";
|
import "rpc_upload_document.proto";
|
||||||
import "rpc_delete_document.proto";
|
import "rpc_delete_document.proto";
|
||||||
|
|
||||||
|
import "rpc_verify_email.proto";
|
||||||
|
|
||||||
option go_package = "github.com/itsscb/df/pb";
|
option go_package = "github.com/itsscb/df/pb";
|
||||||
|
|
||||||
|
|
||||||
@ -143,7 +150,7 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
|||||||
body: "*"
|
body: "*"
|
||||||
};
|
};
|
||||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||||
summary: "Create Account"
|
summary: "Create AccountInfo"
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
rpc UpdateAccount (UpdateAccountRequest) returns (UpdateAccountResponse) {
|
rpc UpdateAccount (UpdateAccountRequest) returns (UpdateAccountResponse) {
|
||||||
@ -161,6 +168,65 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
rpc GetAccountInfo (GetAccountInfoRequest) returns (GetAccountInfoResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v1/accounts/get_account_info/{account_id}"
|
||||||
|
// get: "/v1/accounts/{id=id}"
|
||||||
|
};
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||||
|
summary: "Get AccountInfo by account_id"
|
||||||
|
security: {
|
||||||
|
security_requirement: {
|
||||||
|
key: "BearerAuth";
|
||||||
|
value: {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
rpc ListAccountInfo (ListAccountInfoRequest) returns (ListAccountInfoResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v1/accounts/list_account_info"
|
||||||
|
};
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||||
|
summary: "List AccountInfos [admin only]"
|
||||||
|
security: {
|
||||||
|
security_requirement: {
|
||||||
|
key: "BearerAuth";
|
||||||
|
value: {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
rpc CreateAccountInfo (CreateAccountInfoRequest) returns (CreateAccountInfoResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v1/accounts/create_account_info"
|
||||||
|
body: "*"
|
||||||
|
};
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||||
|
summary: "Create AccountInfo"
|
||||||
|
security: {
|
||||||
|
security_requirement: {
|
||||||
|
key: "BearerAuth";
|
||||||
|
value: {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
rpc UpdateAccountInfo (UpdateAccountInfoRequest) returns (UpdateAccountInfoResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
patch: "/v1/accounts/update_account_info"
|
||||||
|
body: "*"
|
||||||
|
};
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||||
|
summary: "Update AccountInfo"
|
||||||
|
security: {
|
||||||
|
security_requirement: {
|
||||||
|
key: "BearerAuth";
|
||||||
|
value: {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
rpc UpdateAccountPrivacy (UpdateAccountPrivacyRequest) returns (UpdateAccountPrivacyResponse) {
|
rpc UpdateAccountPrivacy (UpdateAccountPrivacyRequest) returns (UpdateAccountPrivacyResponse) {
|
||||||
option (google.api.http) = {
|
option (google.api.http) = {
|
||||||
patch: "/v1/accounts/update_account_privacy"
|
patch: "/v1/accounts/update_account_privacy"
|
||||||
@ -364,4 +430,12 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
rpc VerifyEmail (VerifyEmailRequest) returns (VerifyEmailResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v1/verify_email/{account_id}/{secret_key}"
|
||||||
|
};
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||||
|
summary: "Verify Email with account_id and secret_key"
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
@ -17,6 +17,8 @@ sql:
|
|||||||
go_type: "uint64"
|
go_type: "uint64"
|
||||||
- column: "payments.account_id"
|
- column: "payments.account_id"
|
||||||
go_type: "uint64"
|
go_type: "uint64"
|
||||||
|
- column: "account_info.account_id"
|
||||||
|
go_type: "uint64"
|
||||||
- column: "persons.account_id"
|
- column: "persons.account_id"
|
||||||
go_type: "uint64"
|
go_type: "uint64"
|
||||||
- column: "documents.account_id"
|
- column: "documents.account_id"
|
||||||
|
@ -15,7 +15,10 @@ type Config struct {
|
|||||||
LogOutput string `mapstructure:"LOG_OUTPUT"`
|
LogOutput string `mapstructure:"LOG_OUTPUT"`
|
||||||
TokenPrivateKeyHex string `mapstructure:"TOKEN_PRIVATEKEY_HEX"`
|
TokenPrivateKeyHex string `mapstructure:"TOKEN_PRIVATEKEY_HEX"`
|
||||||
MigrationURL string `mapstructure:"MIGRATION_URL"`
|
MigrationURL string `mapstructure:"MIGRATION_URL"`
|
||||||
MigrationRetries int `mapstructure:"MIGRATION_RETRIES"`
|
SMTPAddress string `mapstructure:"SMTP_ADDRESS"`
|
||||||
|
SMTPPassword string `mapstructure:"SMTP_PASSWORD"`
|
||||||
|
SMTPMail string `mapstructure:"SMTP_MAIL"`
|
||||||
|
MigrationRetries int `mapstructure:"MIGRATION_RETRIES"`
|
||||||
AccessTokenDuration time.Duration `mapstructure:"ACCESS_TOKEN_DURATION"`
|
AccessTokenDuration time.Duration `mapstructure:"ACCESS_TOKEN_DURATION"`
|
||||||
RefreshTokenDuration time.Duration `mapstructure:"REFRESH_TOKEN_DURATION"`
|
RefreshTokenDuration time.Duration `mapstructure:"REFRESH_TOKEN_DURATION"`
|
||||||
}
|
}
|
||||||
|
@ -7,9 +7,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
isValidName = regexp.MustCompile(`^[a-zA-Z\s]+$`).MatchString
|
IsValidName = regexp.MustCompile(`^[a-zA-Z\s]+$`).MatchString
|
||||||
isValidAlphaSpace = regexp.MustCompile(`^[a-zA-Z\s]+$`).MatchString
|
IsValidAlphaSpace = regexp.MustCompile(`^[a-zA-Z\s]+$`).MatchString
|
||||||
isValidAlphaNumSpace = regexp.MustCompile(`^[a-zA-Z0-9\s]+$`).MatchString
|
IsValidAlphaNumSpace = regexp.MustCompile(`^[a-zA-Z0-9\s]+$`).MatchString
|
||||||
)
|
)
|
||||||
|
|
||||||
func ValidateString(value string, minLength int, maxLength int) error {
|
func ValidateString(value string, minLength int, maxLength int) error {
|
||||||
@ -24,7 +24,7 @@ func ValidateName(value string) error {
|
|||||||
if err := ValidateString(value, 2, 40); err != nil {
|
if err := ValidateString(value, 2, 40); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if !isValidName(value) {
|
if !IsValidName(value) {
|
||||||
return fmt.Errorf("must contain only letters or spaces")
|
return fmt.Errorf("must contain only letters or spaces")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@ -56,7 +56,7 @@ func ValidateStreet(value string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if !isValidAlphaNumSpace(value) {
|
if !IsValidAlphaNumSpace(value) {
|
||||||
return fmt.Errorf("must contain only letters, numbers or spaces")
|
return fmt.Errorf("must contain only letters, numbers or spaces")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ func ValidateAlphaSpace(value string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if !isValidAlphaSpace(value) {
|
if !IsValidAlphaSpace(value) {
|
||||||
return fmt.Errorf("must contain only letters, numbers or spaces")
|
return fmt.Errorf("must contain only letters, numbers or spaces")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user