loadbalancer

package
v1.3.53 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL struct {
	ID            int            `json:"id"`
	Name          string         `json:"name"`
	ListenerID    int            `json:"listener_id"`
	TargetGroupID int            `json:"target_group_id"`
	Conditions    []ACLCondition `json:"conditions"`
}

ACL represents an ACL +genie:model_response +genie:model_paginated

type ACLCondition

type ACLCondition struct {
	Name      string                 `json:"name"`
	Arguments []ACLConditionArgument `json:"arguments"`
}

ACLCondition represents an ACL condition +genie:model_response +genie:model_paginated

type ACLConditionArgument

type ACLConditionArgument struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

ACLConditionArgument represents an ACL condition argument +genie:model_response +genie:model_paginated

type ACLNotFoundError

type ACLNotFoundError struct {
	ID int
}

ACLNotFoundError indicates a certificate was not found

func (*ACLNotFoundError) Error

func (e *ACLNotFoundError) Error() string

type AccessIP

type AccessIP struct {
	ID        int                  `json:"id"`
	IP        connection.IPAddress `json:"ip"`
	CreatedAt connection.DateTime  `json:"created_at"`
	UpdatedAt connection.DateTime  `json:"updated_at"`
}

AccessIP represents an access IP +genie:model_response +genie:model_paginated

type AccessIPNotFoundError

type AccessIPNotFoundError struct {
	ID int
}

AccessIPNotFoundError indicates an access IP was not found

func (*AccessIPNotFoundError) Error

func (e *AccessIPNotFoundError) Error() string

type Bind

type Bind struct {
	ID         int                 `json:"id"`
	ListenerID int                 `json:"listener_id"`
	VIPID      int                 `json:"vip_id"`
	Port       int                 `json:"port"`
	CreatedAt  connection.DateTime `json:"created_at"`
	UpdatedAt  connection.DateTime `json:"updated_at"`
}

Bind represents a bind +genie:model_response +genie:model_paginated

type BindNotFoundError

type BindNotFoundError struct {
	ID int
}

BindNotFoundError indicates a bind was not found

func (*BindNotFoundError) Error

func (e *BindNotFoundError) Error() string

type Certificate

type Certificate struct {
	ID          int                 `json:"id"`
	ListenerID  int                 `json:"listener_id"`
	Name        string              `json:"name"`
	Key         string              `json:"key"`
	Certificate string              `json:"certificate"`
	CABundle    string              `json:"ca_bundle"`
	CreatedAt   connection.DateTime `json:"created_at"`
	UpdatedAt   connection.DateTime `json:"updated_at"`
}

Certificate represents a certificate +genie:model_response +genie:model_paginated

type CertificateNotFoundError

type CertificateNotFoundError struct {
	ID int
}

CertificateNotFoundError indicates a certificate was not found

func (*CertificateNotFoundError) Error

func (e *CertificateNotFoundError) Error() string

type Cluster

type Cluster struct {
	ID         int                 `json:"id"`
	Name       string              `json:"name"`
	Deployed   bool                `json:"deployed"`
	DeployedAt connection.DateTime `json:"deployed_at"`
	CreatedAt  connection.DateTime `json:"created_at"`
	UpdatedAt  connection.DateTime `json:"updated_at"`
}

Cluster represents a cluster +genie:model_response +genie:model_paginated

type ClusterNotFoundError

type ClusterNotFoundError struct {
	ID int
}

ClusterNotFoundError indicates a cluster was not found

func (*ClusterNotFoundError) Error

func (e *ClusterNotFoundError) Error() string

type CreateACLRequest

type CreateACLRequest struct {
	Name          string         `json:"name"`
	ListenerID    int            `json:"listener_id"`
	TargetGroupID int            `json:"target_group_id"`
	Conditions    []ACLCondition `json:"conditions"`
}

CreateACLRequest represents a request to create a ACL

type CreateAccessIPRequest

type CreateAccessIPRequest struct {
	IP connection.IPAddress `json:"ip"`
}

CreateAccessIPRequest represents a request to create an access rule

type CreateBindRequest

type CreateBindRequest struct {
	ListenerID int `json:"listener_id"`
	VIPID      int `json:"vip_id"`
	Port       int `json:"port"`
}

CreateBindRequest represents a request to create a bind

type CreateCertificateRequest

type CreateCertificateRequest struct {
	ListenerID  int    `json:"listener_id"`
	Name        string `json:"name"`
	Key         string `json:"key"`
	Certificate string `json:"certificate"`
	CABundle    string `json:"ca_bundle"`
}

CreateCertificateRequest represents a request to create a certificate

type CreateListenerRequest

type CreateListenerRequest struct {
	Name                 string `json:"name"`
	ClusterID            int    `json:"cluster_id"`
	VIPID                int    `json:"vips_id"`
	Port                 int    `json:"port"`
	HSTSEnabled          bool   `json:"hsts_enabled"`
	Mode                 string `json:"mode"`
	HSTSMaxAge           int    `json:"hsts_maxage"`
	Close                bool   `json:"close"`
	RedirectHTTPS        bool   `json:"redirect_https"`
	DefaultTargetGroupID string `json:"default_targetgroup_id"`
}

