ddosx

package
v1.3.54 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ACLGeoIPRule

type ACLGeoIPRule struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Code string `json:"code"`
}

ACLGeoIPRule represents a DDoSX ACL GeoIP rule +genie:model_response +genie:model_paginated

type ACLGeoIPRuleNotFoundError

type ACLGeoIPRuleNotFoundError struct {
	ID string
}

ACLGeoIPRuleNotFoundError indicates an ACL GeoIP rule was not found

func (*ACLGeoIPRuleNotFoundError) Error

func (e *ACLGeoIPRuleNotFoundError) Error() string

type ACLGeoIPRulesMode

type ACLGeoIPRulesMode string
const (
	ACLGeoIPRulesModeWhitelist ACLGeoIPRulesMode = "Whitelist"
	ACLGeoIPRulesModeBlacklist ACLGeoIPRulesMode = "Blacklist"
)

func ParseACLGeoIPRulesMode added in v1.0.6

func ParseACLGeoIPRulesMode(s string) (ACLGeoIPRulesMode, error)

ParseACLGeoIPRulesMode attempts to parse a ACLGeoIPRulesMode from string

func (ACLGeoIPRulesMode) String added in v1.0.6

func (s ACLGeoIPRulesMode) String() string

type ACLIPMode

type ACLIPMode string
const (
	ACLIPModeAllow ACLIPMode = "Allow"
	ACLIPModeDeny  ACLIPMode = "Deny"
)

func ParseACLIPMode

func ParseACLIPMode(s string) (ACLIPMode, error)

ParseACLIPMode attempts to parse a ACLIPMode from string

func (ACLIPMode) String

func (s ACLIPMode) String() string

type ACLIPRule

type ACLIPRule struct {
	ID   string               `json:"id"`
	IP   connection.IPAddress `json:"ip"`
	URI  string               `json:"uri"`
	Mode ACLIPMode            `json:"mode"`
}

ACLIPRule represents a DDoSX ACL IP rule +genie:model_response +genie:model_paginated

type ACLIPRuleNotFoundError

type ACLIPRuleNotFoundError struct {
	ID string
}

ACLIPRuleNotFoundError indicates an ACL IP rule was not found

func (*ACLIPRuleNotFoundError) Error

func (e *ACLIPRuleNotFoundError) Error() string

type CDNRule added in v1.0.16

type CDNRule struct {
	ID           string              `json:"id"`
	URI          string              `json:"uri"`
	CacheControl CDNRuleCacheControl `json:"cache_control"`
	// CacheControlDuration specifies the cache control duration. May be nil if duration not applicable
	CacheControlDuration CDNRuleCacheControlDuration `json:"cache_control_duration"`
	MimeTypes            []string                    `json:"mime_types"`
	Type                 CDNRuleType                 `json:"type"`
}

CDNRule represents a DDoSX CDN rule +genie:model_response +genie:model_paginated

type CDNRuleCacheControl added in v1.0.16

type CDNRuleCacheControl string
const (
	CDNRuleCacheControlCustom CDNRuleCacheControl = "Custom"
	CDNRuleCacheControlOrigin CDNRuleCacheControl = "Origin"
)

func ParseCDNRuleCacheControl added in v1.0.16

func ParseCDNRuleCacheControl(s string) (CDNRuleCacheControl, error)

ParseCDNRuleCacheControl attempts to parse a CDNRuleCacheControl from string

func (CDNRuleCacheControl) String added in v1.0.16

func (e CDNRuleCacheControl) String() string

type CDNRuleCacheControlDuration added in v1.0.16

type CDNRuleCacheControlDuration struct {
	Years   int `json:"years"`
	Months  int `json:"months"`
	Days    int `json:"days"`
	Hours   int `json:"hours"`
	Minutes int `json:"minutes"`
}

CDNRuleCacheControlDuration represents a DDoSX CDN rule duration

func ParseCDNRuleCacheControlDuration added in v1.0.22

func ParseCDNRuleCacheControlDuration(s string) (*CDNRuleCacheControlDuration, error)

ParseCDNRuleCacheControlDuration parses string s and returns a pointer to an initialised CDNRuleCacheControlDuration

func (*CDNRuleCacheControlDuration) Duration added in v1.0.18

Duration returns the cache control duration as time.Duration

func (*CDNRuleCacheControlDuration) String added in v1.0.19

func (d *CDNRuleCacheControlDuration) String() string

type CDNRuleNotFoundError added in v1.0.19

type CDNRuleNotFoundError struct {
	ID string
}

CDNRuleNotFoundError indicates a CDN rule was not found

func (*CDNRuleNotFoundError) Error added in v1.0.19

func (e *CDNRuleNotFoundError) Error() string

type CDNRuleType added in v1.0.16

type CDNRuleType string
const (
	CDNRuleTypeGlobal CDNRuleType = "global"
	CDNRuleTypePerURI CDNRuleType = "per-uri"
)

func ParseCDNRuleType added in v1.0.16

func ParseCDNRuleType(s string) (CDNRuleType, error)

ParseCDNRuleType attempts to parse a CDNRuleType from string

func (CDNRuleType) String added in v1.0.16

func (e CDNRuleType) String() string

type CreateACLGeoIPRuleRequest

type CreateACLGeoIPRuleRequest struct {
	connection.APIRequestBodyDefaultValidator

	Code string `json:"code" validate:"required"`
}

CreateACLGeoIPRuleRequest represents a DDoSX GeoIP ACL rule

func (*CreateACLGeoIPRuleRequest) Validate

Validate returns an error if struct properties are missing/invalid

type CreateACLIPRuleRequest

type CreateACLIPRuleRequest struct {
	connection.APIRequestBodyDefaultValidator

	IP   connection.IPAddress `json:"ip" validate:"required"`
	URI  string               `json:"uri"`
	Mode ACLIPMode            `json:"mode" validate:"required"`
}

CreateACLIPRuleRequest represents a DDoSX IP ACL rule

func (*CreateACLIPRuleRequest) Validate

Validate returns an error if struct properties are missing/invalid

type CreateCDNRuleRequest added in v1.0.19

type CreateCDNRuleRequest struct {
	connection.APIRequestBodyDefaultValidator

	URI                  string                       `json:"uri" validate:"required"`
	CacheControl         CDNRuleCacheControl          `json:"cache_control" validate:"required"`
	CacheControlDuration *CDNRuleCacheControlDuration `json:"cache_control_duration,omitempty"`
	MimeTypes            []string                     `json:"mime_types" validate:"required"`
	Type                 CDNRuleType                  `json:"type" validate:"required"`
}

CreateCDNRuleRequest represents a DDoSX CDN rule create request

func (*CreateCDNRuleRequest) Validate added in v1.0.19

Validate returns an error if struct properties are missing/invalid

type CreateDomainRequest

type CreateDomainRequest struct {
	connection.APIRequestBodyDefaultValidator

	Name string `json:"name" validate:"required"`
}

CreateDomainRequest represents a request to create a DDoSX domain

func (*CreateDomainRequest) Validate

Validate returns an error if struct properties are missing/invalid

type CreateHSTSRuleRequest added in v1.0.32

type CreateHSTSRuleRequest struct {
	connection.APIRequestBodyDefaultValidator

	MaxAge            int          `json:"max_age"`
	Preload           bool         `json:"preload"`
	IncludeSubdomains bool         `json:"include_subdomains"`
	Type              HSTSRuleType `json:"type" validate:"required"`
	RecordName        *string      `json:"record_name,omitempty"`
}

CreateHSTSRuleRequest represents a DDoSX HSTS rule create request

func (*CreateHSTSRuleRequest) Validate added in v1.0.32

Validate returns an error if struct properties are missing/invalid

type CreateRecordRequest

type CreateRecordRequest struct {
	connection.APIRequestBodyDefaultValidator

	Name            string     `json:"name" validate:"required"`
	SafeDNSRecordID int        `json:"safedns_record_id,omitempty"`
	SSLID           string     `json:"ssl_id,omitempty"`
	Type            RecordType `json:"type,omitempty"`
	Content         string     `json:"content,omitempty"`
}

CreateRecordRequest represents a request to create a DDoSX record

func (*CreateRecordRequest) Validate

Validate returns an error if struct properties are missing/invalid

type CreateSSLRequest

type CreateSSLRequest struct {
	connection.APIRequestBodyDefaultValidator

	FriendlyName string `json:"friendly_name" validate:"required"`
	UKFastSSLID  int    `json:"ukfast_ssl_id,omitempty"`
	Key          string `json:"key,omitempty"`
	Certificate  string `json:"certificate,omitempty"`
	CABundle     string `json:"ca_bundle,omitempty"`
}

CreateSSLRequest represents a DDoSX SSL create request

func (*CreateSSLRequest) Validate

Validate returns an error if struct properties are missing/invalid

type CreateWAFAdvancedRuleRequest

type CreateWAFAdvancedRuleRequest struct {
	connection.APIRequestBodyDefaultValidator

	Section  WAFAdvancedRuleSection  `json:"section" validate:"required"`
	Modifier WAFAdvancedRuleModifier `json:"modifier" validate:"required"`
	Phrase   string                  `json:"phrase" validate:"required"`
	IP       connection.IPAddress    `json:"ip" validate:"required"`
}

CreateWAFAdvancedRuleRequest represents a DDoSX WAF advanced rule create request

