mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-20 16:01:36 +02:00
v0.26.0
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
type NodeConfig struct {
|
||||
Node string `json:"node"`
|
||||
VMID *int `json:"vmid"` // unset: auto discover; explicit 0: node-level route; >0: lxc/qemu resource route
|
||||
VMID *uint64 `json:"vmid"` // unset: auto discover; explicit 0: node-level route; >0: lxc/qemu resource route
|
||||
VMName string `json:"vmname,omitempty"`
|
||||
Services []string `json:"services,omitempty" aliases:"service"`
|
||||
Files []string `json:"files,omitempty" aliases:"file"`
|
||||
@@ -27,7 +27,7 @@ type Node struct {
|
||||
}
|
||||
|
||||
// Validate implements the serialization.CustomValidator interface.
|
||||
func (n *NodeConfig) Validate() gperr.Error {
|
||||
func (n *NodeConfig) Validate() error {
|
||||
var errs gperr.Builder
|
||||
for i, service := range n.Services {
|
||||
if err := checkValidInput(service); err != nil {
|
||||
@@ -42,7 +42,7 @@ func (n *NodeConfig) Validate() gperr.Error {
|
||||
return errs.Error()
|
||||
}
|
||||
|
||||
var Nodes = pool.New[*Node]("proxmox_nodes")
|
||||
var Nodes = pool.New[*Node]("proxmox_nodes", "proxmox_node")
|
||||
|
||||
func NewNode(client *Client, name, id string) *Node {
|
||||
return &Node{
|
||||
|
||||
Reference in New Issue
Block a user