api

package
v0.0.0-...-9bbedf1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetApplicationFilters

func GetApplicationFilters() []string

GetApplicationFilters returns an array of attributes available on the api to filter applications

func GetContainerFilters

func GetContainerFilters() []string

GetContainerFilters returns an array of attributes available on the api to filter containers

func GetInstanceFilters

func GetInstanceFilters() []string

GetInstanceFilters returns an array of attributes available on the api to filter instances

Types

type Addon

type Addon struct {
	// Name of the addon
	// Example: my-addon
	Name string `json:"name" yaml:"name"`
	// List of versions of the addon
	Versions []AddonVersion `json:"versions" yaml:"versions"`
	// List of applications using this addon
	// Example: ["app1", "app2"]
	UsedBy []string `json:"used_by" yaml:"used_by"`
}

Addon describes a package with additional functionality to be added to containers

swagger:model

type AddonPatch

type AddonPatch struct{}

AddonPatch allows updating an existing addon with a new version

swagger:model

type AddonVersion

type AddonVersion struct {
	// Version for the addon
	// Example: 0
	Number int `json:"version" yaml:"version"`
	// SHA-256 fingerprint of the addon version
	// Example: 0791cfc011f67c60b7bd0f852ddb686b79fa46083d9d43ef9845c9235c67b261
	Fingerprint string `json:"fingerprint" yaml:"fingerprint"`
	// Size (in bytes) of the addon payload
	// Example: 529887868
	Size int64 `json:"size" yaml:"size"`
	// Creation timestamp of the addon
	// Example: 1610641117
	CreatedAt int64 `json:"created_at" yaml:"created_at"`
}

AddonVersion describes a single version of an addon

swagger:model

type AddonsPost

type AddonsPost struct {
	// Name of the addon
	// Example: my-addon
	Name string `json:"name" yaml:"name"`
}

AddonsPost is used to create a new addon

swagger:model

type Application

type Application struct {
	// ID of the application
	// Example: btavtegj1qm58qg7ru50
	ID string `json:"id" yaml:"id"`
	// Name of the application
	// Example: my-app
	Name string `json:"name" yaml:"name"`
	// Status of the application as an integer value
	// Example: 3
	StatusCode ApplicationStatus `json:"status_code" yaml:"status_code"`
	// Current status of the application
	// Enum: initializing,unknown,ready,deleted,error
	// Example: deleted
	Status string `json:"status" yaml:"status"`
	// Instance type required by the application
	// Example: a2.3
	InstanceType string `json:"instance_type" yaml:"instance_type"`
	// Name of the boot package for the application
	// Example: com.foo.bar
	BootPackage string `json:"boot_package" yaml:"boot_package"`
	// Parent image used for the application
	// Example: btavtegj1qm58qg7ru50
	ParentImageID string `json:"parent_image_id" yaml:"parent_image_id"`
	// Whether or not the application is published
	// Example: false
	Published bool `json:"published" yaml:"published"`
	// List of versions for the application
	Versions []ApplicationVersion `json:"versions" yaml:"versions"`
	// List of addons enabled for the application
	// Example: ["ssh", "gms"]
	Addons []string `json:"addons" yaml:"addons"`
	// Creation UTC timestamp of the application
	// Example: 1532150640
	CreatedAt int64 `json:"created_at" yaml:"created_at"`
	// Flag to show whether the application can be edited
	// Example: false
	Immutable bool `json:"immutable" yaml:"immutable"`
	// Tags to attach to the application
	// Example: ["created_by=anbox"]
	Tags []string `json:"tags" yaml:"tags"`
	// Resources required by the application. Overrides the instance_type requirements.
	Resources ApplicationResources `json:"resources,omitempty" yaml:"resources,omitempty"`
	// ABI supported by the application
	// Example: x86_64
	ABI string `json:"abi,omitempty" yaml:"abi,omitempty"`
	// Whether or not to auto update the application's base image
	// Example: false
	InhibitAutoUpdates bool `json:"inhibit_auto_updates" yaml:"inhibit_auto_updates"`
	// List of tags for filtering the nodes to run the application on
	// Example: ["gpu=nvidia", "cpu=intel"]
	NodeSelector []string `json:"node_selector" yaml:"node_selector"`
	// Whether the application is based on virtual machines or containers
	VM bool `json:"vm" yaml:"vm"`
}

Application represents an AMS application

swagger:model

type ApplicationAddon

type ApplicationAddon struct {
	// Name of the application addon
	// Example: ssh
	Name string `json:"name" yaml:"name"`
	// Version of the application addon
	// Example: 0
	Version int `json:"version" yaml:"version"`
}

ApplicationAddon describes a specific version of an addon an application version uses

swagger:model

type ApplicationBootstrap

type ApplicationBootstrap struct {
	// List of files to keep after the bootstrap
	// Example: ["app.apk"]
	Keep []string `json:"keep,omitempty" yaml:"keep,omitempty"`
}

ApplicationBootstrap describes the fields used to configure the application bootstrap

type ApplicationDelete

type ApplicationDelete struct {
	// Whether deletion of the application should be forced
	// Example: false
	Force bool `json:"force" yaml:"force"`
}

ApplicationDelete represents the fields used to delete an application

swagger:model

type ApplicationExtraData

type ApplicationExtraData struct {
	// Path to the target file on the android filesystem
	// Example: /sdcard/Android/obb/com.foo.bar/
	Target string `json:"target" yaml:"target"`
	// Owner and group for the files
	// Example: root:root
	Owner string `json:"owner" yaml:"owner"`
	// Unix permissions for the files
	// Example: 0644
	Permissions string `json:"permissions" yaml:"permissions"`
}

ApplicationExtraData represents an extra application data

swagger:model

type ApplicationHooks

type ApplicationHooks struct {
	// Time limit to wait for the hook to complete before timing out
	// Example: 10m
	Timeout string `json:"timeout,omitempty" yaml:"timeout,omitempty"`
}

ApplicationHooks describes the fields used to configure the hooks of an application

type ApplicationPatch

type ApplicationPatch struct {
	// Base image id or name to use for the applicaiton
	// Example: btavtegj1qm58qg7ru50
	Image *string `json:"image" yaml:"image"`
	// Instance type to use for the application
	// Example: a3.4
	InstanceType *string `json:"instance-type" yaml:"instance-type"`
	// Tags to attach to the application
	// Example: ["created_by=anbox"]
	Tags *[]string `json:"tags" yaml:"tags"`
	// List of addons enabled for the application
	// Example: ["ssh", "gms"]
	Addons *[]string `json:"addons" yaml:"addons"`
	// Resources required by the application. Overrides the instance_type requirements.
	Resources *ApplicationResourcesPost `json:"resources,omitempty" yaml:"resources,omitempty"`
	// Whether or not to auto update the application's base image
	// Example: false
	InhibitAutoUpdates *bool `json:"inhibit_auto_updates" yaml:"inhibit_auto_updates"`
	// List of services exposed by the application that should be expose on the instance
	// For application version update, changing those values would trigger a new application version creation
	Services *[]NetworkServiceSpec `json:"services,omitempty" yaml:"services,omitempty"`
	// Watchdog settings for the application
	Watchdog *ApplicationWatchdog `json:"watchdog" yaml:"watchdog"`
	// Name of the boot package for the version
	// Example: com.foo.bar.MainActivity
	BootActivity *string `json:"boot_activity" yaml:"boot-activity"`
	// Required android application permissions
	// Example: ["android.permission.WRITE_EXTERNAL_STORAGE","android.permission.READ_EXTERNAL_STORAGE"]
	RequiredPermissions *[]string `json:"required_permissions" yaml:"required_permissions"`
	// Encoder type to use for the application
	// Enum: [ gpu, gpu-preferred, software, unknown ]
	// Example: gpu
	VideoEncoder *VideoEncoderType `json:"video_encoder,omitempty" yaml:"video-encoder,omitempty"`
	// Version of the manifest used to create the application
	// Example: 0.1
	ManifestVersion *string `json:"manifest_version" yaml:"manifest-version"`
	// List of features supported by the application
	// Example: ["feature1", "feature2"]
	Features *[]string `json:"features" yaml:"features"`
	// Hook settings for the application
	Hooks *ApplicationHooks `json:"hooks,omitempty" yaml:"hooks,omitempty"`
	// Bootstrap settings for the application
	Bootstrap *ApplicationBootstrap `json:"bootstrap,omitempty" yaml:"bootstrap,omitempty"`
	// List of tags for filtering the nodes to run the application on
	// Example: ["gpu=nvidia", "cpu=intel"]
	NodeSelector *[]string `json:"node_selector,omitempty" yaml:"node-selector,omitempty"`
}

ApplicationPatch represents the fields a user can modify

swagger:model

type ApplicationResources

type ApplicationResources struct {
	// Number of CPUs required by the application
	// Example: 2
	CPUs int `json:"cpus,omitempty" yaml:"cpus,omitempty"`
	// Memory to be assigned to the application
	// Example: 3GB
	Memory string `json:"memory,omitempty" yaml:"memory,omitempty"`
	// Storage size required by the application
	// Example: 3GB
	DiskSize string `json:"disk-size,omitempty" yaml:"disk-size,omitempty"`
	// Number of GPU slots required by the application
	// Example: 2
	GPUSlots int `json:"gpu-slots,omitempty" yaml:"gpu-slots,omitempty"`
	// Number of VPU slots required by the application
	// Example: 1
	VPUSlots int `json:"vpu-slots,omitempty" yaml:"vpu-slots,omitempty"`
}

