Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { //Begin returns a transaction for the database or an error if one occurred Begin() (*sql.Tx, error) //CreateCharge creates a charge in the database with the given info and returns the ID of the charges or an error if one occurred CreateCharge(tx *sql.Tx, charges Charges, inventoryNumber, user, notes string) (id int64, err error) //ReadDevice returns the Device with with the given bagTag or an error if one occurred ReadDevice(tx *sql.Tx, bagTag string) (*Device, error) //UpdateDevice updates the given Device or returns an error if one occurred UpdateDevice(tx *sql.Tx, device *Device) error }
DB represents a database
type Device ¶
type Device struct { ID int64 `json:"id"` InventoryNumber string `json:"inventory_number"` SerialNumber string `json:"serial_number"` BagTag string `json:"bag_tag"` Status string `json:"status"` Model string `json:"model"` User string `json:"user"` Notes string `json:"notes"` }
Device represents a device in the inventory database
Click to show internal directories.
Click to hide internal directories.