CreateListenerRequest represents a request to create a listener

type CreateTargetGroupRequest

type CreateTargetGroupRequest struct {
	ClusterID            int    `json:"cluster_id"`
	Name                 string `json:"name,omitempty"`
	Balance              string `json:"balance,omitempty"`
	Mode                 string `json:"mode,omitempty"`
	Close                bool   `json:"close"`
	Sticky               bool   `json:"sticky"`
	CookieOpts           string `json:"cookie_opts,omitempty"`
	Source               string `json:"source,omitempty"`
	TimeoutsConnect      int    `json:"timeouts_connect,omitempty"`
	TimeoutServer        int    `json:"timeouts_server,omitempty"`
	CustomOptions        string `json:"custom_options,omitempty"`
	MonitorURL           string `json:"monitor_url,omitempty"`
	MonitorMethod        string `json:"monitor_method,omitempty"`
	MonitorHost          string `json:"monitor_host,omitempty"`
	MonitorHTTPVersion   string `json:"monitor_http_version,omitempty"`
	MonitorExpect        string `json:"monitor_expect,omitempty"`
	MonitorTCPMonitoring bool   `json:"monitor_tcp_monitoring"`
	CheckPort            int    `json:"check_port,omitempty"`
	SendProxy            bool   `json:"send_proxy"`
	SendProxyV2          bool   `json:"send_proxy_v2"`
}

CreateTargetGroupRequest represents a request to create a target group

type CreateTargetRequest

type CreateTargetRequest struct {
	TargetGroupID int                  `json:"targetgroup_id"`
	Name          string               `json:"name,omitempty"`
	IP            connection.IPAddress `json:"ip"`
	Port          int                  `json:"port,omitempty"`
	Weight        int                  `json:"weight,omitempty"`
	Backup        bool                 `json:"backup"`
	CheckInterval int                  `json:"check_interval,omitempty"`
	CheckSSL      bool                 `json:"check_ssl"`
	CheckRise     int                  `json:"check_rise,omitempty"`
	CheckFall     int                  `json:"check_fall,omitempty"`
	DisableHTTP2  bool                 `json:"disable_http2"`
	HTTP2Only     bool                 `json:"http2_only"`
}

CreateTargetRequest represents a request to create a target

type CreateVIPRequest

type CreateVIPRequest struct {
	ClusterID int    `json:"cluster_id"`
	Type      string `json:"type"`
	CIDR      string `json:"cidr"`
}

CreateVIPRequest represents a request to create a target group

type GetACLConditionArgumentResponseBody

type GetACLConditionArgumentResponseBody struct {
	connection.APIResponseBody
	Data ACLConditionArgument `json:"data"`
}

GetACLConditionArgumentResponseBody represents an API response body containing ACLConditionArgument data

type GetACLConditionArgumentSliceResponseBody

type GetACLConditionArgumentSliceResponseBody struct {
	connection.APIResponseBody
	Data []ACLConditionArgument `json:"data"`
}

GetACLConditionArgumentSliceResponseBody represents an API response body containing []ACLConditionArgument data

type GetACLConditionResponseBody

type GetACLConditionResponseBody struct {
	connection.APIResponseBody
	Data ACLCondition `json:"data"`
}

GetACLConditionResponseBody represents an API response body containing ACLCondition data

type GetACLConditionSliceResponseBody

type GetACLConditionSliceResponseBody struct {
	connection.APIResponseBody
	Data []ACLCondition `json:"data"`
}

GetACLConditionSliceResponseBody represents an API response body containing []ACLCondition data

type GetACLResponseBody

type GetACLResponseBody struct {
	connection.APIResponseBody
	Data ACL `json:"data"`
}

GetACLResponseBody represents an API response body containing ACL data

type GetACLSliceResponseBody

type GetACLSliceResponseBody struct {
	connection.APIResponseBody
	Data []ACL `json:"data"`
}

GetACLSliceResponseBody represents an API response body containing []ACL data

type GetAccessIPResponseBody

type GetAccessIPResponseBody struct {
	connection.APIResponseBody
	Data AccessIP `json:"data"`
}

GetAccessIPResponseBody represents an API response body containing AccessIP data

type GetAccessIPSliceResponseBody

type GetAccessIPSliceResponseBody struct {
	connection.APIResponseBody
	Data []AccessIP `json:"data"`
}

GetAccessIPSliceResponseBody represents an API response body containing []AccessIP data

type GetBindResponseBody

type GetBindResponseBody struct {
	connection.APIResponseBody
	Data Bind `json:"data"`
}

GetBindResponseBody represents an API response body containing Bind data

type GetBindSliceResponseBody

type GetBindSliceResponseBody struct {
	connection.APIResponseBody
	Data []Bind `json:"data"`
}

GetBindSliceResponseBody represents an API response body containing []Bind data

type GetCertificateResponseBody

type GetCertificateResponseBody struct {
	connection.APIResponseBody
	Data Certificate `json:"data"`
}

GetCertificateResponseBody represents an API response body containing Certificate data

type GetCertificateSliceResponseBody

type GetCertificateSliceResponseBody struct {
	connection.APIResponseBody
	Data []Certificate `json:"data"`
}

GetCertificateSliceResponseBody represents an API response body containing []Certificate data

type GetClusterResponseBody

type GetClusterResponseBody struct {
	connection.APIResponseBody
	Data Cluster `json:"data"`
}

GetClusterResponseBody represents an API response body containing Cluster data

type GetClusterSliceResponseBody

type GetClusterSliceResponseBody struct {
	connection.APIResponseBody
	Data []Cluster `json:"data"`
}

GetClusterSliceResponseBody represents an API response body containing []Cluster data

type GetHeaderResponseBody

type GetHeaderResponseBody struct {
	connection.APIResponseBody
	Data Header `json:"data"`
}

GetHeaderResponseBody represents an API response body containing Header data

type GetHeaderSliceResponseBody

type GetHeaderSliceResponseBody struct {
	connection.APIResponseBody
	Data []Header `json:"data"`
}

GetHeaderSliceResponseBody represents an API response body containing []Header data

type GetListenerResponseBody

type GetListenerResponseBody struct {
	connection.APIResponseBody
	Data Listener `json:"data"`
}

GetListenerResponseBody represents an API response body containing Listener data

type GetListenerSliceResponseBody

type GetListenerSliceResponseBody struct {
	connection.APIResponseBody
	Data []Listener `json:"data"`
}

GetListenerSliceResponseBody represents an API response body containing []Listener data

type GetTargetGroupResponseBody

type GetTargetGroupResponseBody struct {
	connection.APIResponseBody
	Data TargetGroup `json:"data"`
}

GetTargetGroupResponseBody represents an API response body containing TargetGroup data

type GetTargetGroupSliceResponseBody

type GetTargetGroupSliceResponseBody struct {
	connection.APIResponseBody
	Data []TargetGroup `json:"data"`
}

GetTargetGroupSliceResponseBody represents an API response body containing []TargetGroup data

type GetTargetResponseBody

type GetTargetResponseBody struct {
	connection.APIResponseBody
	Data Target `json:"data"`
}

GetTargetResponseBody represents an API response body containing Target data

type GetTargetSliceResponseBody

type GetTargetSliceResponseBody struct {
	connection.APIResponseBody
	Data []Target `json:"data"`
}

GetTargetSliceResponseBody represents an API response body containing []Target data

type GetVIPResponseBody

type GetVIPResponseBody struct {
	connection.APIResponseBody
	Data VIP `json:"data"`
}

GetVIPResponseBody represents an API response body containing VIP data

type GetVIPSliceResponseBody

type GetVIPSliceResponseBody struct {
	connection.APIResponseBody
	Data []VIP `json:"data"`
}

GetVIPSliceResponseBody represents an API response body containing []VIP data

type Header struct {
	Header string `json:"header"`
}

Header represents a header +genie:model_response +genie:model_paginated

type Listener

type Listener struct {
	ID                   int                 `json:"id"`
	Name                 string              `json:"name"`
	ClusterID            int                 `json:"cluster_id"`
	HSTSEnabled          bool                `json:"hsts_enabled"`
	Mode                 string              `json:"mode"`
	HSTSMaxAge           int                 `json:"hsts_maxage"`
	Close                bool                `json:"close"`
	RedirectHTTPS        bool                `json:"redirect_https"`
	DefaultTargetGroupID int                 `json:"default_targetgroup_id"`
	CreatedAt            connection.DateTime `json:"created_at"`
	UpdatedAt            connection.DateTime `json:"updated_at"`
}

Listener represents a listener / frontend +genie:model_response +genie:model_paginated

type ListenerNotFoundError

type ListenerNotFoundError struct {
	ID int
}

ListenerNotFoundError indicates a listener was not found

func (*ListenerNotFoundError) Error

func (e *ListenerNotFoundError) Error() string

type LoadBalancerService

type LoadBalancerService interface {
	// Cluster
	GetClusters(parameters connection.APIRequestParameters) ([]Cluster, error)
	GetClustersPaginated(parameters connection.APIRequestParameters) (*PaginatedCluster, error)
	GetCluster(clusterID int) (Cluster, error)
	PatchCluster(clusterID int, req PatchClusterRequest) error
	DeployCluster(clusterID int) error
	ValidateCluster(clusterID int) error

	// Target Group
	GetTargetGroups(parameters connection.APIRequestParameters) ([]TargetGroup, error)
	GetTargetGroupsPaginated(parameters connection.APIRequestParameters) (*PaginatedTargetGroup, error)
	GetTargetGroup(groupID int) (TargetGroup, error)
	CreateTargetGroup(req CreateTargetGroupRequest) (int, error)
	PatchTargetGroup(groupID int, req PatchTargetGroupRequest) error
	DeleteTargetGroup(groupID int) error

	// Target Group Target
	GetTargetGroupTargets(groupID int, parameters connection.APIRequestParameters) ([]Target, error)
	GetTargetGroupTargetsPaginated(groupID int, parameters connection.APIRequestParameters) (*PaginatedTarget, error)
	GetTargetGroupTarget(groupID int, targetID int) (Target, error)
	CreateTargetGroupTarget(groupID int, req CreateTargetRequest) (int, error)
	PatchTargetGroupTarget(groupID int, targetID int, req PatchTargetRequest) error
	DeleteTargetGroupTarget(groupID int, targetID int) error

	// VIP
	GetVIPs(parameters connection.APIRequestParameters) ([]VIP, error)
	GetVIPsPaginated(parameters connection.APIRequestParameters) (*PaginatedVIP, error)
	GetVIP(vipID int) (VIP, error)

	// Listener
	GetListeners(parameters connection.APIRequestParameters) ([]Listener, error)
	GetListenersPaginated(parameters connection.APIRequestParameters) (*PaginatedListener, error)
	GetListener(listenerID int) (Listener, error)
	CreateListener(req CreateListenerRequest) (int, error)
	PatchListener(listenerID int, req PatchListenerRequest) error
	DeleteListener(listenerID int) error

	// Listener Access IP
	GetListenerAccessIPs(listenerID int, parameters connection.APIRequestParameters) ([]AccessIP, error)
	GetListenerAccessIPsPaginated(listenerID int, parameters connection.APIRequestParameters) (*PaginatedAccessIP, error)
	CreateListenerAccessIP(listenerID int, req CreateAccessIPRequest) (int, error)

	// Listener Bind
	GetListenerBinds(listenerID int, parameters connection.APIRequestParameters) ([]Bind, error)
	GetListenerBindsPaginated(listenerID int, parameters connection.APIRequestParameters) (*PaginatedBind, error)
	GetListenerBind(listenerID int, bindID int) (Bind, error)
	CreateListenerBind(listenerID int, req CreateBindRequest) (int, error)
	PatchListenerBind(listenerID int, bindID int, req PatchBindRequest) error
	DeleteListenerBind(listenerID int, bindID int) error

	// Access IP
	GetAccessIP(accessIP int) (AccessIP, error)
	PatchAccessIP(accessIP int, req PatchAccessIPRequest) error
	DeleteAccessIP(accessIP int) error

	// Listener Certificate
	GetListenerCertificates(listenerID int, parameters connection.APIRequestParameters) ([]Certificate, error)
	GetListenerCertificatesPaginated(listenerID int, parameters connection.APIRequestParameters) (*PaginatedCertificate, error)
	GetListenerCertificate(listenerID int, certificateID int) (Certificate, error)
	CreateListenerCertificate(listenerID int, req CreateCertificateRequest) (int, error)
	PatchListenerCertificate(listenerID int, certificateID int, req PatchCertificateRequest) error
	DeleteListenerCertificate(listenerID int, certificateID int) error

	// Bind
	GetBinds(parameters connection.APIRequestParameters) ([]Bind, error)
	GetBindsPaginated(parameters connection.APIRequestParameters) (*PaginatedBind, error)

	// Header
	GetHeaders(parameters connection.APIRequestParameters) ([]Header, error)
	GetHeadersPaginated(parameters connection.APIRequestParameters) (*PaginatedHeader, error)

	// ACL
	GetACLs(parameters connection.APIRequestParameters) ([]ACL, error)
	GetACLsPaginated(parameters connection.APIRequestParameters) (*PaginatedACL, error)
	GetACL(aclID int) (ACL, error)
	CreateACL(req CreateACLRequest) (int, error)
	PatchACL(aclID int, req PatchACLRequest) error
	DeleteACL(aclID int) error
}

LoadBalancerService is an interface for managing the LoadBalancer service

type PaginatedACL

type PaginatedACL struct {
	*connection.PaginatedBase
	Items []ACL
}

PaginatedACL represents a paginated collection of ACL

func NewPaginatedACL

NewPaginatedACL returns a pointer to an initialized PaginatedACL struct

type PaginatedACLCondition

type PaginatedACLCondition struct {
	*connection.PaginatedBase
	Items []ACLCondition
}

PaginatedACLCondition represents a paginated collection of ACLCondition

func NewPaginatedACLCondition

NewPaginatedACLCondition returns a pointer to an initialized PaginatedACLCondition struct

type PaginatedACLConditionArgument

type PaginatedACLConditionArgument struct {
	*connection.PaginatedBase
	Items []ACLConditionArgument
}

PaginatedACLConditionArgument represents a paginated collection of ACLConditionArgument

func NewPaginatedACLConditionArgument

NewPaginatedACLConditionArgument returns a pointer to an initialized PaginatedACLConditionArgument struct

type PaginatedAccessIP

type PaginatedAccessIP struct {
	*connection.PaginatedBase
	Items []AccessIP
}

PaginatedAccessIP represents a paginated collection of AccessIP

func NewPaginatedAccessIP

NewPaginatedAccessIP returns a pointer to an initialized PaginatedAccessIP struct

type PaginatedBind

type PaginatedBind struct {
	*connection.PaginatedBase
	Items []Bind
}

PaginatedBind represents a paginated collection of Bind

func NewPaginatedBind

NewPaginatedBind returns a pointer to an initialized PaginatedBind struct

type PaginatedCertificate

