Documentation
¶
Index ¶
- func CreateDomains(args CreateDomainsArgs) error
- func ExecuteDSL(args ExecuteDSLArgs) (*models.DNSConfig, error)
- func FmtFile(args FmtArgs) error
- func GetDNSConfig(args GetDNSConfigArgs) (*models.DNSConfig, error)
- func GetZone(args GetZoneArgs) error
- func InitializeProviders(cfg *models.DNSConfig, providerConfigs map[string]map[string]string, ...) (notify notifications.Notifier, err error)
- func NewCmdZoneCache() *cmdZoneCache
- func PInitializeProviders(cfg *models.DNSConfig, providerConfigs map[string]map[string]string, ...) (notify notifications.Notifier, err error)
- func PPreview(args PPreviewArgs) error
- func PPush(args PPushArgs) error
- func PrintIR(args PrintIRArgs) error
- func PrintJSON(args PrintJSONArgs, config *models.DNSConfig) (err error)
- func PrintValidationErrors(errs []error) (fatal bool)
- func Run(v string) int
- func WriteTypes(args TypesArgs) error
- type CheckArgs
- type CreateDomainsArgs
- type ExecuteDSLArgs
- type FilterArgs
- type FmtArgs
- type GetCredentialsArgs
- type GetDNSConfigArgs
- type GetZoneArgs
- type PPreviewArgs
- type PPushArgs
- type PrintIRArgs
- type PrintJSONArgs
- type ReportItem
- type TypesArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDomains ¶
func CreateDomains(args CreateDomainsArgs) error
CreateDomains contains all data/flags needed to run create-domains, independently of CLI.
func ExecuteDSL ¶
func ExecuteDSL(args ExecuteDSLArgs) (*models.DNSConfig, error)
ExecuteDSL executes the dnsconfig.js contents.
func GetDNSConfig ¶
func GetDNSConfig(args GetDNSConfigArgs) (*models.DNSConfig, error)
GetDNSConfig reads the json-formatted IR file. Or executes javascript. All depending on flags provided.
func GetZone ¶
func GetZone(args GetZoneArgs) error
GetZone contains all data/flags needed to run get-zones, independently of CLI.
func InitializeProviders ¶
func InitializeProviders(cfg *models.DNSConfig, providerConfigs map[string]map[string]string, notifyFlag bool) (notify notifications.Notifier, err error)
InitializeProviders takes (fully processed) configuration and instantiates all providers and returns them.
func NewCmdZoneCache ¶ added in v4.22.0
func NewCmdZoneCache() *cmdZoneCache
NewCmdZoneCache creates a zoneCache.
func PInitializeProviders ¶ added in v4.9.0
func PInitializeProviders(cfg *models.DNSConfig, providerConfigs map[string]map[string]string, notifyFlag bool) (notify notifications.Notifier, err error)
PInitializeProviders takes (fully processed) configuration and instantiates all providers and returns them.
func PPreview ¶ added in v4.9.0
func PPreview(args PPreviewArgs) error
PPreview implements the preview subcommand.
func PrintJSON ¶
func PrintJSON(args PrintJSONArgs, config *models.DNSConfig) (err error)
PrintJSON outputs/prettyprints the IR data.
func PrintValidationErrors ¶
PrintValidationErrors formats and prints the validation errors and warnings.
Types ¶
type CheckArgs ¶
type CheckArgs struct {
GetDNSConfigArgs
}
CheckArgs encapsulates the flags/arguments for the check command.
type CreateDomainsArgs ¶
type CreateDomainsArgs struct {
GetDNSConfigArgs
GetCredentialsArgs
}
CreateDomainsArgs args required for the create-domain subcommand.
type ExecuteDSLArgs ¶
type ExecuteDSLArgs struct {
JSFile string
JSONFile string
DevMode bool
Variable cli.StringSlice
}
ExecuteDSLArgs are used anytime we need to read and execute dnscontrol DSL
type FilterArgs ¶
FilterArgs encapsulates the flags/args for sub-commands that can filter by provider or domain.
type GetCredentialsArgs ¶
type GetCredentialsArgs struct {
CredsFile string
}
GetCredentialsArgs encapsulates the flags/args for sub-commands that use the creds.json file.
type GetDNSConfigArgs ¶
type GetDNSConfigArgs struct {
ExecuteDSLArgs
JSONFile string
}
GetDNSConfigArgs contains what we need to get a valid dns config. Could come from parsing js, or from stored json
type GetZoneArgs ¶
type GetZoneArgs struct {
GetCredentialsArgs // Args related to creds.json
CredName string // key in creds.json
ProviderName string // provider type: BIND, GANDI_V5, etc or "-" (NB(tlim): In 4.0, this field goes away.)
ZoneNames []string // The zones to get
OutputFormat string // Output format
OutputFile string // Filename to send output ("" means stdout)
DefaultTTL int // default TTL for providers where it is unknown
}
GetZoneArgs args required for the create-domain subcommand.
type PPreviewArgs ¶ added in v4.9.0
type PPreviewArgs struct {
GetDNSConfigArgs
GetCredentialsArgs
FilterArgs
Notify bool
WarnChanges bool
ConcurMode string
ConcurMax int // Maximum number of concurrent connections
NoPopulate bool
PopulateOnPreview bool
Report string
Full bool
}
PPreviewArgs contains all data/flags needed to run preview, independently of CLI
type PPushArgs ¶ added in v4.9.0
type PPushArgs struct {
PPreviewArgs
Interactive bool
}
PPushArgs contains all data/flags needed to run push, independently of CLI
type PrintIRArgs ¶
type PrintIRArgs struct {
GetDNSConfigArgs
PrintJSONArgs
Raw bool
}
PrintIRArgs encapsulates the flags/arguments for the print-ir command.
type PrintJSONArgs ¶
PrintJSONArgs are used anytime a command may print some json
type ReportItem ¶ added in v4.4.0
type ReportItem struct {
Domain string `json:"domain"`
Corrections int `json:"corrections"`
CorrectionDetails []string `json:"correction_details,omitempty"`
Provider string `json:"provider,omitempty"`
Registrar string `json:"registrar,omitempty"`
}
ReportItem is a record of corrections for a particular domain/provider/registrar.