stingray

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2015 License: BSD-3-Clause Imports: 7 Imported by: 1

README

go-stingray

GoDoc Build Status

go-stingray is a client library for accessing the Stingray Traffic Manager REST API.

For documentation of the Stingray API, see the "Stingray Traffic Manager REST API Guide" version 2.6, March 2014 from the Riverbed support site.

Usage

import "github.com/whitepages/go-stingray"

Create a new Stingray client.

client := stingray.NewClient(nil, "https://localhost:9070", "username", "password")

Manage an extra file.

fmt.Println("Writing...")
r := stingray.NewExtraFile("name")
r.Content = []byte("Test")
resp, err := client.Set(r)
fmt.Println("Status:", resp.Status)
if err != nil {
	log.Fatal(err)
}

fmt.Println("Reading...")
r, resp, err = client.GetExtraFile("name")
if err != nil {
	log.Fatal(err)
}
fmt.Println("Status:", resp.Status)
fmt.Println("Content:", string(r.Content))

fmt.Println("Deleting...")
r = stingray.NewExtraFile("name")
resp, err = client.Delete(r)
if err != nil {
	log.Fatal(err)
}
fmt.Println("Status:", resp.Status)
Writing...
Status: 201 Created
Reading...
Status: 200 OK
Content: Test
Deleting...
Status: 204 No Content

Supported Resources

Support for resources is being added as needed.

  • Action Program
  • Alerting Action
  • Aptimizer Application Scope
  • Aptimizer Profile
  • Bandwidth Class
  • Cloud Credentials
  • Custom configuration set
  • Event Type
  • Extra File
  • GLB Service
  • Global Settings
  • License
  • Location
  • Monitor
  • Monitor Program
  • NAT Configuration
  • Pool
  • Protection Class
  • Rate Shaping Class
  • Rule
  • SLM Class
  • SSL Client Key Pair
  • SSL Key Pair
  • SSL Trusted Certificate
  • Security Settings
  • Session Persistence Class
  • Traffic IP Group
  • Traffic Manager (incomplete)
  • TrafficScript Authenticator
  • User Authenticator
  • User Group
  • Virtual Server

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.

func CheckResponse

func CheckResponse(resp *http.Response) error

CheckResponse checks the API response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range. API error responses are expected to have either no response body, or a JSON response body that maps to ErrorResponse. Any other response body will be silently ignored.

func Int

func Int(v int) *int

Int is a helper routine that allocates a new int32 value to store v and returns a pointer to it, but unlike Int32 its argument value is an int.

func String

func String(v string) *string

String is a helper routine that allocates a new string value to store v and returns a pointer to it.

Types

type ActionProgram

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

An ActionProgram is Stingray action program.

func NewActionProgram

func NewActionProgram(name string) *ActionProgram

func (*ActionProgram) String

func (f *ActionProgram) String() string

type Client

type Client struct {
	// HTTP client used to communicate with the API.
	Client *http.Client

	// API base URL
	BaseURL *url.URL

	// Username used for communicating with the API.
	Username string

	// Password used for communicating with the API.
	Password string
}

A Client manages communication with the Stingray API.

func NewClient

func NewClient(httpClient *http.Client, urlStr, username string, password string) *Client

NewClient returns a new Stingray API client, using the supplied URL, username, and password

func (*Client) Delete

func (c *Client) Delete(r Resourcer) (*http.Response, error)

Delete deletes a resource

func (*Client) Do

func (c *Client) Do(req *http.Request) (*http.Response, error)

Do sends an API request.

func (*Client) Get

func (c *Client) Get(r Resourcer) (*http.Response, error)

Get retrieves a resource

func (*Client) GetActionProgram

func (c *Client) GetActionProgram(name string) (*ActionProgram, *http.Response, error)

func (*Client) GetExtraFile

func (c *Client) GetExtraFile(name string) (*ExtraFile, *http.Response, error)

func (*Client) GetLicenseKey

func (c *Client) GetLicenseKey(name string) (*LicenseKey, *http.Response, error)

func (*Client) GetMonitor

func (c *Client) GetMonitor(name string) (*Monitor, *http.Response, error)

func (*Client) GetMonitorScript

func (c *Client) GetMonitorScript(name string) (*MonitorScript, *http.Response, error)

func (*Client) GetPool

func (c *Client) GetPool(name string) (*Pool, *http.Response, error)

func (*Client) GetRate

func (c *Client) GetRate(name string) (*Rate, *http.Response, error)

func (*Client) GetRule

