Documentation ¶
Index ¶
- type Connection
- func (conn *Connection) Automigrate() error
- func (conn *Connection) Close() error
- func (conn *Connection) CreateInstance(instance *models.Instance) error
- func (conn *Connection) DeleteInstance(instance *models.Instance) error
- func (conn *Connection) GetInstance(instanceID string) (*models.Instance, error)
- func (conn *Connection) GetInstanceByUUID(uuid string) (*models.Instance, error)
- func (conn *Connection) UpdateInstance(instance *models.Instance) error
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
Click to show internal directories.
Click to hide internal directories.