zones: annotate Machine for JSON encoding
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -5,16 +5,20 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// revive:disable:line-length-limit
|
||||||
|
|
||||||
// A Machine is a machine on a Zone
|
// A Machine is a machine on a Zone
|
||||||
type Machine struct {
|
type Machine struct {
|
||||||
zone *Zone
|
zone *Zone
|
||||||
ID int
|
ID int
|
||||||
Name string `toml:"name" yaml:"-"`
|
Name string `toml:"name" json:"-" yaml:"-"`
|
||||||
|
|
||||||
PublicAddresses []netip.Addr `toml:"public,omitempty" yaml:"public,omitempty"`
|
PublicAddresses []netip.Addr `toml:"public,omitempty" json:"public,omitempty" yaml:"public,omitempty"`
|
||||||
Rings []*RingInfo `toml:"rings,omitempty" yaml:"rings,omitempty"`
|
Rings []*RingInfo `toml:"rings,omitempty" json:"rings,omitempty" yaml:"rings,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// revive:enable:line-length-limit
|
||||||
|
|
||||||
func (m *Machine) String() string {
|
func (m *Machine) String() string {
|
||||||
return m.Name
|
return m.Name
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user