storage

package
v0.0.0-...-ea41141 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfSQLiteDataBase

type ConfSQLiteDataBase struct {
	Path   string  `yaml:"file"`
	Cache  *string `yaml:"cache,omitempty"`
	Memory *string `yaml:"memory,omitempty"`
}

ConfSQLiteDataBase - SQLite configuration

type ConfStorage

type ConfStorage struct {
	SQLite *ConfSQLiteDataBase `yaml:"sqlite,omitempty"`
}

ConfStorage - Storage's configuration

type Storage

type Storage struct {
	// Type - Storage type: sqlite, etc ...
	Type string
	// DB - Storage's DB handler
	DB *sql.DB
}

Storage - Controller for storage

func Connect

func Connect(conf ConfStorage) (*Storage, error)

Connect - Binds Storage with any configured DB

func ConnectSQLite

func ConnectSQLite(conf ConfSQLiteDataBase) (*Storage, error)

ConnectSQLite - Binds Storage with SQLite DB

func (*Storage) Disconnect

func (storage *Storage) Disconnect() error

Disconnect - Disconnects from Store

Jump to

Keyboard shortcuts

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