func (c *Client) GetRule(name string) (*Rule, *http.Response, error)

func (*Client) GetSSLCAs

func (c *Client) GetSSLCAs(name string) (*SSLCAs, *http.Response, error)

func (*Client) GetSSLServerKey

func (c *Client) GetSSLServerKey(name string) (*SSLServerKey, *http.Response, error)

func (*Client) GetServiceLevelMonitor

func (c *Client) GetServiceLevelMonitor(name string) (*ServiceLevelMonitor, *http.Response, error)

func (*Client) GetTrafficIPGroup

func (c *Client) GetTrafficIPGroup(name string) (*TrafficIPGroup, *http.Response, error)

func (*Client) GetTrafficManager

func (c *Client) GetTrafficManager(name string) (*TrafficManager, *http.Response, error)

func (*Client) GetVirtualServer

func (c *Client) GetVirtualServer(name string) (*VirtualServer, *http.Response, error)

func (*Client) List

func (c *Client) List(r Resourcer) ([]string, *http.Response, error)

List lists resources of the specified type

func (*Client) ListActionPrograms

func (c *Client) ListActionPrograms() ([]string, *http.Response, error)

func (*Client) ListExtraFiles

func (c *Client) ListExtraFiles() ([]string, *http.Response, error)

func (*Client) ListLicenseKeys

func (c *Client) ListLicenseKeys() ([]string, *http.Response, error)

func (*Client) ListMonitorScripts

func (c *Client) ListMonitorScripts() ([]string, *http.Response, error)

func (*Client) ListMonitors

func (c *Client) ListMonitors() ([]string, *http.Response, error)

func (*Client) ListPools

func (c *Client) ListPools() ([]string, *http.Response, error)

func (*Client) ListRates

func (c *Client) ListRates() ([]string, *http.Response, error)

func (*Client) ListRules

func (c *Client) ListRules() ([]string, *http.Response, error)

func (*Client) ListSSLCAs

func (c *Client) ListSSLCAs() ([]string, *http.Response, error)

func (*Client) ListSSLServerKey

func (c *Client) ListSSLServerKey() ([]string, *http.Response, error)

func (*Client) ListServiceLevelMonitors

func (c *Client) ListServiceLevelMonitors() ([]string, *http.Response, error)

func (*Client) ListTrafficIPGroups

func (c *Client) ListTrafficIPGroups() ([]string, *http.Response, error)

func (*Client) ListTrafficManagers

func (c *Client) ListTrafficManagers() ([]string, *http.Response, error)

func (*Client) ListVirtualServers

func (c *Client) ListVirtualServers() ([]string, *http.Response, error)

func (*Client) NewRequest

func (c *Client) NewRequest(method, urlStr string, body string) (*http.Request, error)

NewRequest creates a new request with the params

func (*Client) Set

func (c *Client) Set(r Resourcer) (*http.Response, error)

Set sets a resource

type ErrorResponse

type ErrorResponse struct {
	Response  *http.Response // HTTP response that caused this error
	ID        string         `json:"error_id"`
	Text      string         `json:"error_text"`
	ErrorInfo interface{}    `json:"error_info"`
}

ErrorResponse represents an error message returned by the Stingray API.

See Chapter 2, Further Aspects of the Resource Model, Errors.

func (*ErrorResponse) Error

func (r *ErrorResponse) Error() string

type ExtraFile

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

An ExtraFile is a Stingray extra file.

func NewExtraFile

func NewExtraFile(name string) *ExtraFile

func (*ExtraFile) String

func (f *ExtraFile) String() string

type IPMapping

type IPMapping struct {
	IP             *string `json:"ip,omitempty"`
	TrafficManager *string `json:"traffic_manager,omitempty"`
}

type IPMappingTable

type IPMappingTable []IPMapping

type LicenseKey

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

A LicenseKey is a Stingray license key.

func NewLicenseKey

func NewLicenseKey(name string) *LicenseKey

func (*LicenseKey) String

func (f *LicenseKey) String() string

type Monitor

type Monitor struct {
	MonitorProperties `json:"properties"`
	// contains filtered or unexported fields
}

A Monitor is a Stingray monitor.

func NewMonitor

func NewMonitor(name string) *Monitor

func (*Monitor) String

func (r *Monitor) String() string

type MonitorProperties

