db

package
v1.2.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: Apache-2.0 Imports: 6 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.

func UpdateVolumeGroupStatus added in v0.5.1

func UpdateVolumeGroupStatus(ctx *c.Context, client Client, vgID, status string) error

func UpdateVolumeStatus added in v0.5.1

func UpdateVolumeStatus(ctx *c.Context, client Client, volID, status string) error

Types

type Client

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

	GetDock(ctx *c.Context, dckID string) (*model.DockSpec, error)

	ListDocks(ctx *c.Context) ([]*model.DockSpec, error)

	ListDocksWithFilter(ctx *c.Context, m map[string][]string) ([]*model.DockSpec, error)

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

	DeleteDock(ctx *c.Context, dckID string) error

	GetDockByPoolId(ctx *c.Context, poolId string) (*model.DockSpec, error)

	CreatePool(ctx *c.Context, pol *model.StoragePoolSpec) (*model.StoragePoolSpec, error)

	GetPool(ctx *c.Context, polID string) (*model.StoragePoolSpec, error)

	ListPools(ctx *c.Context) ([]*model.StoragePoolSpec, error)

	ListPoolsWithFilter(ctx *c.Context, m map[string][]string) ([]*model.StoragePoolSpec, error)

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

	DeletePool(ctx *c.Context, polID string) error

	GetVolume(ctx *c.Context, volID string) (*model.VolumeSpec, error)

	DeleteVolume(ctx *c.Context, volID string) error

	GetVolumeGroup(ctx *c.Context, vgId string) (*model.VolumeGroupSpec, error)

	UpdateStatus(ctx *c.Context, object interface{}, status string) error

	ListVolumesByGroupId(ctx *c.Context, vgId string) ([]*model.VolumeSpec, 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