config

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: Apache-2.0, BSD-3-Clause, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const STATE_DELETED = "~DELETED~"

Variables

This section is empty.

Functions

func PrintConfigEnv

func PrintConfigEnv()

func RandStringBytes

func RandStringBytes(n int) string

Types

type CheckFunc

type CheckFunc func() (bool, error)

type Config

type Config struct {
	Providers []*ProviderConfig `json:"providers"`

	KubeConfig string
	Namespace  string
	DNSLookup  bool
	Utils      *TestUtils
}

func InitConfig

func InitConfig() *Config

func LoadConfig

func LoadConfig(filename string) (*Config, error)

type LookupFunc

type LookupFunc func(dnsname string) ([]string, error)

type ProviderConfig

type ProviderConfig struct {
	Name               string `json:"name"`
	Type               string `json:"type"`
	FinalizerType      string `json:"finalizerType,omitempty"`
	Domain             string `json:"domain"`
	ForeignDomain      string `json:"foreignDomain,omitempty"`
	SecretData         string `json:"secretData"`
	Prefix             string `json:"prefix"`
	AliasTarget        string `json:"aliasTarget,omitempty"`
	ZoneID             string `json:"zoneID"`
	PrivateDNS         bool   `json:"privateDNS,omitempty"`
	TTL                string `json:"ttl,omitempty"`
	SpecProviderConfig string `json:"providerConfig,omitempty"`

	Namespace           string
	TmpManifestFilename string
}

func (*ProviderConfig) CreateTempManifest

func (p *ProviderConfig) CreateTempManifest(basePath string, manifestTemplate *template.Template) error

func (*ProviderConfig) DeleteTempManifest

func (p *ProviderConfig) DeleteTempManifest()

func (*ProviderConfig) TTLValue

func (p *ProviderConfig) TTLValue() int

type TestUtils

type TestUtils struct {
	AwaitTimeout  time.Duration
	LookupTimeout time.Duration
	PollingPeriod time.Duration
	Namespace     string
	Verbose       bool
	// contains filtered or unexported fields
}

func CreateDefaultTestUtils

func CreateDefaultTestUtils(dnsServer string) *TestUtils

func (*TestUtils) Await

func (u *TestUtils) Await(msg string, check CheckFunc) error

func (*TestUtils) AwaitDNSEntriesDeleted

func (u *TestUtils) AwaitDNSEntriesDeleted(names ...string) error

func (*TestUtils) AwaitDNSEntriesError

func (u *TestUtils) AwaitDNSEntriesError(names ...string) error

func (*TestUtils) AwaitDNSEntriesReady

func (u *TestUtils) AwaitDNSEntriesReady(names ...string) error

func (*TestUtils) AwaitDNSProviderDeleted

func (u *TestUtils) AwaitDNSProviderDeleted(names ...string) error

func (*TestUtils) AwaitDNSProviderReady

func (u *TestUtils) AwaitDNSProviderReady(names ...string) error

func (*TestUtils) AwaitKubectlGetCRDs

func (u *TestUtils) AwaitKubectlGetCRDs(crds ...string) error

func (*TestUtils) AwaitLookup

func (u *TestUtils) AwaitLookup(dnsname string, expected ...string)

func (*TestUtils) AwaitLookupCName

func (u *TestUtils) AwaitLookupCName(dnsname, target string)

func (*TestUtils) AwaitLookupFunc

func (u *TestUtils) AwaitLookupFunc(lookup LookupFunc, dnsname string, expected ...string)

func (*TestUtils) AwaitLookupTXT

func (u *TestUtils) AwaitLookupTXT(dnsname string, expected ...string)

func (*TestUtils) AwaitState

func (u *TestUtils) AwaitState(resourceName, expectedState string, names ...string) error

func (*TestUtils) AwaitWithTimeout

func (u *TestUtils) AwaitWithTimeout(msg string, check CheckFunc, timeout time.Duration) error

func (*TestUtils) CanLookup

func (u *TestUtils) CanLookup(privateDNS bool) bool

func (*TestUtils) KubectlApply

func (u *TestUtils) KubectlApply(filename string) error

func (*TestUtils) KubectlDelete

func (u *TestUtils) KubectlDelete(filename string) error

func (*TestUtils) KubectlGetAllDNSEntries

func (u *TestUtils) KubectlGetAllDNSEntries() (map[string]interface{}, error)

func (*TestUtils) LogVerbose

func (u *TestUtils) LogVerbose(output string)

func (*TestUtils) SetTimeoutForNextAwait added in v0.7.20

func (u *TestUtils) SetTimeoutForNextAwait(timeout time.Duration)

Jump to

Keyboard shortcuts

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