type MonitorProperties struct {
	Basic struct {
		BackOff  *bool   `json:"back_off,omitempty"`
		Delay    *int    `json:"delay,omitempty"`
		Failures *int    `json:"failures,omitempty"`
		Machine  *string `json:"machine,omitempty"`
		Note     *string `json:"note,omitempty"`
		Scope    *string `json:"scope,omitempty"`
		Timeout  *int    `json:"timeout,omitempty"`
		Type     *string `json:"type,omitempty"`
		UseSSL   *bool   `json:"use_ssl,omitempty"`
		Verbose  *bool   `json:"verbose,omitempty"`
	} `json:"basic"`
	HTTP struct {
		Authentication *string `json:"authentication,omitempty"`
		BodyRegex      *string `json:"body_regex,omitempty"`
		HostHeader     *string `json:"host_header,omitempty"`
		Path           *string `json:"path,omitempty"`
		StatusRegex    *string `json:"status_regex,omitempty"`
	} `json:"http"`
	RTSP struct {
		BodyRegex   *string `json:"body_regex,omitempty"`
		Path        *string `json:"path,omitempty"`
		StatusRegex *string `json:"status_regex,omitempty"`
	} `json:"rtsp"`
	Script struct {
		Arguments *ScriptArgumentsTable `json:"arguments,omitempty"`
		Program   *string               `json:"program,omitempty"`
	} `json:"script"`
	SIP struct {
		BodyRegex   *string `json:"body_regex,omitempty"`
		StatusRegex *string `json:"status_regex,omitempty"`
		Transport   *string `json:"transport,omitempty"`
	} `json:"sip"`
	TCP struct {
		CloseString    *string `json:"close_string,omitempty"`
		MaxResponseLen *int    `json:"max_response_len,omitempty"`
		ResponseRegex  *string `json:"response_regex,omitempty"`
		WriteString    *string `json:"write_string,omitempty"`
	} `json:"tcp"`
	UDP struct {
		AcceptAll *bool `json:"accept_all,omitempty"`
	} `json:"udp"`
}

type MonitorScript

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

A MonitorScript is a Stingray monitor program.

func NewMonitorScript

func NewMonitorScript(name string) *MonitorScript

func (*MonitorScript) String

func (f *MonitorScript) String() string

type Node

type Node struct {
	Node     *string `json:"node,omitempty"`
	Priority *int    `json:"priority,omitempty"`
	State    *string `json:"state,omitempty"`
	Weight   *int    `json:"weight,omitempty"`
}

type NodesTable

type NodesTable []Node

type OCSPIssuer

type OCSPIssuer struct {
	AIA           *bool   `json:"aia,omitempty"`
	Issuer        *string `json:"issuer,omitempty"`
	Nonce         *string `json:"nonce,omitempty"`
	Required      *string `json:"required,omitempty"`
	ResponderCert *string `json:"responder_cert,omitempty"`
	Signer        *string `json:"signer,omitempty"`
	URL           *string `json:"url,omitempty"`
}

type OCSPIssuersTable

type OCSPIssuersTable []OCSPIssuer

type Pool

type Pool struct {
	PoolProperties `json:"properties"`
	// contains filtered or unexported fields
}

A Pool is a Stingray pool.

func NewPool

func NewPool(name string) *Pool

func (*Pool) String

func (r *Pool) String() string

type PoolProperties

