dc

package
v0.0.0-...-eb49f3c Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package dc provides structs and functions pertaining to datacenter resources.

Index

Constants

This section is empty.

Variables

View Source
var ErrAddressEmpty = errors.New("address is empty")
View Source
var ErrRowEmpty = errors.New("row is empty")

Functions

This section is empty.

Types

type Datacenter

type Datacenter struct {
	zebra.NamedResource
	Address string `json:"address"`
}

A Datacenter represents the physical building. It is a named resource also with a building address.

func (*Datacenter) Validate

func (dc *Datacenter) Validate(ctx context.Context) error

Validate returns an error if the given Datacenter object has incorrect values. Else, it returns nil.

type Lab

type Lab struct {
	zebra.NamedResource
}

A Lab represents the lab consisting of a name and an ID.

type Rack

type Rack struct {
	zebra.NamedResource
	Row string `json:"row"`
}

A Rack represents a datacenter rack. It consists of a name, ID, and associated row.

func (*Rack) Validate

func (r *Rack) Validate(ctx context.Context) error

Validate returns an error if the given Rack object has incorrect values. Else, it returns nil.

Jump to

Keyboard shortcuts

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