Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PanicIfError ¶
func PanicIfError(e error)
PanicIfError is just a wrapper to a panic call that propagates error when it's not nil
Types ¶
type DNSManager ¶
type DNSManager interface { // GetDNSRecords retrieves all the dns records being managed GetDNSRecords() ([]DNSRecord, error) // GetDNSRecord retrieves the dns record identified by name GetDNSRecord(name, recordType string) (*DNSRecord, error) // RemoveDNSRecord removes a DNS record RemoveDNSRecord(name, recordType string) error // AddDNSRecord adds a new DNS record AddDNSRecord(record DNSRecord) error // UpdateDNSRecord updates an existing DNS record UpdateDNSRecord(record DNSRecord) error }
DNSManager defines the operations a DNS Manager provider should implement
type DNSRecord ¶
type DNSRecord struct { // Name the DNS host name Name string `json:"name"` // Value the value of this record Value string `json:"value"` // Type the record type Type string `json:"type"` }
DNSRecord defines what we understand as a DNSRecord
type Error ¶
type Error struct { Message string `json:"message"` Code int `json:"code"` Details []string `json:"details,omitempty"` Err error `json:"-"` }
Error groups together information that defines an error. Should always be used to
func BadRequestError ¶
BadRequestError create an Error instance with http.StatusBadRequest code
func InternalServerError ¶
BadRequestError create an Error instance with http.StatusInternalServerError code
func NotFoundError ¶
BadRequestError create an Error instance with http.StatusNotFound code
Click to show internal directories.
Click to hide internal directories.