ApplicationResources describes resources allocated for an application

swagger:model

type ApplicationResourcesPost

type ApplicationResourcesPost struct {
	// Number of CPUs required by the application
	// Example: 2
	CPUs *int `json:"cpus,omitempty" yaml:"cpus,omitempty"`
	// Memory to be assigned to the application
	// Example: 3GB
	Memory *string `json:"memory,omitempty" yaml:"memory,omitempty"`
	// Storage size required by the application
	// Example: 3GB
	DiskSize *string `json:"disk-size,omitempty" yaml:"disk-size,omitempty"`
	// Number of GPU slots required by the application
	// Example: 2
	GPUSlots *int `json:"gpu-slots,omitempty" yaml:"gpu-slots,omitempty"`
	// Number of VPU slots required by the application
	// Example: 1
	VPUSlots *int `json:"vpu-slots,omitempty" yaml:"vpu-slots,omitempty"`
}

ApplicationResourcesPost represents the fields used to update an application resource

swagger:model

func (*ApplicationResourcesPost) ToApplicationResources

func (a *ApplicationResourcesPost) ToApplicationResources() ApplicationResources

ToApplicationResources returns a valid application resource from an application resource patch

type ApplicationStatus

type ApplicationStatus int

ApplicationStatus represents the status an application can be in

const (
	// ApplicationStatusError represents the state when an application encountered an error.
	ApplicationStatusError ApplicationStatus = -1
	// ApplicationStatusUnknown represents the state when the real state of an application
	// cannot be determined.
	ApplicationStatusUnknown ApplicationStatus = 0
	// ApplicationStatusInitializing represents the state when an application was created
	// and is correctly being created.
	ApplicationStatusInitializing ApplicationStatus = 1
	// ApplicationStatusReady represents the state when an application was successfully
	// created and is ready to be used.
	ApplicationStatusReady ApplicationStatus = 2
	// ApplicationStatusDeleted represents the status an application has when it is currently
	// being deleted
	ApplicationStatusDeleted ApplicationStatus = 3
)

func (*ApplicationStatus) String

func (s *ApplicationStatus) String() string

type ApplicationVersion

type ApplicationVersion struct {
	// Version of the application
	// Example: 0
	Number int `json:"number" yaml:"number"`
	// Version of the manifest used to create the application
	// Example: 0.1
	ManifestVersion string `json:"manifest_version" yaml:"manifest-version"`
	// Parent image used for the application version
	// Example: btavtegj1qm58qg7ru50
	ParentImageID string `json:"parent_image_id" yaml:"parent_image_id"`
	// Parent image version to use for the application version
	// Example: 0
	ParentImageVersion int `json:"parent_image_version" yaml:"parent_image_version"`
	// Status of the application as an integer value
	// Example: 3
	StatusCode ImageStatus `json:"status_code" yaml:"status_code"`
	// Current status of the version
	// Enum: initializing,unknown,ready,deleted,error
	// Example: deleted
	Status string `json:"status" yaml:"status"`
	// Whether or not the version is published
	// Example: false
	Published bool `json:"published" yaml:"published"`
	// Creation UTC timestamp of the version
	// Example: 1532150640
	CreatedAt int64 `json:"created_at" yaml:"created_at"`
	// Name of the boot package for the version
	// Example: com.foo.bar.MainActivity
	BootActivity string `json:"boot_activity" yaml:"boot-activity"`
	// Required android application permissions
	// Example: ["android.permission.WRITE_EXTERNAL_STORAGE","android.permission.READ_EXTERNAL_STORAGE"]
	RequiredPermissions []string `json:"required_permissions" yaml:"required_permissions"`
	// List of addons enabled for the version
	Addons []ApplicationAddon `json:"addons" yaml:"addons"`
	// Extra data to be setup on the instance on application creation
	// Example: {}
	ExtraData map[string]ApplicationExtraData `json:"extra_data" yaml:"extra_data"`
	// Error message in case the application ran into an error
	// Example: {}
	ErrorMessage string `json:"error_message" yaml:"error_message"`
	// Encoder type to use for the application
	// Enum: [ gpu, gpu-preferred, software, unknown ]
	// Example: gpu
	VideoEncoder VideoEncoderType `json:"video_encoder,omitempty" yaml:"video-encoder,omitempty"`
	// Watchdog settings for the application
	Watchdog ApplicationWatchdog `json:"watchdog" yaml:"watchdog"`
	// List of services exposed by the application that should be exposed on the instance
	Services []NetworkServiceSpec `json:"services,omitempty" yaml:"services,omitempty"`
	// List of features supported by the application
	// Example: ["feature1", "feature2"]
	Features []string `json:"features" yaml:"features"`
	// Hook settings for the application
	Hooks ApplicationHooks `json:"hooks,omitempty" yaml:"hooks,omitempty"`
	// Boostrap settings for the application
	Bootstrap ApplicationBootstrap `json:"bootstrap,omitempty" yaml:"bootstrap,omitempty"`
}

ApplicationVersion describes a single version of an application

swagger:model

type ApplicationVersionDelete

type ApplicationVersionDelete struct {
	// Whether deletion of the application version should be forced
	// Example: false
	Force bool `json:"force" yaml:"force"`
}

ApplicationVersionDelete represents the fields used to delete an application version

swagger:model

type ApplicationVersionPatch

type ApplicationVersionPatch struct {
	// Used to publish a specific version of the application
	// Example: true
	Published *bool `json:"published" yaml:"published"`
}

ApplicationVersionPatch represents the fields used to update an application version

swagger:model

type ApplicationWatchdog

type ApplicationWatchdog struct {
	// Whether or not to enable the watchdog for the application
	// Example: true
	Disabled bool `json:"disabled" yaml:"disabled"`
	// List of android packages to enable the watchdog for
	// Example: ["com.android.settings"]
	AllowedPackages []string `json:"allowed-packages" yaml:"allowed-packages"`
}

ApplicationWatchdog describes the fields used to update an application watchdog

swagger:model

func (ApplicationWatchdog) ValidateAllowedPackages

func (a ApplicationWatchdog) ValidateAllowedPackages() error

ValidateAllowedPackages checks the value for given allowed packages

type ApplicationsDelete

type ApplicationsDelete struct {
	// IDs or names of the applications to delete
	// Example: ["cilsreunfpfec9b1ktg0", "cilsreunfpfec9b1ktg1", "myapp"]
	IDs []string `json:"ids" yaml:"ids"`
	// Whether deletion of the applications should be forced
	// Example: false
	Force bool `json:"force" yaml:"force"`
}

ApplicationsDelete represents a list of application to delete together

swagger:model

API extensions: bulk_delete.applications

type ConfigGet

type ConfigGet struct {
	Config map[string]interface{} `json:"config"`
}

ConfigGet describes a list of config items

type ConfigPost

type ConfigPost struct {
	// Example: application.auto_publish
	Name string `json:"name"`
	// Example: false
	Value string `json:"value"`
}

ConfigPost contains the field necessary to set or update a config item

swagger:model

type Container

type Container struct {
	// ID of the container
	// Example: cilsreunfpfec9b1ktg0
	ID string `json:"id" yaml:"id"`
	// Name of the container. Typically in the format "ams-<ID>".
	// Example: ams-cilsreunfpfec9b1ktg0
	Name string `json:"name" yaml:"name"`
	// Type of the container. Possible values are: regular, base, unknown
	// Example: regular
	Type ContainerType `json:"type" yaml:"type"`
	// StatusCode of the container. Matches the Status field.
	// Example: 4
	StatusCode ContainerStatus `json:"status_code" yaml:"status_code"`
	// Status of the container
	// Example: running
	Status string `json:"status" yaml:"status"`
	// Node the container is running on
	// Example: lxd0
	Node string `json:"node" yaml:"node"`
	// AppID is the ID of the application the container is created from. Empty if the
	// container has not been created from an application.
	// Example: cilsiomnfpfec9b1kteg
	AppID string `json:"app_id" yaml:"app_id"`
	// AppName is the name of the application the container is created from. Empty if the
	// container has not been created from an application.
	// Example: myapp
	AppName string `json:"app_name" yaml:"app_name"`
	// AppVersion is the version of the application the container is created from. Empty if the
	// container has not been created from an application.
	// Example: 0
	AppVersion int `json:"app_version" yaml:"app_version"`
	// ImageID is the ID of the image the container is created from. Empty if the
	// container has not been created from an image.
	// Example: cilshrmnfpfec9b1kte0
	ImageID string `json:"image_id" yaml:"image_id"`
	// ImageVersion is the version of the image the container is created from. Empty if the
	// container has not been created from an image.
	// Example: 0
	ImageVersion int `json:"image_version" yaml:"image_version"`
	// CreatedAt specifies the time at which the container was created
	// Example: 1689604498
	CreatedAt int64 `json:"created_at" yaml:"created_at"`
	// Address is the IP address of the container
	// Example: 192.168.1.74
	Address string `json:"address" yaml:"address"`
	// PublicAddress is the external IP address the container is accessible on (in most
	// cases the IP of the node it is running on)
	// Example: 1.2.3.4
	PublicAddress string `json:"public_address" yaml:"public_address"`
	// Services the container exposes
	Services []ContainerService `json:"services" yaml:"services"`
	// StoredLogs lists log files AMS stores for the container.
	// Example: ["android.log", "system.log"]
	StoredLogs []string `json:"stored_logs" yaml:"stored_logs"`
	// ErrorMessage provides an error message when the container status is set to error.
	// Example: container failed to boot
	ErrorMessage string `json:"error_message" yaml:"error_message"`
	// Config summarizes the configuration the container uses
	Config struct {
		// Platform specifies the Anbox platform the container is running with
		// Example: webrtc
		Platform string `json:"platform,omitempty" yaml:"platform,omitempty"`
		// BootPackage specifies the Android application package name which is started by default
		// Example: com.android.settings
		BootPackage string `json:"boot_package,omitempty" yaml:"boot_package,omitempty"`
		// BootActivity specifies the Android activity which is started by default
		// Example: com.android.settings/.DevSettings
		BootActivity string `json:"boot_activity,omitempty" yaml:"boot_activity,omitempty"`
		// MetricsServer specifies a metrics server the container will use
		// Example: 10.0.0.45:8086
		MetricsServer string `json:"metrics_server,omitempty" yaml:"metrics_server,omitempty"`
		// DisableWatchdog defines whether the watchdog is disabled
		DisableWatchdog bool `json:"disable_watchdog,omitempty" yaml:"disable_watchdog,omitempty"`
		// DevMode specifies if development mode has been turned on for the container
		DevMode bool `json:"devmode,omitempty" yaml:"devmode,omitempty"`
	} `json:"config,omitempty"`
	// Resources specifies the resources allocated for the container
	Resources struct {
		// CPUs cores assigned to the container
		// Example: 2
		CPUs int `json:"cpus,omitempty" yaml:"cpus,omitempty"`
		// Memory assigned to the container
		// Example: 3GB
		Memory string `json:"memory,omitempty" yaml:"memory,omitempty"`
		// DiskSize specifies the amount of storage assigned to the container
		// Example: 3GB
		DiskSize string `json:"disk-size,omitempty" yaml:"disk-size,omitempty"`
		// GPUSlots specifies the number of GPU slots the container got allocated
		// Example: 1
		GPUSlots int `json:"gpu-slots,omitempty" yaml:"gpu-slots,omitempty"`
		// VPUSlots specifies the number of VPU slots the container
		VPUSlots int `json:"vpu-slots,omitempty" yaml:"vpu-slots,omitempty"`
	} `json:"resources,omitempty"`
	// Architecture describes the CPU archtitecture the container is using
	// Example: aarch64
	Architecture string `json:"architecture,omitempty" yaml:"architecture,omitempty"`
	// Tags specifies the tags the container has assigned
	// Example: ["foo", "bar"]
	Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
}