func (*CreateWAFAdvancedRuleRequest) Validate

Validate returns an error if struct properties are missing/invalid

type CreateWAFRequest

type CreateWAFRequest struct {
	connection.APIRequestBodyDefaultValidator

	Mode          WAFMode          `json:"mode" validate:"required"`
	ParanoiaLevel WAFParanoiaLevel `json:"paranoia_level" validate:"required"`
}

CreateWAFRequest represents a DDoSX WAF create request

func (*CreateWAFRequest) Validate

Validate returns an error if struct properties are missing/invalid

type CreateWAFRuleRequest

type CreateWAFRuleRequest struct {
	connection.APIRequestBodyDefaultValidator

	URI string               `json:"uri" validate:"required"`
	IP  connection.IPAddress `json:"ip" validate:"required"`
}

CreateWAFRuleRequest represents a DDoSX WAF rule create request

func (*CreateWAFRuleRequest) Validate

Validate returns an error if struct properties are missing/invalid

type DDoSXService

type DDoSXService interface {
	GetRecords(parameters connection.APIRequestParameters) ([]Record, error)
	GetRecordsPaginated(parameters connection.APIRequestParameters) (*PaginatedRecord, error)

	GetDomains(parameters connection.APIRequestParameters) ([]Domain, error)
	GetDomainsPaginated(parameters connection.APIRequestParameters) (*PaginatedDomain, error)
	GetDomain(domainName string) (Domain, error)
	CreateDomain(req CreateDomainRequest) error
	DeleteDomain(domainName string) error
	DeployDomain(domainName string) error

	GetDomainRecords(domainName string, parameters connection.APIRequestParameters) ([]Record, error)
	GetDomainRecordsPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedRecord, error)
	GetDomainRecord(domainName string, recordID string) (Record, error)
	CreateDomainRecord(domainName string, req CreateRecordRequest) (string, error)
	PatchDomainRecord(domainName string, recordID string, req PatchRecordRequest) error
	DeleteDomainRecord(domainName string, recordID string) error

	GetDomainProperties(domainName string, parameters connection.APIRequestParameters) ([]DomainProperty, error)
	GetDomainPropertiesPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedDomainProperty, error)
	GetDomainProperty(domainName string, propertyID string) (DomainProperty, error)
	PatchDomainProperty(domainName string, propertyID string, req PatchDomainPropertyRequest) error

	GetDomainWAF(domainName string) (WAF, error)
	CreateDomainWAF(domainName string, req CreateWAFRequest) error
	PatchDomainWAF(domainName string, req PatchWAFRequest) error
	DeleteDomainWAF(domainName string) error

	GetDomainWAFRuleSets(domainName string, parameters connection.APIRequestParameters) ([]WAFRuleSet, error)
	GetDomainWAFRuleSetsPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedWAFRuleSet, error)
	GetDomainWAFRuleSet(domainName string, ruleSetID string) (WAFRuleSet, error)
	PatchDomainWAFRuleSet(domainName string, ruleSetID string, req PatchWAFRuleSetRequest) error

	GetDomainWAFRules(domainName string, parameters connection.APIRequestParameters) ([]WAFRule, error)
	GetDomainWAFRulesPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedWAFRule, error)
	GetDomainWAFRule(domainName string, ruleID string) (WAFRule, error)
	CreateDomainWAFRule(domainName string, req CreateWAFRuleRequest) (string, error)
	PatchDomainWAFRule(domainName string, ruleSetID string, req PatchWAFRuleRequest) error
	DeleteDomainWAFRule(domainName string, ruleID string) error

	GetDomainWAFAdvancedRules(domainName string, parameters connection.APIRequestParameters) ([]WAFAdvancedRule, error)
	GetDomainWAFAdvancedRulesPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedWAFAdvancedRule, error)
	GetDomainWAFAdvancedRule(domainName string, ruleID string) (WAFAdvancedRule, error)
	CreateDomainWAFAdvancedRule(domainName string, req CreateWAFAdvancedRuleRequest) (string, error)
	PatchDomainWAFAdvancedRule(domainName string, ruleID string, req PatchWAFAdvancedRuleRequest) error
	DeleteDomainWAFAdvancedRule(domainName string, ruleID string) error

	GetSSLs(parameters connection.APIRequestParameters) ([]SSL, error)
	GetSSLsPaginated(parameters connection.APIRequestParameters) (*PaginatedSSL, error)
	GetSSL(sslID string) (SSL, error)
	CreateSSL(req CreateSSLRequest) (string, error)
	PatchSSL(sslID string, req PatchSSLRequest) (string, error)
	DeleteSSL(sslID string) error
	GetSSLContent(sslID string) (SSLContent, error)
	GetSSLPrivateKey(sslID string) (SSLPrivateKey, error)

	GetDomainACLGeoIPRules(domainName string, parameters connection.APIRequestParameters) ([]ACLGeoIPRule, error)
	GetDomainACLGeoIPRulesPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedACLGeoIPRule, error)
	GetDomainACLGeoIPRule(domainName string, ruleID string) (ACLGeoIPRule, error)
	CreateDomainACLGeoIPRule(domainName string, req CreateACLGeoIPRuleRequest) (string, error)
	PatchDomainACLGeoIPRule(domainName string, ruleID string, req PatchACLGeoIPRuleRequest) error
	DeleteDomainACLGeoIPRule(domainName string, ruleID string) error
	GetDomainACLGeoIPRulesMode(domainName string) (ACLGeoIPRulesMode, error)
	PatchDomainACLGeoIPRulesMode(domainName string, req PatchACLGeoIPRulesModeRequest) error

	GetDomainACLIPRules(domainName string, parameters connection.APIRequestParameters) ([]ACLIPRule, error)
	GetDomainACLIPRulesPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedACLIPRule, error)
	GetDomainACLIPRule(domainName string, ruleID string) (ACLIPRule, error)
	CreateDomainACLIPRule(domainName string, req CreateACLIPRuleRequest) (string, error)
	PatchDomainACLIPRule(domainName string, ruleID string, req PatchACLIPRuleRequest) error
	DeleteDomainACLIPRule(domainName string, ruleID string) error

	DownloadDomainVerificationFile(domainName string) (string, string, error)
	DownloadDomainVerificationFileStream(domainName string) (io.ReadCloser, string, error)
	VerifyDomainDNS(domainName string) error
	VerifyDomainFileUpload(domainName string) error

	AddDomainCDNConfiguration(domainName string) error
	DeleteDomainCDNConfiguration(domainName string) error
	CreateDomainCDNRule(domainName string, req CreateCDNRuleRequest) (string, error)
	GetDomainCDNRules(domainName string, parameters connection.APIRequestParameters) ([]CDNRule, error)
	GetDomainCDNRulesPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedCDNRule, error)
	GetDomainCDNRule(domainName string, ruleID string) (CDNRule, error)
	PatchDomainCDNRule(domainName string, ruleID string, req PatchCDNRuleRequest) error
	DeleteDomainCDNRule(domainName string, ruleID string) error
	PurgeDomainCDN(domainName string, req PurgeCDNRequest) error

	GetDomainHSTSConfiguration(domainName string) (HSTSConfiguration, error)
	AddDomainHSTSConfiguration(domainName string) error
	DeleteDomainHSTSConfiguration(domainName string) error
	CreateDomainHSTSRule(domainName string, req CreateHSTSRuleRequest) (string, error)
	GetDomainHSTSRules(domainName string, parameters connection.APIRequestParameters) ([]HSTSRule, error)
	GetDomainHSTSRulesPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedHSTSRule, error)
	GetDomainHSTSRule(domainName string, ruleID string) (HSTSRule, error)
	PatchDomainHSTSRule(domainName string, ruleID string, req PatchHSTSRuleRequest) error
	DeleteDomainHSTSRule(domainName string, ruleID string) error

	GetWAFLogs(parameters connection.APIRequestParameters) ([]WAFLog, error)
	GetWAFLogsPaginated(parameters connection.APIRequestParameters) (*PaginatedWAFLog, error)
	GetWAFLog(requestID string) (WAFLog, error)
	GetWAFLogMatches(parameters connection.APIRequestParameters) ([]WAFLogMatch, error)
	GetWAFLogMatchesPaginated(parameters connection.APIRequestParameters) (*PaginatedWAFLogMatch, error)
	GetWAFLogRequestMatches(requestID string, parameters connection.APIRequestParameters) ([]WAFLogMatch, error)
	GetWAFLogRequestMatchesPaginated(requestID string, parameters connection.APIRequestParameters) (*PaginatedWAFLogMatch, error)
	GetWAFLogRequestMatch(requestID string, matchID string) (WAFLogMatch, error)

	ActivateDomainDNSRouting(domainName string) error
	DeactivateDomainDNSRouting(domainName string) error
}

DDoSXService is an interface for managing the DDoSX service

type Domain

type Domain struct {
	SafeDNSZoneID *int               `json:"safedns_zone_id"`
	Name          string             `json:"name"`
	Status        DomainStatus       `json:"status"`
	DNSActive     bool               `json:"dns_active"`
	CDNActive     bool               `json:"cdn_active"`
	WAFActive     bool               `json:"waf_active"`
	ExternalDNS   *DomainExternalDNS `json:"external_dns"`
}

