Documentation
¶
Index ¶
- Constants
- type CheckRegion
- type CisServiceAPI
- type Configuration
- type Dns
- type DnsBody
- type DnsRecord
- type DnsResult
- type DnsResults
- type Error
- type Firewall
- type FirewallBody
- type FirewallRecord
- type FirewallResult
- type FirewallResults
- type GenericPaginatedResourcesHandler
- type Glb
- type GlbBody
- type GlbDelete
- type GlbResult
- type GlbResults
- type Glbs
- type Ips
- type IpsList
- type IpsResults
- type Monitor
- type MonitorBody
- type MonitorDelete
- type MonitorResult
- type MonitorResults
- type Monitors
- type NameServer
- type Origin
- type Pool
- type PoolBody
- type PoolDelete
- type PoolResult
- type PoolResults
- type Pools
- type ResultsCount
- type Settings
- type SettingsBody
- type SettingsResObj
- type SettingsResult
- type Zone
- type ZoneBody
- type ZoneDelete
- type ZoneResult
- type ZoneResults
- type Zones
Constants ¶
View Source
const ErrCodeAPICreation = "APICreationError"
ErrCodeAPICreation ...
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckRegion ¶
type CheckRegion struct {
Region string `json:"0"`
}
type CisServiceAPI ¶
type CisServiceAPI interface {
Zones() Zones
Monitors() Monitors
Pools() Pools
Glbs() Glbs
Settings() Settings
Ips() Ips
Dns() Dns
Firewall() Firewall
}
CisServiceAPI is the Cloud Internet Services API ...
type Configuration ¶
type Configuration struct {
Target string `json:"target,omitempty"`
Value string `json:"value,omitempty"`
}
Configuration ...
type Dns ¶
type Dns interface {
ListDns(cisId string, zoneId string) ([]DnsRecord, error)
GetDns(cisId string, zoneId string, dnsId string) (*DnsRecord, error)
CreateDns(cisId string, zoneId string, dnsBody DnsBody) (*DnsRecord, error)
DeleteDns(cisId string, zoneId string, dnsId string) error
UpdateDns(cisId string, zoneId string, dnsId string, dnsBody DnsBody) (*DnsRecord, error)
}
type DnsRecord ¶
type DnsRecord struct {
Id string `json:"id"`
Name string `json:"name,omitempty"`
DnsType string `json:"type"`
Content string `json:"content"`
ZoneId string `json:"zone_id"`
ZoneName string `json:"zone_name"`
CreatedOn *time.Time `json:"created_on,omitempty"`
ModifiedOn *time.Time `json:"modified_on,omitempty"`
Proxiable bool `json:"proxiable"`
Proxied bool `json:"proxied"`
Ttl int `json:"ttl"`
Priority int `json:"priority,omitempty"`
Data interface{} `json:"data,omitempty"`
}
type DnsResults ¶
type DnsResults struct {
DnsList []DnsRecord `json:"result"`
ResultsInfo ResultsCount `json:"result_info"`
Success bool `json:"success"`
Errors []Error `json:"errors"`
}
type Firewall ¶
type Firewall interface {
ListFirewall(cisID string, zoneID string, firewallType string) ([]FirewallRecord, error)
GetFirewall(cisID string, zoneID string, firewallType string, firewallID string) (*FirewallRecord, error)
CreateFirewall(cisID string, zoneID string, firewallType string, firewallBody FirewallBody) (*FirewallRecord, error)
DeleteFirewall(cisID string, zoneID string, firewallType string, firewallID string) error
UpdateFirewall(cisID string, zoneID string, firewallType string, firewallID string, firewallBody FirewallBody) (*FirewallRecord, error)
}
Firewall ...
type FirewallBody ¶
type FirewallBody struct {
Description string `json:"description,omitempty"`
Urls []string `json:"urls,omitempty"`
Configurations []Configuration `json:"configurations,omitempty"`
Paused bool `json:"paused,omitempty"`
Mode string `json:"mode,omitempty"`
Notes string `json:"notes,omitempty"`
Configuration *Configuration `json:"configuration,omitempty"`
Priority int `json:"priority,omitempty"`
}
FirewallBody ...
type FirewallRecord ¶
type FirewallRecord struct {
ID string `json:"id"`
Description string `json:"description,omitempty"`
Urls []string `json:"urls,omitempty"`
Configurations []Configuration `json:"configurations,omitempty"`
Paused bool `json:"paused,omitempty"`
CreatedOn *time.Time `json:"created_on,omitempty"`
ModifiedOn *time.Time `json:"modified_on,omitempty"`
Mode string `json:"mode,omitempty"`
Notes string `json:"notes,omitempty"`
Configuration *Configuration `json:"configuration,omitempty"`
Priority int `json:"priority,omitempty"`
}
FirewallRecord ...
type FirewallResult ¶
type FirewallResult struct {
Firewall FirewallRecord `json:"result"`
Success bool `json:"success"`
Errors []Error `json:"errors"`
Messages []string `json:"messages"`
}
FirewallResult ...
type FirewallResults ¶
type FirewallResults struct {
FirewallList []FirewallRecord `json:"result"`
ResultsInfo ResultsCount `json:"result_info"`
Success bool `json:"success"`
Errors []Error `json:"errors"`
}
FirewallResults ...
type GenericPaginatedResourcesHandler ¶
type GenericPaginatedResourcesHandler struct {
// contains filtered or unexported fields
}
func NewDNSPaginatedResources ¶
func NewDNSPaginatedResources(resource interface{}) GenericPaginatedResourcesHandler
type Glb ¶
type Glb struct {
Id string `json:"id"`
Name string `json:"name"`
Desc string `json:"description"`
FallbackPool string `json:"fallback_pool"`
DefaultPools []string `json:"default_pools"`
Ttl int `json:"ttl"`
Proxied bool `json:"proxied"`
CreatedOn *time.Time `json:"created_on,omitempty"`
ModifiedOn *time.Time `json:"modified_on,omitempty"`
SessionAffinity string `json:"session_affinity"`
Enabled bool `json:"enabled,omitempty"`
}
type GlbBody ¶
type GlbBody struct {
Desc string `json:"description,omitempty"`
Proxied bool `json:"proxied,omitempty"`
Name string `json:"name"`
FallbackPool string `json:"fallback_pool"`
DefaultPools []string `json:"default_pools"`
SessionAffinity string `json:"session_affinity,omitempty"`
Ttl int `json:"ttl,omitempty"`
Enabled bool `json:"enabled,omitempty"`
}
type GlbResults ¶
type GlbResults struct {
GlbList []Glb `json:"result"`
ResultsInfo ResultsCount `json:"result_info"`
Success bool `json:"success"`
Errors []Error `json:"errors"`
}
type Glbs ¶
type Glbs interface {
ListGlbs(cisId string, zoneId string) ([]Glb, error)
GetGlb(cisId string, zoneId string, glbId string) (*Glb, error)
CreateGlb(cisId string, zoneId string, glbBody GlbBody) (*Glb, error)
DeleteGlb(cisId string, zoneId string, glbId string) error
UpdateGlb(cisId string, zoneId string, glbId string, glbBody GlbBody) (*Glb, error)
}
type IpsResults ¶
type IpsResults struct {
IpList IpsList `json:"result"`
ResultsInfo ResultsCount `json:"result_info"`
Success bool `json:"success"`
Errors []Error `json:"errors"`
}
type Monitor ¶
type Monitor struct {
Id string `json:"id"`
Path string `json:"path,omitempty"`
Description string `json:"description"`
ExpBody string `json:"expected_body,omitempty"`
ExpCodes string `json:"expected_codes,omitempty"`
MonType string `json:"type,omitempty"`
Method string `json:"method,omitempty"`
Timeout int `json:"timeout,omitempty"`
Retries int `json:"retries,omitempty"`
Interval int `json:"interval,omitempty"`
FollowRedirects bool `json:"follow_redirects,omitempty"`
AllowInsecure bool `json:"allow_insecure,omitempty"`
Port int `json:"port,omitempty"`
}
type MonitorBody ¶
type MonitorBody struct {
Description string `json:"description"`
ExpCodes string `json:"expected_codes,omitempty"`
ExpBody string `json:"expected_body,omitempty"`
Path string `json:"path,omitempty"`
MonType string `json:"type,omitempty"`
Method string `json:"method,omitempty"`
Timeout int `json:"timeout,omitempty"`
Retries int `json:"retries,omitempty"`
Interval int `json:"interval,omitempty"`
FollowRedirects bool `json:"follow_redirects,omitempty"`
AllowInsecure bool `json:"allow_insecure,omitempty"`
Port int `json:"port,omitempty"`
}
type MonitorDelete ¶
type MonitorResult ¶
type MonitorResults ¶
type MonitorResults struct {
MonitorList []Monitor `json:"result"`
ResultsInfo ResultsCount `json:"result_info"`
Success bool `json:"success"`
Errors []Error `json:"errors"`
}
type Monitors ¶
type Monitors interface {
ListMonitors(cisId string) ([]Monitor, error)
GetMonitor(cisId string, monitorId string) (*Monitor, error)
CreateMonitor(cisId string, monitorBody MonitorBody) (*Monitor, error)
DeleteMonitor(cisId string, monitorId string) error
UpdateMonitor(cisId string, monitorId string, monitorBody MonitorBody) (*Monitor, error)
}
type NameServer ¶
type NameServer struct {
NameS int64 `json:"0"`
}
type Pool ¶
type Pool struct {
Id string `json:"id"`
Description string `json:"description"`
Name string `json:"name"`
CheckRegions []string `json:"check_regions"`
Enabled bool `json:"enabled"`
MinOrigins int `json:"minimum_origins"`
Monitor string `json:"monitor"`
NotEmail string `json:"notification_email"`
Origins []Origin `json:"origins"`
Health string `json:"health"`
CreatedOn string `json:"created_on"`
ModifiedOn string `json:"modified_on"`
}
type PoolBody ¶
type PoolBody struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Origins []Origin `json:"origins"`
CheckRegions []string `json:"check_regions"`
Enabled bool `json:"enabled"`
MinOrigins int `json:"minimum_origins,omitempty"`
Monitor string `json:"monitor,omitempty"`
NotEmail string `json:"notification_email,omitempty"`
}
type PoolDelete ¶
type PoolResult ¶
type PoolResults ¶
type PoolResults struct {
PoolList []Pool `json:"result"`
ResultsInfo ResultsCount `json:"result_info"`
Success bool `json:"success"`
Errors []Error `json:"errors"`
}
type ResultsCount ¶
type ResultsCount struct {
Count int `json:"count"`
}
type Settings ¶
type Settings interface {
GetSetting(cisId string, zoneId string, setting string) (*SettingsResObj, error)
UpdateSetting(cisId string, zoneId string, setting string, settingsBody SettingsBody) (*SettingsResObj, error)
}
type SettingsBody ¶
type SettingsBody struct {
Value string `json:"value"`
}
type SettingsResObj ¶
type SettingsResult ¶
type SettingsResult struct {
Result SettingsResObj `json:"result"`
Success bool `json:"success"`
Errors []Error `json:"errors"`
Messages []string `json:"messages"`
}
type ZoneDelete ¶
type ZoneResult ¶
type ZoneResults ¶
type ZoneResults struct {
ZoneList []Zone `json:"result"`
ResultsInfo ResultsCount `json:"result_info"`
Success bool `json:"success"`
Errors []Error `json:"errors"`
}
Click to show internal directories.
Click to hide internal directories.