-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address book #265
Merged
stdevMac
merged 84 commits into
fibercrypto:develop
from
simelo:stdevHsequeda_t152_AddressBook
Dec 21, 2019
Merged
Address book #265
stdevMac
merged 84 commits into
fibercrypto:develop
from
simelo:stdevHsequeda_t152_AddressBook
Dec 21, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… interaction with the database. The dbWrite and bRead method was created. The dbWrite and bRead test was created.
… / contact.proto, internal / config.proto, Makefile and contact.go files to the data directory. Added to .gitignore *.pb.go filetype. Addressbook.go contains funcs: struct AddressBook{db *db.bolt.DB, dbPath string ,hasPassword bool, hash, entropy []byte}, -InsertContact, -DeleteConstact , -OpenDb ,-ListContacts, -MarshalBinaryConfig, -UnmarshalBinaryConfig, -generateHash, -verifyHash, -CloseDb, -GetConfig, -GenerateMnemonic. Contact.go contains funcs: structContact{ID uint64, Name []byte, Address []Address}, struct Address{value,coin []byte} -MarshalBinary, -UnmarshalBinary, -encryptContact, -decryptContact, -derivePassphrase. data_test contains tests: -TestAddressBook_generateHash, -TestAddressBook_Insert, -TestContact_MarshalBinary, -TestAddressBook_MarshalBinary, -TestAddressBook_List.
…queda_t152_AddressBook
… created in src / core / storage.go. The addressBook type was changed to unexportable in addressbook.go. The global variable dbConfigDataKey was deleted. Modified the verifyHash function. Added the GetAddressBook, New, GetPath, SetPath and GetHashFromConfig functions to the addressBook type. Modified the functions Insert, Get, Delete, List of type addressBook to implement the core.AddressBook interface. Modified functions of type data.Contact to implement the core.Contact interface. Added the GetID and SetID functions to the data.Contact type. Removed the TestAddressBook_generateHash and TestAddressBook_MarshalBinary tests. Added the auxiliary function GetFilePath to generate temporary files for the tests. Modified the auxiliary function OpenAddrsBook to initialize an addressBook for each test.
…queda_t152_AddressBook
… core/storage.go. Removed Encrypt and Decrypt methods of Contact interface in core/storage.go. Added no-repeat address verification to InsertContact func in data/addressbook.go. Added Encrypt and Decrypt func to addressbook. Added SearchAddress method to addressbook. Added GetAddress and SetAddress to Contact in data/contact.go. Added GetValue,GetCoinType, SetValue and SetCoinType to Address type in data/contact. Created datautils.go file in data directory.
…k interface in core/storege.go. Added doc to functions in data/addressbook.go. Rename type addressBook to AddressBookWithBolt in addressbook.go. Removed GetAddressBook func. Rename function New to Init in data/addressbook.go. Modified return errValEmpty when id is not found in DeleteContact func. Auto-generated test to data/. Created TestContact_MarshalBinary, TestContact_UnmarshalBinary and Test_addressBook_DeleteContact. Added Test_addressBook_GetContact test to data/test_data.go. Fixed error in decryptAESGCM.
…queda_t152_AddressBook
…tact, Test_addressBook_ListContact test in data/data_test.go.
…adableAddress interfaces in core/storage.go. Added errParseContact in data/addressbook.go. Rename AddressBook type to DB in data/addressbook.go. Added key and hasPassword property to DB in data/addressbook.go. Remove password param from InsertContact, ListContact, GetContact and UpdateContact in data/addressbook.go. Created UpdateContact in data/addressbook.go. Created TestDB_UpdateContact test in data/data_test. Edited GetAddress and SetAddress functions of data.Address type. Removed GetAddressLen function of data.Address type. Added itob and btoi functions to data/datautils.go.
…rty of DB type. Modified verifiyHash and Open functions. Created LoadFromFile function.
…queda_t152_AddressBook
…Fatal. Created TestLoadFormFile test.
…ontact functions return error if a contact's name is repeated. Created NameExists function. Modify AddressExists function. Added testcases of name-repeat to TestDB_InsertContact and TestDB_UpdateContact.
…queda_t152_AddressBook
…ions in data pkg.
…s to core.Contact interface and data.Contact type. Created addressBook/addressbook.go into models folder. Created AddressBook.qml in ui folder. Added component addressBook into Tools menu in the UI.
…queda_t152_AddressBook
…Dialogs. Create addressbook.go in models/addressBook. Created data, removeContact, addContact, editContact, loadContact, newContact slots to models/addressbook/addressbook.go .Added roles, contacts, count property to models/addressBook/addressbook.go. Implemented add contact to in ui/addressbook.qml.
…queda_t152_AddressBook
…data/addressbook so that if the password is not valid closing database. Added openAddrsBook, initAddrsBook and exist slot to models/addressbook/addressbook.go. Added close, exist, initAddrsBook, openAddrsBook functions to models/addressbook/addressbook.go. Added Connections between qml and model functions into init(constructor) function. Modified address book interface structure. Added password authentication to addressBook UI.
…cts testcase of Test_addressBook_ListContact test. Created ContactDelegate.qml and SectionDelegate.qml in ui/Delegates/. Added delegates SectionDelegate and ContactDelegate implementation to AddressBook.qml.
….go file. models/addressbook/addressbook.go renamed to contact.go. QAddress type moved to models/addressbook/address.go. Created AddrsBkAddressModel struct in models/addressbook/address.go. Created init, rowCount, roleNames, data, FromAddressToQAddress function in models/addressbook/address.go. Created ui/Dialogs/DialogShowContact.qml file. Created a ScrollView with addresses list for each contact in DialogShowContact.qml. Removed header from AddressBook page.
…unction in data/addressbook.go. Added sort function to fromAddressToQAddress function in models/addressBook/address.go for sort all address by coin type. Added sort function to addContact function in models/addressBook/contact.go for sort all contact by contact name. Implemented addAddress function to models/addressBook/contact.go to add many address for each contact. Create AddressListDelegate in ui/Delegates. Implemented interface to add many address in ui/Delegates/AddressListDelegate.qml. Added user-standard image to ui/Delegates/ContactDelegate.qml. Change SectionDelegate UI in ui/Delegates/SectionDelegate.qml. Modified DialogAddContact for add many address for each contact in ui/Dialogs/DialogAddContact.qml. Modified DialogShowContact to show many address for each contact in ui/Dialogs/DialogShowContact.qml. Change dimension of DialogAddContact in ui/AddressBook.qml. Change from "+" to "Add Contact" text of button to add contact.
…sBook.Init implementation. Added make -C src/data/ regenerate to Makefile to generate internal package data files. Added data package test to Makefile.
…rror to return uint64,error in core/storage.go. Added menu to select between View, Edit and remove a contact. Implement removeContact in models/addressBook/contacts.go.
…e in SetPassword and getPassword dialogs in AddressBook.qml file.
…lity into model and UI.
…queda_t152_AddressBook # Conflicts: # .gitignore
…ss_verify' into stdevHsequeda_t152_AddressBook
…y in test-data. Added creation of /temp directory to GetFilePath in data_test.go file in data package.
…ss_verify' into stdevHsequeda_t152_AddressBook
…n data package.
…in data package case to test addressbook.Exist method.
…queda_t152_AddressBook # Conflicts: # Makefile # src/coin/skycoin/models/wallet.go # src/coin/skycoin/models/wallet_test.go # src/core/main.go # src/core/storage.go # src/util/util.go
…152_AddressBook # Conflicts: # src/coin/skycoin/models/wallet_test.go # src/util/util.go
stdevMac
reviewed
Dec 10, 2019
…to "+" in AddressBook.qml. Hide Address book menubar button when address book is the current page.
… secType consts from Type1, Type2, Type3 to NoSecurity, ObfuscationSecurity and PasswordSecurity. Fixed grammatical error in errParseContact. Removed errorWrapper. Created Hash, Entropy and SecurityType const.
…DB to addrBook and dataBase in data package. Created dbLog in data package.
…packege. Added InsertValue, GetValue, ListValue, DeleteValue, UpdateValue, Path, GetConfig, InsertConfig and Close function to Storage interface. Added GetStorage function to AddressBook interface. Added IsValid function to Contact and StringAddress interfaces.
…ackage. Created boltStorage type implementing Storage interface. Implementing InsertValue, GetValue, ListValue, DeleteValue, UpdateValue, Path, GetConfig, InsertConfig and Close function in type boltStorage. Created errValueNoMatch function to handle matching type error. Implementing IsValue method in Contact and Address type. Removed db parameter from dataBase type. Renamed dataBase type to addrsBook. Reimplementing NewAddressBook function. Reimplementing Authenticate, InsertContact, GetContact, ListContact, DeleteContact, UpdateContact, HasInit, IsOpen, GetSecType, getEntropyFromConfig, getHashFromConfig, verifyHash, insertConfig, encryptAESGCM and decryptAESGCM function of addrsBook type. Reimplemented all test for data package.
…kModel in /models/addressbook/contacts.go.
…database.go and addressbook.go file.
…ressBook interface. Implemented ChangeSecurity method of addrsBook type in data package. Fixed error in addressExist method of addrsBook type in data package. Created Test_addrsBook_ChangeSecurity test in data_test.go in data package. Implemented ChangeSecType method in addressBook models and UI.
…age in addressbook.go file. Updated documentation of methods. Created errDatabaseNotOpen error in database.go file.
…queda_t152_AddressBook # Conflicts: # Makefile
…nterface. Removed error return from GetSecType method of AddressBook interface. Changed to unexported Hash, Entropy and SecurityType constants in data package. Removed errParseContact from data package. Modified ChangeSecurity,Init, Authenticate, InsertContact, GetContact, ListContact, UpdataContact and GetSecType method of addrsBook type in data package. Removed encryptContact, decryptContact, encryptAESGCM, decryptAESGCM, genEntropy, addressExist, NameExist and verifyHash methods from addrsBook type in data package. Added validateContact method to addrsBook type in data package. Removed MarshalBinary and UnmarshalBinary methods from Contact type in data package. Implemented Encrypt and Decrypt methods of Contact interface in Contact type in data package. Changed boltStorage to exportable in data package. Created dataUtil.go file in data package. Added isRepeatAddress, isRepeatName, genEntropy, encryptAESGCM and decryptAESGCM function to dataUtil.go file in data package. Made more readable the functions in addressBook models and ui.
… Created TestBoltStorage_InsertValue, TestBoltStorage_GetValue, TestBoltStorage_ListValue, TestBoltStorage_DeleteValue, TestBoltStorage_UpdateValue test in database_test.go.
…, SetName and GetName method of Contact type in TestDB_UpdateContact test id data package.
stdevMac
requested changes
Dec 19, 2019
…lication name and organization domain in main.go file.
…queda_t152_AddressBook
…ssBook' into stdevHsequeda_t152_AddressBook
stdevMac
approved these changes
Dec 20, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #152
Changes:
-Map (Address,coinName).
-Added data package.
-Testing AddressBook methods.
-Added AddressBook into Ui.
-Added selection from AddressBook in Transactions.
-Rejected invalid address.
-Added security type selection.
Does this change need to mentioned in CHANGELOG.md?
yes
Requires testing
Requires testing
yes
Comments about testing , should you have some