Domain represents a DDoSX domain +genie:model_response +genie:model_paginated

type DomainAlreadyVerifiedError added in v1.1.9

type DomainAlreadyVerifiedError struct {
	Name string
}

DomainAlreadyVerifiedError indicates a domain is already verified

func (*DomainAlreadyVerifiedError) Error added in v1.1.9

type DomainCDNConfigurationNotFoundError added in v1.0.19

type DomainCDNConfigurationNotFoundError struct {
	DomainName string
}

DomainCDNConfigurationNotFoundError indicates CDN configuration was not found for domain

func (*DomainCDNConfigurationNotFoundError) Error added in v1.0.19

type DomainExternalDNS

type DomainExternalDNS struct {
	Verified           bool   `json:"verified"`
	VerificationString string `json:"verification_string"`
	Target             string `json:"target"`
}

DomainExternalDNS represents a DDoSX domain external DNS configuration

type DomainHSTSConfigurationNotFoundError added in v1.0.32

type DomainHSTSConfigurationNotFoundError struct {
	DomainName string
}

DomainHSTSConfigurationNotFoundError indicates HSTS configuration was not found for domain

func (*DomainHSTSConfigurationNotFoundError) Error added in v1.0.32

type DomainNotFoundError

type DomainNotFoundError struct {
	Name string
}

DomainNotFoundError indicates a domain was not found

func (*DomainNotFoundError) Error

func (e *DomainNotFoundError) Error() string

type DomainProperty

type DomainProperty struct {
	ID    string             `json:"id"`
	Name  DomainPropertyName `json:"name"`
	Value interface{}        `json:"value"`
}

DomainProperty represents a DDoSX domain property +genie:model_response +genie:model_paginated

type DomainPropertyName added in v1.0.16

type DomainPropertyName string
const (
	DomainPropertyNameClientMaxBodySize DomainPropertyName = "client_max_body_size"
	DomainPropertyNameProxyTimeout      DomainPropertyName = "proxy_timeout"
	DomainPropertyNameIPv6Enabled       DomainPropertyName = "ipv6_enabled"
	DomainPropertyNameSecureOrigin      DomainPropertyName = "secure_origin"
)

func ParseDomainPropertyName added in v1.0.16

func ParseDomainPropertyName(s string) (DomainPropertyName, error)

ParseDomainPropertyName attempts to parse a DomainPropertyName from string

func (DomainPropertyName) String added in v1.0.16

func (e DomainPropertyName) String() string

type DomainPropertyNotFoundError

type DomainPropertyNotFoundError struct {
	ID string
}

DomainPropertyNotFoundError indicates a domain property was not found

func (*DomainPropertyNotFoundError) Error

type DomainRecordNotFoundError

type DomainRecordNotFoundError struct {
	DomainName string
	ID         string
}

DomainRecordNotFoundError indicates a Domain Record was not found

func (*DomainRecordNotFoundError) Error

func (e *DomainRecordNotFoundError) Error() string

type DomainStatus

type DomainStatus string
const (
	DomainStatusConfigured    DomainStatus = "Configured"
	DomainStatusNotConfigured DomainStatus = "Not Configured"
	DomainStatusPending       DomainStatus = "Pending"
	DomainStatusFailed        DomainStatus = "Failed"
	DomainStatusCancelling    DomainStatus = "Cancelling"
	DomainStatusCancelled     DomainStatus = "Cancelled"
)

func (DomainStatus) String

func (s DomainStatus) String() string

type DomainWAFNotFoundError

type DomainWAFNotFoundError struct {
	DomainName string
}

DomainWAFNotFoundError indicates a WAF configuration was not found for domain

func (*DomainWAFNotFoundError) Error

func (e *DomainWAFNotFoundError) Error() string

type GetACLGeoIPRuleResponseBody

type GetACLGeoIPRuleResponseBody struct {
	connection.APIResponseBody
	Data ACLGeoIPRule `json:"data"`
}

GetACLGeoIPRuleResponseBody represents an API response body containing ACLGeoIPRule data

type GetACLGeoIPRuleSliceResponseBody added in v1.3.17

type GetACLGeoIPRuleSliceResponseBody struct {
	connection.APIResponseBody
	Data []ACLGeoIPRule `json:"data"`
}

GetACLGeoIPRuleSliceResponseBody represents an API response body containing []ACLGeoIPRule data

type GetACLGeoIPRulesModeResponseBody

type GetACLGeoIPRulesModeResponseBody struct {
	connection.APIResponseBody

	Data struct {
		Mode ACLGeoIPRulesMode `json:"mode"`
	} `json:"data"`
}

GetACLGeoIPRulesModeResponseBody represents an API response body containing ACLGeoIPRulesMode data

type GetACLIPRuleResponseBody

type GetACLIPRuleResponseBody struct {
	connection.APIResponseBody
	Data ACLIPRule `json:"data"`
}

GetACLIPRuleResponseBody represents an API response body containing ACLIPRule data

type GetACLIPRuleSliceResponseBody added in v1.3.17

type GetACLIPRuleSliceResponseBody struct {
	connection.APIResponseBody
	Data []ACLIPRule `json:"data"`
}

GetACLIPRuleSliceResponseBody represents an API response body containing []ACLIPRule data

type GetCDNRuleResponseBody added in v1.0.16

type GetCDNRuleResponseBody struct {
	connection.APIResponseBody
	Data CDNRule `json:"data"`
}

GetCDNRuleResponseBody represents an API response body containing CDNRule data

type GetCDNRuleSliceResponseBody added in v1.3.17

type GetCDNRuleSliceResponseBody struct {
	connection.APIResponseBody
	Data []CDNRule `json:"data"`
}

GetCDNRuleSliceResponseBody represents an API response body containing []CDNRule data

type GetDomainPropertyResponseBody

type GetDomainPropertyResponseBody struct {
	connection.APIResponseBody
	Data DomainProperty `json:"data"`
}

GetDomainPropertyResponseBody represents an API response body containing DomainProperty data

type GetDomainPropertySliceResponseBody added in v1.3.17

type GetDomainPropertySliceResponseBody struct {
	connection.APIResponseBody
	Data []DomainProperty `json:"data"`
}

GetDomainPropertySliceResponseBody represents an API response body containing []DomainProperty data

type GetDomainResponseBody

type GetDomainResponseBody struct {
	connection.APIResponseBody
	Data Domain `json:"data"`
}

GetDomainResponseBody represents an API response body containing Domain data

type GetDomainSliceResponseBody added in v1.3.17

type GetDomainSliceResponseBody struct {
	connection.APIResponseBody
	Data []Domain `json:"data"`
}

GetDomainSliceResponseBody represents an API response body containing []Domain data

type GetHSTSConfigurationResponseBody added in v1.0.32

type GetHSTSConfigurationResponseBody struct {
	connection.APIResponseBody
	Data HSTSConfiguration `json:"data"`
}

GetHSTSConfigurationResponseBody represents an API response body containing HSTSConfiguration data

type GetHSTSConfigurationSliceResponseBody added in v1.3.17

type GetHSTSConfigurationSliceResponseBody struct {
	connection.APIResponseBody
	Data []HSTSConfiguration `json:"data"`
}

GetHSTSConfigurationSliceResponseBody represents an API response body containing []HSTSConfiguration data

type GetHSTSRuleResponseBody added in v1.0.32

type GetHSTSRuleResponseBody struct {
	connection.APIResponseBody
	Data HSTSRule `json:"data"`
}

GetHSTSRuleResponseBody represents an API response body containing HSTSRule data

type GetHSTSRuleSliceResponseBody added in v1.3.17

type GetHSTSRuleSliceResponseBody struct {
	connection.APIResponseBody
	Data []HSTSRule `json:"data"`
}

GetHSTSRuleSliceResponseBody represents an API response body containing []HSTSRule data

type GetRecordResponseBody

type GetRecordResponseBody struct {
	connection.APIResponseBody
	Data Record `json:"data"`
}

GetRecordResponseBody represents an API response body containing Record data

type GetRecordSliceResponseBody added in v1.3.17

type GetRecordSliceResponseBody struct {
	connection.APIResponseBody
	Data []Record `json:"data"`
}

GetRecordSliceResponseBody represents an API response body containing []Record data

type GetSSLContentResponseBody

type GetSSLContentResponseBody struct {
	connection.APIResponseBody
	Data SSLContent `json:"data"`
}

GetSSLContentResponseBody represents an API response body containing SSLContent data

type GetSSLContentSliceResponseBody added in v1.3.17

type GetSSLContentSliceResponseBody struct {
	connection.APIResponseBody
	Data []SSLContent `json:"data"`
}

GetSSLContentSliceResponseBody represents an API response body containing []SSLContent data

type GetSSLPrivateKeyResponseBody

type GetSSLPrivateKeyResponseBody struct {
	connection.APIResponseBody
	Data SSLPrivateKey `json:"data"`
}

GetSSLPrivateKeyResponseBody represents an API response body containing SSLPrivateKey data

type GetSSLPrivateKeySliceResponseBody added in v1.3.17

type GetSSLPrivateKeySliceResponseBody struct {
	connection.APIResponseBody
	Data []SSLPrivateKey `json:"data"`
}

GetSSLPrivateKeySliceResponseBody represents an API response body containing []SSLPrivateKey data

type GetSSLResponseBody

