api

package
v0.2502.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package api implements the ROFL API.

Index

Constants

View Source
const (
	// LocalRPCEndpointBundleManager is the name of the local RPC endpoint for the bundle manager.
	LocalRPCEndpointBundleManager = "bundle-manager"

	// MethodBundleWrite is the name of the BundleWrite method.
	MethodBundleWrite = "BundleWrite"
	// MethodBundleAdd is the name of the BundleAdd method.
	MethodBundleAdd = "BundleAdd"
	// MethodBundleRemove is the name of the BundleRemove method.
	MethodBundleRemove = "BundleRemove"
	// MethodBundleList is the name of the BundleList method.
	MethodBundleList = "BundleList"
)
View Source
const (
	// LocalRPCEndpointVolumeManager is the name of the local RPC endpoint for the volume manager.
	LocalRPCEndpointVolumeManager = "volume-manager"

	// MethodVolumeAdd is the name of the VolumeAdd method.
	MethodVolumeAdd = "VolumeAdd"
	// MethodVolumeRemove is the name of the VolumeRemove method.
	MethodVolumeRemove = "VolumeRemove"
	// MethodVolumeList is the name of the VolumeList method.
	MethodVolumeList = "VolumeList"
)
View Source
const (
	// EnclaveRPCEndpointRONL is the name of the EnclaveRPC endpoint for the RONL component.
	EnclaveRPCEndpointRONL = "ronl"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleAddRequest added in v0.2502.0

type BundleAddRequest struct {
	// TemporaryName is the temporary name to use to access the bundle. The chunks must have
	// previously been created by using `BundleWriteRequest`.
	TemporaryName string `json:"temporary_name"`
	// ManifestHash is the expected hash of the manifest contained inside the bundle.
	ManifestHash hash.Hash `json:"manifest_hash"`
	// Labels are the labels to tag the bundle with so it can later be found.
	Labels map[string]string `json:"labels"`
	// Volumes are the volumes to attach to the bundle.
	Volumes map[string]string `json:"volumes"`
}

BundleAddRequest is a request to host to add a specific bundle to the host.

The `PermissionBundleAdd` permission is required to call this method.

type BundleAddResponse added in v0.2502.0

type BundleAddResponse struct{}

BundleAddResponse is the response from the BundleAdd method.

type BundleInfo added in v0.2502.0

type BundleInfo struct {
	// ManifestHash is the hash of the manifest.
	ManifestHash hash.Hash `json:"manifest_hash"`
	// Components is a list of all components in this bundle.
	Components []*ComponentInfo `json:"components"`
	// Labels is a set of labels assigned to this bundle.
	Labels map[string]string `json:"labels,omitempty"`
}

BundleInfo is the bundle information.

type BundleListRequest added in v0.2502.0

type BundleListRequest struct {
	// Labels are the labels to filter the bundles by. All labels must match.
	Labels map[string]string `json:"labels"`
}

BundleListRequest is a request to host to list all bundles.

The `PermissionBundleAdd` permission is required to call this method.

type BundleListResponse added in v0.2502.0

type BundleListResponse struct {
	// Bundles are the resulting bundles.
	Bundles []*BundleInfo `json:"bundles,omitempty"`
}

BundleListResponse is a response from host to list all bundles.

type BundleRemoveRequest added in v0.2502.0

type BundleRemoveRequest struct {
	// Labels are the labels to filter the bundles by. All labels must match.
	Labels map[string]string `json:"labels"`
}

BundleRemoveRequest is a request to host to remove specific bundles.

The `PermissionBundleRemove` permission is required to call this method.

type BundleRemoveResponse added in v0.2502.0

type BundleRemoveResponse struct{}

BundleRemoveResponse is the response from the BundleRemove method.

type BundleWriteRequest added in v0.2502.0

type BundleWriteRequest struct {
	// TemporaryName is a temporary name to identify the chunk later.
	TemporaryName string `json:"temporary_name"`
	// Create is the optional flag which specifies that the bundle should be recreated. If the
	// bundle exists and this flag is set to true, it will be truncated. If the flag is set to
	// false, any content will be appended to the existing bundle.
	Create bool `json:"create,omitempty"`
	// Data that should be appended to the bundle.
	Data []byte `json:"data"`
}

BundleWriteRequest is a request to host to store a chunk of the bundle.

The `PermissionBundleAdd` permission is required to call this method.

type BundleWriteResponse added in v0.2502.0

type BundleWriteResponse struct{}

BundleWriteResponse is the response from the BundleWrite method.

type ComponentInfo added in v0.2502.0

type ComponentInfo struct {
	// Name is the component name.
	Name string `json:"name"`
}

ComponentInfo is the component information.

type VolumeAddRequest added in v0.2502.0

type VolumeAddRequest struct {
	// Labels are the labels to tag the volume with so it can later be found.
	Labels map[string]string `json:"labels"`
}

VolumeAddRequest is a request to add a volume.

The `PermissionVolumeAdd` permission is required to call this method.

type VolumeAddResponse added in v0.2502.0

type VolumeAddResponse struct {
	// ID is the unique volume identifier.
	ID string `json:"id"`
}

VolumeAddResponse is a response from the VolumeAdd method.

type VolumeInfo added in v0.2502.0

type VolumeInfo struct {
	// ID is the unique volume identifier.
	ID string `json:"id"`
	// Labels is a set of labels assigned to this volume.
	Labels map[string]string `json:"labels,omitempty"`
}

VolumeInfo is the volume information.

type VolumeListRequest added in v0.2502.0

type VolumeListRequest struct {
	// Labels are the labels to filter the volumes by. All labels must match.
	Labels map[string]string `json:"labels"`
}

VolumeListRequest is a request to list volumes.

The `PermissionVolumeAdd` permission is required to call this method.

type VolumeListResponse added in v0.2502.0

type VolumeListResponse struct {
	Volumes []*VolumeInfo `json:"volumes,omitempty"`
}

VolumeListResponse is a response from the VolumeList method.

type VolumeRemoveRequest added in v0.2502.0

type VolumeRemoveRequest struct {
	// Labels are the labels to filter the volumes by. All labels must match.
	Labels map[string]string `json:"labels"`
}

VolumeRemoveRequest is a request to remove volumes.

The `PermissionVolumeRemove` permission is required to call this method.

type VolumeRemoveResponse added in v0.2502.0

type VolumeRemoveResponse struct{}

VolumeRemoveResponse is a response from the VolumeRemove method.

Jump to

Keyboard shortcuts

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