models

package
v0.0.0-...-40108c5 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2016 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TECH_FILE = Technology("File")
	TECH_LTO1 = Technology("LTO-1")
	TECH_LTO2 = Technology("LTO-2")
	TECH_LTO3 = Technology("LTO-3")
	TECH_LTO4 = Technology("LTO-4")
	TECH_LTO5 = Technology("LTO-5")
	TECH_LTO6 = Technology("LTO-6")
)
View Source
const (
	STATUS_ERROR         = VolStatus("Error")
	STATUS_FULL_RESTORED = VolStatus("Full Restored")
	STATUS_RESTORED      = VolStatus("Restored")
	STATUS_SENT          = VolStatus("Sent")
	STATUS_STORED        = VolStatus("Stored")
	STATUS_TESTED        = VolStatus("Tested")
	STATUS_VAULT         = VolStatus("Vault Stored")
)
View Source
const (
	C_VENDORS_NAME = "vendors"
)
View Source
const (
	C_VOLUMES_NAME = "volumes"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Id          bson.ObjectId `bson:"_id" json:"id"`
	Name        string        `bson:"name" json:"name"`
	Description string        `bson:"description" json:"description"`
}

type Location

type Location struct {
	Id         bson.ObjectId `bson:"_id" json:"id"`
	Name       string        `bson:"name" json:"name"`
	Containers []Container   `bson:"containers" json:"containers"`
}

type Log

type Log struct {
	Time   time.Time `bson:"time" json:"time"`
	User   string    `bson:"user" json:"user"`
	Action string    `bson:"action" json:"action"`
}

type Pool

type Pool struct {
	Id        bson.ObjectId `bson:"_id" json:"id"`
	Name      string        `bson:"name" json:"name"`
	Retention time.Duration `bson:"retention" json:"retention"`
}

type PoolGroup

type PoolGroup struct {
	Id    bson.ObjectId `bson:"_id" json:"id"`
	Name  string        `bson:"name" json:"name"`
	Pools []Pool        `bson:"pools" json:"pools"`
}

type Product

type Product struct {
	Id         bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
	Technology Technology    `bson:"technology" json:"technology"`
	Name       string        `bson:"name" json:"name"`
}

type Technology

type Technology string

type Vendor

type Vendor struct {
	Id       bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
	Name     string        `bson:"name" json:"name"`
	Products []Product     `bson:"products" json:"products"`
}

func PreInitVendors

func PreInitVendors() []Vendor

type VolHistory

type VolHistory struct {
	Id          bson.ObjectId `bson:"_id" json:"id"`
	Date        time.Time     `bson:"date" json:"date"`
	Status      VolStatus     `bson:"status" json:"status"`
	ContainerId bson.ObjectId `bson:"container_id" json:"containerId"`
	Details     string        `bson:"details" json:"details"`
}

type VolStatus

type VolStatus string

type Volume

type Volume struct {
	Id        bson.ObjectId `bson:"_id" json:"id"`
	ProductId bson.ObjectId `bson:"product_id" json:"productId"`
	PoolId    bson.ObjectId `bson:"pool_id" json:"poolId"`
	Serial    string        `bson:"serial" json:"serial"`
	Label     string        `bson:"label" json:"label"`
	LastWrite time.Time     `bson:"last_write" json:"lastWrite"`
	History   []VolHistory  `bson:"history" json:"history"`
}

Jump to

Keyboard shortcuts

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