type GetSSLResponseBody struct {
	connection.APIResponseBody
	Data SSL `json:"data"`
}

GetSSLResponseBody represents an API response body containing SSL data

type GetSSLSliceResponseBody added in v1.3.17

type GetSSLSliceResponseBody struct {
	connection.APIResponseBody
	Data []SSL `json:"data"`
}

GetSSLSliceResponseBody represents an API response body containing []SSL data

type GetWAFAdvancedRuleResponseBody

type GetWAFAdvancedRuleResponseBody struct {
	connection.APIResponseBody
	Data WAFAdvancedRule `json:"data"`
}

GetWAFAdvancedRuleResponseBody represents an API response body containing WAFAdvancedRule data

type GetWAFAdvancedRuleSliceResponseBody added in v1.3.17

type GetWAFAdvancedRuleSliceResponseBody struct {
	connection.APIResponseBody
	Data []WAFAdvancedRule `json:"data"`
}

GetWAFAdvancedRuleSliceResponseBody represents an API response body containing []WAFAdvancedRule data

type GetWAFLogMatchResponseBody added in v1.3.16

type GetWAFLogMatchResponseBody struct {
	connection.APIResponseBody
	Data WAFLogMatch `json:"data"`
}

GetWAFLogMatchResponseBody represents an API response body containing WAFLogMatch data

type GetWAFLogMatchSliceResponseBody added in v1.3.17

type GetWAFLogMatchSliceResponseBody struct {
	connection.APIResponseBody
	Data []WAFLogMatch `json:"data"`
}

GetWAFLogMatchSliceResponseBody represents an API response body containing []WAFLogMatch data

type GetWAFLogResponseBody added in v1.3.16

type GetWAFLogResponseBody struct {
	connection.APIResponseBody
	Data WAFLog `json:"data"`
}

GetWAFLogResponseBody represents an API response body containing WAFLog data

type GetWAFLogSliceResponseBody added in v1.3.17

type GetWAFLogSliceResponseBody struct {
	connection.APIResponseBody
	Data []WAFLog `json:"data"`
}

GetWAFLogSliceResponseBody represents an API response body containing []WAFLog data

type GetWAFResponseBody

type GetWAFResponseBody struct {
	connection.APIResponseBody
	Data WAF `json:"data"`
}

GetWAFResponseBody represents an API response body containing WAF data

type GetWAFRuleResponseBody

type GetWAFRuleResponseBody struct {
	connection.APIResponseBody
	Data WAFRule `json:"data"`
}

GetWAFRuleResponseBody represents an API response body containing WAFRule data

type GetWAFRuleSetResponseBody

type GetWAFRuleSetResponseBody struct {
	connection.APIResponseBody
	Data WAFRuleSet `json:"data"`
}

GetWAFRuleSetResponseBody represents an API response body containing WAFRuleSet data

type GetWAFRuleSetSliceResponseBody added in v1.3.17

type GetWAFRuleSetSliceResponseBody struct {
	connection.APIResponseBody
	Data []WAFRuleSet `json:"data"`
}

GetWAFRuleSetSliceResponseBody represents an API response body containing []WAFRuleSet data

type GetWAFRuleSliceResponseBody added in v1.3.17

type GetWAFRuleSliceResponseBody struct {
	connection.APIResponseBody
	Data []WAFRule `json:"data"`
}

GetWAFRuleSliceResponseBody represents an API response body containing []WAFRule data

type GetWAFSliceResponseBody added in v1.3.17

type GetWAFSliceResponseBody struct {
	connection.APIResponseBody
	Data []WAF `json:"data"`
}

GetWAFSliceResponseBody represents an API response body containing []WAF data

type HSTSConfiguration added in v1.0.32

type HSTSConfiguration struct {
	Enabled bool `json:"enabled"`
}

HSTSConfiguration represents HSTS configuration for a DDoSX domain +genie:model_response

type HSTSRule added in v1.0.32

type HSTSRule struct {
	ID                string       `json:"id"`
	MaxAge            int          `json:"max_age"`
	Preload           bool         `json:"preload"`
	IncludeSubdomains bool         `json:"include_subdomains"`
	Type              HSTSRuleType `json:"type"`
	RecordName        *string      `json:"record_name"`
}

HSTSRule represents HSTS rule for a DDoSX domain +genie:model_response +genie:model_paginated

type HSTSRuleNotFoundError added in v1.0.32

type HSTSRuleNotFoundError struct {
	ID string
}

HSTSRuleNotFoundError indicates a HSTS rule was not found

func (*HSTSRuleNotFoundError) Error added in v1.0.32

func (e *HSTSRuleNotFoundError) Error() string

type HSTSRuleType added in v1.0.32

type HSTSRuleType string
const (
	HSTSRuleTypeDomain HSTSRuleType = "domain"
	HSTSRuleTypeRecord HSTSRuleType = "record"
)

func ParseHSTSRuleType added in v1.0.32

func ParseHSTSRuleType(s string) (HSTSRuleType, error)

ParseHSTSRuleType attempts to parse a HSTSRuleType from string

func (HSTSRuleType) String added in v1.0.32

func (e HSTSRuleType) String() string

type PaginatedACLGeoIPRule added in v1.1.0

type PaginatedACLGeoIPRule struct {
	*connection.PaginatedBase
	Items []ACLGeoIPRule
}

PaginatedACLGeoIPRule represents a paginated collection of ACLGeoIPRule

func NewPaginatedACLGeoIPRule added in v1.1.0

NewPaginatedACLGeoIPRule returns a pointer to an initialized PaginatedACLGeoIPRule struct

type PaginatedACLIPRule added in v1.1.0

type PaginatedACLIPRule struct {
	*connection.PaginatedBase
	Items []ACLIPRule
}

PaginatedACLIPRule represents a paginated collection of ACLIPRule

func NewPaginatedACLIPRule added in v1.1.0

NewPaginatedACLIPRule returns a pointer to an initialized PaginatedACLIPRule struct

type PaginatedCDNRule added in v1.1.0

type PaginatedCDNRule struct {
	*connection.PaginatedBase
	Items []CDNRule
}

PaginatedCDNRule represents a paginated collection of CDNRule

func NewPaginatedCDNRule added in v1.1.0

NewPaginatedCDNRule returns a pointer to an initialized PaginatedCDNRule struct

type PaginatedDomain added in v1.1.0

type PaginatedDomain struct {
	*connection.PaginatedBase
	Items []Domain
}

PaginatedDomain represents a paginated collection of Domain

func NewPaginatedDomain added in v1.1.0

NewPaginatedDomain returns a pointer to an initialized PaginatedDomain struct

type PaginatedDomainProperty added in v1.1.0

type PaginatedDomainProperty struct {
	*connection.PaginatedBase
	Items []DomainProperty
}

PaginatedDomainProperty represents a paginated collection of DomainProperty

func NewPaginatedDomainProperty added in v1.1.0

NewPaginatedDomainProperty returns a pointer to an initialized PaginatedDomainProperty struct

type PaginatedHSTSRule added in v1.1.0

type PaginatedHSTSRule struct {
	*connection.PaginatedBase
	Items []HSTSRule
}

PaginatedHSTSRule represents a paginated collection of HSTSRule

func NewPaginatedHSTSRule added in v1.1.0

NewPaginatedHSTSRule returns a pointer to an initialized PaginatedHSTSRule struct

type PaginatedRecord added in v1.1.0

type PaginatedRecord struct {
	*connection.PaginatedBase
	Items []Record
}

PaginatedRecord represents a paginated collection of Record

func NewPaginatedRecord added in v1.1.0

NewPaginatedRecord returns a pointer to an initialized PaginatedRecord struct

type PaginatedSSL added in v1.1.0

type PaginatedSSL struct {
	*connection.PaginatedBase
	Items []SSL
}

PaginatedSSL represents a paginated collection of SSL

func NewPaginatedSSL added in v1.1.0

NewPaginatedSSL returns a pointer to an initialized PaginatedSSL struct

type PaginatedWAFAdvancedRule added in v1.1.0

type PaginatedWAFAdvancedRule struct {
	*connection.PaginatedBase
	Items []WAFAdvancedRule
}

PaginatedWAFAdvancedRule represents a paginated collection of WAFAdvancedRule

func NewPaginatedWAFAdvancedRule added in v1.1.0

NewPaginatedWAFAdvancedRule returns a pointer to an initialized PaginatedWAFAdvancedRule struct

type PaginatedWAFLog added in v1.3.16

type PaginatedWAFLog struct {
	*connection.PaginatedBase
	Items []WAFLog
}

PaginatedWAFLog represents a paginated collection of WAFLog

func NewPaginatedWAFLog added in v1.3.16

NewPaginatedWAFLog returns a pointer to an initialized PaginatedWAFLog struct

type PaginatedWAFLogMatch added in v1.3.16

type PaginatedWAFLogMatch struct {
	*connection.PaginatedBase
	Items []WAFLogMatch
}

PaginatedWAFLogMatch represents a paginated collection of WAFLogMatch

func NewPaginatedWAFLogMatch added in v1.3.16

NewPaginatedWAFLogMatch returns a pointer to an initialized PaginatedWAFLogMatch struct

type PaginatedWAFRule added in v1.1.0

type PaginatedWAFRule struct {
	*connection.PaginatedBase
	Items []WAFRule
}

