Files
orchard/pkg/resource/v1/connection_target.go
T
edi-oai 3fe0a284c5 Add endpoint support (#478)
* Add endpoint support

* Document endpoint network exposure
2026-09-02 16:08:39 +01:00

21 lines
442 B
Go

package v1
import "fmt"
type ConnectionTarget struct {
VM *ConnectionTargetVM `json:"vm,omitempty"`
}
type ConnectionTargetVM struct {
Port uint16 `json:"port"`
}
//nolint:err113,perfsprint // preserve validation errors exposed to API clients
func (target ConnectionTarget) Validate() error {
if target.VM == nil || target.VM.Port == 0 {
return fmt.Errorf("a VM connection target with a non-zero port is required")
}
return nil
}