database

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlreadySuch = errors.New("entity already exists by that name")
View Source
var DB *sql.DB
View Source
var DBInitialized bool
View Source
var NoSuch = errors.New("nothing found by that name")

Functions

func CloseDatabase

func CloseDatabase() (err error)

func DeleteAllGenericHardware

func DeleteAllGenericHardware() (err error)

func DeleteAllNetworks

func DeleteAllNetworks() (err error)

func DeleteGenericHardware

func DeleteGenericHardware(hardware sls_common.GenericHardware) (err error)

func DeleteNetwork

func DeleteNetwork(networkName string) (err error)

func GetAllGenericHardware

func GetAllGenericHardware() (hardware []sls_common.GenericHardware, err error)

func GetAllNetworks

func GetAllNetworks() (networks []sls_common.Network, err error)

func GetCurrentVersion

func GetCurrentVersion() (version int, err error)

func GetGenericHardwareForExtraProperties

func GetGenericHardwareForExtraProperties(properties map[string]interface{}) (hardware []sls_common.GenericHardware,
	err error)

func GetGenericHardwareFromXname

func GetGenericHardwareFromXname(xname string) (hardware sls_common.GenericHardware, err error)

func GetLastModified

func GetLastModified() (lastModified string, err error)

func GetNetworkForName

func GetNetworkForName(name string) (network sls_common.Network, err error)

func GetNetworksContainingIP

func GetNetworksContainingIP(addr string) (networks []sls_common.Network, err error)

func IncrementVersion

func IncrementVersion(trans *sql.Tx, updatedEntity string) (id int64, err error)

func InsertGenericHardware

func InsertGenericHardware(hardware sls_common.GenericHardware) (err error)

func InsertNetwork

func InsertNetwork(network sls_common.Network) (err error)

func NewDatabase

func NewDatabase() (err error)

func ReplaceAllGenericHardware

func ReplaceAllGenericHardware(hardware []sls_common.GenericHardware) (err error)

func ReplaceAllNetworks

func ReplaceAllNetworks(networks []sls_common.Network) (err error)

func SearchGenericHardware

func SearchGenericHardware(conditions map[string]string, properties map[string]interface{}) (
	hardware []sls_common.GenericHardware, err error)

func SearchNetworks

func SearchNetworks(conditions map[string]string, properties map[string]interface{}) (networks []sls_common.Network, err error)

func ToParameterArray added in v1.22.0

func ToParameterArray(index int, values []string) (next int, ivalues []interface{}, str string)

func UpdateGenericHardware

func UpdateGenericHardware(hardware sls_common.GenericHardware) (err error)

func UpdateNetwork

func UpdateNetwork(network sls_common.Network) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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