storage

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInsertFailed = errors.New("could not create snippet")
	ErrSelectFailed = errors.New("could not get snippet")
)
View Source
var (
	ErrSnippetNotFound = fmt.Errorf("snippet not found")
)

Functions

This section is empty.

Types

type SnippetStore

type SnippetStore interface {
	Create(snippet *domain.Snippet) error
	Get(id string) (*domain.Snippet, error)
	StoreExecution(snippet *domain.Snippet, args []string, output string, successful bool) error
}

func NewInMemorySnippetStore

func NewInMemorySnippetStore() SnippetStore

func NewMySQLSnippetStore added in v0.1.8

func NewMySQLSnippetStore(db *sql.DB) SnippetStore

Jump to

Keyboard shortcuts

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