PaginatedWAFRule represents a paginated collection of WAFRule

func NewPaginatedWAFRule added in v1.1.0

NewPaginatedWAFRule returns a pointer to an initialized PaginatedWAFRule struct

type PaginatedWAFRuleSet added in v1.1.0

type PaginatedWAFRuleSet struct {
	*connection.PaginatedBase
	Items []WAFRuleSet
}

PaginatedWAFRuleSet represents a paginated collection of WAFRuleSet

func NewPaginatedWAFRuleSet added in v1.1.0

NewPaginatedWAFRuleSet returns a pointer to an initialized PaginatedWAFRuleSet struct

type PatchACLGeoIPRuleRequest

type PatchACLGeoIPRuleRequest struct {
	connection.APIRequestBodyDefaultValidator

	Code string `json:"code,omitempty"`
}

PatchACLGeoIPRuleRequest represents a DDoSX GeoIP ACL rule patch request

func (*PatchACLGeoIPRuleRequest) Validate

Validate returns an error if struct properties are missing/invalid

type PatchACLGeoIPRulesModeRequest

type PatchACLGeoIPRulesModeRequest struct {
	Mode ACLGeoIPRulesMode `json:"mode,omitempty"`
}

PatchACLGeoIPRulesModeRequest represents a DDoSX IP ACL rule mode patch request

func (*PatchACLGeoIPRulesModeRequest) Validate

Validate returns an error if struct properties are missing/invalid

type PatchACLIPRuleRequest

type PatchACLIPRuleRequest struct {
	IP   connection.IPAddress `json:"ip,omitempty"`
	URI  *string              `json:"uri,omitempty"`
	Mode ACLIPMode            `json:"mode,omitempty"`
}

PatchACLIPRuleRequest represents a DDoSX IP ACL rule patch request

func (*PatchACLIPRuleRequest) Validate

Validate returns an error if struct properties are missing/invalid

type PatchCDNRuleRequest added in v1.0.19

type PatchCDNRuleRequest struct {
	URI                  string                       `json:"uri,omitempty"`
	CacheControl         CDNRuleCacheControl          `json:"cache_control,omitempty"`
	CacheControlDuration *CDNRuleCacheControlDuration `json:"cache_control_duration,omitempty"`
	MimeTypes            []string                     `json:"mime_types,omitempty"`
	Type                 CDNRuleType                  `json:"type,omitempty"`
}

PatchCDNRuleRequest represents a DDoSX CDN rule patch request

func (*PatchCDNRuleRequest) Validate added in v1.0.19

Validate returns an error if struct properties are missing/invalid

type PatchDomainPropertyRequest

type PatchDomainPropertyRequest struct {
	Value interface{} `json:"value,omitempty"`
}

PatchDomainPropertyRequest represents a DDoSX Domain Property patch request

func (*PatchDomainPropertyRequest) Validate

Validate returns an error if struct properties are missing/invalid

type PatchHSTSRuleRequest added in v1.0.32

type PatchHSTSRuleRequest struct {
	MaxAge            *int  `json:"max_age,omitempty"`
	Preload           *bool `json:"preload,omitempty"`
	IncludeSubdomains *bool `json:"include_subdomains,omitempty"`
}

PatchHSTSRuleRequest represents a DDoSX HSTS rule patch request

func (*PatchHSTSRuleRequest) Validate added in v1.0.32

Validate returns an error if struct properties are missing/invalid

type PatchRecordRequest

type PatchRecordRequest struct {
	SafeDNSRecordID int        `json:"safedns_record_id,omitempty"`
	SSLID           string     `json:"ssl_id,omitempty"`
	Name            string     `json:"name,omitempty"`
	Type            RecordType `json:"type,omitempty"`
	Content         string     `json:"content,omitempty"`
}

PatchRecordRequest represents a DDoSX Record patch request

func (*PatchRecordRequest) Validate

Validate returns an error if struct properties are missing/invalid

type PatchSSLRequest

type PatchSSLRequest struct {
	FriendlyName string `json:"friendly_name,omitempty"`
	UKFastSSLID  int    `json:"ukfast_ssl_id,omitempty"`
	Key          string `json:"key,omitempty"`
	Certificate  string `json:"certificate,omitempty"`
	CABundle     string `json:"ca_bundle,omitempty"`
}

PatchSSLRequest represents a DDoSX SSL create request

func (*PatchSSLRequest) Validate

Validate returns an error if struct properties are missing/invalid

type PatchWAFAdvancedRuleRequest

type PatchWAFAdvancedRuleRequest struct {
	Section  WAFAdvancedRuleSection  `json:"section,omitempty"`
	Modifier WAFAdvancedRuleModifier `json:"modifier,omitempty"`
	Phrase   string                  `json:"phrase,omitempty"`
	IP       connection.IPAddress    `json:"ip,omitempty"`
}

PatchWAFAdvancedRuleRequest represents a DDoSX WAF advanced rule patch request

func (*PatchWAFAdvancedRuleRequest) Validate

Validate returns an error if struct properties are missing/invalid

type PatchWAFRequest

type PatchWAFRequest struct {
	Mode          WAFMode          `json:"mode,omitempty"`
	ParanoiaLevel WAFParanoiaLevel `json:"paranoia_level,omitempty"`
}

PatchWAFRequest represents a DDoSX WAF patch request

func (*PatchWAFRequest) Validate

Validate returns an error if struct properties are missing/invalid

type PatchWAFRuleRequest

type PatchWAFRuleRequest struct {
	URI string               `json:"uri,omitempty"`
	IP  connection.IPAddress `json:"ip,omitempty"`
}

PatchWAFRuleRequest represents a DDoSX WAF rule patch request

func (*PatchWAFRuleRequest) Validate

Validate returns an error if struct properties are missing/invalid

type PatchWAFRuleSetRequest

type PatchWAFRuleSetRequest struct {
	Active *bool `json:"active,omitempty"`
}

PatchWAFRuleSetRequest represents a DDoSX WAF rule set patch request

func (*PatchWAFRuleSetRequest) Validate

Validate returns an error if struct properties are missing/invalid

type PurgeCDNRequest added in v1.0.28

type PurgeCDNRequest struct {
	connection.APIRequestBodyDefaultValidator

	RecordName string `json:"record_name" validate:"required"`
	URI        string `json:"uri" validate:"required"`
}

PurgeCDNRequest represents a DDoSX CDN purge request

func (*PurgeCDNRequest) Validate added in v1.0.28

Validate returns an error if struct properties are missing/invalid

type Record

type Record struct {
	ID              string     `json:"id"`
	DomainName      string     `json:"domain_name"`
	SafeDNSRecordID *int       `json:"safedns_record_id"`
	SSLID           *string    `json:"ssl_id"`
	Name            string     `json:"name"`
	Type            RecordType `json:"type"`
	Content         string     `json:"content"`
}

Record represents a DDoSX record +genie:model_response +genie:model_paginated

type RecordNotFoundError

type RecordNotFoundError struct {
	ID string
}

RecordNotFoundError indicates a Record was not found

func (*RecordNotFoundError) Error

func (e *RecordNotFoundError) Error() string

type RecordType

type RecordType string
const (
	RecordTypeA    RecordType = "A"
	RecordTypeAAAA RecordType = "AAAA"
)

func (RecordType) String

func (s RecordType) String() string

type SSL

type SSL struct {
	ID           string   `json:"id"`
	UKFastSSLID  *int     `json:"ukfast_ssl_id"`
	Domains      []string `json:"domains"`
	FriendlyName string   `json:"friendly_name"`
}

SSL represents a DDoSX SSL +genie:model_response +genie:model_paginated

type SSLContent

type SSLContent struct {
	Certificate string `json:"certificate"`
	CABundle    string `json:"ca_bundle"`
}

SSLContent represents a DDoSX SSL content +genie:model_response

type SSLNotFoundError

type SSLNotFoundError struct {
	ID string
}

SSLNotFoundError indicates an SSL was not found

func (*SSLNotFoundError) Error

func (e *SSLNotFoundError) Error() string

type SSLPrivateKey

type SSLPrivateKey struct {
	Key string `json:"key"`
}

SSLPrivateKey represents a DDoSX SSL private key +genie:model_response

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service implements DDoSXService for managing DDoSX via the UKFast API

func NewService

func NewService(connection connection.Connection) *Service

NewService returns a new instance of Service

func (*Service) ActivateDomainDNSRouting added in v1.3.24

func (s *Service) ActivateDomainDNSRouting(domainName string) error

ActivateDomainDNSRouting activates DNS routing for a domain

func (*Service) AddDomainCDNConfiguration added in v1.0.19

func (s *Service) AddDomainCDNConfiguration(domainName string) error

AddDomainCDNConfiguration adds CDN configuration to a domain

func (*Service) AddDomainHSTSConfiguration added in v1.0.19

func (s *Service) AddDomainHSTSConfiguration(domainName string) error

AddDomainHSTSConfiguration adds HSTS headers to a domain

func (*Service) CreateDomain

func (s *Service) CreateDomain(req CreateDomainRequest) error

CreateDomain creates a new domain

func (*Service) CreateDomainACLGeoIPRule

func (s *Service) CreateDomainACLGeoIPRule(domainName string, req CreateACLGeoIPRuleRequest) (string, error)