type PoolProperties struct {
	AutoScaling struct {
		AddNodeDelayTime *int      `json:"addnode_delaytime,omitempty"`
		CloudCredentials *string   `json:"cloud_credentials,omitempty"`
		Cluster          *string   `json:"cluster,omitempty"`
		DataCenter       *string   `json:"data_center,omitempty"`
		DataStore        *string   `json:"data_store,omitempty"`
		Enabled          *bool     `json:"enabled,omitempty"`
		External         *bool     `json:"external,omitempty"`
		Hysteresis       *int      `json:"hysteresis,omitempty"`
		ImageID          *string   `json:"imageid,omitempty"`
		IPsToUse         *string   `json:"ips_to_use,omitempty"`
		LastNodeIdleTime *int      `json:"last_node_idle_time,omitempty"`
		MaxNodes         *int      `json:"max_nodes,omitempty"`
		MinNodes         *int      `json:"min_nodes,omitempty"`
		Name             *string   `json:"name,omitempty"`
		Port             *int      `json:"port,omitempty"`
		Refractory       *int      `json:"refractory,omitempty"`
		ResponseTime     *int      `json:"response_time,omitempty"`
		ScaleDownLevel   *int      `json:"scale_down_level,omitempty"`
		ScaleUpLevel     *int      `json:"scale_up_level,omitempty"`
		SecurityGroupIDs *[]string `json:"securitygroupids,omitempty"`
		SizeID           *string   `json:"size_id,omitempty"`
		SubnetIDs        *[]string `json:"subnetids,omitempty"`
	} `json:"auto_scaling"`
	Basic struct {
		BandwidthClass                *string     `json:"bandwidth_class,omitempty"`
		FailurePool                   *string     `json:"failure_pool,omitempty"`
		MaxConnectionAttempts         *int        `json:"max_connection_attempts,omitempty"`
		MaxIdleConnectionsPerNode     *int        `json:"max_idle_connections_pernode,omitempty"`
		MaxTimedOutConnectionAttempts *int        `json:"max_timed_out_connection_attempts,omitempty"`
		Monitors                      *[]string   `json:"monitors,omitempty"`
		NodeCloseWithRST              *bool       `json:"node_close_with_rst,omitempty"`
		NodeConnectionAttempts        *int        `json:"node_connection_attempts,omitempty"`
		NodeDeleteBehavior            *string     `json:"node_delete_behavior,omitempty"`
		NodeDrainToDeleteTimeout      *int        `json:"node_drain_to_delete_timeout,omitempty"`
		NodesTable                    *NodesTable `json:"nodes_table,omitempty"`
		PassiveMonitoring             *bool       `json:"passive_monitoring,omitempty"`
		PersistenceClass              *string     `json:"persistence_class,omitempty"`
		Note                          *string     `json:"note,omitempty"`
		Transparent                   *bool       `json:"transparent,omitempty"`
	} `json:"basic"`
	Connection struct {
		MaxConnectTime        *int `json:"max_connect_time,omitempty"`
		MaxConnectionsPerNode *int `json:"max_connections_per_node,omitempty"`
		MaxQueueSize          *int `json:"max_queue_size,omitempty"`
		MaxReplyTime          *int `json:"max_reply_time,omitempty"`
		QueueTimeout          *int `json:"queue_timeout,omitempty"`
	} `json:"connection"`
	DNS struct {
		EDNSUDPSize *int `json:"edns_udpsize,omitempty"`
		MaxUDPSize  *int `json:"max_udpsize,omitempty"`
	} `json:"dns"`
	DNSAutoscale struct {
		Enabled   *bool     `json:"enabled,omitempty"`
		Hostnames *[]string `json:"hostnames,omitempty"`
		Port      *int      `json:"port,omitempty"`
	} `json:"dns_autoscale"`
	FTP struct {
		SupportRFC2428 *bool `json:"support_rfc_2428,omitempty"`
	} `json:"ftp"`
	HTTP struct {
		Keepalive              *bool `json:"keepalive,omitempty"`
		KeepaliveNonIdempotent *bool `json:"keepalive_non_idempotent,omitempty"`
	} `json:"http"`
	KerberosProtocolTransition struct {
		Principal *string `json:"principal,omitempty"`
		Target    *string `json:"target,omitempty"`
	} `json:"kerberos_protocol_transition"`
	LoadBalancing struct {
		Algorithm       *string `json:"algorithm,omitempty"`
		PriorityEnabled *bool   `json:"priority_enabled,omitempty"`
		PriorityNodes   *int    `json:"priority_nodes,omitempty"`
	} `json:"load_balancing"`
	Node struct {
		CloseOnDeath  *bool `json:"close_on_death,omitempty"`
		RetryFailTime *int  `json:"retry_fail_time,omitempty"`
	} `json:"node"`
	SMTP struct {
		SendStartTLS *bool `json:"send_starttls,omitempty"`
	} `json:"smtp"`
	SSL struct {
		ClientAuth          *bool     `json:"client_auth,omitempty"`
		CommonNameMatch     *[]string `json:"common_name_match,omitempty"`
		EllipticCurves      *[]string `json:"elliptic_curves,omitempty"`
		Enable              *bool     `json:"enable,omitempty"`
		Enhance             *bool     `json:"enhance,omitempty"`
		SendCloseAlerts     *bool     `json:"send_close_alerts,omitempty"`
		ServerName          *bool     `json:"server_name,omitempty"`
		SignatureAlgorithms *string   `json:"signature_algorithms,omitempty"`
		SSLCiphers          *string   `json:"ssl_ciphers,omitempty"`
		SSLSupportSSL2      *string   `json:"ssl_support_ssl2,omitempty"`
		SSLSupportSSL3      *string   `json:"ssl_support_ssl3,omitempty"`
		SSLSupportTLS1      *string   `json:"ssl_support_tls1,omitempty"`
		SSLSupportTLS11     *string   `json:"ssl_support_tls1_1,omitempty"`
		SSLSupportTLS12     *string   `json:"ssl_support_tls1_2,omitempty"`
		StrictVerify        *bool     `json:"strict_verify,omitempty"`
	} `json:"ssl"`
	TCP struct {
		Nagle *bool `json:"nagle,omitempty"`
	} `json:"tcp"`
	UDP struct {
		AcceptFrom     *string `json:"accept_from,omitempty"`
		AcceptFromMask *string `json:"accept_from_mask,omitempty"`
	} `json:"udp"`
}

