File tree Expand file tree Collapse file tree 23 files changed +111
-1
lines changed Expand file tree Collapse file tree 23 files changed +111
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ type Store struct {
13
13
codec encoding.Codec
14
14
}
15
15
16
+ // Gets underlying store to allow user manipulate object directly.
17
+ func (s Store ) GetStore () * badger.DB {
18
+ return s .db
19
+ }
20
+
16
21
// Set stores the given value for the given key.
17
22
// Values are automatically marshalled to JSON or gob (depending on the configuration).
18
23
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ type Store struct {
14
14
codec encoding.Codec
15
15
}
16
16
17
+ // Gets underlying store to allow user manipulate object directly.
18
+ func (s Store ) GetStore () * bolt.DB {
19
+ return s .db
20
+ }
21
+
17
22
// Set stores the given value for the given key.
18
23
// Values are automatically marshalled to JSON or gob (depending on the configuration).
19
24
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ type Store struct {
16
16
codec encoding.Codec
17
17
}
18
18
19
+ // Gets underlying store to allow user manipulate object directly.
20
+ func (s Store ) GetStore () * bigcache.BigCache {
21
+ return s .s
22
+ }
23
+
19
24
// Set stores the given value for the given key.
20
25
// Values are automatically marshalled to JSON or gob (depending on the configuration).
21
26
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ type Client struct {
14
14
codec encoding.Codec
15
15
}
16
16
17
+ // Gets underlying store to allow user manipulate object directly.
18
+ func (c Client ) GetStore () * api.KV {
19
+ return c .c
20
+ }
21
+
17
22
// Set stores the given value for the given key.
18
23
// Values are automatically marshalled to JSON or gob (depending on the configuration).
19
24
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ type Client struct {
31
31
codec encoding.Codec
32
32
}
33
33
34
+ // Gets underlying store to allow user manipulate object directly.
35
+ func (c Client ) GetStore () * datastore.Client {
36
+ return c .c
37
+ }
38
+
34
39
// Set stores the given value for the given key.
35
40
// Values are automatically marshalled to JSON or gob (depending on the configuration).
36
41
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change 2
2
Package gokv contains a simple key-value store abstraction in the form of a Go interface.
3
3
Implementations of the gokv.Store interface can be found in the sub-packages.
4
4
5
- Usage
5
+ # Usage
6
6
7
7
Example code for using Redis:
8
8
Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ type Client struct {
28
28
codec encoding.Codec
29
29
}
30
30
31
+ // Gets underlying store to allow user manipulate object directly.
32
+ func (c Client ) GetStore () * awsdynamodb.DynamoDB {
33
+ return c .c
34
+ }
35
+
31
36
// Set stores the given value for the given key.
32
37
// Values are automatically marshalled to JSON or gob (depending on the configuration).
33
38
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ type Client struct {
21
21
codec encoding.Codec
22
22
}
23
23
24
+ // Gets underlying store to allow user manipulate object directly.
25
+ func (c Client ) GetStore () * clientv3.Client {
26
+ return c .c
27
+ }
28
+
24
29
// Set stores the given value for the given key.
25
30
// Values are automatically marshalled to JSON or gob (depending on the configuration).
26
31
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ type Store struct {
15
15
codec encoding.Codec
16
16
}
17
17
18
+ // Gets underlying store to allow user manipulate object directly.
19
+ func (s Store ) GetStore () * freecache.Cache {
20
+ return s .s
21
+ }
22
+
18
23
// Set stores the given value for the given key.
19
24
// Values are automatically marshalled to JSON or gob (depending on the configuration).
20
25
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ type Store struct {
14
14
codec encoding.Codec
15
15
}
16
16
17
+ // Gets underlying store to allow user manipulate object directly.
18
+ func (s Store ) GetStore () map [string ][]byte {
19
+ return s .m
20
+ }
21
+
17
22
// Set stores the given value for the given key.
18
23
// Values are automatically marshalled to JSON or gob (depending on the configuration).
19
24
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -19,6 +19,11 @@ type Client struct {
19
19
codec encoding.Codec
20
20
}
21
21
22
+ // Gets underlying store to allow user manipulate object directly.
23
+ func (c Client ) GetStore () * hazelcast.Client {
24
+ return c .c
25
+ }
26
+
22
27
// Set stores the given value for the given key.
23
28
// Values are automatically marshalled to JSON or gob (depending on the configuration).
24
29
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ type Client struct {
18
18
codec encoding.Codec
19
19
}
20
20
21
+ // Gets underlying store to allow user manipulate object directly.
22
+ func (c Client ) GetStore () * ignite.Client {
23
+ return c .c
24
+ }
25
+
21
26
// Set stores the given value for the given key.
22
27
// Values are automatically marshalled to JSON or gob (depending on the configuration).
23
28
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ type Store struct {
15
15
codec encoding.Codec
16
16
}
17
17
18
+ // Gets underlying store to allow user manipulate object directly.
19
+ func (s Store ) GetStore () * leveldb.DB {
20
+ return s .db
21
+ }
22
+
18
23
// Set stores the given value for the given key.
19
24
// Values are automatically marshalled to JSON or gob (depending on the configuration).
20
25
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ type Client struct {
17
17
codec encoding.Codec
18
18
}
19
19
20
+ // Gets underlying store to allow user manipulate object directly.
21
+ func (c Client ) GetStore () * memcache.Client {
22
+ return c .c
23
+ }
24
+
20
25
// Set stores the given value for the given key.
21
26
// The key must not be longer than 250 bytes (this is a restriction of Memcached).
22
27
// Values are automatically marshalled to JSON or gob (depending on the configuration).
Original file line number Diff line number Diff line change @@ -55,6 +55,11 @@ type Client struct {
55
55
cancel context.CancelFunc
56
56
}
57
57
58
+ // Gets underlying store to allow user manipulate object directly.
59
+ func (c Client ) GetStore () * mongo.Collection {
60
+ return c .c
61
+ }
62
+
58
63
// Set stores the given value for the given key.
59
64
// Values are automatically marshalled to JSON or gob (depending on the configuration).
60
65
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ type Client struct {
24
24
c * sql.Client
25
25
}
26
26
27
+ // Gets underlying store to allow user manipulate object directly.
28
+ func (c Client ) GetStore () * sql.Client {
29
+ return c .c
30
+ }
31
+
27
32
// Set stores the given value for the given key.
28
33
// Values are automatically marshalled to JSON or gob (depending on the configuration).
29
34
// The length of the key must not exceed 255 characters.
Original file line number Diff line number Diff line change @@ -19,6 +19,11 @@ type Client struct {
19
19
codec encoding.Codec
20
20
}
21
21
22
+ // Gets underlying store to allow user manipulate object directly.
23
+ func (c Client ) GetStore () * redis.Client {
24
+ return c .c
25
+ }
26
+
22
27
// Set stores the given value for the given key.
23
28
// Values are automatically marshalled to JSON or gob (depending on the configuration).
24
29
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ type Client struct {
22
22
codec encoding.Codec
23
23
}
24
24
25
+ // Gets underlying store to allow user manipulate object directly.
26
+ func (c Client ) GetStore () * awss3.S3 {
27
+ return c .c
28
+ }
29
+
25
30
// Set stores the given value for the given key.
26
31
// Values are automatically marshalled to JSON or gob (depending on the configuration).
27
32
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ type Client struct {
16
16
Codec encoding.Codec
17
17
}
18
18
19
+ // Gets underlying store to allow user manipulate object directly.
20
+ func (c Client ) GetStore () * sql.DB {
21
+ return c .C
22
+ }
23
+
19
24
// Set stores the given value for the given key.
20
25
// Values are automatically marshalled to JSON or gob (depending on the configuration).
21
26
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ type Store struct {
13
13
codec encoding.Codec
14
14
}
15
15
16
+ // Gets underlying store to allow user manipulate object directly.
17
+ func (s Store ) GetStore () * sync.Map {
18
+ return s .m
19
+ }
20
+
16
21
// Set stores the given value for the given key.
17
22
// Values are automatically marshalled to JSON or gob (depending on the configuration).
18
23
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -30,6 +30,11 @@ type Client struct {
30
30
codec encoding.Codec
31
31
}
32
32
33
+ // Gets underlying store to allow user manipulate object directly.
34
+ func (c Client ) GetStore () * storage.Table {
35
+ return c .c
36
+ }
37
+
33
38
// Set stores the given value for the given key.
34
39
// Values are automatically marshalled to JSON or gob (depending on the configuration).
35
40
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ type Client struct {
20
20
codec encoding.Codec
21
21
}
22
22
23
+ // Gets underlying store to allow user manipulate object directly.
24
+ func (c Client ) GetStore () * tablestore.TableStoreClient {
25
+ return c .c
26
+ }
27
+
23
28
// Set stores the given value for the given key.
24
29
// Values are automatically marshalled to JSON or gob (depending on the configuration).
25
30
// The key must not be "" and the value must not be nil.
Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ type Client struct {
18
18
codec encoding.Codec
19
19
}
20
20
21
+ // Gets underlying store to allow user manipulate object directly.
22
+ func (c Client ) GetStore () * zk.Conn {
23
+ return c .c
24
+ }
25
+
21
26
// Set stores the given value for the given key.
22
27
// Values are automatically marshalled to JSON or gob (depending on the configuration).
23
28
// The key must not be "" and the value must not be nil.
You can’t perform that action at this time.
0 commit comments