MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / S3Get

Method S3Get

driver/oss/db.go:215–239  ·  view source on GitHub ↗
(key []byte)

Source from the content-addressed store, hash-verified

213}
214
215func (db *DB) S3Get(key []byte) ([]byte, error) {
216 value := new(string)
217
218 client, err := NewClient(db.options)
219 if err != nil {
220 return nil, err
221 }
222
223 sskey := db.S3EncodeMetaKey(key)
224
225 //found, err := client.Get(string(key), value)
226 found, err := client.Get(string(sskey), value)
227 if err != nil {
228 //fmt.Println(err)
229 return nil, err
230 }
231
232 if found != true {
233 //fmt.Println(" S3 not found key=" , string(sskey))
234 return nil, nil
235 }
236
237 //db.cache.Set(key, data, 0)
238 return []byte(*value), nil
239}
240
241/*
242func (db *DB) Get(key []byte) ([]byte, error) {

Callers 1

GetMethod · 0.95

Calls 3

S3EncodeMetaKeyMethod · 0.95
GetMethod · 0.95
NewClientFunction · 0.85

Tested by

no test coverage detected