entity

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package entity contains vCenter objects/entities.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Labels contains the pretty names of all vCenter entities.
	Labels []string

	// Map maps entity labels to entities.
	Map map[string]Entity
)
View Source
var ComputeResourceScopes = []string{
	Cluster.String(),
	Host.String(),
	ResourcePool.String(),
}

nolint:revive

View Source
var LabelMap = map[Entity]string{
	Cluster:                     "Cluster",
	Datacenter:                  "Datacenter",
	Datastore:                   "Datastore",
	DistributedVirtualPortgroup: "Distributed Port Group",
	DistributedVirtualSwitch:    "Distributed Switch",
	Folder:                      "Folder",
	Host:                        "ESXi Host",
	Network:                     "Network",
	ResourcePool:                "Resource Pool",
	VCenterRoot:                 "vCenter Root",
	VirtualApp:                  "Virtual App",
	VirtualMachine:              "Virtual Machine",
}

LabelMap maps entities to their pretty names.

Functions

This section is empty.

Types

type Entity

type Entity int

Entity represents a vCenter entity.

const (
	Cluster Entity = iota
	Datacenter
	Datastore
	DistributedVirtualPortgroup
	DistributedVirtualSwitch
	Folder
	Host
	Network
	ResourcePool
	VCenterRoot
	VirtualApp
	VirtualMachine
)

nolint:revive

func (Entity) MarshalYAML

func (e Entity) MarshalYAML() (interface{}, error)

MarshalYAML implements the yaml.Marshaler interface.

func (Entity) String

func (e Entity) String() string

String converts an Entity to a string.

func (*Entity) UnmarshalYAML

func (e *Entity) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the yaml.Unmarshaler interface.

Jump to

Keyboard shortcuts

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