data

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	// modules
	ListModuleIDs() ([]int64, error)
	ListModulesByIDs(ids []int64) ([]coordinates.SerialModule, error)
	ListModulesBySource(source string) ([]coordinates.SerialModule, error)
	ListModules() ([]coordinates.SerialModule, error)
	InsertModules([]coordinates.Module) (int, error)

	// startup configs and payloads
	SetStartConfig(payloads.Configuration) error
	ListStartConfigs() ([]payloads.Configuration, error)
	SetHeartbeat(payloads.Heartbeat) error
	ListHeartbeats() ([]payloads.Heartbeat, error)
}

func Connect

func Connect(kind string, dsn config.DSN) (Store, error)

func New

func New(kind string, db *sql.DB) (Store, error)

Jump to

Keyboard shortcuts

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