6e46d23b45
Signed-off-by: Alejandro Mery <amery@jpi.io>
22 lines
428 B
Go
22 lines
428 B
Go
package main
|
|
|
|
import "git.jpi.io/amery/jpictl/pkg/zones"
|
|
|
|
// Config describes the repository
|
|
type Config struct {
|
|
Base string
|
|
Domain string
|
|
}
|
|
|
|
var cfg = &Config{
|
|
Base: "./m",
|
|
Domain: "m.jpi.cloud",
|
|
}
|
|
|
|
// LoadZones loads all zones and machines in the config directory
|
|
func (cfg *Config) LoadZones(resolve bool) (*zones.Zones, error) {
|
|
return zones.New(cfg.Base, cfg.Domain,
|
|
zones.ResolvePublicAddresses(resolve),
|
|
)
|
|
}
|