dto

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindMount

type BindMount struct {
	Source      string `json:"source"`      // Host path
	Destination string `json:"destination"` // Container path
	ReadOnly    bool   `json:"readonly,omitempty"`
}

type ContainerStatus added in v0.1.8

type ContainerStatus string
const (
	ContainerStatusStart        ContainerStatus = "start"
	ContainerStatusStartFaailed ContainerStatus = "start_failed"
	ContainerStatusStop         ContainerStatus = "stop"
	ContainerStatusStopFailed   ContainerStatus = "stop_failed"
)

type CpuArch

type CpuArch uint8

CpuArch represents the type of CPU architecture

const (
	X86 CpuArch = iota
	X64
	Arm2
	Arm3
	Arm4T
	Arm5
	Arm6T2
	Arm6
	Arm7
	Arm7a
	Arm7r
	Arm7s
	Arm64
	Mips
	SuperH
	Ppc
	Ppc64
	Sparc
	M68k
	OtherArch
)

type CpuCFS

type CpuCFS struct {
	CpuQuota  int64  `json:"quota"`
	CpuPeriod uint64 `json:"period"`
}

type CreateContainerRequest

type CreateContainerRequest struct {
	Image       string         `json:"image"`
	MountVolume *[]MountVolume `json:"mount_volume,omitempty"`
	BindMounts  []BindMount    `json:"bind_mounts,omitempty"`
	Env         []string       `json:"env,omitempty"`
	Quotas      *Quotas        `json:"quotas,omitempty"`
	Entrypoint  *string        `json:"entrypoint,omitempty"`
	Args        []string       `json:"args,omitempty"`
	WorkingDir  *string        `json:"working_dir,omitempty"`
}

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

type FileDataResponse

type FileDataResponse struct {
	Data   string `json:"data"`
	EndPos int64  `json:"end_pos"`
}

type Image

type Image struct {
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type ImagesResponse

type ImagesResponse []Image

type LoadDeployment

type LoadDeployment struct {
	LoadName         string                  `json:"load_name"`
	DeploymentId     string                  `json:"deployment_id"`
	DeploymentStatus common.DeploymentStatus `json:"deployment_status"`
	Driver           string                  `json:"driver"`
	DriverConfig     any                     `json:"driver_config"`
	Metadata         any                     `json:"metadata,omitempty"`
}

type LoadInfo

type LoadInfo struct {
	Name         string `json:"name"`
	Node         string `json:"node"`
	Driver       string `json:"driver"`
	DriverConfig any    `json:"driver_config"`
}

type LoadsDeployments

type LoadsDeployments []LoadDeployment

type LoadsInfo

type LoadsInfo []LoadInfo

type MountVolume

type MountVolume struct {
	VolumeMountPoint string  `json:"volume_mount_point"`
	VolumeSize       *string `json:"volume_size,omitempty"`
}

type NetworkConfig

type NetworkConfig struct {
	Mode    string    `json:"mode,omitempty"`    // Network mode: "bridge" (default) or "host"
	Network string    `json:"network,omitempty"` // Network name (only used in bridge mode)
	IPMasq  bool      `json:"ip_masq,omitempty"`
	DNS     bool      `json:"dns,omitempty"`
	PortMap []Portmap `json:"portmap,omitempty"`
}

type NodeImagesMapResponse

type NodeImagesMapResponse []NodeImagesResponse

type NodeImagesResponse

type NodeImagesResponse struct {
	Node   string         `json:"node"`
	Images ImagesResponse `json:"images,omitempty"`
	Error  string         `json:"error,omitempty"`
}

type NodeResponse added in v0.1.2

type NodeResponse struct {
	State  common.NodeState  `json:"state"`
	Status common.NodeStatus `json:"status"`
}

type OsKind

type OsKind uint8

OsKind represents the type of operating system

const (
	WindowsOs OsKind = iota
	LinuxOs
	AndroidOs
	AppleOs
	UnixOs
	PosixOs
	OtherOs
)

type Portmap

type Portmap struct {
	HostPort      uint16 `json:"host_port"`
	ContainerPort uint16 `json:"container_port"`
	Protocol      string `json:"protocol"`
}

type ProvisionLoadInfo added in v0.1.2

type ProvisionLoadInfo struct {
	DeploymentId string `json:"deployment_id"`
}

type Quotas

type Quotas struct {
	MemLimit  *uint64 `json:"mem_limit,omitempty"` // Megabytes
	CpuCFS    *CpuCFS `json:"cpu_cfs,omitempty"`
	CpuShares *uint64 `json:"cpu_shares,omitempty"`
}

type RestartNodeRequest

type RestartNodeRequest struct {
	WallMessage string  `json:"wall_message"`
	Time        uint32  `json:"time"`
	NodeName    *string `json:"node_name,omitempty"`
}

type StopNodeRequest added in v0.1.5

type StopNodeRequest struct {
	WallMessage string  `json:"wall_message"`
	Time        uint32  `json:"time"`
	NodeName    *string `json:"node_name,omitempty"`
	Force       bool    `json:"force"`
}

type SystemInfo

type SystemInfo struct {
	OsName            string  `json:"os_name"`              // Name of the OS, reported by the OS
	OsKind            OsKind  `json:"os_kind"`              // Kind of OS
	OsArch            CpuArch `json:"os_arch"`              // CPU architecture
	SysVendor         string  `json:"sys_vendor"`           // System vendor string
	NetDefaultGateway string  `json:"net_default_gateway"`  // Default network gateway
	NetHostName       string  `json:"net_host_name"`        // Network name of this host
	NetDomainName     string  `json:"net_domain_name"`      // Domain name of this host
	NetPrimaryDns     string  `json:"net_primary_dns"`      // Primary network DNS
	NetSecondaryDns   string  `json:"net_secondary_dns"`    // Secondary network DNS
	NetPrimaryIpAddr  string  `json:"net_primary_ip_addr"`  // Primary IP address
	NetMacAddress     string  `json:"net_mac_address"`      // Primary MAC address
	CpuModel          string  `json:"cpu_model"`            // CPU model string
	CpuStartTime      int64   `json:"cpu_start_time"`       // Time when the CPU got powered (Unix timestamp in nanoseconds)
	CpuTotalCores     uint32  `json:"cpu_total_cores"`      // Number of cores of the CPU
	CpuCoresPerSocket uint32  `json:"cpu_cores_per_socket"` // Number of cores per socket
	CpuTotalSockets   uint32  `json:"cpu_total_sockets"`    // Number of sockets
	CpuVendor         string  `json:"cpu_vendor"`           // CPU vendor string
	CpuMhz            uint32  `json:"cpu_mhz"`              // Maximum CPU frequency in Megahertz
	RamTotal          uint64  `json:"ram_total"`            // Total available RAM in bytes
}

SystemInfo contains static information about a computer

Jump to

Keyboard shortcuts

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