datasql

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2014 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(driver, datasource string) (*sql.DB, error)

Connect is a helper function that establishes a new database connection and auto-generates the database schema. If the database already exists, it will perform and update as needed.

func MustConnect added in v0.0.2

func MustConnect(driver, datasource string) *sql.DB

MustConnect is a helper function that establishes a new database connection and auto-generates the database schema. If the operation fails it will panic.

func NewContext added in v0.0.2

func NewContext(parent context.Context, db meddler.DB) context.Context

Types

type Datastore added in v0.0.3

type Datastore struct {
	meddler.DB
}

func New

func New(db meddler.DB) *Datastore

func (*Datastore) DelBuild added in v0.0.3

func (d *Datastore) DelBuild(build *resource.Build) error

DelBuild deletes a Build in the datastore.

func (*Datastore) GetBuild added in v0.0.3

func (d *Datastore) GetBuild(name, version, channel, sdk string) (*resource.Build, error)

GetBuild retrieves a specific build from the database for the matching version ID, channel and SDK.

func (*Datastore) GetBuildLatest added in v0.0.3

func (d *Datastore) GetBuildLatest(name, version, channel string) (*resource.Build, error)

GetBuildLatest retrieves a specified build from the database for the matching version and channel, for the latest SDK.

func (*Datastore) GetChannel added in v0.0.3

func (d *Datastore) GetChannel(channel string) (*resource.Channel, error)

GetChannel retrieves the latest SDK version in the system for the specified channel.

func (*Datastore) GetFeed added in v0.0.3

func (d *Datastore) GetFeed() ([]*resource.Build, error)

GetFeed retrieves a list of recent builds.

func (*Datastore) PostBuild added in v0.0.3

func (d *Datastore) PostBuild(build *resource.Build) error

PostBuild saves a Build in the datastore.

func (*Datastore) PutBuild added in v0.0.3

func (d *Datastore) PutBuild(build *resource.Build) error

PutBuild saves a Build in the datastore.

Jump to

Keyboard shortcuts

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