Documentation
¶
Index ¶
- func AskSimpleConfirmation(message string, skipPrompt bool) (bool, error)
- func ContainsString(slice []string, item string) bool
- func ContainsStringIgnoreCase(slice []string, item string) bool
- func FilterByPattern(items []string, pattern string) []string
- func FilterByType(records interface{}, types []string) interface{}
- func InferDomainAndName(client *inwx.Client, ctx context.Context, hostname string) (domain, name string, err error)
- func MatchWildcard(pattern, text string) bool
- func ValidateDomain(domain string) error
- func ValidateEmail(email string) error
- func ValidateHostname(hostname string) error
- func ValidatePort(port int) error
- func ValidatePriority(priority int) error
- func ValidateRecordContent(recordType, content string) error
- func ValidateRecordType(recordType string) error
- func ValidateTTL(ttl int) error
- func ValidateWeight(weight int) error
- type ConfirmationResult
- type GracefulShutdown
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskSimpleConfirmation ¶
func ContainsString ¶
func FilterByPattern ¶
func FilterByType ¶
func FilterByType(records interface{}, types []string) interface{}
func InferDomainAndName ¶
func InferDomainAndName(client *inwx.Client, ctx context.Context, hostname string) (domain, name string, err error)
InferDomainAndName attempts to infer the domain and record name from a qualified hostname
func MatchWildcard ¶
func ValidateDomain ¶
func ValidateEmail ¶
func ValidateHostname ¶
func ValidatePort ¶
func ValidatePriority ¶
func ValidateRecordContent ¶
func ValidateRecordType ¶
func ValidateTTL ¶
func ValidateWeight ¶
Types ¶
type ConfirmationResult ¶
type ConfirmationResult int
const ( ConfirmationYes ConfirmationResult = iota ConfirmationNo ConfirmationAll ConfirmationCancel )
func AskConfirmation ¶
func AskConfirmation(message string, skipPrompt bool) (ConfirmationResult, error)
type GracefulShutdown ¶
type GracefulShutdown struct {
// contains filtered or unexported fields
}
func NewGracefulShutdown ¶
func NewGracefulShutdown() *GracefulShutdown
func (*GracefulShutdown) AddShutdownFunc ¶
func (gs *GracefulShutdown) AddShutdownFunc(fn func() error)
func (*GracefulShutdown) Context ¶
func (gs *GracefulShutdown) Context() context.Context
func (*GracefulShutdown) Start ¶
func (gs *GracefulShutdown) Start()
func (*GracefulShutdown) Wait ¶
func (gs *GracefulShutdown) Wait()
Click to show internal directories.
Click to hide internal directories.