options

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package options contains the options (and default values) used to configure DNS and Certificate management

Index

Constants

This section is empty.

Variables

View Source
var DefaultLogger logging.Logger

DefaultLogger is the default Logger

View Source
var DefaultStorage storage.Storage

DefaultStorage is the default Storage

View Source
var DefaultTrustedNameServers = []string{
	"8.8.8.8:53",
	"8.8.4.4:53",
	"1.1.1.1:53",
	"1.0.0.1:53",
}

DefaultTrustedNameServers is the default TrustedNameServers

Functions

This section is empty.

Types

type Option

type Option func(opts *Options)

Option is used to generate options internally

func WithLogger

func WithLogger(logger logging.Logger) Option

WithLogger sets the logger

func WithOptions

func WithOptions(options Options) Option

WithOptions allows users to pass in an Options struct

func WithStorage

func WithStorage(storage storage.Storage) Option

WithStorage sets the storage

func WithTrustedNameservers

func WithTrustedNameservers(trustedNameservers []string) Option

WithTrustedNameservers sets the TrustedNameservers

type Options

type Options struct {
	Logger             logging.Logger
	Storage            storage.Storage
	TrustedNameServers []string
}

Options is used to provide configuration options.

Default Values:

	options := Options {
		Logger: DefaultLogger,
     Storage: DefaultStorage,
	    TrustedNameServers: DefaultTrustedNameServers,
	}

func LoadOptions

func LoadOptions(options ...Option) *Options

LoadOptions takes a variadic number of Option variables and returns a *Options struct that contains default sanitized values.

Jump to

Keyboard shortcuts

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