Container represents a single container

swagger:model

func MapInstanceToContainer

func MapInstanceToContainer(inst *Instance) Container

MapInstanceToContainer converts an instance API object to a container one

type ContainerDelete

type ContainerDelete struct {
	// Whether deletion of the container should be forced
	Force bool `json:"force"`
}

ContainerDelete describes a request used to delete a container

swagger:model

type ContainerExecControl

type ContainerExecControl struct {
	// Command to execute. Possible values are: window-resize, signal
	// Example: window-resize
	Command string `json:"command" yaml:"command"`
	// Arguments to pass to the command
	// Example: {"width": 1280, "height": 720}
	Args map[string]string `json:"args" yaml:"args"`
	// Signal to send
	Signal int `json:"signal" yaml:"signal"`
}

ContainerExecControl represents a message on the container shell "control" socket

swagger:model

API extension: container_exec

type ContainerExecPost

type ContainerExecPost struct {
	// Command inside the container to execute
	// Example: /bin/ls
	Command []string `json:"command" yaml:"command"`
	// Environment to setup when the command is executed.
	// Example: {"FOO": "bar"}
	Environment map[string]string `json:"environment" yaml:"environment"`
	// Whether the command is executed interactively or not
	Interactive bool `json:"interactive" yaml:"interactive"`
	// Width of the terminal. Only required when `interactive` is set to `true`.
	Width int `json:"width" yaml:"width"`
	// Height of the terminal. Only required when `interactive` is set to `true`.
	Height int `json:"height" yaml:"height"`
}

ContainerExecPost represents an container execution request

swagger:model

API extension: container_exec

type ContainerPatch

type ContainerPatch struct {
	// Desired status of the container
	DesiredStatus *string `json:"desired_status"`
}

ContainerPatch describes the fields which can be changed for an existing container

swagger:model

type ContainerService

type ContainerService struct {
	// Port is the port the container provides a service on
	// Example: 3000
	Port int `json:"port,omitempty" yaml:"port,omitempty"`
	// PortEnd, if specified, denotes the end of the port range starting at Port
	// Example: 3010
	PortEnd int `json:"port_end,omitempty" yaml:"port_end,omitempty"`
	// NodePort is the port used on the LXD node to map to the service port
	// If left empty the node port is automatically selected.
	// Example: 4000
	NodePort *int `json:"node_port,omitempty" yaml:"node_port,omitempty"`
	// NodePortEnd, if specified, denotes the end of the port range on the node starting
	// at NodePort
	// Example: 4010
	NodePortEnd *int `json:"node_port_end,omitempty" yaml:"node_port_end,omitempty"`
	// List of network protocols (tcp, udp) the port should be exposed for
	// Example: ["tcp", "udp"]
	Protocols []NetworkProtocol `json:"protocols" yaml:"protocols"`
	// Expose defines wether the service is exposed on the public endpoint of the node
	// or if it is only available on the private endpoint. To expose the service set to
	// true and to false otherwise.
	Expose bool `json:"expose" yaml:"expose"`
	// Name gives the container a hint what the exposed port is being used for. This
	// allows further tweaks inside the container to expose the service correctly.
	// Example: myservice
	Name string `json:"name" yaml:"name"`
}

ContainerService describes a single service the container exposes to the outside world.

While NetworkServiceSpec defines what the user requests, ContainerService is what is actually opened on the container.

swagger:model

type ContainerStatus

type ContainerStatus int

ContainerStatus represents the status a container can be in

const (
	// ContainerStatusError represents the state a container is in when an error occurred.
	ContainerStatusError ContainerStatus = -1
	// ContainerStatusUnknown represents the state a container is in when its real state
	// cannot be determined.
	ContainerStatusUnknown ContainerStatus = 0
	// ContainerStatusCreated represents the status a container is in when its object
	// was created on the store but no further operation was performed on it yet.
	ContainerStatusCreated ContainerStatus = 1
	// ContainerStatusPrepared represents the status a container is in when it got all
	// its resources assigned and is ready to be constructed and started on the LXD cluster.
	ContainerStatusPrepared ContainerStatus = 2
	// ContainerStatusStarted represents the state a container is in when it is currently
	// starting.
	ContainerStatusStarted ContainerStatus = 3
	// ContainerStatusRunning represents the state a container is in when it is running
	ContainerStatusRunning ContainerStatus = 4
	// ContainerStatusStopped represents the state a container is in when it is stopped
	ContainerStatusStopped ContainerStatus = 5
	// ContainerStatusDeleted represents the state a container is currently being deleted
	ContainerStatusDeleted ContainerStatus = 6
)

func (ContainerStatus) String

func (s ContainerStatus) String() string

type ContainerType

type ContainerType string

ContainerType describes the type of a container. Possible values are: regular, base, unknown

const (
	// ContainerTypeUnknown describes a container whichs type is not known
	ContainerTypeUnknown ContainerType = "unknown"
	// ContainerTypeRegular describes a regular container
	ContainerTypeRegular ContainerType = "regular"
	// ContainerTypeBase describes a base container
	ContainerTypeBase ContainerType = "base"
)

type ContainersDelete

type ContainersDelete struct {
	// IDs of the containers to delete
	// Example: ["cilsreunfpfec9b1ktg0", "cilsreunfpfec9b1ktg1"]
	IDs []string `json:"ids" yaml:"ids"`
	// Whether deletion of the containers should be forced
	Force bool `json:"force" yaml:"force"`
}

ContainersDelete represents a list of containers to delete together

swagger:model

API extensions: bulk_delete.containers

type ContainersPost

