mirror of
https://github.com/minio/minio.git
synced 2025-12-06 07:42:32 -05:00
Implement commands
Commands implemented
$ minio put <objectname> <file>
$ minio encode <objectname>
$ minio get <objectname>
$ minio list
TODO :
$ minio init
$ minio verify
...
...
This commit is contained in:
@@ -80,7 +80,7 @@ func NewStorage(rootDir string, slice int) (storage.ObjectStorage, error) {
|
||||
func (storage *appendStorage) Get(objectPath string) (io.Reader, error) {
|
||||
header, ok := storage.objects[objectPath]
|
||||
if ok == false {
|
||||
return nil, nil
|
||||
return nil, errors.New("Object not found")
|
||||
}
|
||||
|
||||
offset := header.Offset
|
||||
|
||||
@@ -110,7 +110,7 @@ func NewStorage(rootDir string, k, m int, blockSize uint64) (storage.ObjectStora
|
||||
func (eStorage *encodedStorage) Get(objectPath string) (io.Reader, error) {
|
||||
entry, ok := eStorage.objects[objectPath]
|
||||
if ok == false {
|
||||
return nil, nil
|
||||
return nil, errors.New("Object not found")
|
||||
}
|
||||
reader, writer := io.Pipe()
|
||||
go eStorage.readObject(objectPath, entry, writer)
|
||||
|
||||
Reference in New Issue
Block a user