sql

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2019 License: MIT Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

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

Connection represents a sql connection.

func Dial

func Dial(config *conf.GlobalConfiguration) (*Connection, error)

Dial will connect to that storage engine

func (*Connection) Automigrate

func (conn *Connection) Automigrate() error

Automigrate creates any missing tables and/or columns.

func (*Connection) Close

func (conn *Connection) Close() error

Close closes the database connection.

func (*Connection) CreateInstance

func (conn *Connection) CreateInstance(instance *models.Instance) error

func (*Connection) DeleteInstance

func (conn *Connection) DeleteInstance(instance *models.Instance) error

func (*Connection) GetInstance

func (conn *Connection) GetInstance(instanceID string) (*models.Instance, error)

GetInstance finds an instance by ID

func (*Connection) GetInstanceByUUID

func (conn *Connection) GetInstanceByUUID(uuid string) (*models.Instance, error)

func (*Connection) UpdateInstance

func (conn *Connection) UpdateInstance(instance *models.Instance) error

Jump to

Keyboard shortcuts

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