24f5232ff6
Signed-off-by: Alejandro Mery <amery@jpi.io>
23 lines
453 B
Go
23 lines
453 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),
|
|
zones.WithLogger(log),
|
|
)
|
|
}
|