type ContainersPost struct {
	// ID of the application to use. Can be empty if an image ID is specified instead
	// Example: cilsiomnfpfec9b1kteg
	ApplicationID string `json:"app_id" yaml:"app_id"`
	// Version of the application to use. If not specified, the latest version is used.
	// Example: 0
	ApplicationVersion *int `json:"app_version" yaml:"app_version"`
	// ID of the image to use. Can be empty if an application ID is specified instead.
	// Example: cilshrmnfpfec9b1kte0
	ImageID string `json:"image_id" yaml:"image_id"`
	// Version of the image to use. If not specified, the latest version is used.
	// Example: 0
	ImageVersion *int `json:"image_version" yaml:"image_version"`
	// Instance type to use for the container.
	// Example a2.3
	InstanceType string `json:"instance_type" yaml:"instance_type"`
	// Node to start the container on. If empty node will be automatically selected.
	// Example: lxd0
	Node string `json:"node" yaml:"node"`
	// User data to pass to the container.
	// Example: {\"key\":\"value\"}
	Userdata *string `json:"user_data,omitempty" yaml:"user_data,omitempty"`
	// Addons to enable for the container
	// Example: ["addon0", "addon1"]
	Addons []string `json:"addons,omitempty" yaml:"addons,omitempty"`
	// Services to enable for the container
	Services []NetworkServiceSpec `json:"services" yaml:"services"`
	// Disk size the container should get allocated in bytes
	// Example: 3221225472
	DiskSize *int64 `json:"disk_size" yaml:"disk_size"`
	// Number of CPU cores the container should get assigned.
	// Example: 4
	CPUs *int `json:"cpus,omitempty" yaml:"cpus,omitempty"`
	// Memory the container should get assigned in bytes.
	// Example: 3221225472
	Memory *int64 `json:"memory,omitempty" yaml:"memory,omitempty"`
	// Number of GPU slots the container should get assigned.
	// Example: 1
	GPUSlots *int `json:"gpu-slots,omitempty" yaml:"gpu-slots,omitempty"`
	// Number of VPU slots the container should get assigned
	// Example: 1
	VPUSlots *int `json:"vpu-slots,omitempty" yaml:"vpu-slots,omitempty"`
	// Tags which will be assigned to the container
	// Example: ["tag0", "tag1"]
	Tags   []string `json:"tags,omitempty" yaml:"tags,omitempty"`
	Config struct {
		// Platform specifies the Anbox platform the container is running with
		// Example: webrtc
		Platform string `json:"platform,omitempty" yaml:"platform,omitempty"`
		// BootPackage specifies the Android application package name which is started by default
		// Example: com.android.settings
		BootPackage string `json:"boot_package,omitempty" yaml:"boot_package,omitempty"`
		// BootActivity specifies the Android activity which is started by default
		// Example: com.android.settings/.DevSettings
		BootActivity string `json:"boot_activity,omitempty" yaml:"boot_activity,omitempty"`
		// MetricsServer specifies a metrics server the container will use
		// Example: 10.0.0.45:8086
		MetricsServer string `json:"metrics_server,omitempty" yaml:"metrics_server,omitempty"`
		// DisableWatchdog defines whether the watchdog is disabled
		DisableWatchdog bool `json:"disable_watchdog,omitempty" yaml:"disable_watchdog,omitempty"`
		// Feature flags to enable for the container.
		// Example: feature0, feature1
		Features string `json:"features,omitempty" yaml:"features,omitempty"`
		// DevMode specifies if development mode has been turned on for the container
		DevMode bool `json:"devmode,omitempty" yaml:"devmode,omitempty"`
	} `json:"config,omitempty"`
	// Do not start the container after creation.
	NoStart bool `json:"no_start,omitempty" yaml:"no_start,omitempty"`
}

ContainersPost represents the fields required to launch a new container for a specific application

swagger:model

type Event

type Event struct {
	// Type defines the type of event. Listeners can watch specific
	// event types
	Type EventType `json:"type"`
	// Timestamp (in ISO8601 format) is filled when sending the event if empty
	// Example: 2017-07-28T05:02:22.92201407Z
	Timestamp time.Time `json:"timestamp"`
	// Metadata represents the actual event data
	// Example: { "class": "task", "created_at": "2017-07-28T05:02:22.92201407Z", "description": "Deleting container", "err": "", "id": "bc85137b-b20d-470a-a6ea-daa9a2b8506a", "may_cancel": false, "metadata": null, "resources": { "containers": [ "/1.0/containers/c0946voj1qm6t2783db0" ] }, "server_address": "", "status": "Success", "status_code": 200, "updated_at": "2017-07-28T05:02:22.92201407Z" }
	Metadata interface{} `json:"metadata"`
}

Event defines the structure of an event sent on the events API endpoint

swagger:model

type EventType

type EventType string

EventType is used to describe the type of an event

swagger:enum EventType

const (
	// EventTypeOperation is the event type sent when a operation event is reported
	EventTypeOperation EventType = "operation"
	// EventTypeLifecycle is the event type sent when a lifecycle event is reported
	EventTypeLifecycle EventType = "lifecycle"
)

type Image

type Image struct {
	// ID of the image
	// Example: btavtegj1qm58qg7ru50
	ID string `json:"id" yaml:"id"`
	// Name of the image
	// Example: my-image
	Name string `json:"name" yaml:"name"`
	// List of versions for the image
	Versions []ImageVersion `json:"versions" yaml:"versions"`
	// Status of the image as an integer value
	// Example: 3
	StatusCode ImageStatus `json:"status_code" yaml:"status_code"`
	// Current status of the image
	// Enum: error,created,active,initializing,unknown
	// Example: active
	Status string `json:"status" yaml:"status"`
	// List of application ids using the image as a base
	// Example: ["btavtegj1qm58asf123"]
	UsedBy []string `json:"used_by" yaml:"used_by"`
	// Flag to show whether the image can be edited by an AMS instance or not
	// Example: false
	Immutable bool `json:"immutable" yaml:"immutable"`
	// Flag to show whether the image is used by default if no image name is provided
	// Example: false
	Default bool `json:"default" yaml:"default"`
	// CPU architecture supported by the image
	// Example: x86_64
	Architecture string `json:"architecture,omitempty" yaml:"architecture,omitempty"`
	// Type of the image. Possible values are: container, vm
	Type ImageType `json:"type" yaml:"type"`
}

Image represents an image available in AMS

swagger:model

type ImageDelete

type ImageDelete struct {
	Force bool `json:"force"`
}

ImageDelete describes a request used to delete an image

swagger:model

type ImagePatch

type ImagePatch struct {
	// Make the image as default
	// Example: true
	Default *bool `json:"default" yaml:"default"`

	// ForceSync forces synchronization of the image from the remote image server
	// Examle: true
	ForceSync bool `json:"force_sync" yaml:"force_sync"`
}

ImagePatch represents the fields to update an existing image

swagger:model

type ImageStatus

type ImageStatus int

ImageStatus represents the status of an image

const (
	// ImageStatusError represents the state an image is in when an error occurred
	// during a operation
	ImageStatusError ImageStatus = -1
	// ImageStatusUnknown represents the state an image is in when its real state
	// cannot be determined.
	ImageStatusUnknown ImageStatus = 0
	// ImageStatusInitializing represents the state an image is in when its currently being created
	ImageStatusInitializing ImageStatus = 1
	// ImageStatusCreated represents the state an image is in when it was uploaded to
	// AMS but not yet available on all LXD nodes.
	ImageStatusCreated ImageStatus = 2
	// ImageStatusActive represents the state an image is in when it is available on
	// all LXD nodes.
	ImageStatusActive ImageStatus = 3
	// ImageStatusDeleted represents the state an image is in when it is currently being deleted
	ImageStatusDeleted ImageStatus = 4
	// ImageStatusAvailable represents the state when an image is present on the remote but not in the LXD cluster
	ImageStatusAvailable ImageStatus = 5
)

func (ImageStatus) String

func (s ImageStatus) String() string

type ImageType

type ImageType string

ImageType specifies the type of an image

const (
	// ImageTypeAny is used when the type of the image is not relevant
	ImageTypeAny ImageType = ""
	// ImageTypeUnknown is returned when the type of the image is not known
	ImageTypeUnknown ImageType = "unknown"
	// ImageTypeContainer specifies that the image is used for containers
	ImageTypeContainer ImageType = "container"
	// ImageTypeVM specifies that the image is used for virtual machines
	ImageTypeVM ImageType = "vm"
)

type ImageVersion

type ImageVersion struct {
	// Version for the image
	// Example: 0
	Number int `json:"version" yaml:"version"`
	// Fingerprint of the image version
	// Example: 0791cfc011f67c60b7bd0f852ddb686b79fa46083d9d43ef9845c9235c67b261
	Fingerprint string `json:"fingerprint" yaml:"fingerprint"`
	// Size (in bytes) of the image version
	// Example: 529887868
	Size int64 `json:"size" yaml:"size"`
	// Creation UTC timestamp of the image
	// Example: 1610641117
	CreatedAt int64 `json:"created_at" yaml:"upload_time"`
	// Status of the image as an integer value
	// Example: 3
	StatusCode ImageStatus `json:"status_code" yaml:"status_code"`
	// Current status of the image
	// Enum: error,created,active,initializing,unknown
	// Example: active
	Status string `json:"status" yaml:"status"`
	// Version of the image in the remote server
	// Example: 1.2.3
	RemoteID string `json:"remote_id" yaml:"remote_id"`
}

ImageVersion describes a single version of an image

swagger:model

type ImagesGet

type ImagesGet struct {
	Images []Image `json:"images" yaml:"images"`
}

ImagesGet represents a list of images

swagger:model

type ImagesPost

type ImagesPost struct {
	// Name of the image
	// Example: my-image
	Name string `json:"name" yaml:"name"`
	// Path to store the image
	// Example: /save/image
	Path string `json:"path" yaml:"path"`
	// Make the image as default
	// Example: false
	Default bool `json:"default" yaml:"default"`
	// Type specifies if the type of the to be imported image. Only valid
	// when no image payload is provided with the request and the image
	// is meant to be imported from a remote image server. If not specified
	// all available image types will be imported.
	Type ImageType `json:"type" yaml:"type"`
}

ImagesPost represents the fields to upload a new image

swagger:model

type Instance

type Instance struct {
	// ID of the instance
	// Example: cilsreunfpfec9b1ktg0
	ID string `json:"id" yaml:"id"`
	// Name of the instance. Typically in the format "ams-<ID>".
	// Example: ams-cilsreunfpfec9b1ktg0
	Name string `json:"name" yaml:"name"`
	// If this is a base instance or not
	IsBase bool `json:"base" yaml:"base"`
	// Type specifies the type of the instance (container, vm)
	Type InstanceType `json:"type" yaml:"type"`
	// StatusCode of the instance. Matches the Status field.
	// Example: 4
	StatusCode InstanceStatus `json:"status_code" yaml:"status_code"`
	// Status of the instance
	// Example: running
	Status string `json:"status" yaml:"status"`
	// Node the instance is running on
	// Example: lxd0
	Node string `json:"node" yaml:"node"`
	// AppID is the ID of the application the instance is created from. Empty if the
	// instance has not been created from an application.
	// Example: cilsiomnfpfec9b1kteg
	AppID string `json:"app_id" yaml:"app_id"`
	// AppName is the name of the application the instance is created from. Empty if the
	// instance has not been created from an application.
	// Example: myapp
	AppName string `json:"app_name" yaml:"app_name"`
	// AppVersion is the version of the application the instance is created from. Empty if the
	// instance has not been created from an application.
	// Example: 0
	AppVersion int `json:"app_version" yaml:"app_version"`
	// ImageID is the ID of the image the instance is created from. Empty if the
	// instance has not been created from an image.
	// Example: cilshrmnfpfec9b1kte0
	ImageID string `json:"image_id" yaml:"image_id"`
	// ImageVersion is the version of the image the instance is created from. Empty if the
	// instance has not been created from an image.
	// Example: 0
	ImageVersion int `json:"image_version" yaml:"image_version"`
	// CreatedAt specifies the time at which the instance was created
	// Example: 1689604498
	CreatedAt int64 `json:"created_at" yaml:"created_at"`
	// Address is the IP address of the instance
	// Example: 192.168.1.74
	Address string `json:"address" yaml:"address"`
	// PublicAddress is the external IP address the instance is accessible on (in most
	// cases the IP of the node it is running on)
	// Example: 1.2.3.4
	PublicAddress string `json:"public_address" yaml:"public_address"`
	// Services the instance exposes
	Services []InstanceService `json:"services" yaml:"services"`
	// StoredLogs lists log files AMS stores for the instance.
	// Example: ["android.log", "system.log"]
	StoredLogs []string `json:"stored_logs" yaml:"stored_logs"`
	// ErrorMessage provides an error message when the instance status is set to error.
	// Example: instance failed to boot
	ErrorMessage string `json:"error_message" yaml:"error_message"`
	// StatusMessage describes the current status of the instance
	// Example: "Waiting for image download"
	StatusMessage string `json:"status_message" yaml:"status_message"`
	// Config summarizes the configuration the instance uses
	Config struct {
		// Platform specifies the Anbox platform the instance is running with
		// Example: webrtc
		Platform string `json:"platform,omitempty" yaml:"platform,omitempty"`
		// BootPackage specifies the Android application package name which is started by default
		// Example: com.android.settings
		BootPackage string `json:"boot_package,omitempty" yaml:"boot_package,omitempty"`
		// BootActivity specifies the Android activity which is started by default
		// Example: com.android.settings/.DevSettings
		BootActivity string `json:"boot_activity,omitempty" yaml:"boot_activity,omitempty"`
		// MetricsServer specifies a metrics server the instance will use
		// Example: 10.0.0.45:8086
		MetricsServer string `json:"metrics_server,omitempty" yaml:"metrics_server,omitempty"`
		// DisableWatchdog defines whether the watchdog is disabled
		DisableWatchdog bool `json:"disable_watchdog,omitempty" yaml:"disable_watchdog,omitempty"`
		// DevMode specifies if development mode has been turned on for the instance
		DevMode bool `json:"devmode,omitempty" yaml:"devmode,omitempty"`
		// EnableStreaming specifies if streaming should be enabled for the instance or not
		EnableStreaming bool `json:"enable_streaming,omitempty" yaml:"enable_streaming,omitempty"`
		Display         struct {
			// Width is the width of the virtual display
			Width int `json:"width" yaml:"width"`
			// Height is the height of the virtual display
			Height int `json:"height" yaml:"height"`
			// FPS is the frame rate of the virtual display
			FPS int `json:"fps" yaml:"fps"`
			// Density is the piel density of the virtual display
			Density int `json:"density" yaml:"density"`
		} `json:"display,omitempty" yaml:"display,omitempty"`
	} `json:"config,omitempty"`
	// Resources specifies the resources allocated for the instance
	Resources InstanceResources `json:"resources,omitempty"`
	// Architecture describes the CPU archtitecture the instance is using
	// Example: aarch64
	Architecture string `json:"architecture,omitempty" yaml:"architecture,omitempty"`
	// Tags specifies the tags the instance has assigned
	// Example: ["foo", "bar"]
	Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
}

Instance represents a single instance

swagger:model

func MapContainerToInstance

func MapContainerToInstance(c *Container) (Instance, error)

MapContainerToInstance maps a container to an instance object

type InstanceDelete

type InstanceDelete struct {
	// Whether deletion of the instance should be forced
	Force bool `json:"force"`
}

InstanceDelete describes a request used to delete a instance

swagger:model

type InstanceExecControl

type InstanceExecControl struct {
	// Command to execute. Possible values are: window-resize, signal
	// Example: window-resize
	Command string `json:"command" yaml:"command"`
	// Arguments to pass to the command
	// Example: {"width": 1280, "height": 720}
	Args map[string]string `json:"args" yaml:"args"`
	// Signal to send
	Signal int `json:"signal" yaml:"signal"`
}

InstanceExecControl represents a message on the instance shell "control" socket

swagger:model

API extension: instance_exec

type InstanceExecPost

type InstanceExecPost struct {
	// Command inside the instance to execute
	// Example: /bin/ls
	Command []string `json:"command" yaml:"command"`
	// Environment to setup when the command is executed.
	// Example: {"FOO": "bar"}
	Environment map[string]string `json:"environment" yaml:"environment"`
	// Whether the command is executed interactively or not
	Interactive bool `json:"interactive" yaml:"interactive"`
	// Width of the terminal. Only required when `interactive` is set to `true`.
	Width int `json:"width" yaml:"width"`
	// Height of the terminal. Only required when `interactive` is set to `true`.
	Height int `json:"height" yaml:"height"`
}

InstanceExecPost represents an instance execution request

swagger:model

API extension: instance_exec

type InstancePatch

type InstancePatch struct {
	// Desired status of the instance
	DesiredStatus *string `json:"desired_status"`
}

InstancePatch describes the fields which can be changed for an existing instance

swagger:model

type InstanceResources

type InstanceResources struct {
	// CPUs cores assigned to the instance
	// Example: 2
	CPUs int `json:"cpus,omitempty" yaml:"cpus,omitempty"`
	// Memory assigned to the instance in bytes
	// Example: 3221225472
	Memory int64 `json:"memory,omitempty" yaml:"memory,omitempty"`
	// DiskSize specifies the amount of storage assigned to the instance in bytes
	// Example: 3221225472
	DiskSize int64 `json:"disk-size,omitempty" yaml:"disk-size,omitempty"`
	// GPUSlots specifies the number of GPU slots the instance got allocated
	// Example: 1
	GPUSlots int `json:"gpu-slots,omitempty" yaml:"gpu-slots,omitempty"`
	// VPUSlots specifies the number of VPU slots the instance
	VPUSlots int `json:"vpu-slots,omitempty" yaml:"vpu-slots,omitempty"`
}

InstanceResources represents resources assigned to an instance

swagger:model

func (*InstanceResources) ToApplicationResources

func (res *InstanceResources) ToApplicationResources() ApplicationResources

ToApplicationResources converts instance resources to application resources

type InstanceService

type InstanceService struct {
	// Port is the port the instance provides a service on
	// Example: 3000
	Port int `json:"port,omitempty" yaml:"port,omitempty"`
	// PortEnd, if specified, denotes the end of the port range starting at Port
	// Example: 3010
	PortEnd int `json:"port_end,omitempty" yaml:"port_end,omitempty"`
	// NodePort is the port used on the LXD node to map to the service port
	// If left empty the node port is automatically selected.
	// Example: 4000
	NodePort *int `json:"node_port,omitempty" yaml:"node_port,omitempty"`
	// NodePortEnd, if specified, denotes the end of the port range on the node starting
	// at NodePort
	// Example: 4010
	NodePortEnd *int `json:"node_port_end,omitempty" yaml:"node_port_end,omitempty"`
	// List of network protocols (tcp, udp) the port should be exposed for
	// Example: ["tcp", "udp"]
	Protocols []NetworkProtocol `json:"protocols" yaml:"protocols"`
	// Expose defines wether the service is exposed on the public endpoint of the node
	// or if it is only available on the private endpoint. To expose the service set to
	// true and to false otherwise.
	Expose bool `json:"expose" yaml:"expose"`
	// Name gives the instance a hint what the exposed port is being used for. This
	// allows further tweaks inside the instance to expose the service correctly.
	// Example: myservice
	Name string `json:"name" yaml:"name"`
}

InstanceService describes a single service the instance exposes to the outside world.

While NetworkServiceSpec defines what the user requests, InstanceService is what is actually opened on the instance.

swagger:model

type InstanceStatus

type InstanceStatus int

InstanceStatus represents the status a instance can be in

const (
	// InstanceStatusError represents the state a instance is in when an error occurred.
	InstanceStatusError InstanceStatus = -1
	// InstanceStatusUnknown represents the state a instance is in when its real state
	// cannot be determined.
	InstanceStatusUnknown InstanceStatus = 0
	// InstanceStatusCreated represents the status a instance is in when its object
	// was created on the store but no further operation was performed on it yet.
	InstanceStatusCreated InstanceStatus = 1
	// InstanceStatusPrepared represents the status a instance is in when it got all
	// its resources assigned and is ready to be constructed and started on the LXD cluster.
	InstanceStatusPrepared InstanceStatus = 2
	// InstanceStatusStarted represents the state a instance is in when it is currently
	// starting.
	InstanceStatusStarted InstanceStatus = 3
	// InstanceStatusRunning represents the state a instance is in when it is running
	InstanceStatusRunning InstanceStatus = 4
	// InstanceStatusStopped represents the state a instance is in when it is stopped
	InstanceStatusStopped InstanceStatus = 5
	// InstanceStatusDeleted represents the state a instance is currently being deleted
	InstanceStatusDeleted InstanceStatus = 6
)