type PaginatedCertificate struct {
	*connection.PaginatedBase
	Items []Certificate
}

PaginatedCertificate represents a paginated collection of Certificate

func NewPaginatedCertificate

NewPaginatedCertificate returns a pointer to an initialized PaginatedCertificate struct

type PaginatedCluster

type PaginatedCluster struct {
	*connection.PaginatedBase
	Items []Cluster
}

PaginatedCluster represents a paginated collection of Cluster

func NewPaginatedCluster

NewPaginatedCluster returns a pointer to an initialized PaginatedCluster struct

type PaginatedHeader

type PaginatedHeader struct {
	*connection.PaginatedBase
	Items []Header
}

PaginatedHeader represents a paginated collection of Header

func NewPaginatedHeader

NewPaginatedHeader returns a pointer to an initialized PaginatedHeader struct

type PaginatedListener

type PaginatedListener struct {
	*connection.PaginatedBase
	Items []Listener
}

PaginatedListener represents a paginated collection of Listener

func NewPaginatedListener

NewPaginatedListener returns a pointer to an initialized PaginatedListener struct

type PaginatedTarget

type PaginatedTarget struct {
	*connection.PaginatedBase
	Items []Target
}

PaginatedTarget represents a paginated collection of Target

func NewPaginatedTarget

NewPaginatedTarget returns a pointer to an initialized PaginatedTarget struct

type PaginatedTargetGroup

type PaginatedTargetGroup struct {
	*connection.PaginatedBase
	Items []TargetGroup
}

PaginatedTargetGroup represents a paginated collection of TargetGroup

func NewPaginatedTargetGroup

NewPaginatedTargetGroup returns a pointer to an initialized PaginatedTargetGroup struct

type PaginatedVIP

type PaginatedVIP struct {
	*connection.PaginatedBase
	Items []VIP
}

PaginatedVIP represents a paginated collection of VIP

func NewPaginatedVIP

NewPaginatedVIP returns a pointer to an initialized PaginatedVIP struct

type PatchACLRequest

type PatchACLRequest struct {
	Name          string         `json:"name,omitempty"`
	ListenerID    int            `json:"listener_id,omitempty"`
	TargetGroupID int            `json:"target_group_id,omitempty"`
	Conditions    []ACLCondition `json:"conditions,omitempty"`
}

PatchListenerACLRequest represents a request to patch a ACL

type PatchAccessIPRequest

type PatchAccessIPRequest struct {
	IP connection.IPAddress `json:"ip,omitempty"`
}

PatchAccessIPRequest represents a request to patch an access rule

type PatchBindRequest

type PatchBindRequest struct {
	ListenerID int `json:"listener_id,omitempty"`
	VIPID      int `json:"vip_id,omitempty"`
	Port       int `json:"port,omitempty"`
}

PatchBindRequest represents a request to patch a bind

type PatchCertificateRequest

type PatchCertificateRequest struct {
	ListenerID  int    `json:"listener_id,omitempty"`
	Name        string `json:"name,omitempty"`
	Key         string `json:"key,omitempty"`
	Certificate string `json:"certificate,omitempty"`
	CABundle    string `json:"ca_bundle,omitempty"`
}

PatchListenerCertificateRequest represents a request to patch a certificate

type PatchClusterRequest

type PatchClusterRequest struct {
	Name string `json:"name,omitempty"`
}

PatchClusterRequest represents a request to patch a cluster

type PatchListenerRequest

type PatchListenerRequest struct {
	Name                 string `json:"name,omitempty"`
	VIPID                int    `json:"vips_id,omitempty"`
	Port                 int    `json:"port,omitempty"`
	HSTSEnabled          *bool  `json:"hsts_enabled,omitempty"`
	Mode                 string `json:"mode,omitempty"`
	HSTSMaxAge           int    `json:"hsts_maxage,omitempty"`
	Close                *bool  `json:"close,omitempty"`
	RedirectHTTPS        *bool  `json:"redirect_https,omitempty"`
	DefaultTargetGroupID int    `json:"default_targetgroup_id,omitempty"`
}

PatchListenerRequest represents a request to patch a listener

type PatchTargetGroupRequest

type PatchTargetGroupRequest struct {
	ClusterID            int    `json:"cluster_id,omitempty"`
	Name                 string `json:"name,omitempty"`
	Balance              string `json:"balance,omitempty"`
	Mode                 string `json:"mode,omitempty"`
	Close                *bool  `json:"close,omitempty"`
	Sticky               *bool  `json:"sticky,omitempty"`
	CookieOpts           string `json:"cookie_opts,omitempty"`
	Source               string `json:"source,omitempty"`
	TimeoutsConnect      int    `json:"timeouts_connect,omitempty"`
	TimeoutServer        int    `json:"timeouts_server,omitempty"`
	CustomOptions        string `json:"custom_options,omitempty"`
	MonitorURL           string `json:"monitor_url,omitempty"`
	MonitorMethod        string `json:"monitor_method,omitempty"`
	MonitorHost          string `json:"monitor_host,omitempty"`
	MonitorHTTPVersion   string `json:"monitor_http_version,omitempty"`
	MonitorExpect        string `json:"monitor_expect,omitempty"`
	MonitorTCPMonitoring *bool  `json:"monitor_tcp_monitoring,omitempty"`
	CheckPort            int    `json:"check_port,omitempty"`
	SendProxy            *bool  `json:"send_proxy,omitempty"`
	SendProxyV2          *bool  `json:"send_proxy_v2,omitempty"`
}

PatchTargetGroupRequest represents a request to patch a target group

type PatchTargetRequest

type PatchTargetRequest struct {
	TargetGroupID int                  `json:"targetgroup_id,omitempty"`
	Name          string               `json:"name,omitempty"`
	IP            connection.IPAddress `json:"ip,omitempty"`
	Port          int                  `json:"port,omitempty"`
	Weight        int                  `json:"weight,omitempty"`
	Backup        *bool                `json:"backup,omitempty"`
	CheckInterval int                  `json:"check_interval,omitempty"`
	CheckSSL      *bool                `json:"check_ssl,omitempty"`
	CheckRise     int                  `json:"check_rise,omitempty"`
	CheckFall     int                  `json:"check_fall,omitempty"`
	DisableHTTP2  *bool                `json:"disable_http2,omitempty"`
	HTTP2Only     *bool                `json:"http2_only,omitempty"`
}

PatchTargetRequest represents a request to patch a target

type PatchVIPRequest

type PatchVIPRequest struct {
	Type string `json:"type,omitempty"`
	CIDR string `json:"cidr,omitempty"`
}

PatchVIPRequest represents a request to patch a target group

type Service

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

Service implements LoadBalancerService for managing LoadBalancer certificates via the UKFast API

func NewService

func NewService(connection connection.Connection) *Service

NewService returns a new instance of LoadBalancerService

func (*Service) CreateACL

func (s *Service) CreateACL(req CreateACLRequest) (int, error)

CreateACL creates an ACL

func (*Service) CreateListener

func (s *Service) CreateListener(req CreateListenerRequest) (int, error)

CreateListener creates a listener

func (*Service) CreateListenerAccessIP

func (s *Service) CreateListenerAccessIP(listenerID int, req CreateAccessIPRequest) (int, error)

CreateListenerAccessIP creates an access IP

func (*Service) CreateListenerBind

func (s *Service) CreateListenerBind(listenerID int, req CreateBindRequest) (int, error)

CreateListenerBind creates an bind

func (*Service) CreateListenerCertificate

func (s *Service) CreateListenerCertificate(listenerID int, req CreateCertificateRequest) (int, error)

CreateListenerCertificate creates an certificate

func (*Service) CreateTargetGroup

func (s *Service) CreateTargetGroup(req CreateTargetGroupRequest) (int, error)

PatchTargetGroup patches a target group

func (*Service) CreateTargetGroupTarget

func (s *Service) CreateTargetGroupTarget(groupID int, req CreateTargetRequest) (int, error)

CreateTargetGroupTarget creates a target

func (*Service) DeleteACL

func (s *Service) DeleteACL(aclID int) error

DeleteACL deletes an ACL

func (*Service) DeleteAccessIP

func (s *Service) DeleteAccessIP(accessID int) error

DeleteAccessIP deletes an access IP

func (*Service) DeleteListener

func (s *Service) DeleteListener(listenerID int) error

DeleteListener deletes a listener

func (*Service) DeleteListenerBind

func (s *Service) DeleteListenerBind(listenerID int, bindID int) error

DeleteListenerBind deletes a bind

func (*Service) DeleteListenerCertificate

func (s *Service) DeleteListenerCertificate(listenerID int, certificateID int) error

DeleteListenerCertificate deletes a certificate

func (*Service) DeleteTargetGroup

func (s *Service) DeleteTargetGroup(groupID int) error

PatchTargetGroup patches a target group

func (*Service) DeleteTargetGroupTarget

func (s *Service) DeleteTargetGroupTarget(groupID int, targetID int) error

DeleteTargetGroupTarget deletes a target

func (*Service) DeployCluster

func (s *Service) DeployCluster(clusterID int) error

DeployCluster deploys a Cluster

func (*Service) GetACL

func (s *Service) GetACL(aclID int) (ACL, error)

GetACL retrieves a single ACL by id

func (*Service) GetACLs

func (s *Service) GetACLs(parameters connection.APIRequestParameters) ([]ACL, error)

GetACLs retrieves a list of ACLs

func (*Service) GetACLsPaginated

func (s *Service) GetACLsPaginated(parameters connection.APIRequestParameters) (*PaginatedACL, error)

GetACLsPaginated retrieves a paginated list of ACLs

func (*Service) GetAccessIP

func (s *Service) GetAccessIP(accessID int) (AccessIP, error)

GetAccessIP retrieves a single access IP by id

func (*Service) GetBinds

func (s *Service) GetBinds(parameters connection.APIRequestParameters) ([]Bind, error)

GetBinds retrieves a list of binds

func (*Service) GetBindsPaginated

func (s *Service) GetBindsPaginated(parameters connection.APIRequestParameters) (*PaginatedBind, error)

GetBindsPaginated retrieves a paginated list of binds

