Browse Source

zones: annotate Machine for JSON encoding

Signed-off-by: Alejandro Mery <amery@jpi.io>
pull/1/head
Alejandro Mery 10 months ago
parent
commit
c0e2ae9bf1
  1. 10
      pkg/zones/machine.go

10
pkg/zones/machine.go

@ -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
}

Loading…
Cancel
Save