storages

package
v0.0.0-...-bdd81f3 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DbDriverNameSqlite3 = "sqlite3"

DbDriverNameSqlite3 is name of SQLite3 driver

Variables

This section is empty.

Functions

This section is empty.

Types

type PipelineStorage

type PipelineStorage interface {
	// ListPipelineSpecs returns slice of all pipeline specifications
	// that are exist in storage
	ListPipelineSpecs() ([]*models.PipelineSpec, error)
	// SavePipelineSpec stores pipeline specification
	SavePipelineSpec(spec *models.PipelineSpec) error
	// UpdatePipelineSpec overwrites pipeline specification with a given name
	UpdatePipelineSpec(spec *models.PipelineSpec) error
	// LoadPipelineSpec returns pipeline specification with a given name
	LoadPipelineSpec(name string) (*models.PipelineSpec, error)
	// DeletePipelineSpec removes pipeline specification with a given name from
	// storage
	DeletePipelineSpec(name string) error
}

PipelineStorage is used to persistently store pipelines in JSON form

type Storage

type Storage interface {
	PipelineStorage
}

Storage

func NewSqliteStorage

func NewSqliteStorage(filename string, logger logger.Logger) (Storage, error)

NewSqliteStorage returns new storage backed by SQLite database. It runs migrations after database connection, so that errors returned can be related to both DB connection and running migrations

Jump to

Keyboard shortcuts

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