zones: annotate Machine for JSON encoding

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-08-25 16:32:34 +00:00
parent 080021b427
commit c0e2ae9bf1
+7 -3
View File
@@ -5,16 +5,20 @@ import (
"strings"
)
// revive:disable:line-length-limit
// A Machine is a machine on a Zone
type Machine struct {
zone *Zone
ID int
Name string `toml:"name" yaml:"-"`
Name string `toml:"name" json:"-" yaml:"-"`
PublicAddresses []netip.Addr `toml:"public,omitempty" yaml:"public,omitempty"`
Rings []*RingInfo `toml:"rings,omitempty" yaml:"rings,omitempty"`
PublicAddresses []netip.Addr `toml:"public,omitempty" json:"public,omitempty" yaml:"public,omitempty"`
Rings []*RingInfo `toml:"rings,omitempty" json:"rings,omitempty" yaml:"rings,omitempty"`
}
// revive:enable:line-length-limit
func (m *Machine) String() string {
return m.Name
}