database

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusOpening   = "opening"
	StatusOperating = "operating"
	StatusClosing   = "closing"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Dir string
}

type Database

type Database struct {
	Config *Config

	Collections map[string]*collection.Collection
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase(config *Config) *Database

func (*Database) CreateCollection added in v0.0.2

func (db *Database) CreateCollection(name string) (*collection.Collection, error)

func (*Database) DropCollection added in v0.0.2

func (db *Database) DropCollection(name string) error

func (*Database) GetStatus

func (db *Database) GetStatus() string

func (*Database) Load added in v0.0.2

func (db *Database) Load() error

func (*Database) Start

func (db *Database) Start() error

func (*Database) Stop

func (db *Database) Stop() error

Jump to

Keyboard shortcuts

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