move code supporting push, pull, and inspect to libkpod and libkpod/image
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
This commit is contained in:
parent
2c1fd1ad3f
commit
14864f820e
16 changed files with 319 additions and 269 deletions
|
@ -2,11 +2,13 @@ package driver
|
|||
|
||||
import cstorage "github.com/containers/storage"
|
||||
|
||||
type DriverData struct {
|
||||
// Data handles the data for a storage driver
|
||||
type Data struct {
|
||||
Name string
|
||||
Data map[string]string
|
||||
}
|
||||
|
||||
// GetDriverName returns the name of the driver for the given store
|
||||
func GetDriverName(store cstorage.Store) (string, error) {
|
||||
driver, err := store.GraphDriver()
|
||||
if err != nil {
|
||||
|
@ -15,6 +17,7 @@ func GetDriverName(store cstorage.Store) (string, error) {
|
|||
return driver.String(), nil
|
||||
}
|
||||
|
||||
// GetDriverMetadata returns the metadata regarding the driver for the layer in the given store
|
||||
func GetDriverMetadata(store cstorage.Store, layerID string) (map[string]string, error) {
|
||||
driver, err := store.GraphDriver()
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue