Documentation
¶
Index ¶
- type ActiveHealthcheck
- type CertMetadata
- type Certificate
- type CertificateRef
- type CertificateResponse
- type Client
- func (c *Client) CertificateGetById(controlPlaneId string, certificateId string) (certificate *Certificate, err error)
- func (c *Client) CertificatesGet(controlPlaneId string, parameters []string) (certificates []Certificate, err error)
- func (c *Client) ConsumerGetById(controlPlaneId string, consumerId string) (consumer *Consumer, err error)
- func (c *Client) ConsumersGet(controlPlaneId string, parameters []string) (consumers []Consumer, err error)
- func (c *Client) ControlPlaneGetId(controlPlaneId string) (controlPlane *ControlPlane, err error)
- func (c *Client) ControlPlanesGet(parameters []string) (controlPlanes []ControlPlane, err error)
- func (c *Client) ControlPlanesGetPage(pageSize int, pageNumber int, parameters []string) (*ControlPlaneResponse, error)
- func (c *Client) Do(req *http.Request, v interface{}) (resp *RestResponse, err error)
- func (c *Client) DpNodeGetById(controlPlaneId string, dpNodeId string) (dpNode *DpNode, err error)
- func (c *Client) DpNodesGet(controlPlaneId string, parameters []string) (nodes []DpNode, err error)
- func (c *Client) NewRequest(method string, apiPath string, parameters []string, body interface{}) (req *http.Request, err error)
- func (c *Client) PluginGetById(controlPlaneId string, routeId string, pluginId string) (plugin *Plugin, err error)
- func (c *Client) PluginsGet(controlPlaneId string, routeId string, parameters []string) (plugins []Plugin, err error)
- func (c *Client) RouteGetById(controlPlaneId string, routeId string) (route *Route, err error)
- func (c *Client) RoutesGet(controlPlaneId string, parameters []string) (routes []Route, err error)
- func (c *Client) ServiceGetById(controlPlaneId string, serviceId string) (service *Service, err error)
- func (c *Client) ServicesGet(controlPlaneId string, parameters []string) (services []Service, err error)
- func (c *Client) SniGetById(controlPlaneId string, sniId string) (sni *Sni, err error)
- func (c *Client) SnisGet(controlPlaneId string, parameters []string) (snis []Sni, err error)
- func (c *Client) UpstreamGetById(controlPlaneId string, upstreamId string) (upstream *Upstream, err error)
- func (c *Client) UpstreamsGet(controlPlaneId string, parameters []string) (upstreams []Upstream, err error)
- type ClientOptions
- type Config
- type Consumer
- type ConsumerResponse
- type ControlPlane
- type ControlPlaneConfig
- type ControlPlaneResponse
- type DpNode
- type DpNodeResponse
- type ErrorResponse
- type Headers
- type Healthchecks
- type Healthy
- type Meta
- type Page
- type PassiveHealthcheck
- type Plugin
- type PluginResponse
- type RestResponse
- type Route
- type RouteRef
- type RouteResponse
- type Service
- type ServiceRef
- type ServiceResponse
- type Sni
- type SniResponse
- type Unhealthy
- type Upstream
- type UpstreamResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveHealthcheck ¶
type ActiveHealthcheck struct { Concurrency int `json:"concurrency"` Headers Headers `json:"headers,omitempty"` Healthy Healthy `json:"healthy"` HttpsVerifyCertificate bool `json:"https_verify_certificate"` HttpPath string `json:"http_path,omitempty"` HttpsSni string `json:"https_sni,omitempty"` Timeout int `json:"timeout"` Type string `json:"type,omitempty"` Unhealthy Unhealthy `json:"unhealthy"` }
type CertMetadata ¶
type Certificate ¶
type CertificateRef ¶
type CertificateRef struct {
Id string `json:"id"`
}
type CertificateResponse ¶
type CertificateResponse struct { Data []Certificate `json:"data"` Next string `json:"next,omitempty"` Offset string `json:"offset,omitempty"` }
type Client ¶
type Client struct { Client *http.Client BaseURL *url.URL UserAgent string Options *ClientOptions ResponseTimeout time.Duration }
func NewClient ¶
func NewClient(endpoint string, options *ClientOptions) *Client
func (*Client) CertificateGetById ¶
func (c *Client) CertificateGetById(controlPlaneId string, certificateId string) (certificate *Certificate, err error)
func (*Client) CertificatesGet ¶
func (c *Client) CertificatesGet(controlPlaneId string, parameters []string) (certificates []Certificate, err error)
func (*Client) ConsumerGetById ¶
func (*Client) ConsumersGet ¶
func (*Client) ControlPlaneGetId ¶
func (c *Client) ControlPlaneGetId(controlPlaneId string) (controlPlane *ControlPlane, err error)
func (*Client) ControlPlanesGet ¶
func (c *Client) ControlPlanesGet(parameters []string) (controlPlanes []ControlPlane, err error)
func (*Client) ControlPlanesGetPage ¶
func (*Client) Do ¶
func (c *Client) Do(req *http.Request, v interface{}) (resp *RestResponse, err error)
func (*Client) DpNodeGetById ¶
func (*Client) DpNodesGet ¶
func (*Client) NewRequest ¶
func (*Client) PluginGetById ¶
func (*Client) PluginsGet ¶
func (*Client) RouteGetById ¶
func (*Client) ServiceGetById ¶
func (*Client) ServicesGet ¶
func (*Client) SniGetById ¶
func (*Client) UpstreamGetById ¶
type ClientOptions ¶
func DefaultOptions ¶
func DefaultOptions() *ClientOptions
type ConsumerResponse ¶
type ControlPlane ¶
type ControlPlane struct { Id string `json:"id"` Name string `json:"name"` Description string `json:"description,omitempty"` Labels map[string]string `json:"labels,omitempty"` Config ControlPlaneConfig `json:"config"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` }
type ControlPlaneConfig ¶
type ControlPlaneResponse ¶
type ControlPlaneResponse struct { Meta Meta `json:"meta"` Data []ControlPlane }
type DpNode ¶
type DpNode struct { CompatibilityStatus struct { State string `json:"state"` } `json:"compatibility_status"` ConfigHash string `json:"config_hash"` CreatedAt int64 `json:"created_at"` Hostname string `json:"hostname"` Id string `json:"id"` LastPing int64 `json:"last_ping"` Status string `json:"status,omitempty"` Type string `json:"type"` UpdatedAt int64 `json:"updated_at"` Version string `json:"version"` }
type DpNodeResponse ¶
type ErrorResponse ¶
type Healthchecks ¶
type Healthchecks struct { Active ActiveHealthcheck `json:"active"` Threshold int `json:"threshold"` Passive PassiveHealthcheck `json:"passive"` }
type PassiveHealthcheck ¶
type Plugin ¶
type Plugin struct { Config Config `json:"config"` CreatedAt int64 `json:"created_at"` Id string `json:"id"` Name string `json:"name"` Protocols []string `json:"protocols,omitempty"` Route ServiceRef `json:"service,omitempty"` Tags []string `json:"tags,omitempty"` UpdatedAt int64 `json:"updated_at"` }
type PluginResponse ¶
type RestResponse ¶
type RestResponse struct { ErrorResponse ErrorResponse HttpResponse *http.Response }
type Route ¶
type Route struct { CreatedAt int64 `json:"created_at"` Hosts []string `json:"hosts,omitempty"` HttpsRedirectStatusCode int `json:"https_redirect_status_code"` Id string `json:"id"` Name string `json:"name"` PathHandling string `json:"path_handling,omitempty"` Paths []string `json:"paths,omitempty"` PreserveHost bool `json:"preserve_host"` Protocols []string `json:"protocols,omitempty"` RegexPriority int `json:"regex_priority"` RequestBuffering bool `json:"request_buffering"` ResponseBuffering bool `json:"response_buffering"` Service ServiceRef `json:"service"` StripPath bool `json:"strip_path"` Tags []string `json:"tags,omitempty"` UpdatedAt int64 `json:"updated_at"` }
type RouteResponse ¶
type Service ¶
type Service struct { ConnectTimeout int `json:"connect_timeout"` CreatedAt int64 `json:"created_at"` Enabled bool `json:"enabled"` Host string `json:"host,omitempty"` Id string `json:"id"` Name string `json:"name"` Path string `json:"path,omitempty"` Port int `json:"port"` Protocol string `json:"protocol,omitempty"` ReadTimeout int `json:"read_timeout"` Retries int `json:"retries"` Tags []string `json:"tags,omitempty"` UpdatedAt int64 `json:"updated_at"` WriteTimeout int `json:"write_timeout"` }
type ServiceRef ¶
type ServiceRef struct {
Id string `json:"id"`
}
type ServiceResponse ¶
type Sni ¶
type Sni struct { Certificate CertificateRef `json:"certificate"` CreatedAt int64 `json:"created_at"` Id string `json:"id"` Name string `json:"name"` UpdatedAt int64 `json:"updated_at"` }
type SniResponse ¶
type Upstream ¶
type Upstream struct { Algorithm string `json:"created_at"` ClientCertificate *CertificateRef `json:"client_certificate,omitempty"` CreatedAt int64 `json:"created_at"` HashFallback string `json:"hash_fallback"` HashOn string `json:"hash_on"` HashOnCookiePath string `json:"hash_on_cookie_path"` Healthchecks Healthchecks `json:"healthchecks"` HostHeader string `json:""host_header,omitempty"` Id string `json:"id"` Name string `json:"name"` Slots int `json:"slots"` Tags []string `json:"tags,omitempty"` UseSrvName bool `json:"use_srv_name"` }
type UpstreamResponse ¶
Click to show internal directories.
Click to hide internal directories.