db

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exit

func Exit(db *config.Database)

func Init

func Init(db *config.Database)

Init function can perform some initialization work of different databases.

Types

type DBAdapter

type DBAdapter interface {
	ListVolume(ctx context.Context, limit, offset int, query interface{}) ([]*model.Volume, error)
	GetVolume(ctx context.Context, id string) (*model.Volume, error)
	CreateVolume(ctx context.Context, volume *model.Volume) (*model.Volume, error)
	UpdateVolume(ctx context.Context, volume *model.Volume) (*model.Volume, error)
	DeleteVolume(ctx context.Context, id string) error
}
var DbAdapter DBAdapter

DbAdapter 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