type Profile

type Profile struct {
	Name *string   `json:"name,omitempty"`
	URLs *[]string `json:"urls,omitempty"`
}

type ProfileTable

type ProfileTable []Profile

type Rate

type Rate struct {
	RateProperties `json:"properties"`
	// contains filtered or unexported fields
}

A Rate is a Stingray rate shaping class.

func NewRate

func NewRate(name string) *Rate

func (*Rate) String

func (r *Rate) String() string

type RateProperties

type RateProperties struct {
	Basic struct {
		MaxRatePerMinute *int    `json:"max_rate_per_minute,omitempty"`
		MaxRatePerSecond *int    `json:"max_rate_per_second,omitempty"`
		Note             *string `json:"note,omitempty"`
	} `json:"basic"`
}

type Resourcer

type Resourcer interface {
	Name() string

	String() string
	// contains filtered or unexported methods
}

Resourcer is the interface implemented by objects that represent Stingray configuration resources.

type Rule

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

func NewRule

func NewRule(name string) *Rule

func (*Rule) String

func (f *Rule) String() string

type SSLCAs

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

An SSLCAs is a Stingray trusted certificate.

func NewSSLCAs

func NewSSLCAs(name string) *SSLCAs

func (*SSLCAs) String

func (f *SSLCAs) String() string

type SSLServerKey

type SSLServerKey struct {
	SSLServerKeyProperties `json:"properties"`
	// contains filtered or unexported fields
}

A SSLServerKey is a Stingray trusted certificate.

func NewSSLServerKey

func NewSSLServerKey(name string) *SSLServerKey

func (*SSLServerKey) String

func (r *SSLServerKey) String() string

type SSLServerKeyProperties

type SSLServerKeyProperties struct {
	Basic struct {
		Note    *string `json:"note,omitempty"`
		Private *string `json:"private,omitempty"`
		Public  *string `json:"public,omitempty"`
		Request *string `json:"request,omitempty"`
	} `json:"basic"`
}

type ScriptArgument

type ScriptArgument struct {
	Name        *string `json:"name,omitempty"` // mandatory
	Description *string `json:"description,omitempty"`
	Value       *string `json:"value,omitempty"` // mandatory
}

type ScriptArgumentsTable

type ScriptArgumentsTable []ScriptArgument

type ServerCertHostMapping

type ServerCertHostMapping struct {
	Certificate *string `json:"certificate,omitempty"`
	Host        *string `json:"host,omitempty"`
}

type ServerCertHostMappingTable

type ServerCertHostMappingTable []ServerCertHostMapping

type ServiceLevelMonitor

type ServiceLevelMonitor struct {
	ServiceLevelMonitorProperties `json:"properties"`
	// contains filtered or unexported fields
}

A ServiceLevelMonitor is a Stingray service level monitor.

func NewServiceLevelMonitor

func NewServiceLevelMonitor(name string) *ServiceLevelMonitor

func (*ServiceLevelMonitor) String

func (r *ServiceLevelMonitor) String() string

type ServiceLevelMonitorProperties

type ServiceLevelMonitorProperties struct {
	Basic struct {
		Note             *string `json:"note,omitempty"`
		ResponseTime     *int    `json:"response_time,omitempty"`
		SeriousThreshold *int    `json:"serious_threshold,omitempty"`
		WarningThreshold *int    `json:"warning_threshold,omitempty"`
	} `json:"basic"`
}

type TrafficIPGroup

type TrafficIPGroup struct {
	TrafficIPGroupProperties `json:"properties"`
	// contains filtered or unexported fields
}

A TrafficIPGroup is a Stingray traffic IP group.

func NewTrafficIPGroup

func NewTrafficIPGroup(name string) *TrafficIPGroup

func (*TrafficIPGroup) String

func (r *TrafficIPGroup) String() string

