package com.bocloud.cmp.provider.storage;

import com.bocloud.cmp.model.ObjectStorageContainerModel;
import com.bocloud.cmp.model.ObjectStorageItemModel;
import com.bocloud.cmp.provider.SuperProvider;
import com.bocloud.common.model.BocloudResult;

import java.io.InputStream;

/**
 * @author hufy
 */
public interface ObjectStorageProvider extends SuperProvider {
    public BocloudResult createContainer(ObjectStorageContainerModel container);

    public BocloudResult removeContainer(ObjectStorageContainerModel container);

    public BocloudResult existsContainer(ObjectStorageContainerModel container);

    public BocloudResult detailContainer(ObjectStorageContainerModel container);

    public BocloudResult listContainer();

    BocloudResult listItem(String containerName);

    BocloudResult createItem(ObjectStorageItemModel itemModel, String bspPath);

    BocloudResult existsItem(ObjectStorageItemModel itemModel);

    BocloudResult removeItem(ObjectStorageItemModel itemModel);

    BocloudResult detailItem(ObjectStorageItemModel itemModel);

    InputStream download(ObjectStorageItemModel itemModel);

    BocloudResult uploadItem(ObjectStorageItemModel itemModel, InputStream inputStream);
}
