Documentation
¶
Index ¶
- type CaddySyncOptions
- type SyncResult
- type SyncUI
- func (ui *SyncUI) RenderAddEntries(result *SyncResult) string
- func (ui *SyncUI) RenderChanges(result *SyncResult, entryDescription string) string
- func (ui *SyncUI) RenderDryRun() string
- func (ui *SyncUI) RenderDryRunOutput(result *SyncResult, entryDescription string) string
- func (ui *SyncUI) RenderError(err error) string
- func (ui *SyncUI) RenderFetchingMessage(ip string, port int) string
- func (ui *SyncUI) RenderHeader() string
- func (ui *SyncUI) RenderHostnameCount(count int) string
- func (ui *SyncUI) RenderHostnameList(hostnames []string) string
- func (ui *SyncUI) RenderRemoveEntries(result *SyncResult) string
- func (ui *SyncUI) RenderSummary(result *SyncResult) string
- func (ui *SyncUI) RenderUpdateDescEntries(result *SyncResult, entryDescription string) string
- func (ui *SyncUI) RenderUpdateEntries(result *SyncResult) string
- func (ui *SyncUI) RenderWarning(message string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaddySyncOptions ¶
type CaddySyncOptions struct {
DryRun bool
CaddyServerIP string
CaddyServerPort int
EntryDescription string
LegacyDescriptions []string
Verbose bool
}
CaddySyncOptions contains options for the Caddy sync operation
type SyncResult ¶
type SyncResult struct {
HostnameMap map[string]string
ToAdd []string
ToUpdate []string
ToUpdateDesc []string
ToRemove []string
ChangesApplied bool
SyncOverrides map[string]api.DNSOverride
OtherOverrides map[string]api.DNSOverride
ExistingCount int
}
SyncResult contains the results of the sync operation
func SyncCaddyWithUnbound ¶
func SyncCaddyWithUnbound( unboundClient *api.Client, options CaddySyncOptions, ) (*SyncResult, error)
SyncCaddyWithUnbound synchronizes DNS entries between Caddy and Unbound
type SyncUI ¶
type SyncUI struct {
Styles tui.StyleConfig
}
SyncUI handles the UI rendering for the sync operation
func (*SyncUI) RenderAddEntries ¶
func (ui *SyncUI) RenderAddEntries(result *SyncResult) string
RenderAddEntries renders the entries to be added
func (*SyncUI) RenderChanges ¶
func (ui *SyncUI) RenderChanges(result *SyncResult, entryDescription string) string
RenderChanges renders the changes as they are applied
func (*SyncUI) RenderDryRun ¶
RenderDryRun renders the dry run banner
func (*SyncUI) RenderDryRunOutput ¶
func (ui *SyncUI) RenderDryRunOutput(result *SyncResult, entryDescription string) string
RenderDryRunOutput renders the complete dry run output
func (*SyncUI) RenderError ¶
RenderError renders an error message
func (*SyncUI) RenderFetchingMessage ¶
RenderFetchingMessage renders a message indicating that Caddy config is being fetched
func (*SyncUI) RenderHeader ¶
RenderHeader renders the header for the sync operation
func (*SyncUI) RenderHostnameCount ¶
RenderHostnameCount renders the hostname count
func (*SyncUI) RenderHostnameList ¶
RenderHostnameList renders a list of hostnames
func (*SyncUI) RenderRemoveEntries ¶
func (ui *SyncUI) RenderRemoveEntries(result *SyncResult) string
RenderRemoveEntries renders the entries to be removed
func (*SyncUI) RenderSummary ¶
func (ui *SyncUI) RenderSummary(result *SyncResult) string
RenderSummary renders a summary of the sync operation
func (*SyncUI) RenderUpdateDescEntries ¶
func (ui *SyncUI) RenderUpdateDescEntries(result *SyncResult, entryDescription string) string
RenderUpdateDescEntries renders the entries to have their descriptions updated
func (*SyncUI) RenderUpdateEntries ¶
func (ui *SyncUI) RenderUpdateEntries(result *SyncResult) string
RenderUpdateEntries renders the entries to be updated
func (*SyncUI) RenderWarning ¶
RenderWarning renders a warning message