CreateDomainACLGeoIPRule creates an ACL GeoIP rule

func (*Service) CreateDomainACLIPRule

func (s *Service) CreateDomainACLIPRule(domainName string, req CreateACLIPRuleRequest) (string, error)

CreateDomainACLIPRule creates an ACL IP rule

func (*Service) CreateDomainCDNRule added in v1.0.19

func (s *Service) CreateDomainCDNRule(domainName string, req CreateCDNRuleRequest) (string, error)

CreateDomainCDNRule creates a CDN rule

func (*Service) CreateDomainHSTSRule added in v1.0.32

func (s *Service) CreateDomainHSTSRule(domainName string, req CreateHSTSRuleRequest) (string, error)

CreateDomainHSTSRule creates a HSTS rule

func (*Service) CreateDomainRecord

func (s *Service) CreateDomainRecord(domainName string, req CreateRecordRequest) (string, error)

CreateDomainRecord creates a new record for a domain

func (*Service) CreateDomainWAF

func (s *Service) CreateDomainWAF(domainName string, req CreateWAFRequest) error

CreateDomainWAF creates the WAF configuration for a domain

func (*Service) CreateDomainWAFAdvancedRule

func (s *Service) CreateDomainWAFAdvancedRule(domainName string, req CreateWAFAdvancedRuleRequest) (string, error)

CreateDomainWAFAdvancedRule creates a WAF rule

func (*Service) CreateDomainWAFRule

func (s *Service) CreateDomainWAFRule(domainName string, req CreateWAFRuleRequest) (string, error)

CreateDomainWAFRule creates a WAF rule

func (*Service) CreateSSL

func (s *Service) CreateSSL(req CreateSSLRequest) (string, error)

CreateSSL retrieves creates an SSL

func (*Service) DeactivateDomainDNSRouting added in v1.3.24

func (s *Service) DeactivateDomainDNSRouting(domainName string) error

DeactivateDomainDNSRouting deactivates DNS routing for a domain

func (*Service) DeleteDomain added in v1.0.37

func (s *Service) DeleteDomain(domainName string) error

DeleteDomain removes a domain

func (*Service) DeleteDomainACLGeoIPRule

func (s *Service) DeleteDomainACLGeoIPRule(domainName string, ruleID string) error

DeleteDomainACLGeoIPRule deletes an ACL GeoIP rule

func (*Service) DeleteDomainACLIPRule

func (s *Service) DeleteDomainACLIPRule(domainName string, ruleID string) error

DeleteDomainACLIPRule deletes an ACL IP rule

func (*Service) DeleteDomainCDNConfiguration added in v1.0.19

func (s *Service) DeleteDomainCDNConfiguration(domainName string) error

DeleteDomainCDNConfiguration removes CDN configuration from a domain

func (*Service) DeleteDomainCDNRule added in v1.0.19

func (s *Service) DeleteDomainCDNRule(domainName string, ruleID string) error

DeleteDomainCDNRule removes a CDN rule

func (*Service) DeleteDomainHSTSConfiguration added in v1.0.19

func (s *Service) DeleteDomainHSTSConfiguration(domainName string) error

DeleteDomainHSTSConfiguration removes HSTS headers to a domain

func (*Service) DeleteDomainHSTSRule added in v1.0.32

func (s *Service) DeleteDomainHSTSRule(domainName string, ruleID string) error

DeleteDomainHSTSRule removes a HSTS rule

func (*Service) DeleteDomainRecord

func (s *Service) DeleteDomainRecord(domainName string, recordID string) error

DeleteDomainRecord deletes a single domain record by ID

func (*Service) DeleteDomainWAF

func (s *Service) DeleteDomainWAF(domainName string) error

DeleteDomainWAF deletes the WAF configuration for a domain

func (*Service) DeleteDomainWAFAdvancedRule

func (s *Service) DeleteDomainWAFAdvancedRule(domainName string, ruleID string) error

DeleteDomainWAFAdvancedRule deletees a waf advanced rule for a domain

func (*Service) DeleteDomainWAFRule

func (s *Service) DeleteDomainWAFRule(domainName string, ruleID string) error

DeleteDomainWAFRule deletes a waf rule for a domain

func (*Service) DeleteSSL

func (s *Service) DeleteSSL(sslID string) error

DeleteSSL deletes patches an SSL

func (*Service) DeployDomain

func (s *Service) DeployDomain(domainName string) error

DeployDomain deploys/commits changes to a domain

func (*Service) DownloadDomainVerificationFile

func (s *Service) DownloadDomainVerificationFile(domainName string) (content string, filename string, err error)

DownloadDomainVerificationFile downloads the verification file for a domain, returning the file contents, file name and an error

func (*Service) DownloadDomainVerificationFileStream

func (s *Service) DownloadDomainVerificationFileStream(domainName string) (contentStream io.ReadCloser, filename string, err error)

DownloadDomainVerificationFileStream downloads the verification file for a domain, returning a stream of the file contents, file name and an error

func (*Service) GetDomain

func (s *Service) GetDomain(domainName string) (Domain, error)

GetDomain retrieves a single domain by name

func (*Service) GetDomainACLGeoIPRule added in v1.0.30

func (s *Service) GetDomainACLGeoIPRule(domainName string, ruleID string) (ACLGeoIPRule, error)

GetDomainACLGeoIPRule retrieves a single ACL GeoIP rule for a domain

func (*Service) GetDomainACLGeoIPRules

func (s *Service) GetDomainACLGeoIPRules(domainName string, parameters connection.APIRequestParameters) ([]ACLGeoIPRule, error)

GetDomainACLGeoIPRules retrieves a list of rules

func (*Service) GetDomainACLGeoIPRulesMode

func (s *Service) GetDomainACLGeoIPRulesMode(domainName string) (ACLGeoIPRulesMode, error)

GetDomainACLGeoIPRulesMode retrieves the mode for ACL GeoIP rules

func (*Service) GetDomainACLGeoIPRulesPaginated

func (s *Service) GetDomainACLGeoIPRulesPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedACLGeoIPRule, error)

GetDomainACLGeoIPRulesPaginated retrieves a paginated list of domains

func (*Service) GetDomainACLIPRule added in v1.0.30

func (s *Service) GetDomainACLIPRule(domainName string, ruleID string) (ACLIPRule, error)

GetDomainACLIPRule retrieves a single ACL IP rule for a domain

func (*Service) GetDomainACLIPRules

func (s *Service) GetDomainACLIPRules(domainName string, parameters connection.APIRequestParameters) ([]ACLIPRule, error)

GetDomainACLIPRules retrieves a list of rules

func (*Service) GetDomainACLIPRulesPaginated

func (s *Service) GetDomainACLIPRulesPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedACLIPRule, error)

GetDomainACLIPRulesPaginated retrieves a paginated list of domains

func (*Service) GetDomainCDNRule added in v1.0.19

func (s *Service) GetDomainCDNRule(domainName string, ruleID string) (CDNRule, error)

GetDomainCDNRule retrieves a CDN rule

func (*Service) GetDomainCDNRules added in v1.0.16

func (s *Service) GetDomainCDNRules(domainName string, parameters connection.APIRequestParameters) ([]CDNRule, error)

GetDomainCDNRules retrieves a list of rules

func (*Service) GetDomainCDNRulesPaginated added in v1.0.16

func (s *Service) GetDomainCDNRulesPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedCDNRule, error)

GetDomainCDNRulesPaginated retrieves a paginated list of domains

func (*Service) GetDomainHSTSConfiguration added in v1.0.32

func (s *Service) GetDomainHSTSConfiguration(domainName string) (HSTSConfiguration, error)

GetDomainHSTSConfiguration retrieves the HSTS configuration for a domain

func (*Service) GetDomainHSTSRule added in v1.0.32

func (s *Service) GetDomainHSTSRule(domainName string, ruleID string) (HSTSRule, error)

GetDomainHSTSRule retrieves a HSTS rule

func (*Service) GetDomainHSTSRules added in v1.0.32

func (s *Service) GetDomainHSTSRules(domainName string, parameters connection.APIRequestParameters) ([]HSTSRule, error)

GetDomainHSTSRules retrieves a list of rules

func (*Service) GetDomainHSTSRulesPaginated added in v1.0.32

func (s *Service) GetDomainHSTSRulesPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedHSTSRule, error)

GetDomainHSTSRulesPaginated retrieves a paginated list of domains

func (*Service) GetDomainProperties

func (s *Service) GetDomainProperties(domainName string, parameters connection.APIRequestParameters) ([]DomainProperty, error)

GetDomainProperties retrieves a list of domain properties

func (*Service) GetDomainPropertiesPaginated

func (s *Service) GetDomainPropertiesPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedDomainProperty, error)

GetDomainPropertiesPaginated retrieves a paginated list of domain properties

func (*Service) GetDomainProperty

func (s *Service) GetDomainProperty(domainName string, propertyID string) (DomainProperty, error)

GetDomainProperty retrieves a single domain property by ID

func (*Service) GetDomainRecord added in v1.0.30

func (s *Service) GetDomainRecord(domainName string, recordID string) (Record, error)

GetDomainRecord retrieves a single domain record by ID

func (*Service) GetDomainRecords

func (s *Service) GetDomainRecords(domainName string, parameters connection.APIRequestParameters) ([]Record, error)