func (*Service) GetCluster

func (s *Service) GetCluster(clusterID int) (Cluster, error)

GetCluster retrieves a single cluster by id

func (*Service) GetClusters

func (s *Service) GetClusters(parameters connection.APIRequestParameters) ([]Cluster, error)

GetClusters retrieves a list of clusters

func (*Service) GetClustersPaginated

func (s *Service) GetClustersPaginated(parameters connection.APIRequestParameters) (*PaginatedCluster, error)

GetClustersPaginated retrieves a paginated list of clusters

func (*Service) GetHeaders

func (s *Service) GetHeaders(parameters connection.APIRequestParameters) ([]Header, error)

GetHeaders retrieves a list of headers

func (*Service) GetHeadersPaginated

func (s *Service) GetHeadersPaginated(parameters connection.APIRequestParameters) (*PaginatedHeader, error)

GetHeadersPaginated retrieves a paginated list of headers

func (*Service) GetListener

func (s *Service) GetListener(listenerID int) (Listener, error)

GetListener retrieves a single listener by id

func (*Service) GetListenerAccessIP

func (s *Service) GetListenerAccessIP(listenerID int, accessID int) (AccessIP, error)

GetListenerAccessIP retrieves a single access IP by id

func (*Service) GetListenerAccessIPs

func (s *Service) GetListenerAccessIPs(listenerID int, parameters connection.APIRequestParameters) ([]AccessIP, error)

GetListenerAccessIPs retrieves a list of access IPs

func (*Service) GetListenerAccessIPsPaginated

func (s *Service) GetListenerAccessIPsPaginated(listenerID int, parameters connection.APIRequestParameters) (*PaginatedAccessIP, error)

GetListenerAccessIPsPaginated retrieves a paginated list of access IPs

func (*Service) GetListenerBind

func (s *Service) GetListenerBind(listenerID int, bindID int) (Bind, error)

GetListenerBind retrieves a single bind by id

func (*Service) GetListenerBinds

func (s *Service) GetListenerBinds(listenerID int, parameters connection.APIRequestParameters) ([]Bind, error)

GetListenerBinds retrieves a list of binds

func (*Service) GetListenerBindsPaginated

func (s *Service) GetListenerBindsPaginated(listenerID int, parameters connection.APIRequestParameters) (*PaginatedBind, error)

GetListenerBindsPaginated retrieves a paginated list of binds

func (*Service) GetListenerCertificate

func (s *Service) GetListenerCertificate(listenerID int, certificateID int) (Certificate, error)

GetListenerCertificate retrieves a single certificate by id

func (*Service) GetListenerCertificates

func (s *Service) GetListenerCertificates(listenerID int, parameters connection.APIRequestParameters) ([]Certificate, error)

GetListenerCertificates retrieves a list of certificates

func (*Service) GetListenerCertificatesPaginated

func (s *Service) GetListenerCertificatesPaginated(listenerID int, parameters connection.APIRequestParameters) (*PaginatedCertificate, error)

GetListenerCertificatesPaginated retrieves a paginated list of certificates

func (*Service) GetListeners

func (s *Service) GetListeners(parameters connection.APIRequestParameters) ([]Listener, error)

GetListeners retrieves a list of listeners

func (*Service) GetListenersPaginated

func (s *Service) GetListenersPaginated(parameters connection.APIRequestParameters) (*PaginatedListener, error)

GetListenersPaginated retrieves a paginated list of listeners

func (*Service) GetTargetGroup

func (s *Service) GetTargetGroup(groupID int) (TargetGroup, error)

GetTargetGroup retrieves a single target group by id

func (*Service) GetTargetGroupTarget

func (s *Service) GetTargetGroupTarget(groupID int, targetID int) (Target, error)

GetTargetGroupTarget retrieves a single target by id

func (*Service) GetTargetGroupTargets

func (s *Service) GetTargetGroupTargets(groupID int, parameters connection.APIRequestParameters) ([]Target, error)

GetTargetGroupTargets retrieves a list of targets

func (*Service) GetTargetGroupTargetsPaginated

func (s *Service) GetTargetGroupTargetsPaginated(groupID int, parameters connection.APIRequestParameters) (*PaginatedTarget, error)

GetTargetGroupTargetsPaginated retrieves a paginated list of targets

func (*Service) GetTargetGroups

func (s *Service) GetTargetGroups(parameters connection.APIRequestParameters) ([]TargetGroup, error)

GetTargetGroups retrieves a list of target groups

func (*Service) GetTargetGroupsPaginated

func (s *Service) GetTargetGroupsPaginated(parameters connection.APIRequestParameters) (*PaginatedTargetGroup, error)

GetTargetGroupsPaginated retrieves a paginated list of target groups

func (*Service) GetVIP

func (s *Service) GetVIP(vipID int) (VIP, error)

GetVIP retrieves a single VIP by id

func (*Service) GetVIPs

func (s *Service) GetVIPs(parameters connection.APIRequestParameters) ([]VIP, error)

GetVIPs retrieves a list of VIPs

func (*Service) GetVIPsPaginated

