app

package
v0.99.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package app represent cdnscli application for work with providers API's.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	// Provider returns the default provider for interacting with DNS providers.
	Provider() providers.Provider
	// GetProvider returns a provider by name. Returns an error if the provider is not found.
	// If name is empty, returns the default provider.
	GetProvider(name string) (providers.Provider, error)
	// ProviderNames returns a list of all available provider names.
	ProviderNames() []string
	// DefaultProviderName returns the name of the default provider.
	DefaultProviderName() string
	// Printer returns a specialized API for pretty printing.
	Printer() prettyprint.PrettyPrinter
}

App its main application interface.

func New

func New(opts ...Option) (App, error)

New creates a new application instance. Various client options can be used to configure the application.

type Option

type Option func(c *app) error

Option options for app

func WithConfig

func WithConfig(cfg *config.Config) Option

WithConfig sets the application configuration

func WithOutputFormat

func WithOutputFormat(output prettyprint.OutputFormat) Option

WithOutputFormat sets an app's output format

func WithProvider

func WithProvider(providerName string) Option

WithProvider sets the provider name to use

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL