Merge pull request #88 from itsscb/83-move-personal-data-out-of-the-createaccount-process

83 move personal data out of the createaccount process and remove api folder
This commit is contained in:
itsscb 2023-10-23 22:36:25 +02:00 committed by GitHub
commit 80f97ac3a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
59 changed files with 4193 additions and 3483 deletions

View File

@ -1,271 +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{
CreateAccountParams: db.CreateAccountParams{
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,
},
},
AfterCreate: func(a db.Account) error { return nil },
}
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)
}

View File

@ -1,964 +0,0 @@
package api
import (
"bytes"
"database/sql"
"encoding/json"
"fmt"
"io"
"net/http"
"net/http/httptest"
"reflect"
"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()
type eqCreateAccountTxParamsMatcher struct {
arg db.CreateAccountTxParams
password string
user db.Account
}
func (expected eqCreateAccountTxParamsMatcher) Matches(x interface{}) bool {
actualArg, ok := x.(db.CreateAccountTxParams)
if !ok {
return false
}
err := util.CheckPassword(expected.password, actualArg.Passwordhash)
if err != nil {
return false
}
expected.arg.Passwordhash = actualArg.Passwordhash
if !reflect.DeepEqual(expected.arg.CreateAccountParams, actualArg.CreateAccountParams) {
return false
}
err = actualArg.AfterCreate(expected.user)
return err == nil
}
func (e eqCreateAccountTxParamsMatcher) String() string {
return fmt.Sprintf("matches arg %v and password %v", e.arg, e.password)
}
func EqCreateAccountTxParams(arg db.CreateAccountTxParams, password string, user db.Account) gomock.Matcher {
return eqCreateAccountTxParamsMatcher{arg, password, user}
}
func TestCreateAccountAPI(t *testing.T) {
account, password := randomAccount()
// fn := func(db.Account) error { return nil}
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{
CreateAccountParams: db.CreateAccountParams{
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,
},
AfterCreate: func(a db.Account) error { return nil },
}
store.EXPECT().
CreateAccountTx(gomock.Any(), EqCreateAccountTxParams(arg, password, account)).
Times(1).
Return(account, nil)
// 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, string) {
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, password
}
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)
}

View File

@ -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)),
),
)
}
}
}

View File

@ -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())
}

View File

@ -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()
}
}

View File

@ -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)
})
}
}

View File

@ -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()}
}

View File

@ -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)
}

View File

@ -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)
}

View File

@ -6,6 +6,7 @@ DROP TABLE IF EXISTS "mails";
DROP TABLE IF EXISTS "persons";
DROP TABLE IF EXISTS "providers";
DROP TABLE IF EXISTS "sessions";
DROP TABLE IF EXISTS "account_info";
DROP TABLE IF EXISTS "accounts";

View File

