MCPcopy Create free account
hub / github.com/foxcpp/maddy / Create

Method Create

internal/storage/imapsql/external_blob_store.go:35–45  ·  view source on GitHub ↗
(key string, objSize int64)

Source from the content-addressed store, hash-verified

33}
34
35func (e ExtBlobStore) Create(key string, objSize int64) (imapsql.ExtStoreObj, error) {
36 blob, err := e.Base.Create(context.TODO(), key, objSize)
37 if err != nil {
38 return nil, imapsql.ExternalError{
39 NonExistent: err == module.ErrNoSuchBlob,
40 Key: key,
41 Err: err,
42 }
43 }
44 return WriteExtBlob{Blob: blob}, nil
45}
46
47func (e ExtBlobStore) Open(key string) (imapsql.ExtStoreObj, error) {
48 blob, err := e.Base.Open(context.TODO(), key)

Callers

nothing calls this directly

Calls 1

CreateMethod · 0.65

Tested by

no test coverage detected