Documentation ¶
Index ¶
- func CreateDomains(args CreateDomainsArgs) error
- func ExecuteDSL(args ExecuteDSLArgs) (*models.DNSConfig, error)
- func GetCerts(args GetCertsArgs) error
- func GetDNSConfig(args GetDNSConfigArgs) (*models.DNSConfig, error)
- func InitializeProviders(credsFile string, cfg *models.DNSConfig, notifyFlag bool) (notify notifications.Notifier, err error)
- func Preview(args PreviewArgs) error
- func PrintIR(args PrintIRArgs) error
- func PrintJSON(args PrintJSONArgs, config *models.DNSConfig) (err error)
- func PrintValidationErrors(errs []error) (fatal bool)
- func Push(args PushArgs) error
- func Run(v string) int
- type CreateDomainsArgs
- type ExecuteDSLArgs
- type FilterArgs
- type GetCertsArgs
- type GetCredentialsArgs
- type GetDNSConfigArgs
- type PreviewArgs
- type PrintIRArgs
- type PrintJSONArgs
- type PushArgs
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 GetCerts ¶ added in v0.2.7
func GetCerts(args GetCertsArgs) error
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 InitializeProviders ¶
func InitializeProviders(credsFile string, cfg *models.DNSConfig, notifyFlag bool) (notify notifications.Notifier, err error)
InitializeProviders takes a creds file path and a DNSConfig object. Creates all providers with the proper types, and returns them. nonDefaultProviders is a list of providers that should not be run unless explicitly asked for by flags.
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 CreateDomainsArgs ¶
type CreateDomainsArgs struct { GetDNSConfigArgs GetCredentialsArgs }
CreateDomainsArgs args required for the create-domain subcommand.
type ExecuteDSLArgs ¶
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 GetCertsArgs ¶ added in v0.2.7
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 PreviewArgs ¶
type PreviewArgs struct { GetDNSConfigArgs GetCredentialsArgs FilterArgs Notify bool }
PreviewArgs contains all data/flags needed to run preview, 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 PushArgs ¶
type PushArgs struct { PreviewArgs Interactive bool }
PushArgs contains all data/flags needed to run push, independently of CLI