Files
formae-plugin-proxmox/types.go
ManInDark 728bf709cf
Some checks failed
CI / build (push) Failing after 3m29s
CI / lint (push) Failing after 3m2s
CI / pkl-validate (push) Successful in 14s
CI / integration-tests (push) Has been skipped
CI / conformance-tests (latest) (push) Has been skipped
feat: add onboot
2026-02-04 23:24:43 +01:00

81 lines
1.9 KiB
Go

package main
import "encoding/json"
type TargetConfig struct {
URL string `json:"url"`
NODE string `json:"node"`
}
type LXCProperties struct {
VMID string `json:"vmid"`
Hostname string `json:"hostname"`
Description string `json:"description,omitempty"`
OSTemplate string `json:"ostemplate,omitempty"`
Cores int `json:"cores"`
Memory int `json:"memory"`
OnBoot int `json:"onboot"`
}
type ReadRequest struct {
NativeID string
ResourceType string
TargetConfig json.RawMessage
}
type UpdateRequest struct {
NativeID string
ResourceType string
PriorProperties json.RawMessage
DesiredProperties json.RawMessage
TargetConfig json.RawMessage
}
type DeleteRequest struct {
NativeID string
ResourceType string
TargetConfig json.RawMessage
}
type ListRequest struct {
ResourceType string
TargetConfig json.RawMessage
PageSize int32
PageToken *string
AdditionalProperties map[string]string
}
type StatusLXCGeneral struct {
Status string `json:"status"`
NetIn int `json:"netin"`
NetOut int `json:"netout"`
MaxDisk int `json:"maxdisk"`
Cpus int `json:"cpus"`
Name string `json:"name"`
Memory int `json:"maxmem"`
VMID int `json:"vmid"`
Type string `json:"type"`
Swap int `json:"maxswap"`
}
type StatusGeneralResponse struct {
Data []StatusLXCGeneral `json:"data"`
}
type StatusLXCConfig struct {
Arch string `json:"arch"`
Cores int `json:"cores"`
OSType string `json:"ostype"`
RootFS string `json:"rootfs"`
Hostname string `json:"hostname"`
Memory int `json:"memory"`
Swap int `json:"swap"`
Description string `json:"description"`
Digest string `json:"digest"`
OnBoot int `json:"onboot"`
}
type StatusLXCConfigResponse struct {
Data StatusLXCConfig `json:"data"`
}