type TrafficIPGroupProperties

type TrafficIPGroupProperties struct {
	Basic struct {
		Enabled                      *bool           `json:"enabled,omitempty"`
		HashSourcePort               *bool           `json:"hash_source_port,omitempty"`
		IPMapping                    *IPMappingTable `json:"ip_mapping,omitempty"`
		IPAddresses                  *[]string       `json:"ipaddresses,omitempty"`
		KeepTogether                 *bool           `json:"keeptogether,omitempty"`
		Location                     *int            `json:"location,omitempty"`
		Machines                     *[]string       `json:"machines,omitempty"`
		Mode                         *string         `json:"mode,omitempty"`
		Multicast                    *string         `json:"multicast,omitempty"`
		Note                         *string         `json:"note,omitempty"`
		RHIBGPMetricBase             *int            `json:"rhi_bgp_metric_base,omitempty"`
		RHIBGPPassiveMetricOffset    *int            `json:"rhi_bgp_passive_metric_offset,omitempty"`
		RHIOSPFV2MetricBase          *int            `json:"rhi_ospfv2_metric_base,omitempty"`
		RHIOSPFV2PassiveMetricOffset *int            `json:"rhi_ospfv2_passive_metric_offset,omitempty"`
		RHIProtocols                 *string         `json:"rhi_protocols,omitempty"`
		Slaves                       *[]string       `json:"slaves,omitempty"`
	} `json:"basic"`
}

type TrafficManager

type TrafficManager struct {
	TrafficManagerProperties `json:"properties"`
	// contains filtered or unexported fields
}

A TrafficManager is a Stingray traffic manager.

func NewTrafficManager

func NewTrafficManager(name string) *TrafficManager

func (*TrafficManager) String

func (r *TrafficManager) String() string

type TrafficManagerProperties

type TrafficManagerProperties struct{}

type VirtualServer

type VirtualServer struct {
	VirtualServerProperties `json:"properties"`
	// contains filtered or unexported fields
}

A VirtualServer is a Stingray virtual server.

func NewVirtualServer

func NewVirtualServer(name string) *VirtualServer

func (*VirtualServer) String

func (r *VirtualServer) String() string

type VirtualServerProperties