GetDomainRecords retrieves a list of records

func (*Service) GetDomainRecordsPaginated

func (s *Service) GetDomainRecordsPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedRecord, error)

GetDomainRecordsPaginated retrieves a paginated list of domains

func (*Service) GetDomainWAF

func (s *Service) GetDomainWAF(domainName string) (WAF, error)

GetDomainWAF retrieves the WAF configuration for a domain

func (*Service) GetDomainWAFAdvancedRule added in v1.0.31

func (s *Service) GetDomainWAFAdvancedRule(domainName string, ruleID string) (WAFAdvancedRule, error)

GetDomainWAFAdvancedRule retrieves a waf rule for a domain

func (*Service) GetDomainWAFAdvancedRules

func (s *Service) GetDomainWAFAdvancedRules(domainName string, parameters connection.APIRequestParameters) ([]WAFAdvancedRule, error)

GetDomainWAFAdvancedRules retrieves a list of rules

func (*Service) GetDomainWAFAdvancedRulesPaginated

func (s *Service) GetDomainWAFAdvancedRulesPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedWAFAdvancedRule, error)

GetDomainWAFAdvancedRulesPaginated retrieves a paginated list of domains

func (*Service) GetDomainWAFRule added in v1.0.31

func (s *Service) GetDomainWAFRule(domainName string, ruleID string) (WAFRule, error)

GetDomainWAFRule retrieves a waf rule for a domain

func (*Service) GetDomainWAFRuleSet

func (s *Service) GetDomainWAFRuleSet(domainName string, ruleSetID string) (WAFRuleSet, error)

GetDomainWAFRuleSet retrieves a waf advanced rule set for a domain

func (*Service) GetDomainWAFRuleSets

func (s *Service) GetDomainWAFRuleSets(domainName string, parameters connection.APIRequestParameters) ([]WAFRuleSet, error)

GetDomainWAFRuleSets retrieves a list of rulesets

func (*Service) GetDomainWAFRuleSetsPaginated

func (s *Service) GetDomainWAFRuleSetsPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedWAFRuleSet, error)

GetDomainWAFRuleSetsPaginated retrieves a paginated list of domains

func (*Service) GetDomainWAFRules

func (s *Service) GetDomainWAFRules(domainName string, parameters connection.APIRequestParameters) ([]WAFRule, error)

GetDomainWAFRules retrieves a list of rules

func (*Service) GetDomainWAFRulesPaginated

func (s *Service) GetDomainWAFRulesPaginated(domainName string, parameters connection.APIRequestParameters) (*PaginatedWAFRule, error)

GetDomainWAFRulesPaginated retrieves a paginated list of domains

func (*Service) GetDomains

func (s *Service) GetDomains(parameters connection.APIRequestParameters) ([]Domain, error)

GetDomains retrieves a list of domains

func (*Service) GetDomainsPaginated

func (s *Service) GetDomainsPaginated(parameters connection.APIRequestParameters) (*PaginatedDomain, error)

GetDomainsPaginated retrieves a paginated list of domains

func (*Service) GetRecords

func (s *Service) GetRecords(parameters connection.APIRequestParameters) ([]Record, error)

GetRecords retrieves a list of records

func (*Service) GetRecordsPaginated

func (s *Service) GetRecordsPaginated(parameters connection.APIRequestParameters) (*PaginatedRecord, error)

GetRecordsPaginated retrieves a paginated list of domains

func (*Service) GetSSL

func (s *Service) GetSSL(sslID string) (SSL, error)

GetSSL retrieves a single ssl by id

func (*Service) GetSSLContent

func (s *Service) GetSSLContent(sslID string) (SSLContent, error)

GetSSLContent retrieves a single ssl by id

func (*Service) GetSSLPrivateKey

func (s *Service) GetSSLPrivateKey(sslID string) (SSLPrivateKey, error)

GetSSLPrivateKey retrieves a single ssl by id

func (*Service) GetSSLs

func (s *Service) GetSSLs(parameters connection.APIRequestParameters) ([]SSL, error)

GetSSLs retrieves a list of ssls

func (*Service) GetSSLsPaginated

func (s *Service) GetSSLsPaginated(parameters connection.APIRequestParameters) (*PaginatedSSL, error)

GetSSLsPaginated retrieves a paginated list of ssls

func (*Service) GetWAFLog added in v1.3.16

func (s *Service) GetWAFLog(requestID string) (WAFLog, error)

GetWAFLog retrieves a single log by id

func (*Service) GetWAFLogMatches added in v1.3.16

func (s *Service) GetWAFLogMatches(parameters connection.APIRequestParameters) ([]WAFLogMatch, error)

GetWAFLogMatches retrieves a list of log matches

func (*Service) GetWAFLogMatchesPaginated added in v1.3.16

func (s *Service) GetWAFLogMatchesPaginated(parameters connection.APIRequestParameters) (*PaginatedWAFLogMatch, error)

GetWAFLogMatchesPaginated retrieves a paginated list of log matches

func (*Service) GetWAFLogRequestMatch added in v1.3.16

func (s *Service) GetWAFLogRequestMatch(requestID string, matchID string) (WAFLogMatch, error)

GetWAFLogRequestMatch retrieves a single waf log request match

func (*Service) GetWAFLogRequestMatches added in v1.3.16

func (s *Service) GetWAFLogRequestMatches(requestID string, parameters connection.APIRequestParameters) ([]WAFLogMatch, error)

GetWAFLogRequestMatches retrieves a list of log matches for request

func (*Service) GetWAFLogRequestMatchesPaginated added in v1.3.16

func (s *Service) GetWAFLogRequestMatchesPaginated(requestID string, parameters connection.APIRequestParameters) (*PaginatedWAFLogMatch, error)

GetWAFLogRequestMatchesPaginated retrieves a paginated list of matches for request

func (*Service) GetWAFLogs added in v1.3.16

func (s *Service) GetWAFLogs(parameters connection.APIRequestParameters) ([]WAFLog, error)

GetWAFLogs retrieves a list of logs

func (*Service) GetWAFLogsPaginated added in v1.3.16

func (s *Service) GetWAFLogsPaginated(parameters connection.APIRequestParameters) (*PaginatedWAFLog, error)

GetWAFLogsPaginated retrieves a paginated list of logs

func (*Service) PatchDomainACLGeoIPRule

func (s *Service) PatchDomainACLGeoIPRule(domainName string, ruleID string, req PatchACLGeoIPRuleRequest) error

PatchDomainACLGeoIPRule patches an ACL GeoIP rule

func (*Service) PatchDomainACLGeoIPRulesMode

func (s *Service) PatchDomainACLGeoIPRulesMode(domainName string, req PatchACLGeoIPRulesModeRequest) error

PatchDomainACLGeoIPRulesMode patches the mode for ACL GeoIP rules

func (*Service) PatchDomainACLIPRule

func (s *Service) PatchDomainACLIPRule(domainName string, ruleID string, req PatchACLIPRuleRequest) error

PatchDomainACLIPRule patches an ACL IP rule

func (*Service) PatchDomainCDNRule added in v1.0.19

func (s *Service) PatchDomainCDNRule(domainName string, ruleID string, req PatchCDNRuleRequest) error

PatchDomainCDNRule patches a CDN rule

func (*Service) PatchDomainHSTSRule added in v1.0.32

func (s *Service) PatchDomainHSTSRule(domainName string, ruleID string, req PatchHSTSRuleRequest) error

PatchDomainHSTSRule patches a HSTS rule

func (*Service) PatchDomainProperty

func (s *Service) PatchDomainProperty(domainName string, propertyID string, req PatchDomainPropertyRequest) error

PatchDomainProperty patches a single domain property by ID

func (*Service) PatchDomainRecord

func (s *Service) PatchDomainRecord(domainName string, recordID string, req PatchRecordRequest) error

PatchDomainRecord patches a single domain record by ID

func (*Service) PatchDomainWAF

func (s *Service) PatchDomainWAF(domainName string, req PatchWAFRequest) error

PatchDomainWAF patches the WAF configuration for a domain

func (*Service) PatchDomainWAFAdvancedRule

func (s *Service) PatchDomainWAFAdvancedRule(domainName string, ruleID string, req PatchWAFAdvancedRuleRequest) error

PatchDomainWAFAdvancedRule patches a waf advanced rule for a domain

func (*Service) PatchDomainWAFRule

func (s *Service) PatchDomainWAFRule(domainName string, ruleID string, req PatchWAFRuleRequest) error

PatchDomainWAFRule patches a waf rule for a domain

func (*Service) PatchDomainWAFRuleSet

func (s *Service) PatchDomainWAFRuleSet(domainName string, ruleSetID string, req PatchWAFRuleSetRequest) error

PatchDomainWAFRuleSet patches a waf advanced rule set for a domain

func (*Service) PatchSSL

func (s *Service) PatchSSL(sslID string, req PatchSSLRequest) (string, error)

PatchSSL retrieves patches an SSL

func (*Service) PurgeDomainCDN added in v1.0.28

func (s *Service) PurgeDomainCDN(domainName string, req PurgeCDNRequest) error

PurgeDomainCDN purges cached content

func (*Service) VerifyDomainDNS added in v1.1.9

func (s *Service) VerifyDomainDNS(domainName string) error

VerifyDomainDNS verifies a domain via DNS method