func (InstanceStatus) String

func (s InstanceStatus) String() string

type InstanceType

type InstanceType string

InstanceType describes the type of an instance (container, vm)

const (
	// InstanceTypeAny specifies that the type of the instance does not matter
	InstanceTypeAny InstanceType = ""
	// InstanceTypeContainer specifies that the instance is a container
	InstanceTypeContainer InstanceType = "container"
	// InstanceTypeVM specifies that the instance is a VM
	InstanceTypeVM InstanceType = "vm"
)

type InstancesDelete

type InstancesDelete struct {
	// IDs of the instances to delete
	// Example: ["cilsreunfpfec9b1ktg0", "cilsreunfpfec9b1ktg1"]
	IDs []string `json:"ids" yaml:"ids"`
	// Whether deletion of the instances should be forced
	Force bool `json:"force" yaml:"force"`
}

InstancesDelete represents a list of instances to delete together

swagger:model

API extensions: bulk_delete.instances

type InstancesPost

type InstancesPost struct {
	// Name of the instance. Will be automatically assigned if not specified. Names
	// must be unique.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Type of the instance (container, vm)
	Type InstanceType `json:"type" yaml:"type"`
	// ID of the application to use. Can be empty if an image ID is specified instead
	// Example: cilsiomnfpfec9b1kteg
	ApplicationID string `json:"app_id" yaml:"app_id"`
	// Version of the application to use. If not specified, the latest version is used.
	// Example: 0
	ApplicationVersion *int `json:"app_version" yaml:"app_version"`
	// ID of the image to use. Can be empty if an application ID is specified instead.
	// Example: cilshrmnfpfec9b1kte0
	ImageID string `json:"image_id" yaml:"image_id"`
	// Version of the image to use. If not specified, the latest version is used.
	// Example: 0
	ImageVersion *int `json:"image_version" yaml:"image_version"`
	// Node to start the instance on. If empty node will be automatically selected.
	// Example: lxd0
	Node string `json:"node" yaml:"node"`
	// User data to pass to the instance.
	// Example: {\"key\":\"value\"}
	Userdata *string `json:"user_data,omitempty" yaml:"user_data,omitempty"`
	// Addons to enable for the instance
	// Example: ["addon0", "addon1"]
	Addons []string `json:"addons,omitempty" yaml:"addons,omitempty"`
	// Services to enable for the instance
	Services []NetworkServiceSpec `json:"services" yaml:"services"`
	// Resources specifies the resources allocated for the instance
	Resources struct {
		// Number of CPU cores the instance should get assigned.
		// Example: 4
		CPUs *int `json:"cpus,omitempty" yaml:"cpus,omitempty"`
		// Disk size the instance should get allocated in bytes
		// Example: 3221225472
		DiskSize *int64 `json:"disk_size" yaml:"disk_size"`
		// Memory the instance should get assigned in bytes.
		// Example: 3221225472
		Memory *int64 `json:"memory,omitempty" yaml:"memory,omitempty"`
		// Number of GPU slots the instance should get assigned.
		// Example: 1
		GPUSlots *int `json:"gpu-slots,omitempty" yaml:"gpu-slots,omitempty"`
		// Number of VPU slots the instance should get assigned
		// Example: 1
		VPUSlots *int `json:"vpu-slots,omitempty" yaml:"vpu-slots,omitempty"`
	} `json:"resources" yaml:"resources"`
	// Tags which will be assigned to the instance
	// Example: ["tag0", "tag1"]
	Tags   []string `json:"tags,omitempty" yaml:"tags,omitempty"`
	Config struct {
		// Platform specifies the Anbox platform the instance is running with
		// Example: webrtc
		Platform string `json:"platform,omitempty" yaml:"platform,omitempty"`
		// BootPackage specifies the Android application package name which is started by default
		// Example: com.android.settings
		BootPackage string `json:"boot_package,omitempty" yaml:"boot_package,omitempty"`
		// BootActivity specifies the Android activity which is started by default
		// Example: com.android.settings/.DevSettings
		BootActivity string `json:"boot_activity,omitempty" yaml:"boot_activity,omitempty"`
		// MetricsServer specifies a metrics server the instance will use
		// Example: 10.0.0.45:8086
		MetricsServer string `json:"metrics_server,omitempty" yaml:"metrics_server,omitempty"`
		// DisableWatchdog defines whether the watchdog is disabled
		DisableWatchdog bool `json:"disable_watchdog,omitempty" yaml:"disable_watchdog,omitempty"`
		// Feature flags to enable for the instance.
		// Example: feature0, feature1
		Features string `json:"features,omitempty" yaml:"features,omitempty"`
		// DevMode specifies if development mode has been turned on for the instance
		DevMode bool `json:"devmode,omitempty" yaml:"devmode,omitempty"`
		// EnableStreaming specifies if streaming should be enabled for the instance or not
		EnableStreaming bool `json:"enable_streaming,omitempty" yaml:"enable_streaming,omitempty"`
		// Display specifies the configuration of the virutal display of the instance
		Display struct {
			// Width is the width of the virtual display
			Width int `json:"width" yaml:"width"`
			// Height is the height of the virtual display
			Height int `json:"height" yaml:"height"`
			// FPS is the frame rate of the virtual display
			FPS int `json:"fps" yaml:"fps"`
			// Density is the piel density of the virtual display
			Density int `json:"density" yaml:"density"`
		} `json:"display,omitempty" yaml:"display,omitempty"`
	} `json:"config,omitempty" yaml:"config,omitempty"`
	// Do not start the instance after creation.
	NoStart bool `json:"no_start,omitempty" yaml:"no_start,omitempty"`
}

InstancesPost represents the fields required to launch a new instance for a specific application

swagger:model

type LifecycleEvent

type LifecycleEvent struct {
	Action LifecycleEventAction `json:"action"`
	Source string               `json:"source"`
}

LifecycleEvent contains information about a lifecycle event

type LifecycleEventAction

type LifecycleEventAction string

LifecycleEventAction describes a single lifecycle action

const (
	// LifecycleEventActionContainerCreated is sent when a container was created
	LifecycleEventActionContainerCreated LifecycleEventAction = "container-created"
	// LifecycleEventActionContainerScheduled is sent when a container was scheduled
	LifecycleEventActionContainerScheduled LifecycleEventAction = "container-scheduled"
	// LifecycleEventActionContainerStarted is sent when a container was started
	LifecycleEventActionContainerStarted LifecycleEventAction = "container-started"
	// LifecycleEventActionContainerStopped is sent when a container was stopped
	LifecycleEventActionContainerStopped LifecycleEventAction = "container-stopped"
	// LifecycleEventActionContainerRemoved is sent when a container was removed
	LifecycleEventActionContainerRemoved LifecycleEventAction = "container-removed"
	// LifecycleEventActionContainerFailed is sent when a container failed
	LifecycleEventActionContainerFailed LifecycleEventAction = "container-failed"

	// LifecycleEventActionInstanceCreated is sent when an instance was created
	LifecycleEventActionInstanceCreated LifecycleEventAction = "instance-created"
	// LifecycleEventActionInstanceScheduled is sent when an instance was scheduled
	LifecycleEventActionInstanceScheduled LifecycleEventAction = "instance-scheduled"
	// LifecycleEventActionInstanceStarted is sent when an instance was started
	LifecycleEventActionInstanceStarted LifecycleEventAction = "instance-started"
	// LifecycleEventActionInstanceStopped is sent when an instance was stopped
	LifecycleEventActionInstanceStopped LifecycleEventAction = "instance-stopped"
	// LifecycleEventActionInstanceRemoved is sent when an instance was removed
	LifecycleEventActionInstanceRemoved LifecycleEventAction = "instance-removed"
	// LifecycleEventActionInstanceFailed is sent when an instance failed
	LifecycleEventActionInstanceFailed LifecycleEventAction = "instance-failed"
)

type NetworkProtocol

type NetworkProtocol string

NetworkProtocol describes a specific network protocol like TCP or UDP a ContainerService can use

const (
	// NetworkProtocolUnknown describes a unknown network protocol
	NetworkProtocolUnknown NetworkProtocol = "unknown"
	// NetworkProtocolTCP describes the TCP network protocol
	NetworkProtocolTCP NetworkProtocol = "tcp"
	// NetworkProtocolUDP describes the UDP network protocol
	NetworkProtocolUDP NetworkProtocol = "udp"
)

func NetworkProtocolFromString

func NetworkProtocolFromString(value string) NetworkProtocol

NetworkProtocolFromString parses a network protocol from the given value. Returns NetworkProtocolUnknown if not known value can be parsed.

type NetworkServiceSpec

