diff --git a/bff/api/account.go b/bff/api/account.go index cdb0d03..e9c9480 100644 --- a/bff/api/account.go +++ b/bff/api/account.go @@ -63,7 +63,7 @@ func (server *Server) createAccount(ctx *gin.Context) { } type getAccountRequest struct { - ID int64 `uri:"id" binding:"required,min=1" json:"id"` + ID uint64 `uri:"id" binding:"required,min=1" json:"id"` } func (server *Server) getAccount(ctx *gin.Context) { @@ -142,8 +142,8 @@ func (server *Server) listAccounts(ctx *gin.Context) { } type updateAccountPrivacyRequest struct { - ID int64 `binding:"required" json:"ID"` - PrivacyAccepted *bool `binding:"required" json:"privacy_accepted"` + ID uint64 `binding:"required" json:"ID"` + PrivacyAccepted *bool `binding:"required" json:"privacy_accepted"` } func (server *Server) updateAccountPrivacy(ctx *gin.Context) { @@ -180,7 +180,7 @@ func (server *Server) updateAccountPrivacy(ctx *gin.Context) { } type updateAccountRequest struct { - ID int64 `binding:"required" json:"ID"` + ID uint64 `binding:"required" json:"ID"` NewPassword string `json:"new_password"` Firstname string `json:"firstname"` Lastname string `json:"lastname"` diff --git a/bff/api/account_test.go b/bff/api/account_test.go index d6993a0..42cb105 100644 --- a/bff/api/account_test.go +++ b/bff/api/account_test.go @@ -188,7 +188,7 @@ func TestGetAccountAPI(t *testing.T) { testCases := []struct { name string - accountID int64 + accountID uint64 setupAuth func(t *testing.T, request *http.Request, tokenMaker token.Maker) buildStubs func(store *mockdb.MockStore) checkResponse func(t *testing.T, recorder *httptest.ResponseRecorder) diff --git a/bff/db/mock/store.go b/bff/db/mock/store.go index a5c15ce..7bd70f9 100644 --- a/bff/db/mock/store.go +++ b/bff/db/mock/store.go @@ -249,7 +249,7 @@ func (mr *MockStoreMockRecorder) CreateSession(arg0, arg1 any) *gomock.Call { } // DeleteAccount mocks base method. -func (m *MockStore) DeleteAccount(arg0 context.Context, arg1 int64) error { +func (m *MockStore) DeleteAccount(arg0 context.Context, arg1 uint64) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DeleteAccount", arg0, arg1) ret0, _ := ret[0].(error) @@ -263,7 +263,7 @@ func (mr *MockStoreMockRecorder) DeleteAccount(arg0, arg1 any) *gomock.Call { } // DeleteDocument mocks base method. -func (m *MockStore) DeleteDocument(arg0 context.Context, arg1 int64) error { +func (m *MockStore) DeleteDocument(arg0 context.Context, arg1 uint64) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DeleteDocument", arg0, arg1) ret0, _ := ret[0].(error) @@ -277,7 +277,7 @@ func (mr *MockStoreMockRecorder) DeleteDocument(arg0, arg1 any) *gomock.Call { } // DeleteMail mocks base method. -func (m *MockStore) DeleteMail(arg0 context.Context, arg1 int64) error { +func (m *MockStore) DeleteMail(arg0 context.Context, arg1 uint64) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DeleteMail", arg0, arg1) ret0, _ := ret[0].(error) @@ -291,7 +291,7 @@ func (mr *MockStoreMockRecorder) DeleteMail(arg0, arg1 any) *gomock.Call { } // DeletePayment mocks base method. -func (m *MockStore) DeletePayment(arg0 context.Context, arg1 int64) error { +func (m *MockStore) DeletePayment(arg0 context.Context, arg1 uint64) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DeletePayment", arg0, arg1) ret0, _ := ret[0].(error) @@ -305,7 +305,7 @@ func (mr *MockStoreMockRecorder) DeletePayment(arg0, arg1 any) *gomock.Call { } // DeletePerson mocks base method. -func (m *MockStore) DeletePerson(arg0 context.Context, arg1 int64) error { +func (m *MockStore) DeletePerson(arg0 context.Context, arg1 uint64) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DeletePerson", arg0, arg1) ret0, _ := ret[0].(error) @@ -319,7 +319,7 @@ func (mr *MockStoreMockRecorder) DeletePerson(arg0, arg1 any) *gomock.Call { } // DeletePersonTx mocks base method. -func (m *MockStore) DeletePersonTx(arg0 context.Context, arg1 int64) error { +func (m *MockStore) DeletePersonTx(arg0 context.Context, arg1 uint64) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DeletePersonTx", arg0, arg1) ret0, _ := ret[0].(error) @@ -333,7 +333,7 @@ func (mr *MockStoreMockRecorder) DeletePersonTx(arg0, arg1 any) *gomock.Call { } // DeleteProvider mocks base method. -func (m *MockStore) DeleteProvider(arg0 context.Context, arg1 int64) error { +func (m *MockStore) DeleteProvider(arg0 context.Context, arg1 uint64) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DeleteProvider", arg0, arg1) ret0, _ := ret[0].(error) @@ -347,7 +347,7 @@ func (mr *MockStoreMockRecorder) DeleteProvider(arg0, arg1 any) *gomock.Call { } // DeleteReturn mocks base method. -func (m *MockStore) DeleteReturn(arg0 context.Context, arg1 int64) error { +func (m *MockStore) DeleteReturn(arg0 context.Context, arg1 uint64) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DeleteReturn", arg0, arg1) ret0, _ := ret[0].(error) @@ -361,7 +361,7 @@ func (mr *MockStoreMockRecorder) DeleteReturn(arg0, arg1 any) *gomock.Call { } // DeleteReturnsLog mocks base method. -func (m *MockStore) DeleteReturnsLog(arg0 context.Context, arg1 int64) error { +func (m *MockStore) DeleteReturnsLog(arg0 context.Context, arg1 uint64) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DeleteReturnsLog", arg0, arg1) ret0, _ := ret[0].(error) @@ -375,7 +375,7 @@ func (mr *MockStoreMockRecorder) DeleteReturnsLog(arg0, arg1 any) *gomock.Call { } // GetAccount mocks base method. -func (m *MockStore) GetAccount(arg0 context.Context, arg1 int64) (db.Account, error) { +func (m *MockStore) GetAccount(arg0 context.Context, arg1 uint64) (db.Account, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAccount", arg0, arg1) ret0, _ := ret[0].(db.Account) @@ -405,7 +405,7 @@ func (mr *MockStoreMockRecorder) GetAccountByEmail(arg0, arg1 any) *gomock.Call } // GetAccountForUpdate mocks base method. -func (m *MockStore) GetAccountForUpdate(arg0 context.Context, arg1 int64) (db.Account, error) { +func (m *MockStore) GetAccountForUpdate(arg0 context.Context, arg1 uint64) (db.Account, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAccountForUpdate", arg0, arg1) ret0, _ := ret[0].(db.Account) @@ -420,7 +420,7 @@ func (mr *MockStoreMockRecorder) GetAccountForUpdate(arg0, arg1 any) *gomock.Cal } // GetDocument mocks base method. -func (m *MockStore) GetDocument(arg0 context.Context, arg1 int64) (db.Document, error) { +func (m *MockStore) GetDocument(arg0 context.Context, arg1 uint64) (db.Document, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetDocument", arg0, arg1) ret0, _ := ret[0].(db.Document) @@ -435,7 +435,7 @@ func (mr *MockStoreMockRecorder) GetDocument(arg0, arg1 any) *gomock.Call { } // GetMail mocks base method. -func (m *MockStore) GetMail(arg0 context.Context, arg1 int64) (db.Mail, error) { +func (m *MockStore) GetMail(arg0 context.Context, arg1 uint64) (db.Mail, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetMail", arg0, arg1) ret0, _ := ret[0].(db.Mail) @@ -450,7 +450,7 @@ func (mr *MockStoreMockRecorder) GetMail(arg0, arg1 any) *gomock.Call { } // GetPayment mocks base method. -func (m *MockStore) GetPayment(arg0 context.Context, arg1 int64) (db.Payment, error) { +func (m *MockStore) GetPayment(arg0 context.Context, arg1 uint64) (db.Payment, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetPayment", arg0, arg1) ret0, _ := ret[0].(db.Payment) @@ -465,7 +465,7 @@ func (mr *MockStoreMockRecorder) GetPayment(arg0, arg1 any) *gomock.Call { } // GetPerson mocks base method. -func (m *MockStore) GetPerson(arg0 context.Context, arg1 int64) (db.Person, error) { +func (m *MockStore) GetPerson(arg0 context.Context, arg1 uint64) (db.Person, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetPerson", arg0, arg1) ret0, _ := ret[0].(db.Person) @@ -480,7 +480,7 @@ func (mr *MockStoreMockRecorder) GetPerson(arg0, arg1 any) *gomock.Call { } // GetProvider mocks base method. -func (m *MockStore) GetProvider(arg0 context.Context, arg1 int64) (db.Provider, error) { +func (m *MockStore) GetProvider(arg0 context.Context, arg1 uint64) (db.Provider, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetProvider", arg0, arg1) ret0, _ := ret[0].(db.Provider) @@ -495,7 +495,7 @@ func (mr *MockStoreMockRecorder) GetProvider(arg0, arg1 any) *gomock.Call { } // GetReturn mocks base method. -func (m *MockStore) GetReturn(arg0 context.Context, arg1 int64) (db.Return, error) { +func (m *MockStore) GetReturn(arg0 context.Context, arg1 uint64) (db.Return, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetReturn", arg0, arg1) ret0, _ := ret[0].(db.Return) @@ -525,7 +525,7 @@ func (mr *MockStoreMockRecorder) GetReturns(arg0, arg1 any) *gomock.Call { } // GetReturnsLog mocks base method. -func (m *MockStore) GetReturnsLog(arg0 context.Context, arg1 int64) (db.ReturnsLog, error) { +func (m *MockStore) GetReturnsLog(arg0 context.Context, arg1 uint64) (db.ReturnsLog, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetReturnsLog", arg0, arg1) ret0, _ := ret[0].(db.ReturnsLog) diff --git a/bff/db/sqlc/account.sql.go b/bff/db/sqlc/account.sql.go index 7edfb08..779da37 100644 --- a/bff/db/sqlc/account.sql.go +++ b/bff/db/sqlc/account.sql.go @@ -106,7 +106,7 @@ DELETE FROM accounts WHERE "id" = $1 ` -func (q *Queries) DeleteAccount(ctx context.Context, id int64) error { +func (q *Queries) DeleteAccount(ctx context.Context, id uint64) error { _, err := q.db.ExecContext(ctx, deleteAccount, id) return err } @@ -116,7 +116,7 @@ SELECT id, permission_level, passwordhash, firstname, lastname, birthday, privac WHERE "id" = $1 LIMIT 1 ` -func (q *Queries) GetAccount(ctx context.Context, id int64) (Account, error) { +func (q *Queries) GetAccount(ctx context.Context, id uint64) (Account, error) { row := q.db.QueryRowContext(ctx, getAccount, id) var i Account err := row.Scan( @@ -179,7 +179,7 @@ WHERE "id" = $1 LIMIT 1 FOR NO KEY UPDATE ` -func (q *Queries) GetAccountForUpdate(ctx context.Context, id int64) (Account, error) { +func (q *Queries) GetAccountForUpdate(ctx context.Context, id uint64) (Account, error) { row := q.db.QueryRowContext(ctx, getAccountForUpdate, id) var i Account err := row.Scan( @@ -279,7 +279,7 @@ RETURNING id, permission_level, passwordhash, firstname, lastname, birthday, pri ` type UpdateAccountParams struct { - ID int64 `json:"id"` + ID uint64 `json:"id"` Changer string `json:"changer"` Passwordhash sql.NullString `json:"passwordhash"` Firstname sql.NullString `json:"firstname"` @@ -347,7 +347,7 @@ type UpdateAccountPrivacyParams struct { PrivacyAccepted sql.NullBool `json:"privacy_accepted"` PrivacyAcceptedDate sql.NullTime `json:"privacy_accepted_date"` Changer string `json:"changer"` - ID int64 `json:"id"` + ID uint64 `json:"id"` } func (q *Queries) UpdateAccountPrivacy(ctx context.Context, arg UpdateAccountPrivacyParams) (Account, error) { diff --git a/bff/db/sqlc/document.sql.go b/bff/db/sqlc/document.sql.go index 558347e..e6b2825 100644 --- a/bff/db/sqlc/document.sql.go +++ b/bff/db/sqlc/document.sql.go @@ -123,7 +123,7 @@ DELETE FROM documents WHERE "id" = $1 ` -func (q *Queries) DeleteDocument(ctx context.Context, id int64) error { +func (q *Queries) DeleteDocument(ctx context.Context, id uint64) error { _, err := q.db.ExecContext(ctx, deleteDocument, id) return err } @@ -133,7 +133,7 @@ SELECT id, person_id, name, type, path, url, valid, valid_date, validated_by, ma WHERE "id" = $1 LIMIT 1 ` -func (q *Queries) GetDocument(ctx context.Context, id int64) (Document, error) { +func (q *Queries) GetDocument(ctx context.Context, id uint64) (Document, error) { row := q.db.QueryRowContext(ctx, getDocument, id) var i Document err := row.Scan( @@ -168,7 +168,7 @@ RETURNING id, person_id, name, type, path, url, valid, valid_date, validated_by, ` type InvalidateDocumentParams struct { - ID int64 `json:"id"` + ID uint64 `json:"id"` Changer string `json:"changer"` } @@ -259,7 +259,7 @@ RETURNING id, person_id, name, type, path, url, valid, valid_date, validated_by, ` type UpdateDocumentParams struct { - ID int64 `json:"id"` + ID uint64 `json:"id"` Changer string `json:"changer"` PersonID sql.NullInt64 `json:"person_id"` Name sql.NullString `json:"name"` @@ -311,7 +311,7 @@ RETURNING id, person_id, name, type, path, url, valid, valid_date, validated_by, ` type ValidateDocumentParams struct { - ID int64 `json:"id"` + ID uint64 `json:"id"` ValidatedBy sql.NullString `json:"validated_by"` } diff --git a/bff/db/sqlc/document_test.go b/bff/db/sqlc/document_test.go index 45f7a22..95e05cf 100644 --- a/bff/db/sqlc/document_test.go +++ b/bff/db/sqlc/document_test.go @@ -19,7 +19,7 @@ func createRandomDocumentUpload(t *testing.T) Document { arg := CreateDocumentUploadParams{ PersonID: sql.NullInt64{ Valid: true, - Int64: person.ID, + Int64: int64(person.ID), }, Name: util.RandomString(20), Type: util.RandomString(5), @@ -57,7 +57,7 @@ func TestCreateDocumentMail(t *testing.T) { arg := CreateDocumentMailParams{ MailID: sql.NullInt64{ Valid: true, - Int64: mail.ID, + Int64: int64(mail.ID), }, Name: util.RandomString(20), Type: util.RandomString(5), diff --git a/bff/db/sqlc/mail.sql.go b/bff/db/sqlc/mail.sql.go index 1375ccf..b770e48 100644 --- a/bff/db/sqlc/mail.sql.go +++ b/bff/db/sqlc/mail.sql.go @@ -89,7 +89,7 @@ WHERE "id" = $1 // // WHERE "id" = $1 // RETURNING *; -func (q *Queries) DeleteMail(ctx context.Context, id int64) error { +func (q *Queries) DeleteMail(ctx context.Context, id uint64) error { _, err := q.db.ExecContext(ctx, deleteMail, id) return err } @@ -99,7 +99,7 @@ SELECT id, "from", "to", cc, timestamp, subject, body, creator, created, changer WHERE "id" = $1 LIMIT 1 ` -func (q *Queries) GetMail(ctx context.Context, id int64) (Mail, error) { +func (q *Queries) GetMail(ctx context.Context, id uint64) (Mail, error) { row := q.db.QueryRowContext(ctx, getMail, id) var i Mail err := row.Scan( diff --git a/bff/db/sqlc/models.go b/bff/db/sqlc/models.go index f93a481..b27c817 100644 --- a/bff/db/sqlc/models.go +++ b/bff/db/sqlc/models.go @@ -12,7 +12,7 @@ import ( ) type Account struct { - ID int64 `json:"id"` + ID uint64 `json:"id"` PermissionLevel int32 `json:"permission_level"` Passwordhash string `json:"passwordhash"` Firstname string `json:"firstname"` @@ -33,7 +33,7 @@ type Account struct { } type Document struct { - ID int64 `json:"id"` + ID uint64 `json:"id"` PersonID sql.NullInt64 `json:"person_id"` Name string `json:"name"` Type string `json:"type"` @@ -50,7 +50,7 @@ type Document struct { } type Mail struct { - ID int64 `json:"id"` + ID uint64 `json:"id"` From string `json:"from"` To []string `json:"to"` Cc []string `json:"cc"` @@ -64,7 +64,7 @@ type Mail struct { } type Payment struct { - ID int64 `json:"id"` + ID uint64 `json:"id"` AccountID int64 `json:"account_id"` PaymentCategory string `json:"payment_category"` Bankname sql.NullString `json:"bankname"` @@ -81,7 +81,7 @@ type Payment struct { } type Person struct { - ID int64 `json:"id"` + ID uint64 `json:"id"` AccountID int64 `json:"account_id"` Firstname string `json:"firstname"` Lastname string `json:"lastname"` @@ -97,7 +97,7 @@ type Person struct { } type Provider struct { - ID int64 `json:"id"` + ID uint64 `json:"id"` Name string `json:"name"` Description string `json:"description"` Category string `json:"category"` @@ -109,7 +109,7 @@ type Provider struct { } type Return struct { - ID int64 `json:"id"` + ID uint64 `json:"id"` PersonID int64 `json:"person_id"` ProviderID int64 `json:"provider_id"` Name string `json:"name"` @@ -124,7 +124,7 @@ type Return struct { } type ReturnsLog struct { - ID int64 `json:"id"` + ID uint64 `json:"id"` ReturnID int64 `json:"return_id"` MailID int64 `json:"mail_id"` Status sql.NullString `json:"status"` diff --git a/bff/db/sqlc/payment.sql.go b/bff/db/sqlc/payment.sql.go index 63b9ddc..c1eb584 100644 --- a/bff/db/sqlc/payment.sql.go +++ b/bff/db/sqlc/payment.sql.go @@ -81,7 +81,7 @@ DELETE FROM payments WHERE "id" = $1 ` -func (q *Queries) DeletePayment(ctx context.Context, id int64) error { +func (q *Queries) DeletePayment(ctx context.Context, id uint64) error { _, err := q.db.ExecContext(ctx, deletePayment, id) return err } @@ -91,7 +91,7 @@ SELECT id, account_id, payment_category, bankname, "IBAN", "BIC", paypal_account WHERE "id" = $1 LIMIT 1 ` -func (q *Queries) GetPayment(ctx context.Context, id int64) (Payment, error) { +func (q *Queries) GetPayment(ctx context.Context, id uint64) (Payment, error) { row := q.db.QueryRowContext(ctx, getPayment, id) var i Payment err := row.Scan( @@ -176,7 +176,7 @@ RETURNING id, account_id, payment_category, bankname, "IBAN", "BIC", paypal_acco ` type UpdatePaymentParams struct { - ID int64 `json:"id"` + ID uint64 `json:"id"` Changer string `json:"changer"` AccountID sql.NullInt64 `json:"account_id"` PaymentCategory sql.NullString `json:"payment_category"` diff --git a/bff/db/sqlc/payment_test.go b/bff/db/sqlc/payment_test.go index 3ed7b15..48db528 100644 --- a/bff/db/sqlc/payment_test.go +++ b/bff/db/sqlc/payment_test.go @@ -17,7 +17,7 @@ func createRandomPayment(t *testing.T) Payment { creator := util.RandomName() arg := CreatePaymentParams{ - AccountID: account.ID, + AccountID: int64(account.ID), PaymentCategory: util.RandomName(), Bankname: sql.NullString{ Valid: true, diff --git a/bff/db/sqlc/person.sql.go b/bff/db/sqlc/person.sql.go index 0520c8f..ddfd32e 100644 --- a/bff/db/sqlc/person.sql.go +++ b/bff/db/sqlc/person.sql.go @@ -78,7 +78,7 @@ DELETE FROM persons WHERE "id" = $1 ` -func (q *Queries) DeletePerson(ctx context.Context, id int64) error { +func (q *Queries) DeletePerson(ctx context.Context, id uint64) error { _, err := q.db.ExecContext(ctx, deletePerson, id) return err } @@ -88,7 +88,7 @@ SELECT id, account_id, firstname, lastname, birthday, city, zip, street, country WHERE "id" = $1 LIMIT 1 ` -func (q *Queries) GetPerson(ctx context.Context, id int64) (Person, error) { +func (q *Queries) GetPerson(ctx context.Context, id uint64) (Person, error) { row := q.db.QueryRowContext(ctx, getPerson, id) var i Person err := row.Scan( @@ -211,7 +211,7 @@ RETURNING id, account_id, firstname, lastname, birthday, city, zip, street, coun ` type UpdatePersonParams struct { - ID int64 `json:"id"` + ID uint64 `json:"id"` Changer string `json:"changer"` AccountID sql.NullInt64 `json:"account_id"` Firstname sql.NullString `json:"firstname"` diff --git a/bff/db/sqlc/person_test.go b/bff/db/sqlc/person_test.go index 8a1256c..85780e6 100644 --- a/bff/db/sqlc/person_test.go +++ b/bff/db/sqlc/person_test.go @@ -17,7 +17,7 @@ func createRandomPerson(t *testing.T) Person { creator := util.RandomName() arg := CreatePersonParams{ - AccountID: account.ID, + AccountID: int64(account.ID), Firstname: util.RandomName(), Lastname: util.RandomName(), Birthday: time.Date(1990, 1, 1, 0, 0, 0, 0, time.UTC), diff --git a/bff/db/sqlc/provider.sql.go b/bff/db/sqlc/provider.sql.go index 43cb630..cbc92a8 100644 --- a/bff/db/sqlc/provider.sql.go +++ b/bff/db/sqlc/provider.sql.go @@ -61,7 +61,7 @@ DELETE FROM providers WHERE "id" = $1 ` -func (q *Queries) DeleteProvider(ctx context.Context, id int64) error { +func (q *Queries) DeleteProvider(ctx context.Context, id uint64) error { _, err := q.db.ExecContext(ctx, deleteProvider, id) return err } @@ -71,7 +71,7 @@ SELECT id, name, description, category, email, creator, created, changer, change WHERE "id" = $1 LIMIT 1 ` -func (q *Queries) GetProvider(ctx context.Context, id int64) (Provider, error) { +func (q *Queries) GetProvider(ctx context.Context, id uint64) (Provider, error) { row := q.db.QueryRowContext(ctx, getProvider, id) var i Provider err := row.Scan( @@ -147,7 +147,7 @@ RETURNING id, name, description, category, email, creator, created, changer, cha ` type UpdateProviderParams struct { - ID int64 `json:"id"` + ID uint64 `json:"id"` Changer string `json:"changer"` Name sql.NullString `json:"name"` Description sql.NullString `json:"description"` diff --git a/bff/db/sqlc/querier.go b/bff/db/sqlc/querier.go index 0322bae..9f3282d 100644 --- a/bff/db/sqlc/querier.go +++ b/bff/db/sqlc/querier.go @@ -23,8 +23,8 @@ type Querier interface { CreateReturn(ctx context.Context, arg CreateReturnParams) (Return, error) CreateReturnsLog(ctx context.Context, arg CreateReturnsLogParams) (ReturnsLog, error) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error) - DeleteAccount(ctx context.Context, id int64) error - DeleteDocument(ctx context.Context, id int64) error + DeleteAccount(ctx context.Context, id uint64) error + DeleteDocument(ctx context.Context, id uint64) error // -- name: UpdateMail :one // UPDATE mails // SET @@ -38,23 +38,23 @@ type Querier interface { // changed = now() // WHERE "id" = $1 // RETURNING *; - DeleteMail(ctx context.Context, id int64) error - DeletePayment(ctx context.Context, id int64) error - DeletePerson(ctx context.Context, id int64) error - DeleteProvider(ctx context.Context, id int64) error - DeleteReturn(ctx context.Context, id int64) error - DeleteReturnsLog(ctx context.Context, id int64) error - GetAccount(ctx context.Context, id int64) (Account, error) + DeleteMail(ctx context.Context, id uint64) error + DeletePayment(ctx context.Context, id uint64) error + DeletePerson(ctx context.Context, id uint64) error + DeleteProvider(ctx context.Context, id uint64) error + DeleteReturn(ctx context.Context, id uint64) error + DeleteReturnsLog(ctx context.Context, id uint64) error + GetAccount(ctx context.Context, id uint64) (Account, error) GetAccountByEmail(ctx context.Context, email string) (Account, error) - GetAccountForUpdate(ctx context.Context, id int64) (Account, error) - GetDocument(ctx context.Context, id int64) (Document, error) - GetMail(ctx context.Context, id int64) (Mail, error) - GetPayment(ctx context.Context, id int64) (Payment, error) - GetPerson(ctx context.Context, id int64) (Person, error) - GetProvider(ctx context.Context, id int64) (Provider, error) - GetReturn(ctx context.Context, id int64) (Return, error) + GetAccountForUpdate(ctx context.Context, id uint64) (Account, error) + GetDocument(ctx context.Context, id uint64) (Document, error) + GetMail(ctx context.Context, id uint64) (Mail, error) + GetPayment(ctx context.Context, id uint64) (Payment, error) + GetPerson(ctx context.Context, id uint64) (Person, error) + GetProvider(ctx context.Context, id uint64) (Provider, error) + GetReturn(ctx context.Context, id uint64) (Return, error) GetReturns(ctx context.Context, id int64) ([]Return, error) - GetReturnsLog(ctx context.Context, id int64) (ReturnsLog, error) + GetReturnsLog(ctx context.Context, id uint64) (ReturnsLog, error) GetSession(ctx context.Context, id uuid.UUID) (Session, error) InvalidateDocument(ctx context.Context, arg InvalidateDocumentParams) (Document, error) ListAccounts(ctx context.Context, arg ListAccountsParams) ([]Account, error) diff --git a/bff/db/sqlc/return.sql.go b/bff/db/sqlc/return.sql.go index a483e88..915158d 100644 --- a/bff/db/sqlc/return.sql.go +++ b/bff/db/sqlc/return.sql.go @@ -116,7 +116,7 @@ DELETE FROM returns WHERE "id" = $1 ` -func (q *Queries) DeleteReturn(ctx context.Context, id int64) error { +func (q *Queries) DeleteReturn(ctx context.Context, id uint64) error { _, err := q.db.ExecContext(ctx, deleteReturn, id) return err } @@ -126,7 +126,7 @@ SELECT id, person_id, provider_id, name, description, category, email, status, c WHERE "id" = $1 LIMIT 1 ` -func (q *Queries) GetReturn(ctx context.Context, id int64) (Return, error) { +func (q *Queries) GetReturn(ctx context.Context, id uint64) (Return, error) { row := q.db.QueryRowContext(ctx, getReturn, id) var i Return err := row.Scan( @@ -219,7 +219,7 @@ type UpdateReturnParams struct { Email sql.NullString `json:"email"` Status sql.NullString `json:"status"` Changer string `json:"changer"` - ID int64 `json:"id"` + ID uint64 `json:"id"` } func (q *Queries) UpdateReturn(ctx context.Context, arg UpdateReturnParams) (Return, error) { diff --git a/bff/db/sqlc/return_test.go b/bff/db/sqlc/return_test.go index 019caf1..a57bbee 100644 --- a/bff/db/sqlc/return_test.go +++ b/bff/db/sqlc/return_test.go @@ -18,8 +18,8 @@ func createRandomReturn(t *testing.T) Return { creator := util.RandomName() arg := CreateReturnParams{ - PersonID: person.ID, - ProviderID: provider.ID, + PersonID: int64(person.ID), + ProviderID: int64(provider.ID), Status: util.RandomString(7), Name: util.RandomName(), Description: util.RandomString(30), diff --git a/bff/db/sqlc/returnsLog.sql.go b/bff/db/sqlc/returnsLog.sql.go index 0793788..1fac37e 100644 --- a/bff/db/sqlc/returnsLog.sql.go +++ b/bff/db/sqlc/returnsLog.sql.go @@ -59,7 +59,7 @@ DELETE FROM "returnsLog" WHERE "id" = $1 ` -func (q *Queries) DeleteReturnsLog(ctx context.Context, id int64) error { +func (q *Queries) DeleteReturnsLog(ctx context.Context, id uint64) error { _, err := q.db.ExecContext(ctx, deleteReturnsLog, id) return err } @@ -69,7 +69,7 @@ SELECT id, return_id, mail_id, status, creator, created, changer, changed FROM " WHERE "id" = $1 LIMIT 1 ` -func (q *Queries) GetReturnsLog(ctx context.Context, id int64) (ReturnsLog, error) { +func (q *Queries) GetReturnsLog(ctx context.Context, id uint64) (ReturnsLog, error) { row := q.db.QueryRowContext(ctx, getReturnsLog, id) var i ReturnsLog err := row.Scan( @@ -146,7 +146,7 @@ type UpdateReturnsLogParams struct { ReturnID sql.NullInt64 `json:"return_id"` MailID sql.NullInt64 `json:"mail_id"` Status sql.NullString `json:"status"` - ID int64 `json:"id"` + ID uint64 `json:"id"` } func (q *Queries) UpdateReturnsLog(ctx context.Context, arg UpdateReturnsLogParams) (ReturnsLog, error) { diff --git a/bff/db/sqlc/returnsLog_test.go b/bff/db/sqlc/returnsLog_test.go index 30beeee..51bb91d 100644 --- a/bff/db/sqlc/returnsLog_test.go +++ b/bff/db/sqlc/returnsLog_test.go @@ -18,8 +18,8 @@ func createRandomReturnsLog(t *testing.T) ReturnsLog { creator := util.RandomName() arg := CreateReturnsLogParams{ - ReturnID: ret.ID, - MailID: mail.ID, + ReturnID: int64(ret.ID), + MailID: int64(mail.ID), Status: sql.NullString{ Valid: true, String: util.RandomString(7), diff --git a/bff/db/sqlc/store.go b/bff/db/sqlc/store.go index fc50379..cf1849a 100644 --- a/bff/db/sqlc/store.go +++ b/bff/db/sqlc/store.go @@ -12,7 +12,7 @@ type Store interface { UpdateAccountTx(ctx context.Context, arg UpdateAccountTxParams) (Account, error) UpdateAccountPrivacyTx(ctx context.Context, arg UpdateAccountPrivacyTxParams) (Account, error) CreatePersonTx(ctx context.Context, arg CreatePersonTxParams) (Person, error) - DeletePersonTx(ctx context.Context, id int64) error + DeletePersonTx(ctx context.Context, id uint64) error } // Store provides all functions to execute db queries and transactions diff --git a/bff/db/sqlc/tx_create_person.go b/bff/db/sqlc/tx_create_person.go index 6fabfa5..68ef658 100644 --- a/bff/db/sqlc/tx_create_person.go +++ b/bff/db/sqlc/tx_create_person.go @@ -35,7 +35,7 @@ func (store *SQLStore) CreatePersonTx(ctx context.Context, arg CreatePersonTxPar err = q.CloneProviders(ctx, CloneProvidersParams{ Creator: arg.Creator, - PersonID: result.Person.ID, + PersonID: int64(result.Person.ID), }) return err }) diff --git a/bff/db/sqlc/tx_delete_person.go b/bff/db/sqlc/tx_delete_person.go index 1aa2a8e..221e0be 100644 --- a/bff/db/sqlc/tx_delete_person.go +++ b/bff/db/sqlc/tx_delete_person.go @@ -4,10 +4,10 @@ import ( "context" ) -func (store *SQLStore) DeletePersonTx(ctx context.Context, id int64) error { +func (store *SQLStore) DeletePersonTx(ctx context.Context, id uint64) error { err := store.execTx(ctx, func(q *Queries) error { - // TODO: Add removal of db.returnsLog entries. + // TODO: #82 Add removal of db.returnsLog entries. err := q.DeletePerson(ctx, id) if err != nil { diff --git a/bff/db/sqlc/tx_update_account.go b/bff/db/sqlc/tx_update_account.go index 3132c9d..7feba5f 100644 --- a/bff/db/sqlc/tx_update_account.go +++ b/bff/db/sqlc/tx_update_account.go @@ -6,7 +6,7 @@ import ( ) type UpdateAccountTxParams struct { - ID int64 `json:"ID"` + ID uint64 `json:"ID"` Changer string `json:"changer"` Passwordhash sql.NullString `json:"passwordhash"` Firstname sql.NullString `json:"firstname"` diff --git a/bff/db/sqlc/tx_update_account_privacy.go b/bff/db/sqlc/tx_update_account_privacy.go index 64e054a..9eb02aa 100644 --- a/bff/db/sqlc/tx_update_account_privacy.go +++ b/bff/db/sqlc/tx_update_account_privacy.go @@ -7,7 +7,7 @@ import ( ) type UpdateAccountPrivacyTxParams struct { - ID int64 `json:"ID"` + ID uint64 `json:"ID"` Changer string `json:"changer"` PrivacyAccepted *bool `json:"privacy_accepted"` } diff --git a/bff/doc/swagger/df.swagger.json b/bff/doc/swagger/df.swagger.json index 490e23b..2eac134 100644 --- a/bff/doc/swagger/df.swagger.json +++ b/bff/doc/swagger/df.swagger.json @@ -82,7 +82,7 @@ "in": "path", "required": true, "type": "string", - "format": "int64" + "format": "uint64" } ], "tags": [ @@ -116,16 +116,16 @@ { "name": "pageId", "in": "query", - "required": false, + "required": true, "type": "integer", - "format": "int32" + "format": "int64" }, { "name": "pageSize", "in": "query", - "required": false, + "required": true, "type": "integer", - "format": "int32" + "format": "int64" } ], "tags": [ @@ -308,7 +308,7 @@ "in": "path", "required": true, "type": "string", - "format": "int64" + "format": "uint64" } ], "tags": [ @@ -344,7 +344,7 @@ "in": "path", "required": true, "type": "string", - "format": "int64" + "format": "uint64" } ], "tags": [ @@ -380,7 +380,7 @@ "in": "path", "required": true, "type": "string", - "format": "int64" + "format": "uint64" } ], "tags": [ @@ -492,7 +492,7 @@ "in": "path", "required": true, "type": "string", - "format": "int64" + "format": "uint64" } ], "tags": [ @@ -528,7 +528,7 @@ "in": "path", "required": true, "type": "string", - "format": "int64" + "format": "uint64" } ], "tags": [ @@ -564,7 +564,7 @@ "in": "path", "required": true, "type": "string", - "format": "int64" + "format": "uint64" } ], "tags": [ @@ -638,7 +638,7 @@ "in": "path", "required": true, "type": "string", - "format": "int64" + "format": "uint64" } ], "tags": [ @@ -709,7 +709,7 @@ "properties": { "id": { "type": "string", - "format": "int64" + "format": "uint64" }, "email": { "type": "string" @@ -897,7 +897,7 @@ "properties": { "accountId": { "type": "string", - "format": "int64" + "format": "uint64" }, "paymentCategory": { "type": "string" @@ -929,7 +929,6 @@ "required": [ "accountId", "paymentCategory", - "paymentSystem", "type" ] }, @@ -958,7 +957,7 @@ "properties": { "accountId": { "type": "string", - "format": "int64" + "format": "uint64" }, "firstname": { "type": "string" @@ -987,6 +986,7 @@ "description": "Create an Person", "title": "Create Person", "required": [ + "accountId", "firstname", "lastname", "street", @@ -1201,11 +1201,11 @@ "properties": { "id": { "type": "string", - "format": "int64" + "format": "uint64" }, "accountId": { "type": "string", - "format": "int64" + "format": "uint64" }, "paymentCategory": { "type": "string" @@ -1273,11 +1273,11 @@ "properties": { "id": { "type": "string", - "format": "int64" + "format": "uint64" }, "accountId": { "type": "string", - "format": "int64" + "format": "uint64" }, "firstname": { "type": "string" @@ -1444,7 +1444,7 @@ "properties": { "id": { "type": "string", - "format": "int64" + "format": "uint64" }, "email": { "type": "string" @@ -1508,7 +1508,7 @@ "properties": { "id": { "type": "string", - "format": "int64" + "format": "uint64" }, "paymentCategory": { "type": "string" diff --git a/bff/gapi/converter.go b/bff/gapi/converter.go index 4ed5af9..bc2a05e 100644 --- a/bff/gapi/converter.go +++ b/bff/gapi/converter.go @@ -31,7 +31,7 @@ func convertAccount(account db.Account) *pb.Account { func convertPerson(person db.Person) *pb.Person { return &pb.Person{ Id: person.ID, - AccountId: person.AccountID, + AccountId: uint64(person.AccountID), Firstname: person.Firstname, Lastname: person.Lastname, Street: person.Street, @@ -62,7 +62,7 @@ func convertSession(session db.Session) *pb.Session { func convertPayment(payment db.Payment) *pb.Payment { return &pb.Payment{ Id: payment.ID, - AccountId: payment.AccountID, + AccountId: uint64(payment.AccountID), PaymentCategory: payment.PaymentCategory, Bankname: &payment.Bankname.String, IBAN: &payment.IBAN.String, diff --git a/bff/gapi/rpc_create_payment.go b/bff/gapi/rpc_create_payment.go index ea36c1f..f1278b0 100644 --- a/bff/gapi/rpc_create_payment.go +++ b/bff/gapi/rpc_create_payment.go @@ -38,8 +38,9 @@ func (server *Server) CreatePayment(ctx context.Context, req *pb.CreatePaymentRe } } + accountID := int64(req.GetAccountId()) arg := db.CreatePaymentParams{ - AccountID: req.GetAccountId(), + AccountID: accountID, PaymentCategory: req.GetPaymentCategory(), Bankname: sql.NullString{ Valid: req.GetBankname() != "", diff --git a/bff/gapi/rpc_create_person.go b/bff/gapi/rpc_create_person.go index ba0fee4..8985917 100644 --- a/bff/gapi/rpc_create_person.go +++ b/bff/gapi/rpc_create_person.go @@ -38,8 +38,9 @@ func (server *Server) CreatePerson(ctx context.Context, req *pb.CreatePersonRequ } } + accountID := int64(req.GetAccountId()) arg := db.CreatePersonTxParams{ - AccountID: req.GetAccountId(), + AccountID: accountID, Firstname: req.GetFirstname(), Lastname: req.GetLastname(), Birthday: req.GetBirthday().AsTime(), diff --git a/bff/gapi/rpc_delete_payment.go b/bff/gapi/rpc_delete_payment.go index 4077a54..f635ea8 100644 --- a/bff/gapi/rpc_delete_payment.go +++ b/bff/gapi/rpc_delete_payment.go @@ -44,7 +44,10 @@ func (server *Server) DeletePayment(ctx context.Context, req *pb.DeletePaymentRe return nil, status.Errorf(codes.Internal, "failed to get payment") } - if payment.AccountID != account.ID { + paymentID := int64(req.GetId()) + accountID := int64(account.ID) + + if payment.AccountID != accountID { if !server.isAdmin(ctx, authPayload) { return nil, status.Error(codes.NotFound, "payment not found") } @@ -57,7 +60,7 @@ func (server *Server) DeletePayment(ctx context.Context, req *pb.DeletePaymentRe } rsp := &pb.DeletePaymentResponse{ - Id: req.GetId(), + Id: paymentID, Deleted: true, } return rsp, nil diff --git a/bff/gapi/rpc_delete_person.go b/bff/gapi/rpc_delete_person.go index 8f11972..968f62e 100644 --- a/bff/gapi/rpc_delete_person.go +++ b/bff/gapi/rpc_delete_person.go @@ -44,7 +44,10 @@ func (server *Server) DeletePerson(ctx context.Context, req *pb.DeletePersonRequ return nil, status.Errorf(codes.Internal, "failed to get person") } - if person.AccountID != account.ID { + personID := int64(person.ID) + accountID := int64(account.ID) + + if person.AccountID != accountID { if !server.isAdmin(ctx, authPayload) { return nil, status.Error(codes.NotFound, "person not found") } @@ -57,7 +60,7 @@ func (server *Server) DeletePerson(ctx context.Context, req *pb.DeletePersonRequ } rsp := &pb.DeletePersonResponse{ - Id: req.GetId(), + Id: personID, Deleted: true, } return rsp, nil diff --git a/bff/gapi/rpc_get_payment.go b/bff/gapi/rpc_get_payment.go index ed72d10..08cf18c 100644 --- a/bff/gapi/rpc_get_payment.go +++ b/bff/gapi/rpc_get_payment.go @@ -44,7 +44,9 @@ func (server *Server) GetPayment(ctx context.Context, req *pb.GetPaymentRequest) return nil, status.Error(codes.NotFound, "failed to get payments") } - if account.ID != payment.AccountID { + accountID := int64(account.ID) + + if accountID != payment.AccountID { if !server.isAdmin(ctx, authPayload) { return nil, status.Error(codes.NotFound, "account not found") } diff --git a/bff/gapi/rpc_get_person.go b/bff/gapi/rpc_get_person.go index 7687a39..6439a90 100644 --- a/bff/gapi/rpc_get_person.go +++ b/bff/gapi/rpc_get_person.go @@ -44,7 +44,9 @@ func (server *Server) GetPerson(ctx context.Context, req *pb.GetPersonRequest) ( return nil, status.Error(codes.NotFound, "failed to get persons") } - if account.ID != person.AccountID { + accountID := int64(account.ID) + + if accountID != person.AccountID { if !server.isAdmin(ctx, authPayload) { return nil, status.Error(codes.NotFound, "account not found") } diff --git a/bff/gapi/rpc_list_accounts.go b/bff/gapi/rpc_list_accounts.go index b3dc934..bf38c03 100644 --- a/bff/gapi/rpc_list_accounts.go +++ b/bff/gapi/rpc_list_accounts.go @@ -24,8 +24,8 @@ func (server *Server) ListAccounts(ctx context.Context, req *pb.ListAccountsRequ } arg := db.ListAccountsParams{ - Limit: req.GetPageSize(), - Offset: (req.GetPageId() - 1) * req.GetPageSize(), + Limit: int32(req.GetPageSize()), + Offset: int32((req.GetPageId() - 1) * req.GetPageSize()), } dbAccounts, err := server.store.ListAccounts(ctx, arg) diff --git a/bff/gapi/rpc_list_payments.go b/bff/gapi/rpc_list_payments.go index 6f2ce92..124987f 100644 --- a/bff/gapi/rpc_list_payments.go +++ b/bff/gapi/rpc_list_payments.go @@ -42,7 +42,9 @@ func (server *Server) ListPayments(ctx context.Context, req *pb.ListPaymentsRequ } } - dbPayments, err := server.store.ListPayments(ctx, req.GetAccountId()) + accountID := int64(account.ID) + + dbPayments, err := server.store.ListPayments(ctx, accountID) if err != nil { if errors.Is(err, sql.ErrNoRows) { return nil, status.Error(codes.NotFound, "no payments found") diff --git a/bff/gapi/rpc_list_persons.go b/bff/gapi/rpc_list_persons.go index ef4ffa4..129fc9b 100644 --- a/bff/gapi/rpc_list_persons.go +++ b/bff/gapi/rpc_list_persons.go @@ -42,7 +42,9 @@ func (server *Server) ListPersons(ctx context.Context, req *pb.ListPersonsReques } } - dbPersons, err := server.store.ListPersons(ctx, req.GetAccountId()) + accountID := int64(account.ID) + + dbPersons, err := server.store.ListPersons(ctx, accountID) if err != nil { if errors.Is(err, sql.ErrNoRows) { return nil, status.Error(codes.NotFound, "no persons found") diff --git a/bff/gapi/rpc_update_payment.go b/bff/gapi/rpc_update_payment.go index 3856389..b892d81 100644 --- a/bff/gapi/rpc_update_payment.go +++ b/bff/gapi/rpc_update_payment.go @@ -46,7 +46,9 @@ func (server *Server) UpdatePayment(ctx context.Context, req *pb.UpdatePaymentRe return nil, status.Error(codes.Internal, "failed to get payment") } - if dbPayment.AccountID != account.ID { + accountID := int64(account.ID) + + if dbPayment.AccountID != accountID { if !server.isAdmin(ctx, authPayload) { return nil, status.Error(codes.NotFound, "payment not found") } diff --git a/bff/pb/account.pb.go b/bff/pb/account.pb.go index 16cafdb..caca720 100644 --- a/bff/pb/account.pb.go +++ b/bff/pb/account.pb.go @@ -27,7 +27,7 @@ type Account struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Firstname string `protobuf:"bytes,3,opt,name=firstname,proto3" json:"firstname,omitempty"` Lastname string `protobuf:"bytes,4,opt,name=lastname,proto3" json:"lastname,omitempty"` @@ -78,7 +78,7 @@ func (*Account) Descriptor() ([]byte, []int) { return file_account_proto_rawDescGZIP(), []int{0} } -func (x *Account) GetId() int64 { +func (x *Account) GetId() uint64 { if x != nil { return x.Id } @@ -207,7 +207,7 @@ var file_account_proto_rawDesc = []byte{ 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x09, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, diff --git a/bff/pb/payment.pb.go b/bff/pb/payment.pb.go index 481beee..b79155c 100644 --- a/bff/pb/payment.pb.go +++ b/bff/pb/payment.pb.go @@ -27,8 +27,8 @@ type Payment struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - AccountId int64 `protobuf:"varint,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + AccountId uint64 `protobuf:"varint,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` PaymentCategory string `protobuf:"bytes,3,opt,name=payment_category,json=paymentCategory,proto3" json:"payment_category,omitempty"` Bankname *string `protobuf:"bytes,4,opt,name=bankname,proto3,oneof" json:"bankname,omitempty"` IBAN *string `protobuf:"bytes,5,opt,name=IBAN,proto3,oneof" json:"IBAN,omitempty"` @@ -75,14 +75,14 @@ func (*Payment) Descriptor() ([]byte, []int) { return file_payment_proto_rawDescGZIP(), []int{0} } -func (x *Payment) GetId() int64 { +func (x *Payment) GetId() uint64 { if x != nil { return x.Id } return 0 } -func (x *Payment) GetAccountId() int64 { +func (x *Payment) GetAccountId() uint64 { if x != nil { return x.AccountId } @@ -183,9 +183,9 @@ var file_payment_proto_rawDesc = []byte{ 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdf, 0x07, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x08, 0x62, 0x61, diff --git a/bff/pb/person.pb.go b/bff/pb/person.pb.go index cc6ca1e..9204ed5 100644 --- a/bff/pb/person.pb.go +++ b/bff/pb/person.pb.go @@ -27,8 +27,8 @@ type Person struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - AccountId int64 `protobuf:"varint,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + AccountId uint64 `protobuf:"varint,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` Firstname string `protobuf:"bytes,3,opt,name=firstname,proto3" json:"firstname,omitempty"` Lastname string `protobuf:"bytes,4,opt,name=lastname,proto3" json:"lastname,omitempty"` Street string `protobuf:"bytes,5,opt,name=street,proto3" json:"street,omitempty"` @@ -74,14 +74,14 @@ func (*Person) Descriptor() ([]byte, []int) { return file_person_proto_rawDescGZIP(), []int{0} } -func (x *Person) GetId() int64 { +func (x *Person) GetId() uint64 { if x != nil { return x.Id } return 0 } -func (x *Person) GetAccountId() int64 { +func (x *Person) GetAccountId() uint64 { if x != nil { return x.AccountId } @@ -175,9 +175,9 @@ var file_person_proto_rawDesc = []byte{ 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, 0xb7, 0x07, 0x0a, 0x06, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, + 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, diff --git a/bff/pb/rpc_create_payment.pb.go b/bff/pb/rpc_create_payment.pb.go index 7ce5d6f..1828fa6 100644 --- a/bff/pb/rpc_create_payment.pb.go +++ b/bff/pb/rpc_create_payment.pb.go @@ -26,7 +26,7 @@ type CreatePaymentRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AccountId int64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + AccountId uint64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` PaymentCategory string `protobuf:"bytes,2,opt,name=payment_category,json=paymentCategory,proto3" json:"payment_category,omitempty"` Bankname *string `protobuf:"bytes,3,opt,name=bankname,proto3,oneof" json:"bankname,omitempty"` IBAN *string `protobuf:"bytes,4,opt,name=IBAN,proto3,oneof" json:"IBAN,omitempty"` @@ -69,7 +69,7 @@ func (*CreatePaymentRequest) Descriptor() ([]byte, []int) { return file_rpc_create_payment_proto_rawDescGZIP(), []int{0} } -func (x *CreatePaymentRequest) GetAccountId() int64 { +func (x *CreatePaymentRequest) GetAccountId() uint64 { if x != nil { return x.AccountId } @@ -187,10 +187,10 @@ var file_rpc_create_payment_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, - 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x05, + 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x05, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, @@ -208,40 +208,39 @@ var file_rpc_create_payment_proto_rawDesc = []byte{ 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x3a, - 0xaa, 0x02, 0x92, 0x41, 0xa6, 0x02, 0x0a, 0x5b, 0x2a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x99, 0x02, 0x92, 0x41, 0x95, 0x02, 0x0a, 0x4a, 0x2a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0xd2, 0x01, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0xd2, 0x01, 0x10, 0x70, 0x61, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0xd2, 0x01, 0x0e, 0x70, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0xd2, 0x01, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x32, 0xc6, 0x01, 0x7b, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x54, - 0x42, 0x44, 0x3a, 0x20, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, - 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, - 0x6a, 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x69, - 0x64, 0x22, 0x3a, 0x20, 0x22, 0x74, 0x68, 0x69, 0x73, 0x2d, 0x69, 0x73, 0x2d, 0x61, 0x2d, 0x70, - 0x61, 0x79, 0x70, 0x61, 0x6c, 0x2d, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x42, - 0x44, 0x3a, 0x20, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x20, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x22, 0x2c, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x42, 0x44, 0x3a, - 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x22, 0x7d, 0x42, 0x0b, 0x0a, 0x09, - 0x5f, 0x62, 0x61, 0x6e, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x49, 0x42, - 0x41, 0x4e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x42, 0x49, 0x43, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, - 0x61, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0c, 0x0a, - 0x0a, 0x5f, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x42, 0x11, 0x0a, 0x0f, 0x5f, - 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x78, - 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x0f, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x1b, 0x52, 0x65, 0x74, - 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, - 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0xd2, 0x01, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x32, 0xc6, 0x01, 0x7b, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x42, + 0x44, 0x3a, 0x20, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x79, + 0x70, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x6a, + 0x6f, 0x68, 0x6e, 0x2e, 0x64, 0x6f, 0x65, 0x40, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, + 0x63, 0x6f, 0x6d, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, + 0x22, 0x3a, 0x20, 0x22, 0x74, 0x68, 0x69, 0x73, 0x2d, 0x69, 0x73, 0x2d, 0x61, 0x2d, 0x70, 0x61, + 0x79, 0x70, 0x61, 0x6c, 0x2d, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x22, 0x70, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x42, 0x44, + 0x3a, 0x20, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x20, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, + 0x2c, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x54, 0x42, 0x44, 0x3a, 0x20, + 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x22, 0x7d, 0x42, 0x0b, 0x0a, 0x09, 0x5f, + 0x62, 0x61, 0x6e, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x49, 0x42, 0x41, + 0x4e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x42, 0x49, 0x43, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x61, + 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0c, 0x0a, 0x0a, + 0x5f, 0x70, 0x61, 0x79, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x78, 0x0a, + 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x1b, 0x52, 0x65, 0x74, 0x75, + 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, + 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/bff/pb/rpc_create_person.pb.go b/bff/pb/rpc_create_person.pb.go index 38926f5..793f1c1 100644 --- a/bff/pb/rpc_create_person.pb.go +++ b/bff/pb/rpc_create_person.pb.go @@ -27,7 +27,7 @@ type CreatePersonRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AccountId int64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + AccountId uint64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` Firstname string `protobuf:"bytes,2,opt,name=firstname,proto3" json:"firstname,omitempty"` Lastname string `protobuf:"bytes,3,opt,name=lastname,proto3" json:"lastname,omitempty"` Street string `protobuf:"bytes,4,opt,name=street,proto3" json:"street,omitempty"` @@ -69,7 +69,7 @@ func (*CreatePersonRequest) Descriptor() ([]byte, []int) { return file_rpc_create_person_proto_rawDescGZIP(), []int{0} } -func (x *CreatePersonRequest) GetAccountId() int64 { +func (x *CreatePersonRequest) GetAccountId() uint64 { if x != nil { return x.AccountId } @@ -182,10 +182,10 @@ var file_rpc_create_person_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, - 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x04, 0x0a, + 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc7, 0x04, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, @@ -200,34 +200,35 @@ var file_rpc_create_person_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x1b, 0x92, 0x41, 0x18, 0x4a, 0x16, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, - 0x52, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x3a, 0x9c, 0x02, 0x92, 0x41, 0x98, - 0x02, 0x0a, 0x63, 0x2a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x50, 0x65, 0x72, 0x73, + 0x52, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x3a, 0xa9, 0x02, 0x92, 0x41, 0xa5, + 0x02, 0x0a, 0x70, 0x2a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x50, 0x65, - 0x72, 0x73, 0x6f, 0x6e, 0xd2, 0x01, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, - 0xd2, 0x01, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x06, 0x73, 0x74, - 0x72, 0x65, 0x65, 0x74, 0xd2, 0x01, 0x04, 0x63, 0x69, 0x74, 0x79, 0xd2, 0x01, 0x03, 0x7a, 0x69, - 0x70, 0xd2, 0x01, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0xd2, 0x01, 0x08, 0x62, 0x69, - 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x32, 0xb0, 0x01, 0x7b, 0x20, 0x22, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x66, - 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x4a, 0x6f, 0x68, 0x6e, - 0x22, 0x2c, 0x20, 0x22, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, - 0x44, 0x6f, 0x65, 0x22, 0x2c, 0x20, 0x22, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x22, 0x3a, 0x20, - 0x22, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x53, 0x74, 0x72, 0x65, 0x65, 0x74, 0x20, 0x31, 0x22, 0x2c, - 0x20, 0x22, 0x7a, 0x69, 0x70, 0x22, 0x3a, 0x20, 0x22, 0x30, 0x38, 0x31, 0x35, 0x22, 0x2c, 0x20, - 0x22, 0x63, 0x69, 0x74, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x4e, 0x65, 0x77, 0x20, 0x59, 0x6f, 0x72, - 0x6b, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, - 0x55, 0x53, 0x41, 0x22, 0x2c, 0x20, 0x22, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x22, - 0x3a, 0x20, 0x22, 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, - 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x22, 0x72, 0x0a, 0x14, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x27, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x42, 0x03, 0x92, - 0x41, 0x00, 0x52, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x3a, 0x31, 0x92, 0x41, 0x2e, 0x0a, - 0x2c, 0x2a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, - 0x6e, 0x32, 0x1a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x42, 0x19, 0x5a, - 0x17, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, - 0x63, 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x73, 0x6f, 0x6e, 0xd2, 0x01, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0xd2, 0x01, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x08, + 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x06, 0x73, 0x74, 0x72, 0x65, 0x65, + 0x74, 0xd2, 0x01, 0x04, 0x63, 0x69, 0x74, 0x79, 0xd2, 0x01, 0x03, 0x7a, 0x69, 0x70, 0xd2, 0x01, + 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0xd2, 0x01, 0x08, 0x62, 0x69, 0x72, 0x74, 0x68, + 0x64, 0x61, 0x79, 0x32, 0xb0, 0x01, 0x7b, 0x20, 0x22, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x4a, 0x6f, 0x68, 0x6e, 0x22, 0x2c, 0x20, + 0x22, 0x6c, 0x61, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x6f, 0x65, + 0x22, 0x2c, 0x20, 0x22, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x4d, 0x61, + 0x69, 0x6e, 0x20, 0x53, 0x74, 0x72, 0x65, 0x65, 0x74, 0x20, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x7a, + 0x69, 0x70, 0x22, 0x3a, 0x20, 0x22, 0x30, 0x38, 0x31, 0x35, 0x22, 0x2c, 0x20, 0x22, 0x63, 0x69, + 0x74, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x4e, 0x65, 0x77, 0x20, 0x59, 0x6f, 0x72, 0x6b, 0x22, 0x2c, + 0x20, 0x22, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x55, 0x53, 0x41, + 0x22, 0x2c, 0x20, 0x22, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x22, 0x3a, 0x20, 0x22, + 0x31, 0x39, 0x39, 0x30, 0x2d, 0x31, 0x30, 0x2d, 0x30, 0x35, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, + 0x3a, 0x30, 0x30, 0x5a, 0x22, 0x7d, 0x22, 0x72, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, + 0x0a, 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, + 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, + 0x06, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x3a, 0x31, 0x92, 0x41, 0x2e, 0x0a, 0x2c, 0x2a, 0x0e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x32, 0x1a, + 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x42, 0x19, 0x5a, 0x17, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, 0x2f, + 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/bff/pb/rpc_delete_payment.pb.go b/bff/pb/rpc_delete_payment.pb.go index 7d0d41a..2ca05c5 100644 --- a/bff/pb/rpc_delete_payment.pb.go +++ b/bff/pb/rpc_delete_payment.pb.go @@ -26,7 +26,7 @@ type DeletePaymentRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *DeletePaymentRequest) Reset() { @@ -61,7 +61,7 @@ func (*DeletePaymentRequest) Descriptor() ([]byte, []int) { return file_rpc_delete_payment_proto_rawDescGZIP(), []int{0} } -func (x *DeletePaymentRequest) GetId() int64 { +func (x *DeletePaymentRequest) GetId() uint64 { if x != nil { return x.Id } @@ -133,7 +133,7 @@ var file_rpc_delete_payment_proto_rawDesc = []byte{ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x61, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x39, 0x92, 0x41, 0x36, 0x0a, 0x27, 0x2a, 0x0e, 0x44, + 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x39, 0x92, 0x41, 0x36, 0x0a, 0x27, 0x2a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x61, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x0b, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x22, diff --git a/bff/pb/rpc_delete_person.pb.go b/bff/pb/rpc_delete_person.pb.go index 0fa913c..15abbbd 100644 --- a/bff/pb/rpc_delete_person.pb.go +++ b/bff/pb/rpc_delete_person.pb.go @@ -26,7 +26,7 @@ type DeletePersonRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *DeletePersonRequest) Reset() { @@ -61,7 +61,7 @@ func (*DeletePersonRequest) Descriptor() ([]byte, []int) { return file_rpc_delete_person_proto_rawDescGZIP(), []int{0} } -func (x *DeletePersonRequest) GetId() int64 { +func (x *DeletePersonRequest) GetId() uint64 { if x != nil { return x.Id } @@ -132,7 +132,7 @@ var file_rpc_delete_person_proto_rawDesc = []byte{ 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x37, 0x92, 0x41, 0x34, 0x0a, 0x25, 0x2a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x32, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x61, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0xd2, 0x01, 0x02, 0x69, 0x64, diff --git a/bff/pb/rpc_get_account.pb.go b/bff/pb/rpc_get_account.pb.go index 98ff6c2..d1ec158 100644 --- a/bff/pb/rpc_get_account.pb.go +++ b/bff/pb/rpc_get_account.pb.go @@ -26,7 +26,7 @@ type GetAccountRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *GetAccountRequest) Reset() { @@ -61,7 +61,7 @@ func (*GetAccountRequest) Descriptor() ([]byte, []int) { return file_rpc_get_account_proto_rawDescGZIP(), []int{0} } -func (x *GetAccountRequest) GetId() int64 { +func (x *GetAccountRequest) GetId() uint64 { if x != nil { return x.Id } @@ -125,7 +125,7 @@ var file_rpc_get_account_proto_rawDesc = []byte{ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x3a, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x3a, 0x92, 0x41, 0x37, 0x0a, 0x27, 0x2a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x14, 0x47, 0x65, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x0c, 0x7b, diff --git a/bff/pb/rpc_get_payment.pb.go b/bff/pb/rpc_get_payment.pb.go index 81f676f..0588f72 100644 --- a/bff/pb/rpc_get_payment.pb.go +++ b/bff/pb/rpc_get_payment.pb.go @@ -26,7 +26,7 @@ type GetPaymentRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *GetPaymentRequest) Reset() { @@ -61,7 +61,7 @@ func (*GetPaymentRequest) Descriptor() ([]byte, []int) { return file_rpc_get_payment_proto_rawDescGZIP(), []int{0} } -func (x *GetPaymentRequest) GetId() int64 { +func (x *GetPaymentRequest) GetId() uint64 { if x != nil { return x.Id } @@ -125,7 +125,7 @@ var file_rpc_get_payment_proto_rawDesc = []byte{ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x3a, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x3a, 0x92, 0x41, 0x37, 0x0a, 0x27, 0x2a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x14, 0x47, 0x65, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x0c, 0x7b, diff --git a/bff/pb/rpc_get_person.pb.go b/bff/pb/rpc_get_person.pb.go index 80362e3..6757da0 100644 --- a/bff/pb/rpc_get_person.pb.go +++ b/bff/pb/rpc_get_person.pb.go @@ -26,7 +26,7 @@ type GetPersonRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *GetPersonRequest) Reset() { @@ -61,7 +61,7 @@ func (*GetPersonRequest) Descriptor() ([]byte, []int) { return file_rpc_get_person_proto_rawDescGZIP(), []int{0} } -func (x *GetPersonRequest) GetId() int64 { +func (x *GetPersonRequest) GetId() uint64 { if x != nil { return x.Id } @@ -125,7 +125,7 @@ var file_rpc_get_person_proto_rawDesc = []byte{ 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x38, 0x92, 0x41, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x38, 0x92, 0x41, 0x35, 0x0a, 0x25, 0x2a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x32, 0x13, 0x47, 0x65, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x20, 0x62, 0x79, 0x20, 0x49, 0x44, 0xd2, 0x01, 0x02, 0x69, 0x64, 0x32, 0x0c, 0x7b, 0x22, 0x69, 0x64, 0x22, 0x3a, diff --git a/bff/pb/rpc_list_accounts.pb.go b/bff/pb/rpc_list_accounts.pb.go index 39982d7..f75815b 100644 --- a/bff/pb/rpc_list_accounts.pb.go +++ b/bff/pb/rpc_list_accounts.pb.go @@ -26,8 +26,8 @@ type ListAccountsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PageId int32 `protobuf:"varint,1,opt,name=page_id,json=pageId,proto3" json:"page_id,omitempty"` - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageId uint32 `protobuf:"varint,1,opt,name=page_id,json=pageId,proto3" json:"page_id,omitempty"` + PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` } func (x *ListAccountsRequest) Reset() { @@ -62,14 +62,14 @@ func (*ListAccountsRequest) Descriptor() ([]byte, []int) { return file_rpc_list_accounts_proto_rawDescGZIP(), []int{0} } -func (x *ListAccountsRequest) GetPageId() int32 { +func (x *ListAccountsRequest) GetPageId() uint32 { if x != nil { return x.PageId } return 0 } -func (x *ListAccountsRequest) GetPageSize() int32 { +func (x *ListAccountsRequest) GetPageSize() uint32 { if x != nil { return x.PageSize } @@ -131,27 +131,28 @@ var file_rpc_list_accounts_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x01, 0x0a, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, - 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x3a, 0x56, 0x92, 0x41, 0x53, 0x0a, - 0x2f, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x32, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x70, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x3a, 0x67, 0x92, 0x41, 0x64, 0x0a, + 0x40, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x32, 0x1a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x20, - 0x6f, 0x66, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0xd2, 0x01, 0x02, 0x69, 0x64, - 0x32, 0x20, 0x7b, 0x22, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x31, 0x2c, - 0x20, 0x22, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3a, 0x20, 0x31, 0x30, - 0x20, 0x7d, 0x22, 0x77, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, - 0x62, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, 0x08, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x31, 0x92, 0x41, 0x2e, 0x0a, 0x2c, 0x2a, - 0x15, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x20, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x13, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, 0x62, - 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x66, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0xd2, 0x01, 0x07, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x69, 0x64, 0xd2, 0x01, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x32, 0x20, 0x7b, 0x22, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x3a, 0x20, 0x31, + 0x2c, 0x20, 0x22, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3a, 0x20, 0x31, + 0x30, 0x20, 0x7d, 0x22, 0x77, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x70, 0x62, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0x92, 0x41, 0x00, 0x52, + 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x31, 0x92, 0x41, 0x2e, 0x0a, 0x2c, + 0x2a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x20, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x13, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x19, 0x5a, 0x17, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x74, 0x73, 0x73, 0x63, + 0x62, 0x2f, 0x64, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/bff/pb/rpc_list_payments.pb.go b/bff/pb/rpc_list_payments.pb.go index efe4992..4ddc2c1 100644 --- a/bff/pb/rpc_list_payments.pb.go +++ b/bff/pb/rpc_list_payments.pb.go @@ -26,7 +26,7 @@ type ListPaymentsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AccountId int64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + AccountId uint64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` } func (x *ListPaymentsRequest) Reset() { @@ -61,7 +61,7 @@ func (*ListPaymentsRequest) Descriptor() ([]byte, []int) { return file_rpc_list_payments_proto_rawDescGZIP(), []int{0} } -func (x *ListPaymentsRequest) GetAccountId() int64 { +func (x *ListPaymentsRequest) GetAccountId() uint64 { if x != nil { return x.AccountId } @@ -126,7 +126,7 @@ var file_rpc_list_payments_proto_rawDesc = []byte{ 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x3a, 0x50, 0x92, 0x41, 0x4d, 0x0a, 0x37, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x32, 0x1a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x50, 0x61, 0x79, 0x6d, diff --git a/bff/pb/rpc_list_persons.pb.go b/bff/pb/rpc_list_persons.pb.go index b579cbf..c3afc14 100644 --- a/bff/pb/rpc_list_persons.pb.go +++ b/bff/pb/rpc_list_persons.pb.go @@ -26,7 +26,7 @@ type ListPersonsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AccountId int64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + AccountId uint64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` } func (x *ListPersonsRequest) Reset() { @@ -61,7 +61,7 @@ func (*ListPersonsRequest) Descriptor() ([]byte, []int) { return file_rpc_list_persons_proto_rawDescGZIP(), []int{0} } -func (x *ListPersonsRequest) GetAccountId() int64 { +func (x *ListPersonsRequest) GetAccountId() uint64 { if x != nil { return x.AccountId } @@ -126,7 +126,7 @@ var file_rpc_list_persons_proto_rawDesc = []byte{ 0x72, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x3a, 0x4e, 0x92, 0x41, 0x4b, 0x0a, 0x35, 0x2a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x32, 0x19, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0xd2, diff --git a/bff/pb/rpc_list_sessions.pb.go b/bff/pb/rpc_list_sessions.pb.go index 6be8491..187682d 100644 --- a/bff/pb/rpc_list_sessions.pb.go +++ b/bff/pb/rpc_list_sessions.pb.go @@ -26,7 +26,7 @@ type ListSessionsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AccountId int64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + AccountId uint64 `protobuf:"varint,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` } func (x *ListSessionsRequest) Reset() { @@ -61,7 +61,7 @@ func (*ListSessionsRequest) Descriptor() ([]byte, []int) { return file_rpc_list_sessions_proto_rawDescGZIP(), []int{0} } -func (x *ListSessionsRequest) GetAccountId() int64 { +func (x *ListSessionsRequest) GetAccountId() uint64 { if x != nil { return x.AccountId } @@ -126,7 +126,7 @@ var file_rpc_list_sessions_proto_rawDesc = []byte{ 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x0e, 0x92, 0x41, 0x0b, 0x4a, 0x01, 0x31, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0e, 0x92, 0x41, 0x0b, 0x4a, 0x01, 0x31, 0xa2, 0x02, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x3a, 0x52, 0x92, 0x41, 0x4f, 0x0a, 0x37, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x1a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, diff --git a/bff/pb/rpc_update_account.pb.go b/bff/pb/rpc_update_account.pb.go index 872f02b..023c8ff 100644 --- a/bff/pb/rpc_update_account.pb.go +++ b/bff/pb/rpc_update_account.pb.go @@ -27,7 +27,7 @@ type UpdateAccountRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Email *string `protobuf:"bytes,2,opt,name=email,proto3,oneof" json:"email,omitempty"` Password *string `protobuf:"bytes,3,opt,name=password,proto3,oneof" json:"password,omitempty"` Firstname *string `protobuf:"bytes,4,opt,name=firstname,proto3,oneof" json:"firstname,omitempty"` @@ -72,7 +72,7 @@ func (*UpdateAccountRequest) Descriptor() ([]byte, []int) { return file_rpc_update_account_proto_rawDescGZIP(), []int{0} } -func (x *UpdateAccountRequest) GetId() int64 { +func (x *UpdateAccountRequest) GetId() uint64 { if x != nil { return x.Id } @@ -209,7 +209,7 @@ var file_rpc_update_account_proto_rawDesc = []byte{ 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xce, 0x04, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, diff --git a/bff/pb/rpc_update_account_privacy.pb.go b/bff/pb/rpc_update_account_privacy.pb.go index 14b3f05..7383e11 100644 --- a/bff/pb/rpc_update_account_privacy.pb.go +++ b/bff/pb/rpc_update_account_privacy.pb.go @@ -26,8 +26,8 @@ type UpdateAccountPrivacyRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - PrivacyAccepted *bool `protobuf:"varint,2,opt,name=privacy_accepted,json=privacyAccepted,proto3,oneof" json:"privacy_accepted,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + PrivacyAccepted *bool `protobuf:"varint,2,opt,name=privacy_accepted,json=privacyAccepted,proto3,oneof" json:"privacy_accepted,omitempty"` } func (x *UpdateAccountPrivacyRequest) Reset() { @@ -62,7 +62,7 @@ func (*UpdateAccountPrivacyRequest) Descriptor() ([]byte, []int) { return file_rpc_update_account_privacy_proto_rawDescGZIP(), []int{0} } -func (x *UpdateAccountPrivacyRequest) GetId() int64 { +func (x *UpdateAccountPrivacyRequest) GetId() uint64 { if x != nil { return x.Id } @@ -135,7 +135,7 @@ var file_rpc_update_account_privacy_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa1, 0x02, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x42, 0x0e, 0x92, 0x41, 0x0b, 0x4a, 0x01, 0x31, 0xa2, 0x02, 0x05, 0x69, 0x6e, 0x74, 0x36, + 0x04, 0x42, 0x0e, 0x92, 0x41, 0x0b, 0x4a, 0x01, 0x31, 0xa2, 0x02, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x61, 0x63, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0a, 0x92, 0x41, 0x07, 0x4a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x70, diff --git a/bff/pb/rpc_update_payment.pb.go b/bff/pb/rpc_update_payment.pb.go index d8480e7..74230f0 100644 --- a/bff/pb/rpc_update_payment.pb.go +++ b/bff/pb/rpc_update_payment.pb.go @@ -26,7 +26,7 @@ type UpdatePaymentRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` PaymentCategory *string `protobuf:"bytes,2,opt,name=payment_category,json=paymentCategory,proto3,oneof" json:"payment_category,omitempty"` Bankname *string `protobuf:"bytes,3,opt,name=bankname,proto3,oneof" json:"bankname,omitempty"` IBAN *string `protobuf:"bytes,4,opt,name=IBAN,proto3,oneof" json:"IBAN,omitempty"` @@ -69,7 +69,7 @@ func (*UpdatePaymentRequest) Descriptor() ([]byte, []int) { return file_rpc_update_payment_proto_rawDescGZIP(), []int{0} } -func (x *UpdatePaymentRequest) GetId() int64 { +func (x *UpdatePaymentRequest) GetId() uint64 { if x != nil { return x.Id } @@ -190,7 +190,7 @@ var file_rpc_update_payment_proto_rawDesc = []byte{ 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x05, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x62, 0x61, 0x6e, 0x6b, 0x6e, 0x61, diff --git a/bff/pb/service_df.pb.gw.go b/bff/pb/service_df.pb.gw.go index 0de93ce..37cf0ae 100644 --- a/bff/pb/service_df.pb.gw.go +++ b/bff/pb/service_df.pb.gw.go @@ -115,7 +115,7 @@ func request_Df_ListSessions_0(ctx context.Context, marshaler runtime.Marshaler, return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "account_id") } - protoReq.AccountId, err = runtime.Int64(val) + 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) } @@ -141,7 +141,7 @@ func local_request_Df_ListSessions_0(ctx context.Context, marshaler runtime.Mars return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "account_id") } - protoReq.AccountId, err = runtime.Int64(val) + 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) } @@ -201,7 +201,7 @@ func request_Df_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, c return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int64(val) + protoReq.Id, err = runtime.Uint64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -227,7 +227,7 @@ func local_request_Df_GetAccount_0(ctx context.Context, marshaler runtime.Marsha return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int64(val) + protoReq.Id, err = runtime.Uint64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -425,7 +425,7 @@ func request_Df_GetPerson_0(ctx context.Context, marshaler runtime.Marshaler, cl return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int64(val) + protoReq.Id, err = runtime.Uint64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -451,7 +451,7 @@ func local_request_Df_GetPerson_0(ctx context.Context, marshaler runtime.Marshal return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int64(val) + protoReq.Id, err = runtime.Uint64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -477,7 +477,7 @@ func request_Df_DeletePerson_0(ctx context.Context, marshaler runtime.Marshaler, return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int64(val) + protoReq.Id, err = runtime.Uint64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -503,7 +503,7 @@ func local_request_Df_DeletePerson_0(ctx context.Context, marshaler runtime.Mars return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int64(val) + protoReq.Id, err = runtime.Uint64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -529,7 +529,7 @@ func request_Df_ListPersons_0(ctx context.Context, marshaler runtime.Marshaler, return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "account_id") } - protoReq.AccountId, err = runtime.Int64(val) + 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) } @@ -555,7 +555,7 @@ func local_request_Df_ListPersons_0(ctx context.Context, marshaler runtime.Marsh return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "account_id") } - protoReq.AccountId, err = runtime.Int64(val) + 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) } @@ -615,7 +615,7 @@ func request_Df_GetPayment_0(ctx context.Context, marshaler runtime.Marshaler, c return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int64(val) + protoReq.Id, err = runtime.Uint64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -641,7 +641,7 @@ func local_request_Df_GetPayment_0(ctx context.Context, marshaler runtime.Marsha return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int64(val) + protoReq.Id, err = runtime.Uint64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -667,7 +667,7 @@ func request_Df_DeletePayment_0(ctx context.Context, marshaler runtime.Marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int64(val) + protoReq.Id, err = runtime.Uint64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -693,7 +693,7 @@ func local_request_Df_DeletePayment_0(ctx context.Context, marshaler runtime.Mar return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int64(val) + protoReq.Id, err = runtime.Uint64(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -719,7 +719,7 @@ func request_Df_ListPayments_0(ctx context.Context, marshaler runtime.Marshaler, return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "account_id") } - protoReq.AccountId, err = runtime.Int64(val) + 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) } @@ -745,7 +745,7 @@ func local_request_Df_ListPayments_0(ctx context.Context, marshaler runtime.Mars return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "account_id") } - protoReq.AccountId, err = runtime.Int64(val) + 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) } diff --git a/bff/proto/account.proto b/bff/proto/account.proto index 6f45c1d..4ceff8d 100644 --- a/bff/proto/account.proto +++ b/bff/proto/account.proto @@ -14,7 +14,7 @@ message Account { }; example: "{\"id\": \"1\",\"email\": \"john.doe@example.com\", \"firstname\": \"John\", \"lastname\": \"Doe\", \"phone\": \"\", \"street\": \"Death Star 2\", \"zip\": \"0815\", \"city\": \"New York\", \"country\": \"USA\", \"birthday\": \"1990-10-05T00:00:00Z\", \"privacy_accepted\": false, \"privacy_accepted_date\": \"0001-01-01T00:00:00Z\", \"creator\": \"john.doe@example.com\", \"created\": \"2023-10-05T02:30:53Z\", \"changer\": \"john.doe@example.com\", \"changed\": \"2023-10-05T02:30:53Z\"}"; }; - int64 id = 1; + uint64 id = 1; string email = 2; string firstname = 3; string lastname = 4; diff --git a/bff/proto/payment.proto b/bff/proto/payment.proto index 93c16a6..8d3be92 100644 --- a/bff/proto/payment.proto +++ b/bff/proto/payment.proto @@ -14,8 +14,8 @@ message Payment { }; example: "{\"id\": \"1\",\"account_id\": \"1\", \"payment_category\": \"TBD: paypal\", \"paypal_account\": \"john.doe@example.com\", \"paypal_id\": \"this-is-a-paypal-id\", \"payment_system\": \"TBD: paypal system\", \"type\": \"TBD: some type\", \"creator\": \"john.doe@example.com\", \"created\": \"2023-10-05T02:30:53Z\", \"changer\": \"john.doe@example.com\", \"changed\": \"2023-10-05T02:30:53Z\"}"; }; - int64 id = 1; - int64 account_id = 2; + uint64 id = 1; + uint64 account_id = 2; string payment_category = 3; optional string bankname = 4; optional string IBAN = 5; diff --git a/bff/proto/person.proto b/bff/proto/person.proto index 49921e1..abe8acd 100644 --- a/bff/proto/person.proto +++ b/bff/proto/person.proto @@ -14,8 +14,8 @@ message Person { }; example: "{\"id\": \"1\",\"email\": \"john.doe@example.com\", \"firstname\": \"John\", \"lastname\": \"Doe\", \"phone\": \"\", \"street\": \"Death Star 2\", \"zip\": \"0815\", \"city\": \"New York\", \"country\": \"USA\", \"birthday\": \"1990-10-05T00:00:00Z\", \"privacy_accepted\": false, \"privacy_accepted_date\": \"0001-01-01T00:00:00Z\", \"creator\": \"john.doe@example.com\", \"created\": \"2023-10-05T02:30:53Z\", \"changer\": \"john.doe@example.com\", \"changed\": \"2023-10-05T02:30:53Z\"}"; }; - int64 id = 1; - int64 account_id = 2; + uint64 id = 1; + uint64 account_id = 2; string firstname = 3; string lastname = 4; string street = 5; diff --git a/bff/proto/rpc_create_payment.proto b/bff/proto/rpc_create_payment.proto index d8149d9..08bc07e 100644 --- a/bff/proto/rpc_create_payment.proto +++ b/bff/proto/rpc_create_payment.proto @@ -16,13 +16,12 @@ message CreatePaymentRequest { required: [ "account_id", "payment_category", - "payment_system", "type" ]; }; example: "{\"account_id\": \"1\", \"payment_category\": \"TBD: paypal\", \"paypal_account\": \"john.doe@example.com\", \"paypal_id\": \"this-is-a-paypal-id\", \"payment_system\": \"TBD: paypal system\", \"type\": \"TBD: some type\"}"; }; - int64 account_id = 1; + uint64 account_id = 1; string payment_category = 2; optional string bankname = 3; optional string IBAN = 4; diff --git a/bff/proto/rpc_create_person.proto b/bff/proto/rpc_create_person.proto index 01c3bd1..a45e0ae 100644 --- a/bff/proto/rpc_create_person.proto +++ b/bff/proto/rpc_create_person.proto @@ -15,6 +15,7 @@ message CreatePersonRequest { title: "Create Person"; description: "Create an Person"; required: [ + "account_id", "firstname", "lastname", "street", @@ -26,7 +27,7 @@ message CreatePersonRequest { }; 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\"}"; }; - int64 account_id = 1; + uint64 account_id = 1; string firstname = 2; string lastname = 3; string street = 4; diff --git a/bff/proto/rpc_delete_payment.proto b/bff/proto/rpc_delete_payment.proto index f22fe79..7e01512 100644 --- a/bff/proto/rpc_delete_payment.proto +++ b/bff/proto/rpc_delete_payment.proto @@ -17,7 +17,7 @@ message DeletePaymentRequest { }; example: "{\"id\": \"1\"}" }; - int64 id = 1; + uint64 id = 1; } message DeletePaymentResponse { diff --git a/bff/proto/rpc_delete_person.proto b/bff/proto/rpc_delete_person.proto index 91082b1..5f7345f 100644 --- a/bff/proto/rpc_delete_person.proto +++ b/bff/proto/rpc_delete_person.proto @@ -17,7 +17,7 @@ message DeletePersonRequest { }; example: "{\"id\": \"1\"}" }; - int64 id = 1; + uint64 id = 1; } message DeletePersonResponse { diff --git a/bff/proto/rpc_get_account.proto b/bff/proto/rpc_get_account.proto index 0575226..48344f1 100644 --- a/bff/proto/rpc_get_account.proto +++ b/bff/proto/rpc_get_account.proto @@ -19,7 +19,7 @@ message GetAccountRequest { }; example: "{\"id\": \"1\" }"; }; - int64 id = 1; + uint64 id = 1; } message GetAccountResponse { diff --git a/bff/proto/rpc_get_payment.proto b/bff/proto/rpc_get_payment.proto index 576a2f3..fa47beb 100644 --- a/bff/proto/rpc_get_payment.proto +++ b/bff/proto/rpc_get_payment.proto @@ -19,7 +19,7 @@ message GetPaymentRequest { }; example: "{\"id\": \"1\" }"; }; - int64 id = 1; + uint64 id = 1; } message GetPaymentResponse { diff --git a/bff/proto/rpc_get_person.proto b/bff/proto/rpc_get_person.proto index 9fe31e4..927d203 100644 --- a/bff/proto/rpc_get_person.proto +++ b/bff/proto/rpc_get_person.proto @@ -19,7 +19,7 @@ message GetPersonRequest { }; example: "{\"id\": \"1\" }"; }; - int64 id = 1; + uint64 id = 1; } message GetPersonResponse { diff --git a/bff/proto/rpc_list_accounts.proto b/bff/proto/rpc_list_accounts.proto index f972bfa..6426b3e 100644 --- a/bff/proto/rpc_list_accounts.proto +++ b/bff/proto/rpc_list_accounts.proto @@ -14,13 +14,14 @@ message ListAccountsRequest { title: "ListAccounts"; description: "Returns a List of Accounts"; required: [ - "id" + "page_id", + "page_size" ]; }; example: "{\"page_id\": 1, \"page_size\": 10 }"; }; - int32 page_id = 1; - int32 page_size = 2; + uint32 page_id = 1; + uint32 page_size = 2; } message ListAccountsResponse { diff --git a/bff/proto/rpc_list_payments.proto b/bff/proto/rpc_list_payments.proto index fa7ffb3..d004626 100644 --- a/bff/proto/rpc_list_payments.proto +++ b/bff/proto/rpc_list_payments.proto @@ -19,7 +19,7 @@ message ListPaymentsRequest { }; example: "{\"account_id\": 1 }"; }; - int64 account_id = 1; + uint64 account_id = 1; } message ListPaymentsResponse { diff --git a/bff/proto/rpc_list_persons.proto b/bff/proto/rpc_list_persons.proto index 848af46..605c6be 100644 --- a/bff/proto/rpc_list_persons.proto +++ b/bff/proto/rpc_list_persons.proto @@ -19,7 +19,7 @@ message ListPersonsRequest { }; example: "{\"account_id\": 1 }"; }; - int64 account_id = 1; + uint64 account_id = 1; } message ListPersonsResponse { diff --git a/bff/proto/rpc_list_sessions.proto b/bff/proto/rpc_list_sessions.proto index e0a4cdd..5bc3d73 100644 --- a/bff/proto/rpc_list_sessions.proto +++ b/bff/proto/rpc_list_sessions.proto @@ -19,7 +19,7 @@ message ListSessionsRequest { }; example: "{\"account_id\": \"1\" }"; }; - int64 account_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" }]; diff --git a/bff/proto/rpc_update_account.proto b/bff/proto/rpc_update_account.proto index 689c4d7..9f6e92e 100644 --- a/bff/proto/rpc_update_account.proto +++ b/bff/proto/rpc_update_account.proto @@ -20,7 +20,7 @@ message UpdateAccountRequest { }; example: "{\"id\": \"1\", \"street\": \"Death Star 2\"}"; }; - int64 id = 1; + uint64 id = 1; optional string email = 2; optional string password = 3; optional string firstname = 4; diff --git a/bff/proto/rpc_update_account_privacy.proto b/bff/proto/rpc_update_account_privacy.proto index dbba084..01f67f8 100644 --- a/bff/proto/rpc_update_account_privacy.proto +++ b/bff/proto/rpc_update_account_privacy.proto @@ -20,7 +20,7 @@ message UpdateAccountPrivacyRequest { }; example: "{\"id\": \"1\", \"privacy_accepted\": true }" }; - int64 id = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + uint64 id = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { example: "1", format: "int64" }]; diff --git a/bff/proto/rpc_update_payment.proto b/bff/proto/rpc_update_payment.proto index 59b911d..2207dc6 100644 --- a/bff/proto/rpc_update_payment.proto +++ b/bff/proto/rpc_update_payment.proto @@ -19,7 +19,7 @@ message UpdatePaymentRequest { }; example: "{\"id\": \"1\", \"payment_category\": \"TBD: paypal\", \"paypal_account\": \"john.doe@example.com\", \"paypal_id\": \"this-is-a-paypal-id\", \"payment_system\": \"TBD: paypal system\", \"type\": \"TBD: some type\"}"; }; - int64 id = 1; + uint64 id = 1; optional string payment_category = 2; optional string bankname = 3; optional string IBAN = 4; diff --git a/bff/sqlc.yaml b/bff/sqlc.yaml index 93d369b..92a4550 100644 --- a/bff/sqlc.yaml +++ b/bff/sqlc.yaml @@ -13,6 +13,11 @@ sql: emit_empty_slices: true emit_exact_table_names: false overrides: + - db_type: "bigserial" + go_type: "uint64" + - db_type: "bigint" + null: false + go_type: "uint64" - db_type: "timestamptz" go_type: "time.Time" - db_type: "uuid" diff --git a/bff/util/random.go b/bff/util/random.go index 105e238..4d737b2 100644 --- a/bff/util/random.go +++ b/bff/util/random.go @@ -9,8 +9,8 @@ const alphabet = "abcdefghijklmnopqrstuvwxyz" const numbers = "0123456789" // RandomInt generates a random number between min and max -func RandomInt(min, max int64) int64 { - return min + rand.Int63n(max-min+1) +func RandomInt(min, max int64) uint64 { + return uint64(min + rand.Int63n(max-min+1)) } // RandomString generates a random string of length n