Documentation ¶
Overview ¶
Copyright 2020 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
TODO: add logging TODO: add timeouts
Index ¶
- func GetBluecatGatewayToken(cfg BluecatConfig) (string, http.Cookie, error)
- func IsValidDNSDeployType(deployType string) bool
- func SplitProperties(props string) map[string]string
- type BluecatCNAMERecord
- type BluecatConfig
- type BluecatCreateCNAMERecordRequest
- type BluecatCreateHostRecordRequest
- type BluecatCreateTXTRecordRequest
- type BluecatHostRecord
- type BluecatServerFullDeployRequest
- type BluecatTXTRecord
- type BluecatZone
- type GatewayClient
- type GatewayClientConfig
- func (c GatewayClientConfig) CreateCNAMERecord(zone string, req *BluecatCreateCNAMERecordRequest) error
- func (c GatewayClientConfig) CreateHostRecord(zone string, req *BluecatCreateHostRecordRequest) error
- func (c GatewayClientConfig) CreateTXTRecord(zone string, req *BluecatCreateTXTRecordRequest) error
- func (c GatewayClientConfig) DeleteCNAMERecord(name string, zone string) (err error)
- func (c GatewayClientConfig) DeleteHostRecord(name string, zone string) (err error)
- func (c GatewayClientConfig) DeleteTXTRecord(name string, zone string) error
- func (c GatewayClientConfig) GetBluecatZones(zoneName string) ([]BluecatZone, error)
- func (c GatewayClientConfig) GetCNAMERecord(name string, record *BluecatCNAMERecord) error
- func (c GatewayClientConfig) GetCNAMERecords(zone string, records *[]BluecatCNAMERecord) error
- func (c GatewayClientConfig) GetHostRecord(name string, record *BluecatHostRecord) error
- func (c GatewayClientConfig) GetHostRecords(zone string, records *[]BluecatHostRecord) error
- func (c GatewayClientConfig) GetTXTRecord(name string, record *BluecatTXTRecord) error
- func (c GatewayClientConfig) GetTXTRecords(zone string, records *[]BluecatTXTRecord) error
- func (c GatewayClientConfig) ServerFullDeploy() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBluecatGatewayToken ¶
func GetBluecatGatewayToken(cfg BluecatConfig) (string, http.Cookie, error)
GetBluecatGatewayToken retrieves a Bluecat Gateway API token.
func IsValidDNSDeployType ¶
IsValidDNSDeployType validates the deployment type provided by a users configuration is supported by the Bluecat Provider.
func SplitProperties ¶
SplitProperties is a helper function to break a '|' separated string into key/value pairs i.e. "foo=bar|baz=mop"
Types ¶
type BluecatCNAMERecord ¶
type BluecatCNAMERecord struct { ID int `json:"id"` Name string `json:"name"` Properties string `json:"properties"` Type string `json:"type"` }
BluecatCNAMERecord defines dns CNAME record
type BluecatConfig ¶
type BluecatConfig struct { GatewayHost string `json:"gatewayHost"` GatewayUsername string `json:"gatewayUsername,omitempty"` GatewayPassword string `json:"gatewayPassword,omitempty"` DNSConfiguration string `json:"dnsConfiguration"` DNSServerName string `json:"dnsServerName"` DNSDeployType string `json:"dnsDeployType"` View string `json:"dnsView"` RootZone string `json:"rootZone"` SkipTLSVerify bool `json:"skipTLSVerify"` }
TODO: Ensure DNS Deploy Type Defaults to no-deploy instead of ""
type BluecatHostRecord ¶
type BluecatHostRecord struct { ID int `json:"id"` Name string `json:"name"` Properties string `json:"properties"` Type string `json:"type"` }
BluecatHostRecord defines dns Host record
type BluecatServerFullDeployRequest ¶
type BluecatServerFullDeployRequest struct {
ServerName string `json:"server_name"`
}
type BluecatTXTRecord ¶
type BluecatTXTRecord struct { ID int `json:"id"` Name string `json:"name"` Properties string `json:"properties"` }
BluecatTXTRecord defines dns TXT record
type BluecatZone ¶
type BluecatZone struct { ID int `json:"id"` Name string `json:"name"` Properties string `json:"properties"` Type string `json:"type"` }
BluecatZone defines a zone to hold records
type GatewayClient ¶
type GatewayClient interface { GetBluecatZones(zoneName string) ([]BluecatZone, error) GetHostRecords(zone string, records *[]BluecatHostRecord) error GetCNAMERecords(zone string, records *[]BluecatCNAMERecord) error GetHostRecord(name string, record *BluecatHostRecord) error GetCNAMERecord(name string, record *BluecatCNAMERecord) error CreateHostRecord(zone string, req *BluecatCreateHostRecordRequest) error CreateCNAMERecord(zone string, req *BluecatCreateCNAMERecordRequest) error DeleteHostRecord(name string, zone string) (err error) DeleteCNAMERecord(name string, zone string) (err error) GetTXTRecords(zone string, records *[]BluecatTXTRecord) error GetTXTRecord(name string, record *BluecatTXTRecord) error CreateTXTRecord(zone string, req *BluecatCreateTXTRecordRequest) error DeleteTXTRecord(name string, zone string) error ServerFullDeploy() error }
type GatewayClientConfig ¶
type GatewayClientConfig struct { Cookie http.Cookie Token string Host string DNSConfiguration string View string RootZone string DNSServerName string SkipTLSVerify bool }
GatewayClientConfig defines the configuration for a Bluecat Gateway Client
func NewGatewayClientConfig ¶
func NewGatewayClientConfig(cookie http.Cookie, token, gatewayHost, dnsConfiguration, view, rootZone, dnsServerName string, skipTLSVerify bool) GatewayClientConfig
NewGatewayClient creates and returns a new Bluecat gateway client
func (GatewayClientConfig) CreateCNAMERecord ¶
func (c GatewayClientConfig) CreateCNAMERecord(zone string, req *BluecatCreateCNAMERecordRequest) error
func (GatewayClientConfig) CreateHostRecord ¶
func (c GatewayClientConfig) CreateHostRecord(zone string, req *BluecatCreateHostRecordRequest) error
func (GatewayClientConfig) CreateTXTRecord ¶
func (c GatewayClientConfig) CreateTXTRecord(zone string, req *BluecatCreateTXTRecordRequest) error
func (GatewayClientConfig) DeleteCNAMERecord ¶
func (c GatewayClientConfig) DeleteCNAMERecord(name string, zone string) (err error)
func (GatewayClientConfig) DeleteHostRecord ¶
func (c GatewayClientConfig) DeleteHostRecord(name string, zone string) (err error)
func (GatewayClientConfig) DeleteTXTRecord ¶
func (c GatewayClientConfig) DeleteTXTRecord(name string, zone string) error
func (GatewayClientConfig) GetBluecatZones ¶
func (c GatewayClientConfig) GetBluecatZones(zoneName string) ([]BluecatZone, error)
func (GatewayClientConfig) GetCNAMERecord ¶
func (c GatewayClientConfig) GetCNAMERecord(name string, record *BluecatCNAMERecord) error
func (GatewayClientConfig) GetCNAMERecords ¶
func (c GatewayClientConfig) GetCNAMERecords(zone string, records *[]BluecatCNAMERecord) error
func (GatewayClientConfig) GetHostRecord ¶
func (c GatewayClientConfig) GetHostRecord(name string, record *BluecatHostRecord) error
func (GatewayClientConfig) GetHostRecords ¶
func (c GatewayClientConfig) GetHostRecords(zone string, records *[]BluecatHostRecord) error
func (GatewayClientConfig) GetTXTRecord ¶
func (c GatewayClientConfig) GetTXTRecord(name string, record *BluecatTXTRecord) error
func (GatewayClientConfig) GetTXTRecords ¶
func (c GatewayClientConfig) GetTXTRecords(zone string, records *[]BluecatTXTRecord) error
func (GatewayClientConfig) ServerFullDeploy ¶
func (c GatewayClientConfig) ServerFullDeploy() error