@ -1,5 +1,5 @@
CREATE TABLE "mails" (
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
"from" varchar NOT NULL,
"to" varchar[] NOT NULL,
"cc" varchar[],
@ -13,18 +13,22 @@ CREATE TABLE "mails" (
);
CREATE TABLE "accounts" (
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
"permission_level" int NOT NULL DEFAULT 0,
"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,
"lastname" varchar NOT NULL,
"birthday" timestamptz NOT NULL,
"privacy_accepted" boolean DEFAULT false,
"privacy_accepted_date" timestamptz,
"email" varchar UNIQUE NOT NULL,
"secret_key" varchar,
"email_verified" boolean DEFAULT false,
"email_verified_time" timestamptz,
"phone" varchar,
"city" varchar NOT NULL,
"zip" varchar NOT NULL,
@ -48,7 +52,7 @@ CREATE TABLE "sessions" (
);
CREATE TABLE "persons" (
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
"account_id" bigint NOT NULL,
"firstname" varchar NOT NULL,
"lastname" varchar NOT NULL,
@ -64,7 +68,7 @@ CREATE TABLE "persons" (
);
CREATE TABLE "documents" (
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
"person_id" bigint,
"name" varchar NOT NULL,
"type" varchar NOT NULL,
@ -81,7 +85,7 @@ CREATE TABLE "documents" (
);
CREATE TABLE "payments" (
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
"account_id" bigint NOT NULL,
"payment_category" varchar NOT NULL,
"bankname" varchar,
@ -98,7 +102,7 @@ CREATE TABLE "payments" (
);
CREATE TABLE "providers" (
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
"name" varchar NOT NULL,
"description" text NOT NULL,
"category" varchar NOT NULL,
@ -110,7 +114,7 @@ CREATE TABLE "providers" (
);
CREATE TABLE "returns" (
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
"person_id" bigint NOT NULL,
"provider_id" bigint NOT NULL,
"name" varchar NOT NULL,
@ -125,7 +129,7 @@ CREATE TABLE "returns" (
);
CREATE TABLE "returnsLog" (
"id" bigserial UNIQUE PRIMARY KEY NOT NULL,
"id" BIGSERIAL UNIQUE PRIMARY KEY NOT NULL,
"return_id" bigint NOT NULL,
"mail_id" bigint NOT NULL,
"status" varchar NOT NULL DEFAULT 'created',
@ -135,6 +139,9 @@ CREATE TABLE "returnsLog" (
"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 "persons" ADD FOREIGN KEY ("account_id") REFERENCES "accounts" ("id");

View File

@ -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)
}
// 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.
func (m *MockStore) CreateAccountTx(arg0 context.Context, arg1 db.CreateAccountTxParams) (db.Account, error) {
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)
}
// 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.
func (m *MockStore) DeleteDocument(arg0 context.Context, arg1 uint64) error {
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)
}
// GetAccountForUpdate mocks base method.
func (m *MockStore) GetAccountForUpdate(arg0 context.Context, arg1 uint64) (db.Account, error) {
// GetAccountInfo mocks base method.
func (m *MockStore) GetAccountInfo(arg0 context.Context, arg1 uint64) (db.AccountInfo, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetAccountForUpdate", arg0, arg1)
ret0, _ := ret[0].(db.Account)
ret := m.ctrl.Call(m, "GetAccountInfo", arg0, arg1)
ret0, _ := ret[0].(db.AccountInfo)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetAccountForUpdate indicates an expected call of GetAccountForUpdate.
func (mr *MockStoreMockRecorder) GetAccountForUpdate(arg0, arg1 any) *gomock.Call {
// GetAccountInfo indicates an expected call of GetAccountInfo.
func (mr *MockStoreMockRecorder) GetAccountInfo(arg0, arg1 any) *gomock.Call {
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.
@ -704,6 +733,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)
}
// 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.
func (m *MockStore) ListAccounts(arg0 context.Context, arg1 db.ListAccountsParams) ([]db.Account, error) {
m.ctrl.T.Helper()
@ -854,26 +898,41 @@ func (mr *MockStoreMockRecorder) ListSessions(arg0, arg1 any) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSessions", reflect.TypeOf((*MockStore)(nil).ListSessions), arg0, arg1)
}
// UpdateAccount mocks base method.
func (m *MockStore) UpdateAccount(arg0 context.Context, arg1 db.UpdateAccountParams) (db.Account, error) {
// UpdateAccountInfo mocks base method.
func (m *MockStore) UpdateAccountInfo(arg0 context.Context, arg1 db.UpdateAccountInfoParams) (db.AccountInfo, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpdateAccount", arg0, arg1)
ret0, _ := ret[0].(db.Account)
ret := m.ctrl.Call(m, "UpdateAccountInfo", arg0, arg1)
ret0, _ := ret[0].(db.AccountInfo)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpdateAccount indicates an expected call of UpdateAccount.
func (mr *MockStoreMockRecorder) UpdateAccount(arg0, arg1 any) *gomock.Call {
// UpdateAccountInfo indicates an expected call of UpdateAccountInfo.
func (mr *MockStoreMockRecorder) UpdateAccountInfo(arg0, arg1 any) *gomock.Call {
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.
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()
ret := m.ctrl.Call(m, "UpdateAccountPrivacy", arg0, arg1)
ret0, _ := ret[0].(db.Account)
ret0, _ := ret[0].(db.AccountInfo)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -885,10 +944,10 @@ func (mr *MockStoreMockRecorder) UpdateAccountPrivacy(arg0, arg1 any) *gomock.Ca
}
// 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()
ret := m.ctrl.Call(m, "UpdateAccountPrivacyTx", arg0, arg1)
ret0, _ := ret[0].(db.Account)
ret0, _ := ret[0].(db.AccountInfo)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@ -899,21 +958,6 @@ func (mr *MockStoreMockRecorder) UpdateAccountPrivacyTx(arg0, arg1 any) *gomock.
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.
func (m *MockStore) UpdateDocument(arg0 context.Context, arg1 db.UpdateDocumentParams) (db.Document, error) {
m.ctrl.T.Helper()

View File

@ -1,85 +1,39 @@
-- name: GetAccount :one
SELECT * FROM accounts
WHERE "id" = $1 LIMIT 1;
WHERE "id" = sqlc.arg(id);
-- name: GetAccountByEmail :one
SELECT * FROM accounts
WHERE "email" = $1 LIMIT 1;
-- name: GetAccountForUpdate :one
SELECT * FROM accounts
WHERE "id" = $1 LIMIT 1
FOR NO KEY UPDATE;
WHERE "email" = sqlc.arg(email);
-- name: CreateAccount :one
INSERT INTO accounts (
"passwordhash",
"privacy_accepted",
"privacy_accepted_date",
"firstname",
"lastname",
"birthday",
"email",
"secret_key",
"phone",
"city",
"zip",
"street",
"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),
"passwordhash",
"secret_key"
)
VALUES (
sqlc.arg(email),
sqlc.arg(secret_key),
sqlc.arg(phone),
sqlc.arg(city),
sqlc.arg(zip),
sqlc.arg(street),
sqlc.arg(country),
sqlc.arg(creator),
sqlc.arg(creator)
) RETURNING *;
sqlc.arg(passwordhash),
sqlc.arg(secret_key)
)
RETURNING *;
-- name: UpdateAccount :one
UPDATE accounts
SET
"email" = COALESCE(sqlc.narg(email), "email"),
"passwordhash" = COALESCE(sqlc.narg(passwordhash), "passwordhash"),
"secret_key" = COALESCE(sqlc.narg(secret_key), "secret_key")
WHERE "id" = sqlc.arg(id)
RETURNING *;
-- name: ListAccounts :many
SELECT * FROM accounts
ORDER BY "lastname", "firstname"
ORDER BY "email"
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 *;
-- name: UpdateAccountPrivacy :one
UPDATE accounts
SET
"privacy_accepted" = sqlc.arg(privacy_accepted),
"privacy_accepted_date" = sqlc.arg(privacy_accepted_date),
"changer" = sqlc.arg(changer),
"changed" = now()
WHERE "id" = sqlc.arg(id)
RETURNING *;
-- name: VerifyAccountEmail :exec
UPDATE accounts
SET
@ -90,4 +44,4 @@ WHERE "id" = sqlc.arg(id);
-- name: DeleteAccount :exec
DELETE FROM accounts
WHERE "id" = $1;
WHERE "id" = sqlc.arg(id);

View 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;

View File

@ -8,102 +8,39 @@ package db
import (
"context"
"database/sql"
"time"
)
const createAccount = `-- name: CreateAccount :one
INSERT INTO accounts (
"passwordhash",
"privacy_accepted",
"privacy_accepted_date",
"firstname",
"lastname",
"birthday",
"email",
"secret_key",
"phone",
"city",
"zip",
"street",
"country",
"creator",
"changer"
) VALUES (
"passwordhash",
"secret_key"
)
VALUES (
$1,
$2,
$3,
$4,
$5,
$6,
$7,
$8,
$9,
$10,
$11,
$12,
$13,
$14,
$14
) RETURNING id, permission_level, passwordhash, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, email, secret_key, email_verified, email_verified_time, phone, city, zip, street, country, creator, created, changer, changed
$3
)
RETURNING id, permission_level, passwordhash, email, secret_key, email_verified, email_verified_time
`
type CreateAccountParams struct {
Passwordhash string `json:"passwordhash"`
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"`
Email string `json:"email"`
SecretKey sql.NullString `json:"secret_key"`
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"`
Email string `json:"email"`
Passwordhash string `json:"passwordhash"`
SecretKey sql.NullString `json:"secret_key"`
}
func (q *Queries) CreateAccount(ctx context.Context, arg CreateAccountParams) (Account, error) {
row := q.db.QueryRowContext(ctx, createAccount,
arg.Passwordhash,
arg.PrivacyAccepted,
arg.PrivacyAcceptedDate,
arg.Firstname,
arg.Lastname,
arg.Birthday,
arg.Email,
arg.SecretKey,
arg.Phone,
arg.City,
arg.Zip,
arg.Street,
arg.Country,
arg.Creator,
)
row := q.db.QueryRowContext(ctx, createAccount, arg.Email, arg.Passwordhash, arg.SecretKey)
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.SecretKey,
&i.EmailVerified,
&i.EmailVerifiedTime,
&i.Phone,
&i.City,
&i.Zip,
&i.Street,
&i.Country,
&i.Creator,
&i.Created,
&i.Changer,
&i.Changed,
)
return i, err
}
@ -119,8 +56,8 @@ func (q *Queries) DeleteAccount(ctx context.Context, id uint64) error {
}
const getAccount = `-- name: GetAccount :one
SELECT id, permission_level, passwordhash, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, email, secret_key, email_verified, email_verified_time, phone, city, zip, street, country, creator, created, changer, changed FROM accounts
WHERE "id" = $1 LIMIT 1
SELECT id, permission_level, passwordhash, email, secret_key, email_verified, email_verified_time FROM accounts
WHERE "id" = $1
`
func (q *Queries) GetAccount(ctx context.Context, id uint64) (Account, error) {
@ -130,31 +67,17 @@ func (q *Queries) GetAccount(ctx context.Context, id uint64) (Account, error) {
&i.ID,
&i.PermissionLevel,
&i.Passwordhash,
&i.Firstname,
&i.Lastname,
&i.Birthday,
&i.PrivacyAccepted,
&i.PrivacyAcceptedDate,
&i.Email,
&i.SecretKey,
&i.EmailVerified,
&i.EmailVerifiedTime,
&i.Phone,
&i.City,
&i.Zip,
&i.Street,
&i.Country,
&i.Creator,
&i.Created,
&i.Changer,
&i.Changed,
)
return i, err
}
const getAccountByEmail = `-- name: GetAccountByEmail :one
SELECT id, permission_level, passwordhash, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, email, secret_key, email_verified, email_verified_time, phone, city, zip, street, country, creator, created, changer, changed FROM accounts
WHERE "email" = $1 LIMIT 1
SELECT id, permission_level, passwordhash, email, secret_key, email_verified, email_verified_time FROM accounts
WHERE "email" = $1
`
func (q *Queries) GetAccountByEmail(ctx context.Context, email string) (Account, error) {
@ -164,66 +87,17 @@ func (q *Queries) GetAccountByEmail(ctx context.Context, email string) (Account,
&i.ID,
&i.PermissionLevel,
&i.Passwordhash,
&i.Firstname,
&i.Lastname,
&i.Birthday,
&i.PrivacyAccepted,
&i.PrivacyAcceptedDate,
&i.Email,
&i.SecretKey,
&i.EmailVerified,
&i.EmailVerifiedTime,
&i.Phone,
&i.City,
&i.Zip,
&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, secret_key, email_verified, email_verified_time, 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.SecretKey,
&i.EmailVerified,
&i.EmailVerifiedTime,
&i.Phone,
&i.City,
&i.Zip,
&i.Street,
&i.Country,
&i.Creator,
&i.Created,
&i.Changer,
&i.Changed,
)
return i, err
}
const listAccounts = `-- name: ListAccounts :many
SELECT id, permission_level, passwordhash, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, email, secret_key, email_verified, email_verified_time, phone, city, zip, street, country, creator, created, changer, changed FROM accounts
ORDER BY "lastname", "firstname"
SELECT id, permission_level, passwordhash, email, secret_key, email_verified, email_verified_time FROM accounts
ORDER BY "email"
LIMIT $1
OFFSET $2
`
@ -246,24 +120,10 @@ func (q *Queries) ListAccounts(ctx context.Context, arg ListAccountsParams) ([]A
&i.ID,
&i.PermissionLevel,
&i.Passwordhash,
&i.Firstname,
&i.Lastname,
&i.Birthday,
&i.PrivacyAccepted,
&i.PrivacyAcceptedDate,
&i.Email,
&i.SecretKey,
&i.EmailVerified,
&i.EmailVerifiedTime,
&i.Phone,
&i.City,
&i.Zip,
&i.Street,
&i.Country,
&i.Creator,
&i.Created,
&i.Changer,
&i.Changed,
); err != nil {
return nil, err
}
@ -279,104 +139,27 @@ func (q *Queries) ListAccounts(ctx context.Context, arg ListAccountsParams) ([]A
}
const updateAccount = `-- name: UpdateAccount :one
UPDATE accounts
UPDATE accounts
SET
"passwordhash" = COALESCE($3, "passwordhash"),
"firstname" = COALESCE($4, "firstname"),
"lastname" = COALESCE($5, "lastname"),
"birthday" = COALESCE($6, "birthday"),
"email" = COALESCE($7, "email"),
"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, secret_key, email_verified, email_verified_time, phone, city, zip, street, country, creator, created, changer, changed
"email" = COALESCE($1, "email"),
"passwordhash" = COALESCE($2, "passwordhash"),
"secret_key" = COALESCE($3, "secret_key")
WHERE "id" = $4
RETURNING id, permission_level, passwordhash, email, secret_key, email_verified, email_verified_time
`
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"`
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"`
Passwordhash sql.NullString `json:"passwordhash"`
SecretKey sql.NullString `json:"secret_key"`
ID uint64 `json:"id"`
}
func (q *Queries) UpdateAccount(ctx context.Context, arg UpdateAccountParams) (Account, error) {
row := q.db.QueryRowContext(ctx, updateAccount,
arg.ID,
arg.Changer,
arg.Passwordhash,
arg.Firstname,
arg.Lastname,
arg.Birthday,
arg.Email,
arg.Phone,
arg.City,
arg.Zip,
arg.Street,
arg.Country,
)
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.SecretKey,
&i.EmailVerified,
&i.EmailVerifiedTime,
&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 accounts
SET
"privacy_accepted" = $1,
"privacy_accepted_date" = $2,
"changer" = $3,
"changed" = now()
WHERE "id" = $4
RETURNING id, permission_level, passwordhash, firstname, lastname, birthday, privacy_accepted, privacy_accepted_date, email, secret_key, email_verified, email_verified_time, 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) (Account, error) {
row := q.db.QueryRowContext(ctx, updateAccountPrivacy,
arg.PrivacyAccepted,
arg.PrivacyAcceptedDate,
arg.Changer,
arg.Passwordhash,
arg.SecretKey,
arg.ID,
)
var i Account
@ -384,24 +167,10 @@ func (q *Queries) UpdateAccountPrivacy(ctx context.Context, arg UpdateAccountPri
&i.ID,
&i.PermissionLevel,
&i.Passwordhash,
&i.Firstname,
&i.Lastname,
&i.Birthday,
&i.PrivacyAccepted,
&i.PrivacyAcceptedDate,
&i.Email,
&i.SecretKey,
&i.EmailVerified,
&i.EmailVerifiedTime,
&i.Phone,
&i.City,
&i.Zip,
&i.Street,
&i.Country,
&i.Creator,
&i.Created,
&i.Changer,
&i.Changed,
)
return i, err
}

View 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
}

View File

@ -14,31 +14,13 @@ var timestamp = time.Now()
func createRandomAccount(t *testing.T) Account {
creator := util.RandomName()
arg := CreateAccountParams{
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(),
Phone: sql.NullString{
SecretKey: sql.NullString{
String: util.RandomString(100),
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)
@ -46,20 +28,10 @@ func createRandomAccount(t *testing.T) Account {
require.NotEmpty(t, account)
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.Phone, account.Phone)
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.Equal(t, arg.SecretKey, account.SecretKey)
require.NotZero(t, account.ID)
require.NotZero(t, account.Created)
return account
}
@ -77,19 +49,8 @@ func TestGetAccount(t *testing.T) {
require.NotEmpty(t, account)
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.Phone, account.Phone)
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)
require.Equal(t, newAccount.SecretKey, account.SecretKey)
}
func TestDeleteAccount(t *testing.T) {
@ -103,78 +64,6 @@ func TestDeleteAccount(t *testing.T) {
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) {
for i := 0; i < 10; i++ {
createRandomAccount(t)

View File

@ -12,18 +12,22 @@ import (
)
type Account struct {
ID uint64 `json:"id"`
PermissionLevel int32 `json:"permission_level"`
Passwordhash string `json:"passwordhash"`
ID uint64 `json:"id"`
PermissionLevel int32 `json:"permission_level"`
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"`
Lastname string `json:"lastname"`
Birthday time.Time `json:"birthday"`
PrivacyAccepted sql.NullBool `json:"privacy_accepted"`
PrivacyAcceptedDate sql.NullTime `json:"privacy_accepted_date"`
Email string `json:"email"`
SecretKey sql.NullString `json:"secret_key"`
EmailVerified sql.NullBool `json:"email_verified"`
EmailVerifiedTime sql.NullTime `json:"email_verified_time"`
Phone sql.NullString `json:"phone"`
City string `json:"city"`
Zip string `json:"zip"`

View File

@ -15,6 +15,7 @@ type Querier interface {
BlockSession(ctx context.Context, id uuid.UUID) error
CloneProviders(ctx context.Context, arg CloneProvidersParams) error
CreateAccount(ctx context.Context, arg CreateAccountParams) (Account, error)
CreateAccountInfo(ctx context.Context, arg CreateAccountInfoParams) (AccountInfo, error)
CreateDocument(ctx context.Context, arg CreateDocumentParams) (Document, error)
CreateDocumentMail(ctx context.Context, arg CreateDocumentMailParams) (Document, error)
CreateDocumentUpload(ctx context.Context, arg CreateDocumentUploadParams) (Document, error)
@ -26,6 +27,7 @@ type Querier interface {
CreateReturnsLog(ctx context.Context, arg CreateReturnsLogParams) (ReturnsLog, error)
CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error)
DeleteAccount(ctx context.Context, id uint64) error
DeleteAccountInfo(ctx context.Context, accountID uint64) error
DeleteDocument(ctx context.Context, id uint64) error
DeleteDocumentsByPersonID(ctx context.Context, personID sql.NullInt64) error
// -- name: UpdateMail :one
@ -51,7 +53,7 @@ type Querier interface {
DeleteReturnsLogsByPersonID(ctx context.Context, personID uint64) error
GetAccount(ctx context.Context, id uint64) (Account, error)
GetAccountByEmail(ctx context.Context, email string) (Account, error)
GetAccountForUpdate(ctx context.Context, id uint64) (Account, error)
GetAccountInfo(ctx context.Context, accountID uint64) (AccountInfo, error)
GetDocument(ctx context.Context, id uint64) (Document, error)
GetDocumentByHash(ctx context.Context, arg GetDocumentByHashParams) ([]uint64, error)
GetDocumentByIDWithAccountID(ctx context.Context, arg GetDocumentByIDWithAccountIDParams) (Document, error)
@ -65,6 +67,7 @@ type Querier interface {
GetReturnsLog(ctx context.Context, id uint64) (ReturnsLog, error)
GetSession(ctx context.Context, id uuid.UUID) (Session, error)
InvalidateDocument(ctx context.Context, arg InvalidateDocumentParams) (Document, error)
ListAccountInfo(ctx context.Context, arg ListAccountInfoParams) ([]AccountInfo, error)
ListAccounts(ctx context.Context, arg ListAccountsParams) ([]Account, error)
ListDocuments(ctx context.Context, arg ListDocumentsParams) ([]Document, error)
ListMails(ctx context.Context, arg ListMailsParams) ([]Mail, error)
@ -76,7 +79,8 @@ type Querier interface {
ListReturnsLogsByPersonID(ctx context.Context, personID uint64) ([]ReturnsLog, error)
ListSessions(ctx context.Context, accountID uint64) ([]Session, error)
UpdateAccount(ctx context.Context, arg UpdateAccountParams) (Account, error)
UpdateAccountPrivacy(ctx context.Context, arg UpdateAccountPrivacyParams) (Account, error)
UpdateAccountInfo(ctx context.Context, arg UpdateAccountInfoParams) (AccountInfo, error)
UpdateAccountPrivacy(ctx context.Context, arg UpdateAccountPrivacyParams) (AccountInfo, error)
UpdateDocument(ctx context.Context, arg UpdateDocumentParams) (Document, error)
UpdatePayment(ctx context.Context, arg UpdatePaymentParams) (Payment, error)
UpdatePerson(ctx context.Context, arg UpdatePersonParams) (Person, error)

View File

@ -11,12 +11,13 @@ import (
type Store interface {
Querier
CreateAccountTx(ctx context.Context, arg CreateAccountTxParams) (Account, error)
UpdateAccountTx(ctx context.Context, arg UpdateAccountTxParams) (Account, error)
UpdateAccountPrivacyTx(ctx context.Context, arg UpdateAccountPrivacyTxParams) (Account, error)
UpdateAccountInfoTx(ctx context.Context, arg UpdateAccountInfoTxParams) (AccountInfo, error)
UpdateAccountPrivacyTx(ctx context.Context, arg UpdateAccountPrivacyTxParams) (AccountInfo, error)
CreatePersonTx(ctx context.Context, arg CreatePersonTxParams) (Person, error)
DeletePersonTx(ctx context.Context, id uint64) error
CreateDocumentTx(ctx context.Context, arg CreateDocumentTxParams) (doc Document, code int, err error)
DeleteDocumentTx(ctx context.Context, id uint64) (code codes.Code, err error)
UpdateAccountTx(ctx context.Context, arg UpdateAccountTxParams) (Account, error)
}
// Store provides all functions to execute db queries and transactions

View File

@ -3,7 +3,6 @@ package db
import (
"context"
"database/sql"
"time"
"github.com/google/uuid"
)
@ -28,13 +27,6 @@ func (store *SQLStore) CreateAccountTx(ctx context.Context, arg CreateAccountTxP
String: uid.String(),
}
if arg.PrivacyAccepted.Bool && arg.PrivacyAccepted.Valid && !arg.PrivacyAcceptedDate.Valid {
arg.PrivacyAcceptedDate = sql.NullTime{
Valid: true,
Time: time.Now(),
}
}
// arg.Passwordhash, err = util.HashPassword(arg.Passwordhash)
// if err != nil {
// return Account{}, nil

View File

@ -5,27 +5,25 @@ import (
"database/sql"
)
type UpdateAccountTxParams 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"`
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"`
type UpdateAccountInfoTxParams 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"`
}
type UpdateAccountTxResult struct {
Account Account `json:"account"`
type UpdateAccountInfoTxResult struct {
AccountInfo AccountInfo `json:"account_info"`
}
func (store *SQLStore) UpdateAccountTx(ctx context.Context, arg UpdateAccountTxParams) (Account, error) {
var result UpdateAccountTxResult
func (store *SQLStore) UpdateAccountInfoTx(ctx context.Context, arg UpdateAccountInfoTxParams) (AccountInfo, error) {
var result UpdateAccountInfoTxResult
// if arg.Passwordhash.Valid {
// 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 {
var err error
result.Account, err = q.UpdateAccount(ctx, UpdateAccountParams(arg))
result.AccountInfo, err = q.UpdateAccountInfo(ctx, UpdateAccountInfoParams(arg))
return err
})
return result.Account, err
return result.AccountInfo, err
}

View File

@ -16,9 +16,9 @@ type UpdateAccountPrivacyTxResult struct {
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 account Account
var account AccountInfo
if *arg.PrivacyAccepted {
date = sql.NullTime{

View 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
}

View File

@ -68,7 +68,7 @@
},
"/v1/accounts/create_account": {
"post": {
"summary": "Create Account",
"summary": "Create AccountInfo",
"operationId": "df_CreateAccount",
"responses": {
"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}": {
"get": {
"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": {
"get": {
"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": {
"patch": {
"summary": "Update Account Privacy Settings",
@ -241,7 +400,7 @@
"parameters": [
{
"name": "body",
"description": "Update the Privacy Consent of an Account",
"description": "Update the Privacy Consent of an AccountInfo",
"in": "body",
"required": true,
"schema": {
@ -921,6 +1080,54 @@
"email": {
"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": {
"type": "string"
},
@ -977,7 +1184,7 @@
"example": "2023-10-05T00:00:00Z"
}
},
"title": "Account"
"title": "AccountInfo"
},
"pbBlockSessionRequest": {
"type": "object",
@ -1016,11 +1223,10 @@
},
"title": "Blocked Session"
},
"pbCreateAccountRequest": {
"pbCreateAccountInfoRequest": {
"type": "object",
"example": {
"email": "john.doe@example.com",
"password": "MayTheForceBeWithYou!",
"account_id": "1",
"firstname": "John",
"lastname": "Doe",
"street": "Main Street 1",
@ -1030,11 +1236,9 @@
"birthday": "1990-10-05T00:00:00Z"
},
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string"
"accountId": {
"type": "string",
"format": "uint64"
},
"firstname": {
"type": "string"
@ -1067,11 +1271,10 @@
"example": true
}
},
"description": "Create an Account",
"title": "Create Account",
"description": "Create an AccountInfo",
"title": "Create AccountInfo",
"required": [
"email",
"password",
"accountId",
"firstname",
"lastname",
"street",
@ -1081,6 +1284,37 @@
"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": {
"type": "object",
"properties": {
@ -1321,6 +1555,16 @@
},
"title": "Document"
},
"pbGetAccountInfoResponse": {
"type": "object",
"properties": {
"accountInfo": {
"$ref": "#/definitions/pbAccountInfo"
}
},
"description": "Returns the AccountInfo",
"title": "GetAccountInfo Response"
},
"pbGetAccountResponse": {
"type": "object",
"properties": {
@ -1328,7 +1572,7 @@
"$ref": "#/definitions/pbAccount"
}
},
"description": "Returns the Account",
"description": "Returns the AccountInfo",
"title": "GetAccount Response"
},
"pbGetPaymentResponse": {
@ -1351,6 +1595,20 @@
"description": "Returns the Person",
"title": "GetPerson Response"
},
"pbListAccountInfoResponse": {
"type": "object",
"properties": {
"accountInfo": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/pbAccountInfo"
}
}
},
"description": "Returns the AccountInfo",
"title": "ListAccountInfo Response"
},
"pbListAccountsResponse": {
"type": "object",
"properties": {
@ -1751,57 +2009,17 @@
},
"title": "Session"
},
"pbUpdateAccountPrivacyRequest": {
"pbUpdateAccountInfoRequest": {
"type": "object",
"example": {
"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",
"account_id": "1",
"street": "Death Star 2"
},
"properties": {
"id": {
"accountId": {
"type": "string",
"format": "uint64"
},
"email": {
"type": "string"
},
"password": {
"type": "string"
},
"firstname": {
"type": "string"
},
@ -1829,10 +2047,79 @@
"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",
"title": "Update Account",
"required": [
"id"
"email",
"password"
]
},
"pbUpdateAccountResponse": {

View File

@ -8,23 +8,32 @@ import (
func convertAccount(account db.Account) *pb.Account {
return &pb.Account{
Id: account.ID,
PermissionLevel: account.PermissionLevel,
Email: account.Email,
Firstname: account.Firstname,
Lastname: account.Lastname,
City: account.City,
Street: account.Street,
Zip: account.Zip,
Country: account.Country,
Creator: account.Creator,
Changer: account.Changer,
PrivacyAccepted: account.PrivacyAccepted.Bool,
PrivacyAcceptedDate: timestamppb.New(account.PrivacyAcceptedDate.Time),
Birthday: timestamppb.New(account.Birthday),
Created: timestamppb.New(account.Created),
Changed: timestamppb.New(account.Changed),
Phone: account.Phone.String,
Id: account.ID,
PermissionLevel: account.PermissionLevel,
Email: account.Email,
EmailVerified: account.EmailVerified.Bool,
EmailVerifiedTime: timestamppb.New(account.EmailVerifiedTime.Time),
SecretKey: &account.SecretKey.String,
}
}
func convertAccountInfo(account_info db.AccountInfo) *pb.AccountInfo {
return &pb.AccountInfo{
AccountId: account_info.AccountID,
Firstname: account_info.Firstname,
Lastname: account_info.Lastname,
City: account_info.City,
Street: account_info.Street,
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,
}
}

View File

@ -2,8 +2,6 @@ package gapi
import (
"context"
"database/sql"
"errors"
"fmt"
"log/slog"
@ -31,26 +29,10 @@ func (server *Server) CreateAccount(ctx context.Context, req *pb.CreateAccountRe
arg := db.CreateAccountTxParams{
CreateAccountParams: db.CreateAccountParams{
Passwordhash: hashedPassword,
PrivacyAccepted: sql.NullBool{
Valid: true,
Bool: req.GetPrivacyAccepted(),
},
Firstname: req.GetFirstname(),
Lastname: req.GetLastname(),
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(),
},
Email: req.GetEmail(),
},
AfterCreate: func(a db.Account) error {
return server.mailSender.SendEmail("Verify your E-Mail Address", fmt.Sprintf("Hello %s %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.GetFirstname(), req.GetLastname(), a.ID, a.SecretKey.String), []string{req.GetEmail()}, nil, nil, nil)
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)
},
}
@ -76,21 +58,5 @@ func validateCreateAccountRequest(req *pb.CreateAccountRequest) (violations []*e
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
}

View 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
}

View 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
}

View File

@ -4,6 +4,7 @@ import (
"context"
"database/sql"
"errors"
"fmt"
"log/slog"
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)
}
if authPayload.AccountID != req.GetId() {
if authPayload.AccountID != req.GetAccountId() {
if !server.isAdmin(ctx, authPayload) {
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 {
return nil, status.Error(codes.NotFound, "account not found")
}
arg := db.UpdateAccountTxParams{
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(),
},
}
var hashedPassword string
if req.Password != nil {
hashedPassword, err := util.HashPassword(req.GetPassword())
hashedPassword, err = util.HashPassword(req.GetPassword())
if err != nil {
slog.Error("update_account (hash_password)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetId())), slog.String("error", err.Error()))
return nil, status.Error(codes.Internal, "failed to hash password")
}
arg.Passwordhash = sql.NullString{
Valid: true,
String: hashedPassword,
slog.Error("create_account (hash_password)", slog.String("invoked_by", req.GetEmail()), slog.String("error", err.Error()))
return nil, status.Errorf(codes.Internal, "failed to hash password: %s", err)
}
}
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 {
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")
}
@ -105,44 +81,15 @@ func (server *Server) UpdateAccount(ctx context.Context, req *pb.UpdateAccountRe
}
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")))
}
if err := val.ValidateEmail(req.GetEmail()); err != nil {
violations = append(violations, fieldViolation("email", err))
}
if req.GetEmail() != "" {
if err := val.ValidateEmail(req.GetEmail()); err != nil {
violations = append(violations, fieldViolation("email", err))
}
}
if 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))
}
if err := val.ValidatePassword(req.GetPassword()); err != nil {
violations = append(violations, fieldViolation("password", err))
}
return violations

View 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
}

View File

@ -24,12 +24,12 @@ func (server *Server) UpdateAccountPrivacy(ctx context.Context, req *pb.UpdateAc
return nil, invalidArgumentError(violations)
}
account, err := server.store.GetAccount(ctx, req.GetId())
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("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")
}
@ -42,25 +42,25 @@ func (server *Server) UpdateAccountPrivacy(ctx context.Context, req *pb.UpdateAc
arg := db.UpdateAccountPrivacyTxParams{
Changer: account.Email,
ID: req.GetId(),
ID: req.GetAccountId(),
PrivacyAccepted: &privacyAccepted,
}
account, err = server.store.UpdateAccountPrivacyTx(ctx, arg)
account_info, err := server.store.UpdateAccountPrivacyTx(ctx, arg)
if err != nil {
slog.Error("update_account_privacy (db)", slog.Int64("invoked_by", int64(authPayload.AccountID)), slog.Int64("account_id", int64(req.GetId())), slog.String("error", err.Error()))
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")
}
rsp := &pb.UpdateAccountPrivacyResponse{
Account: convertAccount(account),
AccountInfo: convertAccountInfo(account_info),
}
return rsp, nil
}
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")))
}
return violations

View File

@ -13,7 +13,6 @@ import (
"github.com/gin-gonic/gin"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/itsscb/df/bff/api"
db "github.com/itsscb/df/bff/db/sqlc"
"github.com/itsscb/df/bff/gapi"
"github.com/itsscb/df/bff/gw"
@ -158,15 +157,3 @@ func runGatewayServer(config util.Config, store db.Store, swaggerFS http.FileSys
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)
}
}

View File

@ -29,21 +29,11 @@ type Account struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
Firstname string `protobuf:"bytes,3,opt,name=firstname,proto3" json:"firstname,omitempty"`
Lastname string `protobuf:"bytes,4,opt,name=lastname,proto3" json:"lastname,omitempty"`
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"`
SecretKey *string `protobuf:"bytes,3,opt,name=secret_key,json=secretKey,proto3,oneof" json:"secret_key,omitempty"`
EmailVerifiedTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=email_verified_time,json=emailVerifiedTime,proto3" json:"email_verified_time,omitempty"`
EmailVerified bool `protobuf:"varint,10,opt,name=email_verified,json=emailVerified,proto3" json:"email_verified,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 *Account) Reset() {
@ -92,65 +82,23 @@ func (x *Account) GetEmail() string {
return ""
}
func (x *Account) GetFirstname() string {
if x != nil {
return x.Firstname
func (x *Account) GetSecretKey() string {
if x != nil && x.SecretKey != nil {
return *x.SecretKey
}
return ""
}
func (x *Account) GetLastname() string {
func (x *Account) GetEmailVerifiedTime() *timestamppb.Timestamp {
if x != nil {
return x.Lastname
}
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 x.EmailVerifiedTime
}
return nil
}
func (x *Account) GetPhone() string {
func (x *Account) GetEmailVerified() bool {
if x != nil {
return x.Phone
}
return ""
}
func (x *Account) GetPrivacyAccepted() bool {
if x != nil {
return x.PrivacyAccepted
return x.EmailVerified
}
return false
}
@ -169,34 +117,6 @@ func (x *Account) GetPermissionLevel() int32 {
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_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,
0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x09, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
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, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74,
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, 0xbd, 0x03, 0x92, 0x41, 0xb9, 0x03, 0x0a, 0x09, 0x2a, 0x07,
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xab, 0x03, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a,
0x20, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x3a, 0x20, 0x22, 0x6a,
0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e,
0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0x3a, 0x20, 0x22, 0x4a, 0x6f, 0x68, 0x6e, 0x22, 0x2c, 0x20, 0x22, 0x6c, 0x61, 0x73, 0x74,
0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x6f, 0x65, 0x22, 0x2c, 0x20, 0x22, 0x70,
0x68, 0x6f, 0x6e, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x74, 0x72, 0x65,
0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x65, 0x61, 0x74, 0x68, 0x20, 0x53, 0x74, 0x61, 0x72,
0x20, 0x32, 0x22, 0x2c, 0x20, 0x22, 0x7a, 0x69, 0x70, 0x22, 0x3a, 0x20, 0x22, 0x30, 0x38, 0x31,
0x35, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x4e, 0x65, 0x77,
0x20, 0x59, 0x6f, 0x72, 0x6b, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79,
0x22, 0x3a, 0x20, 0x22, 0x55, 0x53, 0x41, 0x22, 0x2c, 0x20, 0x22, 0x62, 0x69, 0x72, 0x74, 0x68,
0x64, 0x61, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30,
0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x20, 0x22, 0x70,
0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22,
0x3a, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x20, 0x22, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63,
0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x22,
0x3a, 0x20, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30,
0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74,
0x6f, 0x72, 0x22, 0x3a, 0x20, 0x22, 0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x72,
0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30,
0x2d, 0x30, 0x35, 0x54, 0x30, 0x32, 0x3a, 0x33, 0x30, 0x3a, 0x35, 0x33, 0x5a, 0x22, 0x2c, 0x20,
0x22, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x22, 0x3a, 0x20, 0x22, 0x6a, 0x6f, 0x68, 0x6e,
0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d,
0x22, 0x2c, 0x20, 0x22, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x32,
0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x32, 0x3a, 0x33, 0x30, 0x3a,
0x35, 0x33, 0x5a, 0x22, 0x7d, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74,
0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x65,
0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x12, 0x67, 0x0a, 0x13, 0x65, 0x6d,
0x61, 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d,
0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d,
0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22,
0x52, 0x11, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x54,
0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72,
0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6d, 0x61,
0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 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, 0x3a, 0xbd, 0x03, 0x92, 0x41, 0xb9, 0x03, 0x0a, 0x09,
0x2a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xab, 0x03, 0x7b, 0x22, 0x69, 0x64,
0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x3a, 0x20,
0x22, 0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61,
0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x4a, 0x6f, 0x68, 0x6e, 0x22, 0x2c, 0x20, 0x22, 0x6c, 0x61,
0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x6f, 0x65, 0x22, 0x2c, 0x20,
0x22, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x74,
0x72, 0x65, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x65, 0x61, 0x74, 0x68, 0x20, 0x53, 0x74,
0x61, 0x72, 0x20, 0x32, 0x22, 0x2c, 0x20, 0x22, 0x7a, 0x69, 0x70, 0x22, 0x3a, 0x20, 0x22, 0x30,
0x38, 0x31, 0x35, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x4e,
0x65, 0x77, 0x20, 0x59, 0x6f, 0x72, 0x6b, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x55, 0x53, 0x41, 0x22, 0x2c, 0x20, 0x22, 0x62, 0x69, 0x72,
0x74, 0x68, 0x64, 0x61, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30,
0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x20,
0x22, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65,
0x64, 0x22, 0x3a, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x20, 0x22, 0x70, 0x72, 0x69, 0x76,
0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74,
0x65, 0x22, 0x3a, 0x20, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54,
0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x72, 0x65,
0x61, 0x74, 0x6f, 0x72, 0x22, 0x3a, 0x20, 0x22, 0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65,
0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22,
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d,
0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x32, 0x3a, 0x33, 0x30, 0x3a, 0x35, 0x33, 0x5a, 0x22,
0x2c, 0x20, 0x22, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x22, 0x3a, 0x20, 0x22, 0x6a, 0x6f,
0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63,
0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x22, 0x3a, 0x20,
0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x32, 0x3a, 0x33,
0x30, 0x3a, 0x35, 0x33, 0x5a, 0x22, 0x7d, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x65, 0x63, 0x72,
0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 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 (
@ -304,15 +204,13 @@ var file_account_proto_goTypes = []interface{}{
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
}
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, // 2: pb.Account.created:type_name -> google.protobuf.Timestamp
1, // 3: pb.Account.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
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_account_proto_init() }
@ -334,6 +232,7 @@ func file_account_proto_init() {
}
}
}
file_account_proto_msgTypes[0].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

346
bff/pb/account_info.pb.go Normal file
View 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
}

View File

@ -10,7 +10,6 @@ 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"
)
@ -27,17 +26,8 @@ type CreateAccountRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,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"`
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
}
func (x *CreateAccountRequest) Reset() {
@ -86,69 +76,6 @@ func (x *CreateAccountRequest) GetPassword() string {
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 {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -200,71 +127,34 @@ var File_rpc_create_account_proto protoreflect.FileDescriptor
var file_rpc_create_account_proto_rawDesc = []byte{
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,
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,
0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfb,
0x05, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a,
0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 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, 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,
0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e,
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d,
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x01,
0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08,
0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x3a, 0x84, 0x01, 0x92, 0x41, 0x80, 0x01, 0x0a,
0x36, 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, 0x32, 0x46, 0x7b, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c,
0x22, 0x3a, 0x20, 0x22, 0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x73, 0x73,
0x77, 0x6f, 0x72, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x4d, 0x61, 0x79, 0x54, 0x68, 0x65, 0x46, 0x6f,
0x72, 0x63, 0x65, 0x42, 0x65, 0x57, 0x69, 0x74, 0x68, 0x59, 0x6f, 0x75, 0x21, 0x22, 0x7d, 0x22,
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 (
@ -283,17 +173,15 @@ var file_rpc_create_account_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_rpc_create_account_proto_goTypes = []interface{}{
(*CreateAccountRequest)(nil), // 0: pb.CreateAccountRequest
(*CreateAccountResponse)(nil), // 1: pb.CreateAccountResponse
(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
(*Account)(nil), // 3: pb.Account
(*Account)(nil), // 2: pb.Account
}
var file_rpc_create_account_proto_depIdxs = []int32{
2, // 0: pb.CreateAccountRequest.birthday:type_name -> google.protobuf.Timestamp
3, // 1: pb.CreateAccountResponse.account:type_name -> pb.Account
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
2, // 0: pb.CreateAccountResponse.account:type_name -> pb.Account
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_rpc_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{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View 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
}

View File

@ -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,
0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a, 0x11, 0x47, 0x65,
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,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a,
0x3a, 0x92, 0x41, 0x37, 0x0a, 0x27, 0x2a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x32, 0x14, 0x47, 0x65, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x0c, 0x7b,
0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x20, 0x7d, 0x22, 0x71, 0x0a, 0x12, 0x47,
0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42,
0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x2f, 0x92,
0x41, 0x2c, 0x0a, 0x2a, 0x2a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x20, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x13, 0x52, 0x65, 0x74, 0x75, 0x72,
0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x19,
0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73,
0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
0x43, 0x92, 0x41, 0x40, 0x0a, 0x30, 0x2a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 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, 0x02, 0x69, 0x64, 0x32, 0x0c, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22,
0x31, 0x22, 0x20, 0x7d, 0x22, 0x75, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62,
0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x61,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x13, 0x47,
0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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 (

View 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
}

View 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
}

View File

@ -10,7 +10,6 @@ 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"
)
@ -27,17 +26,9 @@ type UpdateAccountRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Email *string `protobuf:"bytes,2,opt,name=email,proto3,oneof" json:"email,omitempty"`
Password *string `protobuf:"bytes,3,opt,name=password,proto3,oneof" json:"password,omitempty"`
Firstname *string `protobuf:"bytes,4,opt,name=firstname,proto3,oneof" json:"firstname,omitempty"`
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"`
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"`
Password *string `protobuf:"bytes,3,opt,name=password,proto3,oneof" json:"password,omitempty"`
}
func (x *UpdateAccountRequest) Reset() {
@ -72,9 +63,9 @@ func (*UpdateAccountRequest) Descriptor() ([]byte, []int) {
return file_rpc_update_account_proto_rawDescGZIP(), []int{0}
}
func (x *UpdateAccountRequest) GetId() uint64 {
func (x *UpdateAccountRequest) GetAccountId() uint64 {
if x != nil {
return x.Id
return x.AccountId
}
return 0
}
@ -93,62 +84,6 @@ func (x *UpdateAccountRequest) GetPassword() string {
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 {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -200,60 +135,37 @@ var File_rpc_update_account_proto protoreflect.FileDescriptor
var file_rpc_update_account_proto_rawDesc = []byte{
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,
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,
0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xce,
0x04, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x88,
0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 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, 0x03, 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, 0x04, 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, 0x05, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a,
0x03, 0x7a, 0x69, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 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, 0x07, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79,
0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x0a, 0x20, 0x01,
0x28, 0x09, 0x48, 0x08, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x12, 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, 0x09, 0x52, 0x08, 0x62, 0x69, 0x72,
0x74, 0x68, 0x64, 0x61, 0x79, 0x88, 0x01, 0x01, 0x3a, 0x54, 0x92, 0x41, 0x51, 0x0a, 0x28, 0x2a,
0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32,
0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x25, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20,
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,
0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61,
0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e,
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d,
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfb, 0x01,
0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01,
0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x88, 0x01,
0x01, 0x3a, 0x71, 0x92, 0x41, 0x6e, 0x0a, 0x36, 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, 0x05, 0x65, 0x6d,
0x61, 0x69, 0x6c, 0xd2, 0x01, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x32, 0x34,
0x7b, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22,
0x31, 0x22, 0x2c, 0x20, 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, 0x7d, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x42, 0x0b,
0x0a, 0x09, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 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 (
@ -272,17 +184,15 @@ var file_rpc_update_account_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_rpc_update_account_proto_goTypes = []interface{}{
(*UpdateAccountRequest)(nil), // 0: pb.UpdateAccountRequest
(*UpdateAccountResponse)(nil), // 1: pb.UpdateAccountResponse
(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
(*Account)(nil), // 3: pb.Account
(*Account)(nil), // 2: pb.Account
}
var file_rpc_update_account_proto_depIdxs = []int32{
2, // 0: pb.UpdateAccountRequest.birthday:type_name -> google.protobuf.Timestamp
3, // 1: pb.UpdateAccountResponse.account:type_name -> pb.Account
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
2, // 0: pb.UpdateAccountResponse.account:type_name -> pb.Account
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_rpc_update_account_proto_init() }

View 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
}

View File

@ -26,7 +26,7 @@ type UpdateAccountPrivacyRequest struct {
sizeCache protoimpl.SizeCache
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"`
}
@ -62,9 +62,9 @@ func (*UpdateAccountPrivacyRequest) Descriptor() ([]byte, []int) {
return file_rpc_update_account_privacy_proto_rawDescGZIP(), []int{0}
}
func (x *UpdateAccountPrivacyRequest) GetId() uint64 {
func (x *UpdateAccountPrivacyRequest) GetAccountId() uint64 {
if x != nil {
return x.Id
return x.AccountId
}
return 0
}
@ -81,7 +81,7 @@ type UpdateAccountPrivacyResponse struct {
sizeCache protoimpl.SizeCache
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() {
@ -116,9 +116,9 @@ func (*UpdateAccountPrivacyResponse) Descriptor() ([]byte, []int) {
return file_rpc_update_account_privacy_proto_rawDescGZIP(), []int{1}
}
func (x *UpdateAccountPrivacyResponse) GetAccount() *Account {
func (x *UpdateAccountPrivacyResponse) GetAccountInfo() *AccountInfo {
if x != nil {
return x.Account
return x.AccountInfo
}
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,
0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x02, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x04, 0x42, 0x0e, 0x92, 0x41, 0x0b, 0x4a, 0x01, 0x31, 0xa2, 0x02, 0x05, 0x69, 0x6e, 0x74, 0x36,
0x34, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79,
0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42,
0x0a, 0x92, 0x41, 0x07, 0x4a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x70, 0x72, 0x69,
0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x3a, 0x90, 0x01, 0x92,
0x41, 0x8c, 0x01, 0x0a, 0x62, 0x2a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x43, 0x6f,
0x6e, 0x73, 0x65, 0x6e, 0x74, 0x32, 0x28, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68,
0x65, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e,
0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0xd2,
0x01, 0x02, 0x69, 0x64, 0xd2, 0x01, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61,
0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x32, 0x26, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20,
0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63,
0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0x20, 0x7d, 0x22,
0x83, 0x01, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x3b, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x14,
0x92, 0x41, 0x11, 0x2a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x20, 0x41, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x26, 0x92,
0x41, 0x23, 0x0a, 0x21, 0x2a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
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, 0xa7, 0x02, 0x0a, 0x1b, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76,
0x61, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x61, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0e,
0x92, 0x41, 0x0b, 0x4a, 0x01, 0x31, 0xa2, 0x02, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x09,
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x10, 0x70, 0x72, 0x69,
0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x08, 0x42, 0x0a, 0x92, 0x41, 0x07, 0x4a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52,
0x0f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64,
0x3a, 0xa1, 0x01, 0x92, 0x41, 0x9d, 0x01, 0x0a, 0x6b, 0x2a, 0x23, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x50,
0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x32, 0x2c,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x69, 0x76, 0x61,
0x63, 0x79, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e,
0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0xd2, 0x01, 0x02, 0x69,
0x64, 0xd2, 0x01, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65,
0x70, 0x74, 0x65, 0x64, 0x32, 0x2e, 0x7b, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f,
0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x72, 0x69, 0x76, 0x61,
0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72,
0x75, 0x65, 0x20, 0x7d, 0x22, 0x99, 0x01, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 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, 0x18, 0x92, 0x41,
0x15, 0x2a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49,
0x6e, 0x66, 0x6f, 0x3a, 0x2b, 0x92, 0x41, 0x28, 0x0a, 0x26, 0x2a, 0x24, 0x55, 0x70, 0x64, 0x61,
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 (
@ -178,10 +182,10 @@ var file_rpc_update_account_privacy_proto_msgTypes = make([]protoimpl.MessageInf
var file_rpc_update_account_privacy_proto_goTypes = []interface{}{
(*UpdateAccountPrivacyRequest)(nil), // 0: pb.UpdateAccountPrivacyRequest
(*UpdateAccountPrivacyResponse)(nil), // 1: pb.UpdateAccountPrivacyResponse
(*Account)(nil), // 2: pb.Account
(*AccountInfo)(nil), // 2: pb.AccountInfo
}
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 input_type
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 {
return
}
file_account_proto_init()
file_account_info_proto_init()
if !protoimpl.UnsafeEnabled {
file_rpc_update_account_privacy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateAccountPrivacyRequest); i {

View File

@ -54,257 +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,
0x20, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x0f, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63,
0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f,
0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x72,
0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x5f,
0x6c, 0x6f, 0x67, 0x5f, 0x62, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x70, 0x6c, 0x6f,
0x61, 0x64, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x19, 0x72, 0x70, 0x63, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x64, 0x6f,
0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x72, 0x70,
0x63, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x32, 0x95, 0x1c, 0x0a, 0x02, 0x64, 0x66, 0x12, 0x42, 0x0a, 0x05, 0x4c,
0x6f, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69,
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x0e, 0x3a, 0x01, 0x2a, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12,
0x68, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
0x17, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65,
0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f,
0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x66, 0x72,
0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0xa4, 0x01, 0x0a, 0x0c, 0x4c, 0x69,
0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x61, 0x92,
0x41, 0x2f, 0x12, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x6f, 0x1a, 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,
0x1a, 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, 0x1a, 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, 0x1a, 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, 0x1a, 0x0f, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x6f,
0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x6c,
0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f,
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x72, 0x70, 0x63,
0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x72,
0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x62, 0x79, 0x5f, 0x70, 0x65,
0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x72,
0x70, 0x63, 0x5f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65,
0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x72, 0x70, 0x63, 0x5f, 0x64, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x72, 0x70, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f,
0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xc8, 0x21, 0x0a, 0x02,
0x64, 0x66, 0x12, 0x42, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x2e, 0x70, 0x62,
0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e,
0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x3a, 0x01, 0x2a, 0x22, 0x09, 0x2f, 0x76, 0x31,
0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x68, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73,
0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x72,
0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x18, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x73, 0x2f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
0x12, 0xa4, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x73, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x61, 0x92, 0x41, 0x2f, 0x12, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x20,
0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x62, 0x79, 0x20, 0x61, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72,
0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27,
0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x69, 0x73,
0x74, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63,
0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c,
0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x92, 0x41, 0x27,
0x12, 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20,
0x62, 0x79, 0x20, 0x49, 0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65,
0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a,
0x32, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x62,
0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x92, 0x01, 0x0a,
0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x15, 0x2e, 0x70, 0x62,
0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x55, 0x92, 0x41, 0x2d, 0x12,
0x19, 0x47, 0x65, 0x74, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x62, 0x79, 0x20,
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a,
0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93,
0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x7b, 0x69, 0x64,
0x7d, 0x12, 0x96, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x73, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x92, 0x41, 0x2e, 0x12, 0x1a, 0x4c, 0x69, 0x73, 0x74,
0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x20, 0x5b, 0x61, 0x64, 0x6d, 0x69, 0x6e,
0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x5d, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72,
0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a,
0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x6c, 0x69, 0x73,
0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x83, 0x01, 0x0a, 0x0d, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70,
0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x3d, 0x92, 0x41, 0x14, 0x12, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x41,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20,
0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x12, 0x91, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70,
0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x92, 0x41, 0x22, 0x12, 0x0e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x62, 0x10, 0x0a, 0x0e,
0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x32, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x12, 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,
0x12, 0x1e, 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, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
0x12, 0xa6, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 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, 0x22, 0x54, 0x92, 0x41, 0x26, 0x12, 0x12, 0x43, 0x72, 0x65, 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, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0xa6, 0x01, 0x0a, 0x11, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
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,
0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x92, 0x41, 0x21, 0x12, 0x0d, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a,
0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93,
0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x32, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f,
0x6e, 0x73, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
0x12, 0x84, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x14,
0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72,
0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0x92, 0x41, 0x24,
0x12, 0x10, 0x47, 0x65, 0x74, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x20, 0x62, 0x79, 0x20,
0x49, 0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75,
0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x76, 0x31, 0x2f,
0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x73,
0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x72,
0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x92, 0x41, 0x27,
0x12, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x20,
0x62, 0x79, 0x20, 0x49, 0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65,
0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x2a, 0x1e, 0x2f,
0x76, 0x31, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9e, 0x01,
0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x2e,
0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50,
0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e,
0x92, 0x41, 0x2e, 0x12, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e,
0x73, 0x20, 0x62, 0x79, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x62,
0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12,
0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d,
0x12, 0x92, 0x01, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e,
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x92, 0x41, 0x27, 0x12, 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
0x20, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0x62, 0x10,
0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00,
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x32, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x73,
0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x65,
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62,
0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x55, 0x92, 0x41, 0x2d, 0x12, 0x19, 0x47, 0x65, 0x74, 0x20, 0x41, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x5f, 0x69, 0x64, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41,
0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31,
0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x96, 0x01, 0x0a, 0x0c, 0x4c,
0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x17, 0x2e, 0x70, 0x62,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53,
0x92, 0x41, 0x2e, 0x12, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x73, 0x20, 0x5b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x5d, 0x62,
0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12,
0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x73, 0x12, 0x7f, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x92, 0x41, 0x10, 0x12, 0x0e,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x92, 0x41, 0x22,
0x12, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68,
0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x32, 0x1b, 0x2f, 0x76, 0x31,
0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0xbf, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63,
0x79, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x52, 0x65, 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,
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, 0x28, 0x3a, 0x01, 0x2a, 0x32, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x73, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x12, 0x8b, 0x01, 0x0a, 0x0c, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62,
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48,
0x92, 0x41, 0x21, 0x12, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x50, 0x65, 0x72, 0x73,
0x6f, 0x6e, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75,
0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f,
0x76, 0x31, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x8b, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65,
0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x92, 0x41,
0x21, 0x12, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e,
0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68,
0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x32, 0x19, 0x2f, 0x76, 0x31,
0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f,
0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x84, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x65,
0x72, 0x73, 0x6f, 0x6e, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72,
0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e,
0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x4a, 0x92, 0x41, 0x24, 0x12, 0x10, 0x47, 0x65, 0x74, 0x20, 0x50, 0x65, 0x72, 0x73,
0x6f, 0x6e, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65,
0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d,
0x12, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x2f, 0x67, 0x65,
0x74, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x93, 0x01,
0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x17,
0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x50, 0x92, 0x41, 0x27, 0x12, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x50,
0x65, 0x72, 0x73, 0x6f, 0x6e, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a,
0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x20, 0x2a, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73,
0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2f, 0x7b,
0x69, 0x64, 0x7d, 0x12, 0x9e, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x73,
0x6f, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72,
0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x62,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0x92, 0x41, 0x2e, 0x12, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x20,
0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x20, 0x62, 0x79, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x5f, 0x69, 0x64, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65,
0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f,
0x76, 0x31, 0x2f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x5f,
0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x5f, 0x69, 0x64, 0x7d, 0x12, 0x91, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50,
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d,
0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x92, 0x41, 0x22,
0x12, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68,
0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31,
0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x8a, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74,
0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74,
0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x92, 0x41, 0x25, 0x12, 0x11, 0x47, 0x65, 0x74,
0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0x62, 0x10,
0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x12, 0x8a, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65,
0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x4d, 0x92, 0x41, 0x25, 0x12, 0x11, 0x47, 0x65, 0x74, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65,
0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f,
0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x67,
0x65, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12,
0x99, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62,
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x92, 0x41, 0x28, 0x12, 0x14, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x49,
0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74,
0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x2a, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x70,
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70,
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xa4, 0x01, 0x0a, 0x0c,
0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x17, 0x2e, 0x70,
0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50,
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x61, 0x92, 0x41, 0x2f, 0x12, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65,
0x6e, 0x74, 0x73, 0x20, 0x62, 0x79, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69,
0x64, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74,
0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x70,
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69,
0x64, 0x7d, 0x12, 0x91, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x92, 0x41, 0x22, 0x12, 0x0e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x10,
0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00,
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d,
0x65, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x99, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x92, 0x41,
0x28, 0x12, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61,
0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x2a,
0x20, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x64, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x69, 0x64,
0x7d, 0x12, 0xa4, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x73, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d,
0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x61, 0x92, 0x41, 0x2f, 0x12, 0x1b, 0x4c, 0x69, 0x73, 0x74,
0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x62, 0x79, 0x20, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61,
0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12,
0x27, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x6c, 0x69,
0x73, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x91, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x4b, 0x92, 0x41, 0x22, 0x12, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x50, 0x61, 0x79,
0x6d, 0x65, 0x6e, 0x74, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72,
0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x32,
0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x70,
0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0xb0, 0x01, 0x0a,
0x0e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x4c, 0x6f, 0x67, 0x12,
0x19, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73,
0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x92, 0x41, 0x30, 0x12, 0x1c, 0x4c, 0x69, 0x73,
0x74, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x4c, 0x6f, 0x67, 0x20, 0x62, 0x79, 0x20,
0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42,
0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x2e, 0x12, 0x2c, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x5f, 0x6c,
0x6f, 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x5f,
0x6c, 0x6f, 0x67, 0x2f, 0x7b, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12,
0xca, 0x02, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65,
0x6e, 0x74, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x6f,
0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e,
0x70, 0x62, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, 0x02, 0x92, 0x41, 0xe0, 0x01,
0x12, 0x1b, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x20, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,
0x74, 0x20, 0x5b, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x48, 0x54, 0x54, 0x50, 0x5d, 0x1a, 0xae, 0x01,
0x54, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x69, 0x61, 0x20, 0x73, 0x77, 0x61, 0x67,
0x67, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x70, 0x6f, 0x73, 0x73, 0x69,
0x62, 0x6c, 0x65, 0x2e, 0x20, 0x54, 0x72, 0x79, 0x20, 0x60, 0x60, 0x60, 0x63, 0x75, 0x72, 0x6c,
0x20, 0x2d, 0x58, 0x20, 0x50, 0x4f, 0x53, 0x54, 0x20, 0x2d, 0x48, 0x20, 0x22, 0x41, 0x75, 0x74,
0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x42, 0x65, 0x61, 0x72,
0x65, 0x72, 0x20, 0x7b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x7d, 0x22, 0x20, 0x2d, 0x46, 0x20, 0x22,
0x66, 0x69, 0x6c, 0x65, 0x3d, 0x40, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x74, 0x6f, 0x2f, 0x66,
0x69, 0x6c, 0x65, 0x22, 0x20, 0x2d, 0x46, 0x20, 0x22, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x5f,
0x69, 0x64, 0x3d, 0x31, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x7b, 0x73,
0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x52, 0x49, 0x7d, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65,
0x6e, 0x74, 0x73, 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x60, 0x60, 0x60, 0x62, 0x10,
0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00,
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x64, 0x6f, 0x63, 0x75,
0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x9f, 0x01, 0x0a,
0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12,
0x19, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d,
0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x92, 0x41, 0x29, 0x12, 0x15, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x20, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x62, 0x79, 0x20,
0x49, 0x44, 0x62, 0x10, 0x0a, 0x0e, 0x0a, 0x0a, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x41, 0x75,
0x74, 0x68, 0x12, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x2a, 0x22, 0x2f, 0x76, 0x31, 0x2f,
0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 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,
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{}{
@ -316,44 +367,52 @@ var file_service_df_proto_goTypes = []interface{}{
(*ListAccountsRequest)(nil), // 5: pb.ListAccountsRequest
(*CreateAccountRequest)(nil), // 6: pb.CreateAccountRequest
(*UpdateAccountRequest)(nil), // 7: pb.UpdateAccountRequest
(*UpdateAccountPrivacyRequest)(nil), // 8: pb.UpdateAccountPrivacyRequest
(*CreatePersonRequest)(nil), // 9: pb.CreatePersonRequest
(*UpdatePersonRequest)(nil), // 10: pb.UpdatePersonRequest
(*GetPersonRequest)(nil), // 11: pb.GetPersonRequest
(*DeletePersonRequest)(nil), // 12: pb.DeletePersonRequest
(*ListPersonsRequest)(nil), // 13: pb.ListPersonsRequest
(*CreatePaymentRequest)(nil), // 14: pb.CreatePaymentRequest
(*GetPaymentRequest)(nil), // 15: pb.GetPaymentRequest
(*DeletePaymentRequest)(nil), // 16: pb.DeletePaymentRequest
(*ListPaymentsRequest)(nil), // 17: pb.ListPaymentsRequest
(*UpdatePaymentRequest)(nil), // 18: pb.UpdatePaymentRequest
(*ListReturnsLogRequest)(nil), // 19: pb.ListReturnsLogRequest
(*UploadDocumentRequest)(nil), // 20: pb.UploadDocumentRequest
(*DeleteDocumentRequest)(nil), // 21: pb.DeleteDocumentRequest
(*VerifyEmailRequest)(nil), // 22: pb.VerifyEmailRequest
(*LoginResponse)(nil), // 23: pb.LoginResponse
(*RefreshTokenResponse)(nil), // 24: pb.RefreshTokenResponse
(*ListSessionsResponse)(nil), // 25: pb.ListSessionsResponse
(*BlockSessionResponse)(nil), // 26: pb.BlockSessionResponse
(*GetAccountResponse)(nil), // 27: pb.GetAccountResponse
(*ListAccountsResponse)(nil), // 28: pb.ListAccountsResponse
(*CreateAccountResponse)(nil), // 29: pb.CreateAccountResponse
(*UpdateAccountResponse)(nil), // 30: pb.UpdateAccountResponse
(*UpdateAccountPrivacyResponse)(nil), // 31: pb.UpdateAccountPrivacyResponse
(*CreatePersonResponse)(nil), // 32: pb.CreatePersonResponse
(*UpdatePersonResponse)(nil), // 33: pb.UpdatePersonResponse
(*GetPersonResponse)(nil), // 34: pb.GetPersonResponse
(*DeletePersonResponse)(nil), // 35: pb.DeletePersonResponse
(*ListPersonsResponse)(nil), // 36: pb.ListPersonsResponse
(*CreatePaymentResponse)(nil), // 37: pb.CreatePaymentResponse
(*GetPaymentResponse)(nil), // 38: pb.GetPaymentResponse
(*DeletePaymentResponse)(nil), // 39: pb.DeletePaymentResponse
(*ListPaymentsResponse)(nil), // 40: pb.ListPaymentsResponse
(*UpdatePaymentResponse)(nil), // 41: pb.UpdatePaymentResponse
(*ListReturnsLogResponse)(nil), // 42: pb.ListReturnsLogResponse
(*UploadDocumentResponse)(nil), // 43: pb.UploadDocumentResponse
(*DeleteDocumentResponse)(nil), // 44: pb.DeleteDocumentResponse
(*VerifyEmailResponse)(nil), // 45: pb.VerifyEmailResponse
(*GetAccountInfoRequest)(nil), // 8: pb.GetAccountInfoRequest
(*ListAccountInfoRequest)(nil), // 9: pb.ListAccountInfoRequest
(*CreateAccountInfoRequest)(nil), // 10: pb.CreateAccountInfoRequest
(*UpdateAccountInfoRequest)(nil), // 11: pb.UpdateAccountInfoRequest
(*UpdateAccountPrivacyRequest)(nil), // 12: pb.UpdateAccountPrivacyRequest
(*CreatePersonRequest)(nil), // 13: pb.CreatePersonRequest
(*UpdatePersonRequest)(nil), // 14: pb.UpdatePersonRequest
(*GetPersonRequest)(nil), // 15: pb.GetPersonRequest
(*DeletePersonRequest)(nil), // 16: pb.DeletePersonRequest
(*ListPersonsRequest)(nil), // 17: pb.ListPersonsRequest
(*CreatePaymentRequest)(nil), // 18: pb.CreatePaymentRequest
(*GetPaymentRequest)(nil), // 19: pb.GetPaymentRequest
(*DeletePaymentRequest)(nil), // 20: pb.DeletePaymentRequest
(*ListPaymentsRequest)(nil), // 21: pb.ListPaymentsRequest
(*UpdatePaymentRequest)(nil), // 22: pb.UpdatePaymentRequest
(*ListReturnsLogRequest)(nil), // 23: pb.ListReturnsLogRequest
(*UploadDocumentRequest)(nil), // 24: pb.UploadDocumentRequest
(*DeleteDocumentRequest)(nil), // 25: pb.DeleteDocumentRequest
(*VerifyEmailRequest)(nil), // 26: pb.VerifyEmailRequest
(*LoginResponse)(nil), // 27: pb.LoginResponse
(*RefreshTokenResponse)(nil), // 28: pb.RefreshTokenResponse
(*ListSessionsResponse)(nil), // 29: pb.ListSessionsResponse
(*BlockSessionResponse)(nil), // 30: pb.BlockSessionResponse
(*GetAccountResponse)(nil), // 31: pb.GetAccountResponse
(*ListAccountsResponse)(nil), // 32: pb.ListAccountsResponse
(*CreateAccountResponse)(nil), // 33: pb.CreateAccountResponse
(*UpdateAccountResponse)(nil), // 34: pb.UpdateAccountResponse
(*GetAccountInfoResponse)(nil), // 35: pb.GetAccountInfoResponse
(*ListAccountInfoResponse)(nil), // 36: pb.ListAccountInfoResponse
(*CreateAccountInfoResponse)(nil), // 37: pb.CreateAccountInfoResponse
(*UpdateAccountInfoResponse)(nil), // 38: pb.UpdateAccountInfoResponse
(*UpdateAccountPrivacyResponse)(nil), // 39: pb.UpdateAccountPrivacyResponse
(*CreatePersonResponse)(nil), // 40: pb.CreatePersonResponse
(*UpdatePersonResponse)(nil), // 41: pb.UpdatePersonResponse
(*GetPersonResponse)(nil), // 42: pb.GetPersonResponse
(*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{
0, // 0: pb.df.Login:input_type -> pb.LoginRequest
@ -364,46 +423,54 @@ var file_service_df_proto_depIdxs = []int32{
5, // 5: pb.df.ListAccounts:input_type -> pb.ListAccountsRequest
6, // 6: pb.df.CreateAccount:input_type -> pb.CreateAccountRequest
7, // 7: pb.df.UpdateAccount:input_type -> pb.UpdateAccountRequest
8, // 8: pb.df.UpdateAccountPrivacy:input_type -> pb.UpdateAccountPrivacyRequest
9, // 9: pb.df.CreatePerson:input_type -> pb.CreatePersonRequest
10, // 10: pb.df.UpdatePerson:input_type -> pb.UpdatePersonRequest
11, // 11: pb.df.GetPerson:input_type -> pb.GetPersonRequest
12, // 12: pb.df.DeletePerson:input_type -> pb.DeletePersonRequest
13, // 13: pb.df.ListPersons:input_type -> pb.ListPersonsRequest
14, // 14: pb.df.CreatePayment:input_type -> pb.CreatePaymentRequest
15, // 15: pb.df.GetPayment:input_type -> pb.GetPaymentRequest
16, // 16: pb.df.DeletePayment:input_type -> pb.DeletePaymentRequest
17, // 17: pb.df.ListPayments:input_type -> pb.ListPaymentsRequest
18, // 18: pb.df.UpdatePayment:input_type -> pb.UpdatePaymentRequest
19, // 19: pb.df.ListReturnsLog:input_type -> pb.ListReturnsLogRequest
20, // 20: pb.df.UploadDocument:input_type -> pb.UploadDocumentRequest
21, // 21: pb.df.DeleteDocument:input_type -> pb.DeleteDocumentRequest
22, // 22: pb.df.VerifyEmail:input_type -> pb.VerifyEmailRequest
23, // 23: pb.df.Login:output_type -> pb.LoginResponse
24, // 24: pb.df.RefreshToken:output_type -> pb.RefreshTokenResponse
25, // 25: pb.df.ListSessions:output_type -> pb.ListSessionsResponse
26, // 26: pb.df.BlockSession:output_type -> pb.BlockSessionResponse
27, // 27: pb.df.GetAccount:output_type -> pb.GetAccountResponse
28, // 28: pb.df.ListAccounts:output_type -> pb.ListAccountsResponse
29, // 29: pb.df.CreateAccount:output_type -> pb.CreateAccountResponse
30, // 30: pb.df.UpdateAccount:output_type -> pb.UpdateAccountResponse
31, // 31: pb.df.UpdateAccountPrivacy:output_type -> pb.UpdateAccountPrivacyResponse
32, // 32: pb.df.CreatePerson:output_type -> pb.CreatePersonResponse
33, // 33: pb.df.UpdatePerson:output_type -> pb.UpdatePersonResponse
34, // 34: pb.df.GetPerson:output_type -> pb.GetPersonResponse
35, // 35: pb.df.DeletePerson:output_type -> pb.DeletePersonResponse
36, // 36: pb.df.ListPersons:output_type -> pb.ListPersonsResponse
37, // 37: pb.df.CreatePayment:output_type -> pb.CreatePaymentResponse
38, // 38: pb.df.GetPayment:output_type -> pb.GetPaymentResponse
39, // 39: pb.df.DeletePayment:output_type -> pb.DeletePaymentResponse
40, // 40: pb.df.ListPayments:output_type -> pb.ListPaymentsResponse
41, // 41: pb.df.UpdatePayment:output_type -> pb.UpdatePaymentResponse
42, // 42: pb.df.ListReturnsLog:output_type -> pb.ListReturnsLogResponse
43, // 43: pb.df.UploadDocument:output_type -> pb.UploadDocumentResponse
44, // 44: pb.df.DeleteDocument:output_type -> pb.DeleteDocumentResponse
45, // 45: pb.df.VerifyEmail:output_type -> pb.VerifyEmailResponse
23, // [23:46] is the sub-list for method output_type
0, // [0:23] is the sub-list for method input_type
8, // 8: pb.df.GetAccountInfo:input_type -> pb.GetAccountInfoRequest
9, // 9: pb.df.ListAccountInfo:input_type -> pb.ListAccountInfoRequest
10, // 10: pb.df.CreateAccountInfo:input_type -> pb.CreateAccountInfoRequest
11, // 11: pb.df.UpdateAccountInfo:input_type -> pb.UpdateAccountInfoRequest
12, // 12: pb.df.UpdateAccountPrivacy:input_type -> pb.UpdateAccountPrivacyRequest
13, // 13: pb.df.CreatePerson:input_type -> pb.CreatePersonRequest
14, // 14: pb.df.UpdatePerson:input_type -> pb.UpdatePersonRequest
15, // 15: pb.df.GetPerson:input_type -> pb.GetPersonRequest
16, // 16: pb.df.DeletePerson:input_type -> pb.DeletePersonRequest
17, // 17: pb.df.ListPersons:input_type -> pb.ListPersonsRequest
18, // 18: pb.df.CreatePayment:input_type -> pb.CreatePaymentRequest
19, // 19: pb.df.GetPayment:input_type -> pb.GetPaymentRequest
20, // 20: pb.df.DeletePayment:input_type -> pb.DeletePaymentRequest
21, // 21: pb.df.ListPayments:input_type -> pb.ListPaymentsRequest
22, // 22: pb.df.UpdatePayment:input_type -> pb.UpdatePaymentRequest
23, // 23: pb.df.ListReturnsLog:input_type -> pb.ListReturnsLogRequest
24, // 24: pb.df.UploadDocument:input_type -> pb.UploadDocumentRequest
25, // 25: pb.df.DeleteDocument:input_type -> pb.DeleteDocumentRequest
26, // 26: pb.df.VerifyEmail:input_type -> pb.VerifyEmailRequest
27, // 27: pb.df.Login:output_type -> pb.LoginResponse
28, // 28: pb.df.RefreshToken:output_type -> pb.RefreshTokenResponse
29, // 29: pb.df.ListSessions:output_type -> pb.ListSessionsResponse
30, // 30: pb.df.BlockSession:output_type -> pb.BlockSessionResponse
31, // 31: pb.df.GetAccount:output_type -> pb.GetAccountResponse
32, // 32: pb.df.ListAccounts:output_type -> pb.ListAccountsResponse
33, // 33: pb.df.CreateAccount:output_type -> pb.CreateAccountResponse
34, // 34: pb.df.UpdateAccount:output_type -> pb.UpdateAccountResponse
35, // 35: pb.df.GetAccountInfo:output_type -> pb.GetAccountInfoResponse
36, // 36: pb.df.ListAccountInfo:output_type -> pb.ListAccountInfoResponse
37, // 37: pb.df.CreateAccountInfo:output_type -> pb.CreateAccountInfoResponse
38, // 38: pb.df.UpdateAccountInfo:output_type -> pb.UpdateAccountInfoResponse
39, // 39: pb.df.UpdateAccountPrivacy:output_type -> pb.UpdateAccountPrivacyResponse
40, // 40: pb.df.CreatePerson:output_type -> pb.CreatePersonResponse
41, // 41: pb.df.UpdatePerson:output_type -> pb.UpdatePersonResponse
42, // 42: pb.df.GetPerson:output_type -> pb.GetPersonResponse
43, // 43: pb.df.DeletePerson:output_type -> pb.DeletePersonResponse
44, // 44: pb.df.ListPersons:output_type -> pb.ListPersonsResponse
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 extendee
0, // [0:0] is the sub-list for field type_name
@ -429,6 +496,10 @@ func file_service_df_proto_init() {
file_rpc_list_accounts_proto_init()
file_rpc_update_account_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_list_sessions_proto_init()
file_rpc_refresh_token_proto_init()

View File

@ -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) {
var protoReq UpdateAccountPrivacyRequest
var metadata runtime.ServerMetadata
@ -1239,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) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -1831,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) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -2181,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_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_CreatePerson_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "persons", "create_person"}, ""))
@ -2229,6 +2581,14 @@ var (
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_CreatePerson_0 = runtime.ForwardResponseMessage

View File

@ -27,6 +27,10 @@ const (
Df_ListAccounts_FullMethodName = "/pb.df/ListAccounts"
Df_CreateAccount_FullMethodName = "/pb.df/CreateAccount"
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_CreatePerson_FullMethodName = "/pb.df/CreatePerson"
Df_UpdatePerson_FullMethodName = "/pb.df/UpdatePerson"
@ -56,6 +60,10 @@ type DfClient interface {
ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error)
CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error)
UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...grpc.CallOption) (*UpdateAccountResponse, error)
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)
CreatePerson(ctx context.Context, in *CreatePersonRequest, opts ...grpc.CallOption) (*CreatePersonResponse, error)
UpdatePerson(ctx context.Context, in *UpdatePersonRequest, opts ...grpc.CallOption) (*UpdatePersonResponse, error)
@ -153,6 +161,42 @@ func (c *dfClient) UpdateAccount(ctx context.Context, in *UpdateAccountRequest,
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) {
out := new(UpdateAccountPrivacyResponse)
err := c.cc.Invoke(ctx, Df_UpdateAccountPrivacy_FullMethodName, in, out, opts...)
@ -300,6 +344,10 @@ type DfServer interface {
ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error)
CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, 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)
CreatePerson(context.Context, *CreatePersonRequest) (*CreatePersonResponse, error)
UpdatePerson(context.Context, *UpdatePersonRequest) (*UpdatePersonResponse, error)
@ -346,6 +394,18 @@ func (UnimplementedDfServer) CreateAccount(context.Context, *CreateAccountReques
func (UnimplementedDfServer) UpdateAccount(context.Context, *UpdateAccountRequest) (*UpdateAccountResponse, error) {
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) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateAccountPrivacy not implemented")
}
@ -548,6 +608,78 @@ func _Df_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(in
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) {
in := new(UpdateAccountPrivacyRequest)
if err := dec(in); err != nil {
@ -857,6 +989,22 @@ var Df_ServiceDesc = grpc.ServiceDesc{
MethodName: "UpdateAccount",
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",
Handler: _Df_UpdateAccountPrivacy_Handler,

View File

@ -16,29 +16,15 @@ message Account {
};
uint64 id = 1;
string email = 2;
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\""
optional string secret_key = 3;
google.protobuf.Timestamp email_verified_time = 9 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2023-10-05T00:00:00Z\""
}];
string phone = 10;
bool privacy_accepted = 11;
bool email_verified = 10;
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\""
}];
}

View 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\""
}];
}

View File

@ -2,7 +2,6 @@ syntax = "proto3";
package pb;
import "google/protobuf/timestamp.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
import "account.proto";
@ -16,33 +15,13 @@ message CreateAccountRequest {
description: "Create an Account";
required: [
"email",
"password",
"firstname",
"lastname",
"street",
"city",
"zip",
"country",
"birthday"
"password"
];
};
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 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 {

View 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) = {
}];
}

View File

@ -12,7 +12,7 @@ message GetAccountRequest {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
json_schema: {
title: "GetAccount";
description: "Get an Account by ID";
description: "Get AccountInfo by account_id";
required: [
"id"
];
@ -26,7 +26,7 @@ message GetAccountResponse {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
json_schema: {
title: "GetAccount Response";
description: "Returns the Account";
description: "Returns the AccountInfo";
};
};
Account account = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {

View 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) = {
}];
}

View 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) = {
}];
}

View File

@ -2,7 +2,6 @@ syntax = "proto3";
package pb;
import "google/protobuf/timestamp.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
import "account.proto";
@ -15,24 +14,15 @@ message UpdateAccountRequest {
title: "Update Account";
description: "Update an Account";
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 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 {

View 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) = {
}];
}

View File

@ -4,23 +4,23 @@ package pb;
import "protoc-gen-openapiv2/options/annotations.proto";
import "account.proto";
import "account_info.proto";
option go_package = "github.com/itsscb/df/pb";
message UpdateAccountPrivacyRequest {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
json_schema: {
title: "Update Account Privacy Consent";
description: "Update the Privacy Consent of an Account";
title: "Update Account Info Privacy Consent";
description: "Update the Privacy Consent of an AccountInfo";
required: [
"id",
"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",
format: "int64"
}];
@ -32,10 +32,10 @@ message UpdateAccountPrivacyRequest {
message UpdateAccountPrivacyResponse {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_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) = {
title: "Updated Account"
AccountInfo account_info = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
title: "Updated AccountInfo"
}];
}

View File

@ -23,6 +23,11 @@ import "rpc_list_accounts.proto";
import "rpc_update_account.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_list_sessions.proto";
import "rpc_refresh_token.proto";
@ -145,7 +150,7 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Create Account"
summary: "Create AccountInfo"
};
};
rpc UpdateAccount (UpdateAccountRequest) returns (UpdateAccountResponse) {
@ -163,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) {
option (google.api.http) = {
patch: "/v1/accounts/update_account_privacy"

View File

@ -17,6 +17,8 @@ sql:
go_type: "uint64"
- column: "payments.account_id"
go_type: "uint64"
- column: "account_info.account_id"
go_type: "uint64"
- column: "persons.account_id"
go_type: "uint64"
- column: "documents.account_id"

View File

@ -7,9 +7,9 @@ import (
)
var (
isValidName = regexp.MustCompile(`^[a-zA-Z\s]+$`).MatchString
isValidAlphaSpace = regexp.MustCompile(`^[a-zA-Z\s]+$`).MatchString
isValidAlphaNumSpace = regexp.MustCompile(`^[a-zA-Z0-9\s]+$`).MatchString
IsValidName = regexp.MustCompile(`^[a-zA-Z\s]+$`).MatchString
IsValidAlphaSpace = regexp.MustCompile(`^[a-zA-Z\s]+$`).MatchString
IsValidAlphaNumSpace = regexp.MustCompile(`^[a-zA-Z0-9\s]+$`).MatchString
)
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 {
return err
}
if !isValidName(value) {
if !IsValidName(value) {
return fmt.Errorf("must contain only letters or spaces")
}
return nil
@ -56,7 +56,7 @@ func ValidateStreet(value string) error {
return err
}
if !isValidAlphaNumSpace(value) {
if !IsValidAlphaNumSpace(value) {
return fmt.Errorf("must contain only letters, numbers or spaces")
}
@ -68,7 +68,7 @@ func ValidateAlphaSpace(value string) error {
return err
}
if !isValidAlphaSpace(value) {
if !IsValidAlphaSpace(value) {
return fmt.Errorf("must contain only letters, numbers or spaces")
}