db

package
v0.0.0-...-e5e3d13 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() error

Connect connects to the databse at program start

func Insert

func Insert(installer Installer) error

Insert takes a db Installer and persists it to the database

func PGArrayToArray

func PGArrayToArray(pgarray string) []string

PGArrayToArray transforms a postgres string array to a Go string slice

func Update

func Update(installer Installer) error

Update takes an Installer (db) and updates all the fields for that db entry

Types

type Installer

type Installer struct {
	ID              string
	Name            string
	Thumbnail       string
	VersionMetadata sqlxTypes.JSONText
}

Installer represents an installer as saved by the database

func Get

func Get(filter map[string]interface{}) (Installer, bool, error)

Get returns an Installer based on the provided filter

func GetAll

func GetAll() ([]Installer, error)

GetAll retrieves all installers from the database

func Search(searchTerm string) ([]Installer, error)

Search searches installers using a full text search on name, description and provides field

func SearchProvider

func SearchProvider(providerType string) ([]Installer, error)

SearchProvider searches installers based on the provides field

Jump to

Keyboard shortcuts

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