Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Docstub ¶ added in v0.0.8
type Docstub struct {
Family *string
Shortname *string
Name *string
Sequence *int
Content *string
*auth.ReadPublic `column:"-"`
}
type Oplog ¶ added in v0.0.8
Oplog is a single oplog entry. It can be created with POST, or updated with PUT referencing the id.
type Oplogs ¶ added in v0.0.8
type Oplogs []Oplog
Oplogs is an array of oplog entries, and can only be fetched (with Get).
type StationTests ¶ added in v0.0.8
type StationTests []Test
StationTests is an array of tests associated with a single station (and track). It is used for reading all status entries for a single station. In the future, it might support Delete() to clear all status for a station.
type Switch ¶ added in v0.0.8
type Switch struct {
Sysname *string
MgmtIP4 *types.IP `column:"mgmt_v4_addr"`
MgmtIP6 *types.IP `column:"mgmt_v6_addr"`
LastUpdated *time.Time `column:"last_updated"`
PollFrequency *string `column:"poll_frequency"`
Locked *bool
Deleted *bool
DistroName *string `column:"distro_name"`
DistroPhyPort *string `column:"distro_phy_port"`
Tags *types.Jsonb
Community *string
TrafficVlan *int `column:"traffic_vlan"`
MgmtVlan *int `column:"mgmt_vlan"`
Placement *types.Box
}
Switch represents a single switch, or box. It can be updated in bulk or singular.
func (*Switch) Get ¶ added in v0.0.8
Get a single switch from the database and return it. db.Get is a convenience that returns 404 if it doesn't exist and 400 if element is blank.
type Switches ¶ added in v0.0.8
type Switches []Switch
Switches is the slice-variant of Switch, allowing us to return and parse an array of switches.
type Test ¶ added in v0.0.8
type Test struct {
Track *string
Station *int
Hash *string // Hash is a unique identifier for a single test, defined by the poster. Typically a sha-sum of the title. The key for a single test is, thus, track/station/hash
Title *string // Short title
Time *time.Time // Update time. Can be left empty on PUT/POST (updated by triggers)
Description *string // Longer description for the test
Status *string // Actual status-result. Should probably be OK / WARN/ FAIL or something (to be defined)
Participant *string // Participant ID... somewhat legacy. Might be removed.
Seq *int // Sorting ID
*auth.ReadPublic `column:"-"` // Authentication enforced for writes, not reads.
// contains filtered or unexported fields
}
Test is a single test(result), with all relevant descriptions. It is used mainly for writes, but can be Get() from as well - because why not.