Skip to content

Commit

Permalink
Blobstore: Expand detailed blobstore with basic data
Browse files Browse the repository at this point in the history
  • Loading branch information
Nosmoht committed Mar 29, 2020
1 parent 1325c2f commit 5922735
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions blobstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,15 @@ func (c client) BlobstoreRead(id string) (*Blobstore, error) {
return nil, err
}

switch bs.Type {
case BlobstoreTypeFile:
bs.Path = bsDetailed.Path
case BlobstoreTypeS3:
bs.BlobstoreS3BucketConfiguration = &BlobstoreS3BucketConfiguration{
BlobstoreS3AdvancedBucketConnection: bsDetailed.BlobstoreS3AdvancedBucketConnection,
BlobstoreS3Bucket: bsDetailed.BlobstoreS3Bucket,
BlobstoreS3BucketSecurity: bsDetailed.BlobstoreS3BucketSecurity,
BlobstoreS3Encryption: bsDetailed.BlobstoreS3Encryption,
}
}
return &bs, nil
bsDetailed.Name = bs.Name
bsDetailed.Type = bs.Type
bsDetailed.BlobCount = bs.BlobCount
bsDetailed.TotalSizeInBytes = bs.TotalSizeInBytes
bsDetailed.AvailableSpaceInBytes = bs.AvailableSpaceInBytes

bs.Name = bsDetailed.Name

return bsDetailed, nil
}
}

Expand Down

0 comments on commit 5922735

Please sign in to comment.