db

package
v0.0.0-...-7980162 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2018 License: Apache-2.0 Imports: 6 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage interface {
	// Preset methods
	StorePreset(types.Preset) (types.Preset, error)
	RetrievePreset(string) (types.Preset, error)
	UpdatePreset(string, types.Preset) (types.Preset, error)
	GetPresets() ([]types.Preset, error)
	DeletePreset(string) (types.Preset, error)

	// Job methods
	DeleteJob(string) (types.Job, error)
	StoreJob(types.Job) (types.Job, error)
	RetrieveJob(string) (types.Job, error)
	UpdateJob(string, types.Job) (types.Job, error)
	GetJobs() ([]types.Job, error)

	ClearDatabase() error
}

Storage defines functions for accessing data

func GetDatabase

func GetDatabase(config gonfig.Gonfig) (Storage, error)

GetDatabase selects the right driver based on config

Jump to

Keyboard shortcuts

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