func (*Service) VerifyDomainFileUpload added in v1.1.9

func (s *Service) VerifyDomainFileUpload(domainName string) error

VerifyDomainFileUpload verifies a domain via file-upload method

type WAF

type WAF struct {
	Mode          WAFMode          `json:"mode"`
	ParanoiaLevel WAFParanoiaLevel `json:"paranoia_level"`
}

WAF represents a DDoSX WAF configuration +genie:model_response

type WAFAdvancedRule

type WAFAdvancedRule struct {
	ID       string                  `json:"id"`
	Section  WAFAdvancedRuleSection  `json:"section"`
	Modifier WAFAdvancedRuleModifier `json:"modifier"`
	Phrase   string                  `json:"phrase"`
	IP       connection.IPAddress    `json:"ip"`
}

WAFAdvancedRule represents a DDoSX WAF advanced rule +genie:model_response +genie:model_paginated

type WAFAdvancedRuleModifier

type WAFAdvancedRuleModifier string
const (
	WAFAdvancedRuleModifierBeginsWith   WAFAdvancedRuleModifier = "beginsWith"
	WAFAdvancedRuleModifierEndsWith     WAFAdvancedRuleModifier = "endsWith"
	WAFAdvancedRuleModifierContains     WAFAdvancedRuleModifier = "contains"
	WAFAdvancedRuleModifierContainsWord WAFAdvancedRuleModifier = "containsWord"
)

func ParseWAFAdvancedRuleModifier

func ParseWAFAdvancedRuleModifier(s string) (WAFAdvancedRuleModifier, error)

ParseWAFAdvancedRuleModifier attempts to parse a WAFAdvancedRuleModifier from string

func (WAFAdvancedRuleModifier) String

func (s WAFAdvancedRuleModifier) String() string

type WAFAdvancedRuleNotFoundError

type WAFAdvancedRuleNotFoundError struct {
	ID string
}

WAFAdvancedRuleNotFoundError indicates a WAF advanced rule was not found

func (*WAFAdvancedRuleNotFoundError) Error

type WAFAdvancedRuleSection

type WAFAdvancedRuleSection string
const (
	WAFAdvancedRuleSectionArgs           WAFAdvancedRuleSection = "ARGS"
	WAFAdvancedRuleSectionMatchedVars    WAFAdvancedRuleSection = "MATCHED_VARS"
	WAFAdvancedRuleSectionRemoteHost     WAFAdvancedRuleSection = "REMOTE_HOST"
	WAFAdvancedRuleSectionRequestBody    WAFAdvancedRuleSection = "REQUEST_BODY"
	WAFAdvancedRuleSectionRequestCookies WAFAdvancedRuleSection = "REQUEST_COOKIES"
	WAFAdvancedRuleSectionRequestHeaders WAFAdvancedRuleSection = "REQUEST_HEADERS"
	WAFAdvancedRuleSectionRequestURI     WAFAdvancedRuleSection = "REQUEST_URI"
)

func ParseWAFAdvancedRuleSection

func ParseWAFAdvancedRuleSection(s string) (WAFAdvancedRuleSection, error)

ParseWAFAdvancedRuleSection attempts to parse a WAFAdvancedRuleSection from string

func (WAFAdvancedRuleSection) String

func (s WAFAdvancedRuleSection) String() string

type WAFLog added in v1.3.16

type WAFLog struct {
	ID        string               `json:"id"`
	Host      string               `json:"host"`
	ClientIP  connection.IPAddress `json:"client_ip"`
	Request   string               `json:"request"`
	CreatedAt connection.DateTime  `json:"created_at"`
}

WAFLog represents a WAF log entry +genie:model_response +genie:model_paginated

type WAFLogMatch added in v1.3.16

type WAFLogMatch struct {
	ID          string               `json:"id"`
	LogID       string               `json:"log_id"`
	Host        string               `json:"host"`
	ClientIP    connection.IPAddress `json:"client_ip"`
	RequestURI  string               `json:"request_uri"`
	CreatedAt   connection.DateTime  `json:"created_at"`
	CountryCode string               `json:"country_code"`
	Method      string               `json:"method"`
	Content     string               `json:"content"`
	Message     string               `json:"message"`
	MatchData   string               `json:"match_data"`
	URIPart     string               `json:"uri_part"`
	Value       string               `json:"value"`
}

WAFLogMatch represents a WAF log match +genie:model_response +genie:model_paginated

type WAFLogMatchNotFoundError added in v1.3.16

type WAFLogMatchNotFoundError struct {
	ID string
}

WAFLogMatchNotFoundError indicates a WAF rule was not found

func (*WAFLogMatchNotFoundError) Error added in v1.3.16

func (e *WAFLogMatchNotFoundError) Error() string

type WAFLogNotFoundError added in v1.3.16

type WAFLogNotFoundError struct {
	ID string
}

WAFLogNotFoundError indicates a WAF rule was not found

func (*WAFLogNotFoundError) Error added in v1.3.16

func (e *WAFLogNotFoundError) Error() string

type WAFMode

type WAFMode string
const (
	WAFModeOn            WAFMode = "On"
	WAFModeOff           WAFMode = "Off"
	WAFModeDetectionOnly WAFMode = "DetectionOnly"
)

func ParseWAFMode

func ParseWAFMode(s string) (WAFMode, error)

ParseWAFMode attempts to parse a WAFMode from string

func (WAFMode) String

func (s WAFMode) String() string

type WAFParanoiaLevel

type WAFParanoiaLevel string
const (
	WAFParanoiaLevelLow     WAFParanoiaLevel = "Low"
	WAFParanoiaLevelMedium  WAFParanoiaLevel = "Medium"
	WAFParanoiaLevelHigh    WAFParanoiaLevel = "High"
	WAFParanoiaLevelHighest WAFParanoiaLevel = "Highest"
)

func ParseWAFParanoiaLevel

func ParseWAFParanoiaLevel(s string) (WAFParanoiaLevel, error)

ParseWAFParanoiaLevel attempts to parse a WAFParanoiaLevel from string

func (WAFParanoiaLevel) String

func (s WAFParanoiaLevel) String() string

type WAFRule

type WAFRule struct {
	ID  string               `json:"id"`
	URI string               `json:"uri"`
	IP  connection.IPAddress `json:"ip"`
}

WAFRule represents a DDoSX WAF rule +genie:model_response +genie:model_paginated

type WAFRuleNotFoundError

type WAFRuleNotFoundError struct {
	ID string
}

WAFRuleNotFoundError indicates a WAF rule was not found

func (*WAFRuleNotFoundError) Error

func (e *WAFRuleNotFoundError) Error() string

type WAFRuleSet

type WAFRuleSet struct {
	ID     string         `json:"id"`
	Name   WAFRuleSetName `json:"name"`
	Active bool           `json:"active"`
}

WAFRuleSet represents a DDoSX WAF rule set +genie:model_response +genie:model_paginated

type WAFRuleSetName

type WAFRuleSetName string
const (
	WAFRuleSetNameIPRepution                             WAFRuleSetName = "IP Reputation"
	WAFRuleSetNameMethodEnforcement                      WAFRuleSetName = "Method Enforcement"
	WAFRuleSetNameScannerDetection                       WAFRuleSetName = "Scanner Detection"
	WAFRuleSetNameProtocolEnforcement                    WAFRuleSetName = "Protocol Enforcement"
	WAFRuleSetNameProtocolAttack                         WAFRuleSetName = "Protocol Attack"
	WAFRuleSetNameApplicationAttackLocalFileInclusion    WAFRuleSetName = "Application Attack (Local File Inclusion)"
	WAFRuleSetNameApplicationAttackRemoteFileInclusion   WAFRuleSetName = "Application Attack (Remote File Inclusion)"
	WAFRuleSetNameApplicationAttackRemoteCodeExecution   WAFRuleSetName = "Application Attack (Remote Code Execution)"
	WAFRuleSetNameApplicationAttackPHP                   WAFRuleSetName = "Application Attack PHP"
	WAFRuleSetNameApplicationAttackXSSCrossSiteScripting WAFRuleSetName = "Application Attack XSS (Cross Site Scripting)"
	WAFRuleSetNameApplicationAttackSQLISQLInjection      WAFRuleSetName = "Application Attack SQLI (SQL Injection)"
	WAFRuleSetNameApplicationAttackSessionFixation       WAFRuleSetName = "Application Attack Session Fixation"
	WAFRuleSetNameDataDeakages                           WAFRuleSetName = "Data Leakages"
	WAFRuleSetNameDataLeakageSQL                         WAFRuleSetName = "Data Leakage SQL"
	WAFRuleSetNameDataLeakageJava                        WAFRuleSetName = "Data Leakage Java"
	WAFRuleSetNameDataLeakagePHP                         WAFRuleSetName = "Data Leakage PHP"
	WAFRuleSetNameDataLeakageIIS                         WAFRuleSetName = "Data Leakage IIS"
)

func (WAFRuleSetName) String

func (s WAFRuleSetName) String() string

type WAFRuleSetNotFoundError

type WAFRuleSetNotFoundError struct {
	ID string
}

WAFRuleSetNotFoundError indicates a WAF rule set was not found

func (*WAFRuleSetNotFoundError) Error

func (e *WAFRuleSetNotFoundError) Error() string

Jump to

Keyboard shortcuts

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