func (s *Service) GetVIPsPaginated(parameters connection.APIRequestParameters) (*PaginatedVIP, error)

GetVIPsPaginated retrieves a paginated list of VIPs

func (*Service) PatchACL

func (s *Service) PatchACL(aclID int, req PatchACLRequest) error

PatchACL patches an ACL

func (*Service) PatchAccessIP

func (s *Service) PatchAccessIP(accessID int, req PatchAccessIPRequest) error

PatchAccessIP patches an access IP

func (*Service) PatchCluster

func (s *Service) PatchCluster(clusterID int, req PatchClusterRequest) error

PatchCluster patches a Cluster

func (*Service) PatchListener

func (s *Service) PatchListener(listenerID int, req PatchListenerRequest) error

PatchListener patches a listener

func (*Service) PatchListenerBind

func (s *Service) PatchListenerBind(listenerID int, bindID int, req PatchBindRequest) error

PatchListenerBind patches an bind

func (*Service) PatchListenerCertificate

func (s *Service) PatchListenerCertificate(listenerID int, certificateID int, req PatchCertificateRequest) error

PatchListenerCertificate patches an certificate

func (*Service) PatchTargetGroup

func (s *Service) PatchTargetGroup(groupID int, req PatchTargetGroupRequest) error

PatchTargetGroup patches a target group

func (*Service) PatchTargetGroupTarget

func (s *Service) PatchTargetGroupTarget(groupID int, targetID int, req PatchTargetRequest) error

PatchTargetGroupTarget patches a target

func (*Service) ValidateCluster

func (s *Service) ValidateCluster(clusterID int) error

ValidateCluster validates a cluster

type Target

type Target struct {
	ID            int                  `json:"id"`
	TargetGroupID int                  `json:"targetgroup_id"`
	Name          string               `json:"name"`
	IP            connection.IPAddress `json:"ip"`
	Port          int                  `json:"port"`
	Weight        int                  `json:"weight"`
	Backup        bool                 `json:"backup"`
	CheckInterval int                  `json:"check_interval"`
	CheckSSL      bool                 `json:"check_ssl"`
	CheckRise     int                  `json:"check_rise"`
	CheckFall     int                  `json:"check_fall"`
	DisableHTTP2  bool                 `json:"disable_http2"`
	HTTP2Only     bool                 `json:"http2_only"`
	CreatedAt     connection.DateTime  `json:"created_at"`
	UpdatedAt     connection.DateTime  `json:"updated_at"`
}

Target represents a target +genie:model_response +genie:model_paginated

type TargetGroup

type TargetGroup struct {
	ID                   int                 `json:"id"`
	ClusterID            int                 `json:"cluster_id"`
	Name                 string              `json:"name"`
	Balance              string              `json:"balance"`
	Mode                 string              `json:"mode"`
	Close                bool                `json:"close"`
	Sticky               bool                `json:"sticky"`
	CookieOpts           string              `json:"cookie_opts"`
	Source               string              `json:"source"`
	TimeoutsConnect      int                 `json:"timeouts_connect"`
	TimeoutServer        int                 `json:"timeouts_server"`
	CustomOptions        string              `json:"custom_options"`
	MonitorURL           string              `json:"monitor_url"`
	MonitorMethod        string              `json:"monitor_method"`
	MonitorHost          string              `json:"monitor_host"`
	MonitorHTTPVersion   string              `json:"monitor_http_version"`
	MonitorExpect        string              `json:"monitor_expect"`
	MonitorTCPMonitoring bool                `json:"monitor_tcp_monitoring"`
	CheckPort            int                 `json:"check_port"`
	SendProxy            bool                `json:"send_proxy"`
	SendProxyV2          bool                `json:"send_proxy_v2"`
	CreatedAt            connection.DateTime `json:"created_at"`
	UpdatedAt            connection.DateTime `json:"updated_at"`
}

TargetGroup represents a target group +genie:model_response +genie:model_paginated

type TargetGroupNotFoundError

type TargetGroupNotFoundError struct {
	ID int
}

TargetGroupNotFoundError indicates a target group was not found

func (*TargetGroupNotFoundError) Error

func (e *TargetGroupNotFoundError) Error() string

type TargetNotFoundError

type TargetNotFoundError struct {
	ID int
}

TargetNotFoundError indicates a target was not found

func (*TargetNotFoundError) Error

func (e *TargetNotFoundError) Error() string

type VIP

type VIP struct {
	ID           int                 `json:"id"`
	ClusterID    int                 `json:"cluster_id"`
	InternalCIDR string              `json:"internal_cidr"`
	ExternalCIDR string              `json:"external_cidr"`
	MACAddress   string              `json:"mac_address"`
	CreatedAt    connection.DateTime `json:"created_at"`
	UpdatedAt    connection.DateTime `json:"updated_at"`
}

VIP represents a target virtual IP address +genie:model_response +genie:model_paginated

type VIPNotFoundError

type VIPNotFoundError struct {
	ID int
}

VIPNotFoundError indicates a VIP was not found

func (*VIPNotFoundError) Error

func (e *VIPNotFoundError) Error() string

Jump to

Keyboard shortcuts

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