storageprovider

package
v0.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NFSProvisionerPrefix  string = "nfs-provisioner-"
	NFSStorageClassPrefix string = "nfs-storageclass-"
)

the const for the provisioner or storageclass of nfs

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeStorageProvider

type FakeStorageProvider struct {
	entity.FakeStorage
}

FakeStorageProvider is the structure for Fake Storage Provider

func (FakeStorageProvider) CreateStorage

func (fake FakeStorageProvider) CreateStorage(sp *serviceprovider.Container, storage *entity.Storage) error

CreateStorage will create storage

func (FakeStorageProvider) DeleteStorage

func (fake FakeStorageProvider) DeleteStorage(sp *serviceprovider.Container, net *entity.Storage) error

DeleteStorage will delete storage

func (FakeStorageProvider) ValidateBeforeCreating

func (fake FakeStorageProvider) ValidateBeforeCreating(sp *serviceprovider.Container, storage *entity.Storage) error

ValidateBeforeCreating will validate StorageProvider before creating

func (FakeStorageProvider) ValidateBeforeDeleting added in v0.2.1

func (fake FakeStorageProvider) ValidateBeforeDeleting(sp *serviceprovider.Container, net *entity.Storage) error

ValidateBeforeDeleting will validate StorageProvider before deleting

type NFSStorageProvider

type NFSStorageProvider struct {
	entity.Storage
}

NFSStorageProvider is the structure for NFS storage provider

func (NFSStorageProvider) CreateStorage

func (nfs NFSStorageProvider) CreateStorage(sp *serviceprovider.Container, storage *entity.Storage) error

CreateStorage will create storage depandent on NFS storage srovider

func (NFSStorageProvider) DeleteStorage

func (nfs NFSStorageProvider) DeleteStorage(sp *serviceprovider.Container, storage *entity.Storage) error

DeleteStorage will delete stroage

func (NFSStorageProvider) ValidateBeforeCreating

func (nfs NFSStorageProvider) ValidateBeforeCreating(sp *serviceprovider.Container, storage *entity.Storage) error

ValidateBeforeCreating will validate the nfs storage provider before creating

func (NFSStorageProvider) ValidateBeforeDeleting added in v0.2.1

func (nfs NFSStorageProvider) ValidateBeforeDeleting(sp *serviceprovider.Container, storage *entity.Storage) error

ValidateBeforeDeleting will validate StorageProvider before deleting

type StorageProvider

type StorageProvider interface {
	ValidateBeforeCreating(sp *serviceprovider.Container, net *entity.Storage) error
	CreateStorage(sp *serviceprovider.Container, net *entity.Storage) error
	ValidateBeforeDeleting(sp *serviceprovider.Container, net *entity.Storage) error
	DeleteStorage(sp *serviceprovider.Container, net *entity.Storage) error
}

StorageProvider is storage provider interface

func GetStorageProvider

func GetStorageProvider(storage *entity.Storage) (StorageProvider, error)

GetStorageProvider will get storage provider

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL