database

package
v0.0.0-...-8fb9c67 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBConn

func DBConn() (db *sql.DB, err error)

Types

type FunctionStore

type FunctionStore interface {
	Get(name string) (*models.Function, error)
	Create(models.Function) error
	Delete(models.Function) error
	GetAll() ([]*models.Function, error)
}

FunctionStore defines database operations for account.

type FunctionStoreSQLite

type FunctionStoreSQLite struct {
	// contains filtered or unexported fields
}

func GetFunctionStore

func GetFunctionStore(db *sql.DB) *FunctionStoreSQLite

Returns the singleton Store

func (*FunctionStoreSQLite) Create

Creates a function in the Db

func (*FunctionStoreSQLite) Delete

Delete removes a function form the DB

func (*FunctionStoreSQLite) Get

func (s *FunctionStoreSQLite) Get(fname string) (*models.Function, error)

Get returns function by name, uniqueness is enforced by DB

func (*FunctionStoreSQLite) GetAll

func (s *FunctionStoreSQLite) GetAll() ([]*models.Function, error)

GetAll returns all function

Jump to

Keyboard shortcuts

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