govmomi

package
v0.16.5 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VSphereTypeFolder         = "Folder"
	VSphereTypeNetwork        = "Network"
	VSphereTypeResourcePool   = "ResourcePool"
	VSphereTypeDatastore      = "Datastore"
	VSphereTypeVirtualMachine = "VirtualMachine"
)

Variables

This section is empty.

Functions

func NewVMOMIClientBuilder

func NewVMOMIClientBuilder() *vMOMIClientBuilder

func NewVMOMIClientBuilderOverride

func NewVMOMIClientBuilderOverride(vfb VMOMIFinderBuilder, gcb VMOMISessionBuilder, amb VMOMIAuthorizationManagerBuilder) *vMOMIClientBuilder

func NewVMOMIFinderBuilder

func NewVMOMIFinderBuilder() *vMOMIFinderBuilder

func NewvMOMISessionBuilder

func NewvMOMISessionBuilder() *vMOMIClientBuilder

Types

type VMOMIAuthorizationManager

type VMOMIAuthorizationManager interface {
	FetchUserPrivilegeOnEntities(ctx context.Context, entities []types.ManagedObjectReference, userName string) ([]types.UserPrivilegeResult, error)
}

type VMOMIAuthorizationManagerBuilder

type VMOMIAuthorizationManagerBuilder interface {
	Build(c *vim25.Client) *object.AuthorizationManager
}

type VMOMIClient

type VMOMIClient struct {
	Gcvm   *govmomi.Client
	Finder VMOMIFinder

	AuthorizationManager VMOMIAuthorizationManager
	// contains filtered or unexported fields
}

func NewVMOMIClientCustom

func NewVMOMIClientCustom(gcvm *govmomi.Client, f VMOMIFinder, username string, am VMOMIAuthorizationManager) *VMOMIClient

func (*VMOMIClient) GetPrivsOnEntity

func (vsc *VMOMIClient) GetPrivsOnEntity(ctx context.Context, path string, objType string, username string) ([]string, error)

func (*VMOMIClient) Username

func (vsc *VMOMIClient) Username() string

type VMOMIFinder

type VMOMIFinder interface {
	Datastore(ctx context.Context, path string) (*object.Datastore, error)
	Folder(ctx context.Context, path string) (*object.Folder, error)
	Network(ctx context.Context, path string) (object.NetworkReference, error)
	ResourcePool(ctx context.Context, path string) (*object.ResourcePool, error)
	VirtualMachine(ctx context.Context, path string) (*object.VirtualMachine, error)
	Datacenter(ctx context.Context, path string) (*object.Datacenter, error)
	SetDatacenter(dc *object.Datacenter) *find.Finder
}

type VMOMIFinderBuilder

type VMOMIFinderBuilder interface {
	Build(arg0 *vim25.Client, arg1 ...bool) VMOMIFinder
}

type VMOMISessionBuilder

type VMOMISessionBuilder interface {
	Build(ctx context.Context, u *url.URL, insecure bool) (*govmomi.Client, error)
}

type VSphereClient

type VSphereClient interface {
	Username() string
	GetPrivsOnEntity(ctx context.Context, path string, objType string, username string) ([]string, error)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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