type NetworkServiceSpec struct {
	// Port is the port the container provides a service on
	// Example: 3000
	Port int `json:"port,omitempty" yaml:"port,omitempty"`
	// PortEnd is the end of the port range set for a service. If empty, only a
	// single port is opened
	// Example: 3010
	PortEnd int `json:"port_end,omitempty" yaml:"port_end,omitempty"`
	// List of network protocols (tcp, udp) the port should be exposed for
	// Example: ["tcp", "udp"]
	Protocols []NetworkProtocol `json:"protocols" yaml:"protocols"`
	// Expose defines wether the service is exposed on the public endpoint of the node
	// or if it is only available on the private endpoint. To expose the service set to
	// true and to false otherwise.
	Expose bool `json:"expose" yaml:"expose"`
	// Name gives the container a hint what the exposed port is being used for. This
	// allows further tweaks inside the container to expose the service correctly.
	// Exampe: ssh
	Name string `json:"name" yaml:"name"`
}

NetworkServiceSpec is used to define the user defined network services that should be opened on a container

type Node

type Node struct {
	// Name of the node
	// Example: lxd0
	Name string `json:"name" yaml:"name"`
	// Internal IP address of the node
	// Example: 10.0.0.1
	// swagger:strfmt ipv4
	Address string `json:"address" yaml:"address"`
	// Public IP address of the node
	// Example: 10.0.0.1
	// swagger:strfmt ipv4
	PublicAddress string `json:"public_address" yaml:"public_address"`
	// MTU for the configured network bridge on LXD
	// Example: 1500
	NetworkBridgeMTU int `json:"network_bridge_mtu" yaml:"network_bridge_mtu"`
	// Number of CPUs on the node
	// Example: 4
	CPUs int `json:"cpus" yaml:"cpus"`
	// CPU allocation rate for the node
	// Example: 4
	CPUAllocationRate float32 `json:"cpu_allocation_rate" yaml:"cpu_allocation_rate"`
	// Memory (in GB) of the LXD node
	// Example: 8GB
	Memory string `json:"memory" yaml:"memory"`
	// Memory allocation rate for the node
	// Example: 2
	MemoryAllocationRate float32 `json:"memory_allocation_rate" yaml:"memory_allocation_rate"`
	// Current status code of the node as an integer value
	// Example: 4
	StatusCode NodeStatus `json:"status_code" yaml:"status_code"`
	// Current status of the node
	// Example: online
	Status string `json:"status" yaml:"status"`
	// Flag to represent the master node for the AMS cluster
	// Example: true
	IsMaster bool `json:"is_master" yaml:"is_master"`
	// Disk size for the node
	// Example: true
	DiskSize string `json:"disk_size" yaml:"disk_size"`
	// Number of GPU slots present on the node
	// Example: 0
	GPUSlots int `json:"gpu_slots" yaml:"gpu_slots"`
	// Number of GPU encoder slots present on the node
	// Example: 0
	GPUEncoderSlots int `json:"gpu_encoder_slots" yaml:"gpu_encoder_slots"`
	// Tags attached to the node
	// Example: ["created_by=anbox", "gpu=nvidia"]
	Tags []string `json:"tags" yaml:"tags"`
	// Flag used to see if the node is available to schedule containers
	// Example: false
	Unschedulable bool `json:"unschedulable" yaml:"unschedulable"`
	// CPU architecture of the node
	// Example: aarch64
	Architecture string `json:"architecture,omitempty" yaml:"architecture,omitempty"`
	// Name of the storage pool configured for the node
	// Example: default
	StoragePool string `json:"storage_pool" yaml:"storage_pool"`
	// Flag used to control if AMS can manage the LXD node
	// Example: false
	Managed bool `json:"managed" yaml:"managed"`
	// GPU information for the node
	GPUs []NodeGPU `json:"gpus" yaml:"gpus"`
	// VPU information for the node
	VPUs []NodeVPU `json:"vpus" yaml:"vpus"`

	// DEPRECATED Flag in favour of `unschedulable` flag
	// Example: false
	DEPRECATEDUnschedulable bool `json:"unscheduable" yaml:"unscheduable"`
}

Node describes a single node of the underlying LXD cluster AMS manages

swagger:model

type NodeDelete

type NodeDelete struct {
	// Use this to force deletion of a node from AMS and LXD cluster
	// Example: true
	Force bool `json:"force"`
	// Use this to remove the node from the LXD cluster as well
	// Example: true
	KeepInCluster bool `json:"keep_in_cluster"`
}

NodeDelete describes a request used to delete a node

swagger:model

type NodeGPU

type NodeGPU struct {
	// ID of the GPU configured on the node
	// Example: 0
	ID uint64 `json:"id" yaml:"id"`
	// PCI Bus Address used by the GPU
	// Example: 00:08.0
	PCIAddress string `json:"pci_address" yaml:"pci_address"`
	// PCI Bus Address used by the GPU
	// Example: D129
	RenderName string `json:"render_name" yaml:"render_name"`
	// Number of the GPU slots available
	// Example: 20
	Slots int `json:"slots" yaml:"slots"`
	// Number of the encoder slots available on the GPU
	// Example: 20
	EncoderSlots int `json:"encoder_slots" yaml:"encoder_slots"`
	// Map of current allocations and containers on the GPU
	Allocations map[string]NodeGPUAllocation `json:"allocations" yaml:"allocations"`
	// NUMA Node number for the GPU
	// Example: 0
	NUMANode uint64 `json:"numa_node" yaml:"numa_node"`
}

NodeGPU describes a single GPU available on a node

swagger:model

type NodeGPUAllocation

type NodeGPUAllocation struct {
	// List of GPU IDs allocated to the container
	// Example: [0,1]
	GPUs []uint64 `json:"gpus" yaml:"gpus"`
	// Number of GPU Slots allocated to the container
	// Example: 1
	Slots int `json:"slots" yaml:"slots"`
	// Number of Encoder Slots allocated to the container
	// Example: 1
	EncoderSlots int `json:"encoder_slots" yaml:"encoder_slots"`
}

NodeGPUAllocation describes a single allocation on a GPU

swagger:model

type NodeGPUPatch

type NodeGPUPatch struct {

	// ID of the GPU configured on the node
	// Example: 0
	ID uint64 `json:"id" yaml:"id"`
	// Update the number of the GPU slots available on the Node
	// Example: 20
	Slots *int `json:"slots" yaml:"slots"`
	// Update the number of GPU encoder slots
	// Example: 4
	EncoderSlots *int `json:"encoder_slots" yaml:"encoder_slots"`
}

NodeGPUPatch allows changing configuration for individual GPUs

swagger:model

type NodePatch

type NodePatch struct {
	// Update the public IP Address of the node
	// Example: 10.0.0.1
	// swagger:strfmt ipv4
	PublicAddress *string `json:"public_address"`
	// Update the number of CPUs for the node
	// Example: 4
	CPUs *int `json:"cpus"`
	// Update the CPU allocation rate for the node
	// Example: 4
	CPUAllocationRate *float32 `json:"cpu_allocation_rate"`
	// Update the memory (in GB) for the node
	// Example: 2GB
	Memory *string `json:"memory"`
	// Update the memory allocation rate for the node
	// Example: 2
	MemoryAllocationRate *float32 `json:"memory_allocation_rate"`
	// Update the number of GPU slots to configure on the node
	// Example: 2
	GPUSlots *int `json:"gpu_slots"`
	// Update the number of GPU encoder slots to configure on the node
	// Example: 4
	GPUEncoderSlots *int `json:"gpu_encoder_slots" yaml:"gpu_encoder_slots"`
	// Update the tags of the node
	// Example: ["created_by=anbox", "gpu=nvidia"]
	Tags *[]string `json:"tags" yaml:"tags"`
	// Flag used to remove the node from scheduler and not schedule containers on it
	// Example: true
	Unschedulable *bool          `json:"unschedulable" yaml:"unschedulable"`
	GPUs          []NodeGPUPatch `json:"gpus" yaml:"gpus"`
	// Update the subnet info of the node if the subnet of a node is changed
	// Example: 10.0.0.1/24
	// swagger:strfmt ipv4
	Subnet *string `json:"subnet" yaml:"subnet"`

	// DEPRECATED Flag in favour of `unschedulable` flag
	// Example: false
	DEPRECATEDUnschedulable *bool `json:"unscheduable" yaml:"unscheduable"`
}

NodePatch describes a request to update an existing node

swagger:model

type NodeStatus

type NodeStatus int

NodeStatus describes the current status of a node

swagger:model

const (
	// NodeStatusError represents the status a node is in when it can not be used
	// because of an error.
	NodeStatusError NodeStatus = -1
	// NodeStatusUnknown describes the status of a node when the status is not known
	NodeStatusUnknown NodeStatus = 0
	// NodeStatusCreated represents the status a node is in after it was created
	NodeStatusCreated NodeStatus = 1
	// NodeStatusInitializing represents the status a node is in when its corresponding
	// LXD instance is currently being configured.
	NodeStatusInitializing NodeStatus = 2
	// NodeStatusInitialized represents the status a node is in after its corresponding
	// LXD instance was initialized
	NodeStatusInitialized NodeStatus = 3
	// NodeStatusOnline represents the status a node is in when it available and can
	// be used by AMS.
	NodeStatusOnline NodeStatus = 4
	// NodeStatusOffline represents the status a node is in when it is not available
	// and can't be used by AMS.
	NodeStatusOffline NodeStatus = 5
	// NodeStatusDeleted represents the status a node is in when it got deleted by the user
	NodeStatusDeleted NodeStatus = 6
)

func (*NodeStatus) String

func (s *NodeStatus) String() string

String returns a textual representation of a node status

type NodeVPU