type VirtualServerProperties struct {
	Aptimizer struct {
		Enabled *bool         `json:"enabled,omitempty"`
		Profile *ProfileTable `json:"profile,omitempty"`
	} `json:"aptimizer"`
	Basic struct {
		AddClusterIP             *bool   `json:"add_cluster_ip,omitempty"`
		AddXForwardedFor         *bool   `json:"add_x_forwarded_for,omitempty"`
		AddXForwardedProto       *bool   `json:"add_x_forwarded_proto,omitempty"`
		AutodetectUpgradeHeaders *bool   `json:"autodetect_upgrade_headers,omitempty"`
		BandwidthClass           *string `json:"bandwidth_class,omitempty"`
		CloseWithRST             *bool   `json:"close_with_rst,omitempty"`
		// To disable a rule, add a / before the name (e.g.
		// "example" -> "/example")
		CompletionRules      *[]string `json:"completionrules,omitempty"`
		ConnectTimeout       *int      `json:"connect_timeout,omitempty"`
		Enabled              *bool     `json:"enabled,omitempty"`
		FTPForceServerSecure *bool     `json:"ftp_force_server_secure,omitempty"`
		GLBServices          *[]string `json:"glb_services,omitempty"`
		ListenOnAny          *bool     `json:"listen_on_any,omitempty"`
		ListenOnHosts        *[]string `json:"listen_on_hosts,omitempty"`
		ListenOnTrafficIPs   *[]string `json:"listen_on_traffic_ips,omitempty"`
		Note                 *string   `json:"note,omitempty"`
		Pool                 *string   `json:"pool,omitempty"` // mandatory
		Port                 *int      `json:"port,omitempty"` // mandatory
		ProtectionClass      *string   `json:"protection_class,omitempty"`
		Protocol             *string   `json:"protocol,omitempty"`
		RequestRules         *[]string `json:"request_rules,omitempty"`
		ResponseRules        *[]string `json:"response_rules,omitempty"`
		SMLClass             *string   `json:"slm_class,omitempty"`
		SoNagle              *bool     `json:"so_nagle,omitempty"`
		SSLClientCertHeaders *string   `json:"ssl_client_cert_headers,omitempty"`
		SSLDecrypt           *bool     `json:"ssl_decrypt,omitempty"`
		SSLHonorFallbackSCSV *string   `json:"ssl_honor_fallback_scsv,omitempty"`
		Transparent          *bool     `json:"transparent,omitempty"`
	} `json:"basic"`
	Connection struct {
		Keepalive              *bool   `json:"keepalive,omitempty"`
		KeepaliveTimeout       *int    `json:"keepalive_timeout,omitempty"`
		MaxClientBuffer        *int    `json:"max_client_buffer,omitempty"`
		MaxServerBuffer        *int    `json:"max_server_buffer,omitempty"`
		MaxTransactionDuration *int    `json:"max_transaction_duration,omitempty"`
		ServerFirstBanner      *string `json:"server_first_banner,omitempty"`
		Timeout                *int    `json:"timeout,omitempty"`
	} `json:"connection"`
	ConnectionErrors struct {
		ErrorFile *string `json:"error_file,omitempty"`
	} `json:"connection_errors"`
	Cookie struct {
		Domain      *string `json:"domain,omitempty"`
		NewDomain   *string `json:"new_domain,omitempty"`
		PathRegex   *string `json:"path_regex,omitempty"`
		PathReplace *string `json:"path_replace,omitempty"`
		Secure      *string `json:"secure,omitempty"`
	} `json:"cookie"`
	DNS struct {
		EDNSUDPSize *int      `json:"edns_udpsize,omitempty"`
		MaxUDPSize  *int      `json:"max_udpsize,omitempty"`
		RRSetOrder  *string   `json:"rrset_order,omitempty"`
		Verbose     *bool     `json:"verbose,omitempty"`
		Zones       *[]string `json:"zones,omitempty"`
	} `json:"dns"`
	FTP struct {
		DataSourcePort    *int  `json:"data_source_port,omitempty"`
		ForceClientSecure *bool `json:"force_client_secure,omitempty"`
		PortRangeHigh     *int  `json:"port_range_high,omitempty"`
		PortRangeLow      *int  `json:"port_range_low,omitempty"`
		SSLData           *bool `json:"ssl_data,omitempty"`
	} `json:"ftp"`
	Gzip struct {
		CompressLevel *int      `json:"compress_level,omitempty"`
		Enabled       *bool     `json:"enabled,omitempty"`
		ETagRewrite   *string   `json:"etag_rewrite,omitempty"`
		IncludeMIME   *[]string `json:"include_mime,omitempty"`
		MaxSize       *int      `json:"max_size,omitempty"`
		MinSize       *int      `json:"min_size,omitempty"`
		NoSize        *bool     `json:"no_size,omitempty"`
	} `json:"gzip"`
	HTTP struct {
		ChunkOverheadForwarding *string `json:"chunk_overhead_forwarding,omitempty"`
		LocationRegex           *string `json:"location_regex,omitempty"`
		LocationReplace         *string `json:"location_replace,omitempty"`
		LocationRewrite         *string `json:"location_rewrite,omitempty"`
		MIMEDefault             *string `json:"mime_default,omitempty"`
		MIMEDetect              *bool   `json:"mime_detect,omitempty"`
	} `json:"http"`
	KerberosProtocolTransition struct {
		Enabled   *bool   `json:"enabled,omitempty"`
		Principal *string `json:"principal,omitempty"`
		Target    *string `json:"target,omitempty"`
	} `json:"kerberos_protocol_transition"`
	Log struct {
		ClientConnectionFailures  *bool   `json:"client_connection_failures,omitempty"`
		Enabled                   *bool   `json:"enabled,omitempty"`
		Filename                  *string `json:"filename,omitempty"`
		Format                    *string `json:"format,omitempty"`
		Save                      *bool   `json:"save_all,omitempty"`
		ServerConnectionFailures  *bool   `json:"server_connection_failures,omitempty"`
		SessionPersistenceVerbose *bool   `json:"session_persistence_verbose,omitempty"`
		SSLFailures               *bool   `json:"ssl_failures,omitempty"`
	} `json:"log"`
	RecentConnections struct {
		Enabled *bool `json:"enabled,omitempty"`
		SaveAll *bool `json:"save_all,omitempty"`
	} `json:"recent_connections"`
	RequestTracing struct {
		Enabled *bool `json:"enabled,omitempty"`
		TraceIO *bool `json:"trace_io,omitempty"`
	} `json:"request_tracing"`
	RTSP struct {
		StreamingPortRangeHigh *int `json:"streaming_port_range_high,omitempty"`
		StreamingPortRangeLow  *int `json:"streaming_port_range_low,omitempty"`
		StreamingTimeout       *int `json:"streaming_timeout,omitempty"`
	} `json:"rtsp"`
	SIP struct {
		DangerousRequests      *string `json:"dangerous_requests,omitempty"`
		FollowRoute            *bool   `json:"follow_route,omitempty"`
		MaxConnectionMem       *int    `json:"max_connection_mem,omitempty"`
		Mode                   *string `json:"mode,omitempty"`
		RewriteURI             *bool   `json:"rewrite_uri,omitempty"`
		StreamingPortRangeHigh *int    `json:"streaming_port_range_high,omitempty"`
		StreamingPortRangeLow  *int    `json:"streaming_port_range_low,omitempty"`
		StreamingTimeout       *int    `json:"streaming_timeout,omitempty"`
		TimeoutMessages        *bool   `json:"timeout_messages,omitempty"`
		TransactionTimeout     *int    `json:"transaction_timeout,omitempty"`
	} `json:"sip"`
	SMTP struct {
		ExpectStartTLS *bool `json:"expect_starttls,omitempty"`
	} `json:"smtp"`
	SSL struct {
		AddHTTPHeaders         *bool                       `json:"add_http_headers,omitempty"`
		ClientCertCAs          *[]string                   `json:"client_cert_cas,omitempty"`
		EllipticCurves         *[]string                   `json:"elliptic_curves,omitempty"`
		IssuedCertsNeverExpire *[]string                   `json:"issued_certs_never_expire,omitempty"`
		OCSPEnable             *bool                       `json:"ocsp_enable,omitempty"`
		OCSPIssuers            *OCSPIssuersTable           `json:"ocsp_issuers,omitempty"`
		OCSPMaxResponseAge     *int                        `json:"ocsp_max_response_age,omitempty"`
		OCSPStapling           *bool                       `json:"ocsp_stapling,omitempty"`
		OCSPTimeTolerance      *int                        `json:"ocsp_time_tolerance,omitempty"`
		OCSPTimeout            *int                        `json:"ocsp_timeout,omitempty"`
		PreferSSLv3            *bool                       `json:"prefer_sslv3,omitempty"`
		RequestClientCert      *string                     `json:"request_client_cert,omitempty"`
		SendCloseAlerts        *bool                       `json:"send_close_alerts,omitempty"`
		ServerCertDefault      *string                     `json:"server_cert_default,omitempty"`
		ServerCertHostMapping  *ServerCertHostMappingTable `json:"server_cert_host_mapping,omitempty"`
		SignatureAlgorithms    *string                     `json:"signature_algorithms,omitempty"`
		SSLCiphers             *string                     `json:"ssl_ciphers,omitempty"`
		SSLSupportSSL2         *string                     `json:"ssl_support_ssl2,omitempty"`
		SSLSupportSSL3         *string                     `json:"ssl_support_ssl3,omitempty"`
		SSLSupportTLS1         *string                     `json:"ssl_support_tls1,omitempty"`
		SSLSupportTLS11        *string                     `json:"ssl_support_tls1_1,omitempty"`
		SSLSupportTLS12        *string                     `json:"ssl_support_tls1_2,omitempty"`
		TrustMagic             *bool                       `json:"trust_magic,omitempty"`
	} `json:"ssl"`
	Syslog struct {
		Enabled     *bool   `json:"enabled,omitempty"`
		Format      *string `json:"format,omitempty"`
		IPEndPoint  *string `json:"ip_end_point,omitempty"`
		MsgLenLimit *int    `json:"msg_len_limit,omitempty"`
	} `json:"syslog"`
	TCP struct {
		ProxyClose *bool `json:"proxy_close,omitempty"`
	} `json:"tcp"`
	UDP struct {
		EndPointPersistence       *bool `json:"end_point_persistence,omitempty"`
		PortSMP                   *bool `json:"port_smp,omitempty"`
		ResponseDatagramsExpected *int  `json:"response_datagrams_expected,omitempty"`
		Timeout                   *int  `json:"timeout,omitempty"`
	} `json:"udp"`
	WebCache struct {
		ControlOut    *string `json:"control_out,omitempty"`
		Enabled       *bool   `json:"enabled,omitempty"`
		ErrorPageTime *int    `json:"error_page_time,omitempty"`
		MaxTime       *int    `json:"max_time,omitempty"`
		RefreshTime   *int    `json:"refresh_time,omitempty"`
	} `json:"web_cache"`
}

Jump to

Keyboard shortcuts

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