engine

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DbNameSuffix = "_snapvault"

Variables

This section is empty.

Functions

This section is empty.

Types

type DBConfig

type DBConfig struct {
	Host     string
	Port     string
	User     string
	Password string
	Name     string
}

type DBname

type DBname string

func ToDBname

func ToDBname(snapName SnapName) DBname

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func DirectEngine

func DirectEngine(url string) (*Engine, error)

func LoadEngine

func LoadEngine(dir string) (*Engine, error)

func (*Engine) Close

func (e *Engine) Close() error

func (*Engine) Connect

func (e *Engine) Connect() error

func (*Engine) CreateFromSnap

func (d *Engine) CreateFromSnap(snapName SnapName) (int64, error)

func (*Engine) DisableTemplate

func (d *Engine) DisableTemplate() (int64, error)

func (*Engine) Drop

func (d *Engine) Drop(dbName DBname) (int64, error)

func (*Engine) EnableTemplate

func (d *Engine) EnableTemplate() (int64, error)

func (*Engine) GetCommentForDatabase

func (e *Engine) GetCommentForDatabase(dbName string) (*string, error)

func (*Engine) GetName

func (e *Engine) GetName() string

func (*Engine) GetSnap

func (d *Engine) GetSnap(snapName SnapName) (DBname, error)

func (*Engine) GetSnapshots

func (d *Engine) GetSnapshots() ([]SnapInfo, error)

func (*Engine) Snap

func (d *Engine) Snap(snapName SnapName) (int64, error)

func (*Engine) TerminateConnections

func (d *Engine) TerminateConnections() (int64, error)

func (*Engine) WriteCommentForDatabase

func (e *Engine) WriteCommentForDatabase(dbName string, comment string) error

type SnapInfo

type SnapInfo struct {
	SnapName SnapName
	Size     string
	Created  string
	Comment  string
}

type SnapName

type SnapName string

func ToSnapName

func ToSnapName(dbName DBname) SnapName

Jump to

Keyboard shortcuts

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