crypto

package
v0.44.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Overview

Package vapi/crypto provides access to the Crypto Manager REST APIs that are not available in the SOAP API. Currently for creating and deleting native providers only. See the top-level package crypto for getting provider details via crypto.ManagerKmip. See also: https://blogs.vmware.com/code/2023/07/30/automate-vsphere-native-key-providers/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KmsProviderConstraints

type KmsProviderConstraints struct {
	TpmRequired bool `json:"tpm_required"`
}

type KmsProviderCreateSpec

type KmsProviderCreateSpec struct {
	Provider    string                 `json:"provider"`
	Constraints KmsProviderConstraints `json:"constraints"`
}

type KmsProviderDownloadToken

type KmsProviderDownloadToken struct {
	Token  string `json:"token"`
	Expiry string `json:"expiry"`
}

type KmsProviderExport

type KmsProviderExport struct {
	Type     string                     `json:"type"`
	Location *KmsProviderExportLocation `json:"location,omitempty"`
}

type KmsProviderExportLocation

type KmsProviderExportLocation struct {
	URL           string                   `json:"url"`
	DownloadToken KmsProviderDownloadToken `json:"download_token"`
}

type KmsProviderExportSpec

type KmsProviderExportSpec struct {
	Provider string `json:"provider"`
	Password string `json:"password,omitempty"`
}

type Manager

type Manager struct {
	*rest.Client
}

Manager extends rest.Client, adding crypto related methods. Currently providing create, delete and export only. See crypto.ManagerKmip for getting provider details.

func NewManager

func NewManager(client *rest.Client) *Manager

NewManager creates a new Manager instance with the given client.

func (*Manager) KmsProviderCreate

func (c *Manager) KmsProviderCreate(ctx context.Context, spec KmsProviderCreateSpec) error

func (*Manager) KmsProviderDelete

func (c *Manager) KmsProviderDelete(ctx context.Context, provider string) error

func (*Manager) KmsProviderExport

func (c *Manager) KmsProviderExport(ctx context.Context, spec KmsProviderExportSpec) (*KmsProviderExport, error)

func (*Manager) KmsProviderExportRequest

func (c *Manager) KmsProviderExportRequest(ctx context.Context, export *KmsProviderExportLocation) (*http.Request, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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