db

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(db *Database)

Init function can perform some initialization work of different databases.

Types

type Client

type Client interface {
	CreateDock(dck *model.DockSpec) (*model.DockSpec, error)

	GetDock(dckID string) (*model.DockSpec, error)

	ListDocks() ([]*model.DockSpec, error)

	UpdateDock(dckID, name, desp string) (*model.DockSpec, error)

	DeleteDock(dckID string) error

	GetDockByPoolId(poolId string) (*model.DockSpec, error)

	CreatePool(pol *model.StoragePoolSpec) (*model.StoragePoolSpec, error)

	GetPool(polID string) (*model.StoragePoolSpec, error)

	ListPools() ([]*model.StoragePoolSpec, error)

	UpdatePool(polID, name, desp string, usedCapacity int64, used bool) (*model.StoragePoolSpec, error)

	DeletePool(polID string) error

	CreateProfile(prf *model.ProfileSpec) (*model.ProfileSpec, error)

	GetProfile(prfID string) (*model.ProfileSpec, error)

	GetDefaultProfile() (*model.ProfileSpec, error)

	ListProfiles() ([]*model.ProfileSpec, error)

	UpdateProfile(prfID string, input *model.ProfileSpec) (*model.ProfileSpec, error)

	DeleteProfile(prfID string) error

	AddExtraProperty(prfID string, ext model.ExtraSpec) (*model.ExtraSpec, error)

	ListExtraProperties(prfID string) (*model.ExtraSpec, error)

	RemoveExtraProperty(prfID, extraKey string) error

	CreateVolume(vol *model.VolumeSpec) (*model.VolumeSpec, error)

	GetVolume(volID string) (*model.VolumeSpec, error)

	ListVolumes() ([]*model.VolumeSpec, error)

	UpdateVolume(vol *model.VolumeSpec) (*model.VolumeSpec, error)

	DeleteVolume(volID string) error

	ExtendVolume(vol *model.VolumeSpec) (*model.VolumeSpec, error)

	CreateVolumeAttachment(attachment *model.VolumeAttachmentSpec) (*model.VolumeAttachmentSpec, error)

	GetVolumeAttachment(attachmentId string) (*model.VolumeAttachmentSpec, error)

	ListVolumeAttachments(volumeId string) ([]*model.VolumeAttachmentSpec, error)

	UpdateVolumeAttachment(attachmentId string, attachment *model.VolumeAttachmentSpec) (*model.VolumeAttachmentSpec, error)

	DeleteVolumeAttachment(attachmentId string) error

	CreateVolumeSnapshot(vs *model.VolumeSnapshotSpec) (*model.VolumeSnapshotSpec, error)

	GetVolumeSnapshot(snapshotID string) (*model.VolumeSnapshotSpec, error)

	ListVolumeSnapshots() ([]*model.VolumeSnapshotSpec, error)

	UpdateVolumeSnapshot(snapshotID string, vs *model.VolumeSnapshotSpec) (*model.VolumeSnapshotSpec, error)

	DeleteVolumeSnapshot(snapshotID string) error
}

Client is an interface for exposing some operations of managing database client.

var C Client

C is a global variable that controls database module.

Directories

Path Synopsis
drivers

Jump to

Keyboard shortcuts

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