~tsileo/blobstash

ref: b178995e346d blobstash/pkg/client/response/response.go -rw-r--r-- 608 bytes
b178995eThomas Sileo vendor: update deps 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package response // import "a4.io/blobstash/pkg/client/response"

// KeyValue holds a singke key value pair, along with the version (the creation timestamp)
type KeyValue struct {
	Key     string `json:"key,omitempty"`
	Hash    string `json:"hash"`
	Data    []byte `json:"data"`
	Version int    `json:"version"`
}

// KeyValueVersions holds the full history for a key value pair
type KeyValueVersions struct {
	Key      string      `json:"key"`
	Versions []*KeyValue `json:"versions"`
}

// KeysResponse is a wrapper for a list of key value pairs
type KeysResponse struct {
	Keys []*KeyValue `json:"keys"`
}