Author | SHA1 | Message | Date |
---|---|---|---|
Ismail Khoffi | b089587b42 |
make gosec linter pass (#3294)
* not related to linter: remove obsolete constants: - `Insecure` and `Secure` and type `Security` are not used anywhere * not related to linter: update example - NewInsecure was deleted; change example to NewRemoteDB * address: Binds to all network interfaces (gosec): - bind to localhost instead of 0.0.0.0 - regenerate test key and cert for this purpose (was valid for ::) and otherwise we would see: transport: authentication handshake failed: x509: certificate is valid for ::, not 127.0.0.1\" (used https://github.com/google/keytransparency/blob/master/scripts/gen_server_keys.sh to regenerate certs) * use sha256 in tests instead of md5; time difference is negligible * nolint usage of math/rand in test and add comment on its import - crypto/rand is slower and we do not need sth more secure in tests * enable linter in circle-ci * another nolint math/rand in test * replace another occurrence of md5 * consistent comment about importing math/rand |
6 years ago |
Zach Ramsay | 44dad6d70b |
Revert "detele everything"
This reverts commit
|
6 years ago |
Zach Ramsay | d02c5d1e30 | detele everything | 6 years ago |
Ethan Buchman | ae3bf81833 | mv tmlibs files to libs dir | 6 years ago |
Ethan Buchman | 468be0f8d6 | mv remotedb, proto, grpcdb all under db/remotedb | 7 years ago |
Emmanuel T Odeke |
5d12e1eb46
|
remotedb: a client package implementing the db.DB interface
Simplified the abstractions to remotedb, a package that allows clients to use whatever database they can in client code without having to switch out their code e.g ```go client, err := remotedb.NewInsecure(":9888") ... // Just like they'd initialize locally in := &remotedb.Init{ Name: "test-remote-db", Type: "leveldb", Dir: "/tmp/dbs", } if err := client.InitRemote(in); err != nil { log.Fatalf("Failed to initialize the database") } v1 := client.Get(k1) client.Set(k9, dog) for itr := client.Iterator(a1, z1); itr.Valid(); itr.Next() { k, v := itr.Key(), itr.Value() dom := itr.Domain() ... } ``` |
7 years ago |