type NodeVPU struct {
	// ID of the VPU
	ID uint64 `json:"id" yaml:"id"`
	// Type of the VPU. Valid values are: unknown, netint
	Type string `json:"type" yaml:"type"`
	// Model name of the VPU
	Model string `json:"model" yaml:"model"`
	// NUMA node the card sits on
	NUMANode uint64 `json:"numa_node" yaml:"numa_node"`
	// Number of slots available on the VPU
	Slots int `json:"slots" yaml:"slots"`
	// Map of current allocations on the VPU
	Allocations map[string]NodeVPUAllocation `json:"allocations" yaml:"allocations"`
}

NodeVPU describes a single independent VPU available on a node

swagger:model

type NodeVPUAllocation

type NodeVPUAllocation struct {
	// VPU IDs the allocation is for
	IDs []uint64 `json:"ids" yaml:"ids"`
	// Number of slots used by this allocation
	Slots int `json:"slots" yaml:"slots"`
}

NodeVPUAllocation describes a single allocation for a VPU

swagger:model

type NodesPost

type NodesPost struct {
	// Name of the node
	// Example: lxd0
	Name string `json:"name"`
	// Internal IP address of the node
	// Example: 10.0.0.1
	// swagger:strfmt ipv4
	Address string `json:"address"`
	// Public IP address of the node
	// Example: 10.0.0.1
	// swagger:strfmt ipv4
	PublicAddress string `json:"public_address"`
	// Trust password for the LXD instance
	// Example: sUp3rs3cr3t
	TrustPassword string `json:"trust_password"`
	// MTU for the configured network bridge on LXD
	// Example: 1500
	NetworkBridgeMTU int `json:"network_bridge_mtu"`
	// Storage device to use for configuring LXD storage pools
	// Example: /dev/sdb
	StorageDevice string `json:"storage_device"`
	// Number of CPUs on the node
	// Example: 4
	CPUs int `json:"cpus"`
	// CPU allocation rate for the node
	// Example: 4
	CPUAllocationRate float32 `json:"cpu_allocation_rate"`
	// Memory (in GB) of the node
	// Example: 8GB
	Memory string `json:"memory"`
	// Memory allocation rate for the node
	// Example: 2
	MemoryAllocationRate float32 `json:"memory_allocation_rate"`
	// Number of GPU slots to configure on the node
	// Example: 2
	GPUSlots int `json:"gpu_slots"`
	// Number of GPU encoder slots to configure on the node
	// Example: 4
	GPUEncoderSlots int `json:"gpu_encoder_slots" yaml:"gpu_encoder_slots"`
	// Tags to attach to the node
	// Example: ["created_by=anbox", "gpu=nvidia"]
	Tags []string `json:"tags" yaml:"tags"`
	// Flag used to control if AMS can manage the LXD node
	// Example: false
	Unmanaged bool `json:"unmanaged" yaml:"unmanaged"`
	// Name of the storage pool to use for configuring the LXD node
	// Example: default
	StoragePool string `json:"storage_pool" yaml:"storage_pool"`
	// Name of the network bridge to create on the LXD node
	// Example: amsbr0
	NetworkName string `json:"network_name" yaml:"network_name"`
	// CIDR of the subnet to configure for the network bridge on LXD
	// Example: 10.0.0.0/24
	// swagger:strfmt ipv4
	NetworkSubnet string `json:"network_subnet" yaml:"network_subnet"`
	// Name of the network ACL to create on the LXD node
	// Example: ams0
	NetworkACLName string `json:"network_acl_name" yaml:"network_acl_name"`
}

NodesPost describes a request to create a new node on AMS

swagger:model

type RegistryApplication

type RegistryApplication struct {
	Name          string                              `json:"name" yaml:"name"`
	Architectures []string                            `json:"architectures" yaml:"architectures"`
	BootPackage   string                              `json:"boot_package" yaml:"boot_package"`
	InstanceType  string                              `json:"instance_type" yaml:"instance_type"`
	Tags          []string                            `json:"tags" yaml:"tags"`
	Versions      map[int]*RegistryApplicationVersion `json:"versions" yaml:"versions"`
	VM            bool                                `json:"vm" yaml:"vm"`
}

RegistryApplication describes a single application available in the registry

type RegistryApplicationBootstrap

type RegistryApplicationBootstrap struct {
	Keep []string `json:"keep" yaml:"keep"`
}

RegistryApplicationBootstrap describes the fields used to configure the application bootstrap

type RegistryApplicationHooks

type RegistryApplicationHooks struct {
	Timeout string `json:"timeout" yaml:"timeout"`
}

RegistryApplicationHooks describes the fields used to configure the hooks of an application

type RegistryApplicationVersion

type RegistryApplicationVersion struct {
	BootActivity string                       `json:"boot_activity" yaml:"boot_activity"`
	Features     []string                     `json:"features" yaml:"features"`
	Hooks        RegistryApplicationHooks     `json:"hooks" yaml:"hooks"`
	Bootstrap    RegistryApplicationBootstrap `json:"bootstrap" yaml:"bootstrap"`
	VideoEncoder string                       `json:"video_encoder" yaml:"video_encoder"`
}

RegistryApplicationVersion describes a version of an application available in the registry

type ServiceStatus

type ServiceStatus struct {
	// List of supported features for the service version running
	// Example: ["addon_restore_hook", "container_logs", "registry"]
	APIExtensions []string `json:"api_extensions" yaml:"api_extensions"`
	// Shows the API stability status
	// Example: stable
	APIStatus string `json:"api_status" yaml:"api_status"`
	// API version for the service
	// Example: 1.0
	APIVersion string `json:"api_version" yaml:"api_version"`
	// Used to see if the client is trusted. Can be `trusted` or `untrusted`.
	// Example: untrusted
	Auth string `json:"auth" yaml:"auth"`
	// Authentication method used for the requests.
	// Example: 2waySSL
	AuthMethods []string `json:"auth_methods" yaml:"auth_methods"`

	// ID of the subcluster the AMS instance is part of
	// Example: cilsreunfpfec9b1ktg0
	ClusterID string `json:"cluster_id" yaml:"cluster_id"`
	// Name of the subcluster the AMS instance is part of
	// Example: prod0
	ClusterName string `json:"cluster_name" yaml:"cluster_name"`
}

ServiceStatus represents the status of the AMS service

swagger:model ServiceStatus

type Task

type Task struct {
	// ID of the task
	// Example: c055dl0j1qm027422feg
	ID string `json:"id"`
	// Status of the task
	// Enum: created,prepared,started,running,stopped,shutdown,completed,error,deleted,unknown
	// Example: running
	Status string `json:"status"`
	// ID of the object that the task is operating on
	// Example: c055dl0j1qm027422fe0
	ObjectID string `json:"object_id"`
	// Type of the object that the task is operating on
	// Example: container
	ObjectType string `json:"object_type"`
}

Task is the scheduling unit AMS uses for container launches

swagger:model

type TaskStatus

type TaskStatus int

TaskStatus holds the status of a task

const (
	// TaskStatusUnknown is the status of a task when its real status is unknown
	TaskStatusUnknown TaskStatus = -1
	// TaskStatusCreated is the status of a task when it was created by the orchestrator
	// but not processed any further.
	TaskStatusCreated TaskStatus = 0
	// TaskStatusAssigned is the status of a task when it got assigned to a worker which
	// will process it.
	TaskStatusAssigned TaskStatus = 1
	// TaskStatusPrepared is the status of a task when all necessary resources for the
	// associated container are allocated
	TaskStatusPrepared TaskStatus = 2
	// TaskStatusStarted is the status of a task when the associated container was started
	// and is starting up.
	TaskStatusStarted TaskStatus = 3
	// TaskStatusRunning is the status of a task when the associated container is up and running
	TaskStatusRunning TaskStatus = 4
	// TaskStatusShutdown is the status of a task when its in the process of shutting down.
	TaskStatusShutdown TaskStatus = 5
	// TaskStatusStopped is the status of a task when the associated container got stopped.
	TaskStatusStopped TaskStatus = 6
	// TaskStatusCompleted is the status of a task when all operations are completed.
	TaskStatusCompleted TaskStatus = 7
	// TaskStatusError is the status of a task when an error occurred.
	TaskStatusError TaskStatus = 8
	// TaskStatusDeleted is the status of a task when it and its associated container should
	// be deleted.
	TaskStatusDeleted TaskStatus = 9
)

func (TaskStatus) String

func (s TaskStatus) String() string

String returns the textual representation of the task status

type VersionGet

type VersionGet struct {
	Version string `json:"version"`
}

VersionGet is the JSON response from the API version request method

swagger:model

type VideoEncoderType

type VideoEncoderType string

VideoEncoderType describes the type of a video encoder is used by an application

const (
	// VideoEncoderTypeGPU describes a GPU-based video encoder
	VideoEncoderTypeGPU VideoEncoderType = "gpu"
	// VideoEncoderTypeGPUPreferred describes a gpu preferred video encoder if the video
	// encoder slots is not filled up, otherwise it fallbacks to software video encoder.
	VideoEncoderTypeGPUPreferred VideoEncoderType = "gpu-preferred"
	// VideoEncoderTypeSoftware describes a software-based video encoder
	VideoEncoderTypeSoftware VideoEncoderType = "software"
	// VideoEncoderTypeVPU describes a VPU based video encoder
	VideoEncoderTypeVPU VideoEncoderType = "vpu"
	// VideoEncoderTypeUnknown describes a unknown video encoder
	VideoEncoderTypeUnknown VideoEncoderType = "unknown"
)

func VideoEncoderFromString

func VideoEncoderFromString(value string) VideoEncoderType

VideoEncoderFromString return a video encode type from the given value

Jump to

Keyboard shortcuts

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