Documentation ¶
Index ¶
Constants ¶
View Source
const ( MESSAGE_WRONG_METHOD = "Wrong Method, expected GET or POST" MESSAGE_WRONG_CONTENT_TYPE = "Wrong Content-Type, expected application/json" MESSAGE_REQUEST_PARSING_FAILED = "Failed to parse the request, received wrong or malformed parameters" MESSAGE_UNAUTHORIZED = "Failed to authenticate to cloudflare" MESSAGE_DOMAINS_FORBIDDEN = "At least one of the provided domains is not allowed to be handled by this server" MESSAGE_INVALID_IP = "Either no IP or an invalid IP has been provided" MESSAGE_MISSING_DOMAIN = "No domains have been provided" MESSAGE_FAILED_UPDATE = "Failed to update the records" MESSAGE_SUCCESS = "Updated dyndns records" )
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶ added in v1.0.0
Types ¶
type RequestParams ¶
type RequestParams struct { // To maintain compatibility with https://github.com/1rfsNet/Fritz-Box-Cloudflare-DynDNS, the cf_key and domain can be used as well for token and domains when doing GET Token string `json:"token"` // Token needed for accessing cloudflare api. Domains []string `json:"domains"` // The domain to update, parsed from comma (,) separated string, needs at least 1. IPv4 string `json:"ipv4,omitempty"` // IPv4 Address, optional, when IPv6 set IPv6 string `json:"ipv6,omitempty"` // IPv6 Address, optional, when IPv4 set Proxy bool `json:"proxy,omitempty"` // Indicate if domain should be proxied, defaults to true }
Click to show internal directories.
Click to hide internal directories.