Documentation
¶
Overview ¶
Package enterprise provides client operations for HAProxy Enterprise-only DataPlane API endpoints.
This package is organized by feature domain:
- waf.go: Web Application Firewall operations (waf_profiles, waf_body_rules, waf/rulesets)
- botmgmt.go: Bot management (botmgmt_profiles, captchas)
- udp.go: UDP load balancing (udp_lbs with child resources)
- keepalived.go: Keepalived/VRRP operations (vrrp_instances, vrrp_sync_groups)
- logging.go: Advanced logging (logs/config, logs/inputs, logs/outputs)
- git.go: Git integration (git/settings, git/actions)
- dynamic_update.go: Dynamic update rules
- aloha.go: ALOHA features
- misc.go: Other endpoints (facts, ping, summary, structured config)
All operations in this package require HAProxy Enterprise edition. When called against a Community edition instance, operations will return ErrEnterpriseRequired.
Usage:
wafOps := enterprise.NewWAFOperations(dataplaneClient)
profiles, err := wafOps.GetAllProfiles(ctx, txID)
if errors.Is(err, client.ErrEnterpriseRequired) {
log.Warn("WAF features require HAProxy Enterprise")
}
Index ¶
- Variables
- type ACL
- type ALOHAAction
- type ALOHAEndpoints
- type ALOHAOperations
- func (a *ALOHAOperations) ExecuteAction(ctx context.Context, action *ALOHAAction) (*ALOHAAction, error)
- func (a *ALOHAOperations) GetAction(ctx context.Context, id string) (*ALOHAAction, error)
- func (a *ALOHAOperations) GetAllActions(ctx context.Context) ([]ALOHAAction, error)
- func (a *ALOHAOperations) GetEndpoints(ctx context.Context) (*ALOHAEndpoints, error)
- type BotManagementOperations
- func (b *BotManagementOperations) CreateCaptcha(ctx context.Context, txID string, captcha *Captcha) error
- func (b *BotManagementOperations) CreateProfile(ctx context.Context, txID string, profile *BotmgmtProfile) error
- func (b *BotManagementOperations) DeleteCaptcha(ctx context.Context, txID, name string) error
- func (b *BotManagementOperations) DeleteProfile(ctx context.Context, txID, name string) error
- func (b *BotManagementOperations) GetAllCaptchas(ctx context.Context, txID string) ([]Captcha, error)
- func (b *BotManagementOperations) GetAllProfiles(ctx context.Context, txID string) ([]BotmgmtProfile, error)
- func (b *BotManagementOperations) GetCaptcha(ctx context.Context, txID, name string) (*Captcha, error)
- func (b *BotManagementOperations) GetProfile(ctx context.Context, txID, name string) (*BotmgmtProfile, error)
- type BotmgmtProfile
- type Captcha
- type DgramBind
- type DynamicUpdateOperations
- func (d *DynamicUpdateOperations) CreateRule(ctx context.Context, txID string, index int, rule *DynamicUpdateRule) error
- func (d *DynamicUpdateOperations) CreateSection(ctx context.Context, txID string) error
- func (d *DynamicUpdateOperations) DeleteRule(ctx context.Context, txID string, index int) error
- func (d *DynamicUpdateOperations) DeleteSection(ctx context.Context, txID string) error
- func (d *DynamicUpdateOperations) GetAllRules(ctx context.Context, txID string) ([]DynamicUpdateRule, error)
- func (d *DynamicUpdateOperations) GetRule(ctx context.Context, txID string, index int) (*DynamicUpdateRule, error)
- func (d *DynamicUpdateOperations) GetSection(ctx context.Context, txID string) error
- type DynamicUpdateRule
- type Facts
- type GitAction
- type GitOperations
- func (g *GitOperations) ExecuteAction(ctx context.Context, action *GitAction) (*GitAction, error)
- func (g *GitOperations) GetAction(ctx context.Context, id string) (*GitAction, error)
- func (g *GitOperations) GetAllActions(ctx context.Context) ([]GitAction, error)
- func (g *GitOperations) GetSettings(ctx context.Context) (*GitSettings, error)
- func (g *GitOperations) ReplaceSettings(ctx context.Context, settings *GitSettings) error
- type GitSettings
- type KeepalivedOperations
- func (k *KeepalivedOperations) CommitTransaction(ctx context.Context, txID string) error
- func (k *KeepalivedOperations) CreateVRRPInstance(ctx context.Context, txID string, instance *VRRPInstance) error
- func (k *KeepalivedOperations) CreateVRRPScript(ctx context.Context, txID string, script *VRRPScript) error
- func (k *KeepalivedOperations) CreateVRRPSyncGroup(ctx context.Context, txID string, group *VRRPSyncGroup) error
- func (k *KeepalivedOperations) DeleteTransaction(ctx context.Context, txID string) error
- func (k *KeepalivedOperations) DeleteVRRPInstance(ctx context.Context, txID, name string) error
- func (k *KeepalivedOperations) DeleteVRRPScript(ctx context.Context, txID, name string) error
- func (k *KeepalivedOperations) DeleteVRRPSyncGroup(ctx context.Context, txID, name string) error
- func (k *KeepalivedOperations) GetAllVRRPInstances(ctx context.Context) ([]VRRPInstance, error)
- func (k *KeepalivedOperations) GetAllVRRPScripts(ctx context.Context) ([]VRRPScript, error)
- func (k *KeepalivedOperations) GetAllVRRPSyncGroups(ctx context.Context) ([]VRRPSyncGroup, error)
- func (k *KeepalivedOperations) GetTransaction(ctx context.Context, txID string) (*KeepalivedTransaction, error)
- func (k *KeepalivedOperations) GetVRRPInstance(ctx context.Context, name string) (*VRRPInstance, error)
- func (k *KeepalivedOperations) GetVRRPScript(ctx context.Context, name string) (*VRRPScript, error)
- func (k *KeepalivedOperations) GetVRRPSyncGroup(ctx context.Context, name string) (*VRRPSyncGroup, error)
- func (k *KeepalivedOperations) ReplaceVRRPInstance(ctx context.Context, txID, name string, instance *VRRPInstance) error
- func (k *KeepalivedOperations) StartTransaction(ctx context.Context) (string, error)
- type KeepalivedTransaction
- type LogConfiguration
- type LogTarget
- type LoggingOperations
- type MiscOperations
- func (m *MiscOperations) GetFacts(ctx context.Context, refresh bool) (*Facts, error)
- func (m *MiscOperations) GetStructuredConfig(ctx context.Context, txID string) (*StructuredConfig, error)
- func (m *MiscOperations) Ping(ctx context.Context) error
- func (m *MiscOperations) ReplaceStructuredConfig(ctx context.Context, txID string, config *StructuredConfig) error
- type Operations
- type ServerSwitchingRule
- type StructuredConfig
- type UDPLBOperations
- func (u *UDPLBOperations) CreateACLUDPLb(ctx context.Context, txID, lbName string, index int, acl *ACL) error
- func (u *UDPLBOperations) CreateDgramBindUDPLb(ctx context.Context, txID, lbName string, bind *DgramBind) error
- func (u *UDPLBOperations) CreateLogTargetUDPLb(ctx context.Context, txID, lbName string, index int, target *LogTarget) error
- func (u *UDPLBOperations) CreateServerSwitchingRuleUDPLb(ctx context.Context, txID, lbName string, index int, rule *ServerSwitchingRule) error
- func (u *UDPLBOperations) CreateUDPLb(ctx context.Context, txID string, lb *UDPLb) error
- func (u *UDPLBOperations) DeleteACLUDPLb(ctx context.Context, txID, lbName string, index int) error
- func (u *UDPLBOperations) DeleteDgramBindUDPLb(ctx context.Context, txID, lbName, bindName string) error
- func (u *UDPLBOperations) DeleteLogTargetUDPLb(ctx context.Context, txID, lbName string, index int) error
- func (u *UDPLBOperations) DeleteServerSwitchingRuleUDPLb(ctx context.Context, txID, lbName string, index int) error
- func (u *UDPLBOperations) DeleteUDPLb(ctx context.Context, txID, name string) error
- func (u *UDPLBOperations) GetAllACLsUDPLb(ctx context.Context, txID, lbName string) ([]ACL, error)
- func (u *UDPLBOperations) GetAllDgramBindsUDPLb(ctx context.Context, txID, lbName string) ([]DgramBind, error)
- func (u *UDPLBOperations) GetAllLogTargetsUDPLb(ctx context.Context, txID, lbName string) ([]LogTarget, error)
- func (u *UDPLBOperations) GetAllServerSwitchingRulesUDPLb(ctx context.Context, txID, lbName string) ([]ServerSwitchingRule, error)
- func (u *UDPLBOperations) GetAllUDPLbs(ctx context.Context, txID string) ([]UDPLb, error)
- func (u *UDPLBOperations) GetUDPLb(ctx context.Context, txID, name string) (*UDPLb, error)
- func (u *UDPLBOperations) ReplaceUDPLb(ctx context.Context, txID, name string, lb *UDPLb) error
- type UDPLb
- type VRRPInstance
- type VRRPScript
- type VRRPSyncGroup
- type WAFOperations
- func (w *WAFOperations) CreateBodyRuleBackend(ctx context.Context, txID, backendName string, index int, rule *WafBodyRule) error
- func (w *WAFOperations) CreateBodyRuleFrontend(ctx context.Context, txID, frontendName string, index int, rule *WafBodyRule) error
- func (w *WAFOperations) CreateGlobal(ctx context.Context, txID string, global *WafGlobal) error
- func (w *WAFOperations) CreateProfile(ctx context.Context, txID string, profile *WafProfile) error
- func (w *WAFOperations) CreateRuleset(ctx context.Context, content io.Reader) error
- func (w *WAFOperations) CreateRulesetFile(ctx context.Context, rulesetName, subDir string, content io.Reader) error
- func (w *WAFOperations) DeleteBodyRuleBackend(ctx context.Context, txID, backendName string, index int) error
- func (w *WAFOperations) DeleteBodyRuleFrontend(ctx context.Context, txID, frontendName string, index int) error
- func (w *WAFOperations) DeleteGlobal(ctx context.Context, txID string) error
- func (w *WAFOperations) DeleteProfile(ctx context.Context, txID, name string) error
- func (w *WAFOperations) DeleteRuleset(ctx context.Context, name string) error
- func (w *WAFOperations) DeleteRulesetFile(ctx context.Context, rulesetName, fileName, subDir string) error
- func (w *WAFOperations) GetAllBodyRulesBackend(ctx context.Context, txID, backendName string) ([]WafBodyRule, error)
- func (w *WAFOperations) GetAllBodyRulesFrontend(ctx context.Context, txID, frontendName string) ([]WafBodyRule, error)
- func (w *WAFOperations) GetAllProfiles(ctx context.Context, txID string) ([]WafProfile, error)
- func (w *WAFOperations) GetAllRulesetFiles(ctx context.Context, rulesetName, subDir string) ([]string, error)
- func (w *WAFOperations) GetAllRulesets(ctx context.Context) ([]WafRuleset, error)
- func (w *WAFOperations) GetGlobal(ctx context.Context, txID string) (*WafGlobal, error)
- func (w *WAFOperations) GetProfile(ctx context.Context, txID, name string) (*WafProfile, error)
- func (w *WAFOperations) GetRuleset(ctx context.Context, name string) (*WafRuleset, error)
- func (w *WAFOperations) GetRulesetFile(ctx context.Context, rulesetName, fileName, subDir string) ([]byte, error)
- func (w *WAFOperations) ReplaceBodyRuleBackend(ctx context.Context, txID, backendName string, index int, rule *WafBodyRule) error
- func (w *WAFOperations) ReplaceBodyRuleFrontend(ctx context.Context, txID, frontendName string, index int, rule *WafBodyRule) error
- func (w *WAFOperations) ReplaceGlobal(ctx context.Context, txID string, global *WafGlobal) error
- func (w *WAFOperations) ReplaceProfile(ctx context.Context, txID, name string, profile *WafProfile) error
- func (w *WAFOperations) ReplaceRuleset(ctx context.Context, name string, content io.Reader) error
- func (w *WAFOperations) ReplaceRulesetFile(ctx context.Context, rulesetName, fileName, subDir string, content io.Reader) error
- type WafBodyRule
- type WafGlobal
- type WafProfile
- type WafRuleset
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("resource not found")
ErrNotFound is returned when a requested resource does not exist.
var ErrPingRequiresV32 = errors.New("ping endpoint requires HAProxy Enterprise v3.2+")
ErrPingRequiresV32 is returned when Ping is called on v3.0 or v3.1.
var ErrUDPLBACLsRequiresV32 = errors.New("UDP load balancer ACL operations require HAProxy Enterprise v3.2+")
ErrUDPLBACLsRequiresV32 is returned when ACL operations are attempted on pre-3.2 enterprise.
var ErrUDPLBServerSwitchingRequiresV32 = errors.New("UDP load balancer server switching rules require HAProxy Enterprise v3.2+")
ErrUDPLBServerSwitchingRequiresV32 is returned when server switching rule operations are attempted on pre-3.2 enterprise.
var ErrWAFGlobalRequiresV32 = errors.New("WAF global configuration requires HAProxy Enterprise DataPlane API v3.2+")
ErrWAFGlobalRequiresV32 is returned when WAF Global operations are attempted on HAProxy Enterprise v3.0 or v3.1 (WAF Global is v3.2+ only).
var ErrWAFProfilesRequiresV32 = errors.New("WAF profiles require HAProxy Enterprise DataPlane API v3.2+")
ErrWAFProfilesRequiresV32 is returned when WAF Profile operations are attempted on HAProxy Enterprise v3.0 or v3.1 (WAF Profiles are v3.2+ only).
Functions ¶
This section is empty.
Types ¶
type ALOHAEndpoints ¶
ALOHAEndpoints represents ALOHA endpoint information.
type ALOHAOperations ¶
type ALOHAOperations struct {
// contains filtered or unexported fields
}
ALOHAOperations provides operations for HAProxy Enterprise ALOHA features.
func NewALOHAOperations ¶
func NewALOHAOperations(c *client.DataplaneClient) *ALOHAOperations
NewALOHAOperations creates a new ALOHA operations client.
func (*ALOHAOperations) ExecuteAction ¶
func (a *ALOHAOperations) ExecuteAction(ctx context.Context, action *ALOHAAction) (*ALOHAAction, error)
ExecuteAction executes an ALOHA action.
func (*ALOHAOperations) GetAction ¶
func (a *ALOHAOperations) GetAction(ctx context.Context, id string) (*ALOHAAction, error)
GetAction retrieves a specific ALOHA action by ID.
func (*ALOHAOperations) GetAllActions ¶
func (a *ALOHAOperations) GetAllActions(ctx context.Context) ([]ALOHAAction, error)
GetAllActions retrieves all available ALOHA actions.
func (*ALOHAOperations) GetEndpoints ¶
func (a *ALOHAOperations) GetEndpoints(ctx context.Context) (*ALOHAEndpoints, error)
GetEndpoints retrieves ALOHA endpoint information.
type BotManagementOperations ¶
type BotManagementOperations struct {
// contains filtered or unexported fields
}
BotManagementOperations provides operations for HAProxy Enterprise bot management. This includes bot management profiles and CAPTCHA configurations.
func NewBotManagementOperations ¶
func NewBotManagementOperations(c *client.DataplaneClient) *BotManagementOperations
NewBotManagementOperations creates a new bot management operations client.
func (*BotManagementOperations) CreateCaptcha ¶
func (b *BotManagementOperations) CreateCaptcha(ctx context.Context, txID string, captcha *Captcha) error
CreateCaptcha creates a new CAPTCHA configuration.
func (*BotManagementOperations) CreateProfile ¶
func (b *BotManagementOperations) CreateProfile(ctx context.Context, txID string, profile *BotmgmtProfile) error
CreateProfile creates a new bot management profile.
func (*BotManagementOperations) DeleteCaptcha ¶
func (b *BotManagementOperations) DeleteCaptcha(ctx context.Context, txID, name string) error
DeleteCaptcha deletes a CAPTCHA configuration.
func (*BotManagementOperations) DeleteProfile ¶
func (b *BotManagementOperations) DeleteProfile(ctx context.Context, txID, name string) error
DeleteProfile deletes a bot management profile.
func (*BotManagementOperations) GetAllCaptchas ¶
func (b *BotManagementOperations) GetAllCaptchas(ctx context.Context, txID string) ([]Captcha, error)
GetAllCaptchas retrieves all CAPTCHA configurations.
func (*BotManagementOperations) GetAllProfiles ¶
func (b *BotManagementOperations) GetAllProfiles(ctx context.Context, txID string) ([]BotmgmtProfile, error)
GetAllProfiles retrieves all bot management profiles.
func (*BotManagementOperations) GetCaptcha ¶
func (b *BotManagementOperations) GetCaptcha(ctx context.Context, txID, name string) (*Captcha, error)
GetCaptcha retrieves a specific CAPTCHA configuration by name.
func (*BotManagementOperations) GetProfile ¶
func (b *BotManagementOperations) GetProfile(ctx context.Context, txID, name string) (*BotmgmtProfile, error)
GetProfile retrieves a specific bot management profile by name.
type BotmgmtProfile ¶
type BotmgmtProfile = v32ee.BotmgmtProfile
BotmgmtProfile represents a bot management profile configuration.
type DynamicUpdateOperations ¶
type DynamicUpdateOperations struct {
// contains filtered or unexported fields
}
DynamicUpdateOperations provides operations for HAProxy Enterprise dynamic update feature.
func NewDynamicUpdateOperations ¶
func NewDynamicUpdateOperations(c *client.DataplaneClient) *DynamicUpdateOperations
NewDynamicUpdateOperations creates a new dynamic update operations client.
func (*DynamicUpdateOperations) CreateRule ¶
func (d *DynamicUpdateOperations) CreateRule(ctx context.Context, txID string, index int, rule *DynamicUpdateRule) error
CreateRule creates a new dynamic update rule at the specified index.
func (*DynamicUpdateOperations) CreateSection ¶
func (d *DynamicUpdateOperations) CreateSection(ctx context.Context, txID string) error
CreateSection creates the dynamic update section.
func (*DynamicUpdateOperations) DeleteRule ¶
DeleteRule deletes a dynamic update rule at the specified index.
func (*DynamicUpdateOperations) DeleteSection ¶
func (d *DynamicUpdateOperations) DeleteSection(ctx context.Context, txID string) error
DeleteSection deletes the dynamic update section.
func (*DynamicUpdateOperations) GetAllRules ¶
func (d *DynamicUpdateOperations) GetAllRules(ctx context.Context, txID string) ([]DynamicUpdateRule, error)
GetAllRules retrieves all dynamic update rules.
func (*DynamicUpdateOperations) GetRule ¶
func (d *DynamicUpdateOperations) GetRule(ctx context.Context, txID string, index int) (*DynamicUpdateRule, error)
GetRule retrieves a specific dynamic update rule by index.
func (*DynamicUpdateOperations) GetSection ¶
func (d *DynamicUpdateOperations) GetSection(ctx context.Context, txID string) error
GetSection checks if the dynamic update section exists.
type DynamicUpdateRule ¶
type DynamicUpdateRule = v32ee.DynamicUpdateRule
DynamicUpdateRule represents a dynamic update rule.
type GitOperations ¶
type GitOperations struct {
// contains filtered or unexported fields
}
GitOperations provides operations for HAProxy Enterprise Git integration.
func NewGitOperations ¶
func NewGitOperations(c *client.DataplaneClient) *GitOperations
NewGitOperations creates a new Git operations client.
func (*GitOperations) ExecuteAction ¶
ExecuteAction executes a Git action.
func (*GitOperations) GetAllActions ¶
func (g *GitOperations) GetAllActions(ctx context.Context) ([]GitAction, error)
GetAllActions retrieves all available Git actions.
func (*GitOperations) GetSettings ¶
func (g *GitOperations) GetSettings(ctx context.Context) (*GitSettings, error)
GetSettings retrieves the current Git settings.
func (*GitOperations) ReplaceSettings ¶
func (g *GitOperations) ReplaceSettings(ctx context.Context, settings *GitSettings) error
ReplaceSettings replaces the Git settings.
type GitSettings ¶
type GitSettings = v32ee.GitSettings
GitSettings represents Git integration settings.
type KeepalivedOperations ¶
type KeepalivedOperations struct {
// contains filtered or unexported fields
}
KeepalivedOperations provides operations for HAProxy Enterprise Keepalived/VRRP management. This includes VRRP instances, sync groups, scripts, and Keepalived-specific transactions.
func NewKeepalivedOperations ¶
func NewKeepalivedOperations(c *client.DataplaneClient) *KeepalivedOperations
NewKeepalivedOperations creates a new Keepalived operations client.
func (*KeepalivedOperations) CommitTransaction ¶
func (k *KeepalivedOperations) CommitTransaction(ctx context.Context, txID string) error
CommitTransaction commits a Keepalived configuration transaction.
func (*KeepalivedOperations) CreateVRRPInstance ¶
func (k *KeepalivedOperations) CreateVRRPInstance(ctx context.Context, txID string, instance *VRRPInstance) error
CreateVRRPInstance creates a new VRRP instance.
func (*KeepalivedOperations) CreateVRRPScript ¶
func (k *KeepalivedOperations) CreateVRRPScript(ctx context.Context, txID string, script *VRRPScript) error
CreateVRRPScript creates a new VRRP script.
func (*KeepalivedOperations) CreateVRRPSyncGroup ¶
func (k *KeepalivedOperations) CreateVRRPSyncGroup(ctx context.Context, txID string, group *VRRPSyncGroup) error
CreateVRRPSyncGroup creates a new VRRP sync group.
func (*KeepalivedOperations) DeleteTransaction ¶
func (k *KeepalivedOperations) DeleteTransaction(ctx context.Context, txID string) error
DeleteTransaction deletes (cancels) a Keepalived configuration transaction.
func (*KeepalivedOperations) DeleteVRRPInstance ¶
func (k *KeepalivedOperations) DeleteVRRPInstance(ctx context.Context, txID, name string) error
DeleteVRRPInstance deletes a VRRP instance.
func (*KeepalivedOperations) DeleteVRRPScript ¶
func (k *KeepalivedOperations) DeleteVRRPScript(ctx context.Context, txID, name string) error
DeleteVRRPScript deletes a VRRP script.
func (*KeepalivedOperations) DeleteVRRPSyncGroup ¶
func (k *KeepalivedOperations) DeleteVRRPSyncGroup(ctx context.Context, txID, name string) error
DeleteVRRPSyncGroup deletes a VRRP sync group.
func (*KeepalivedOperations) GetAllVRRPInstances ¶
func (k *KeepalivedOperations) GetAllVRRPInstances(ctx context.Context) ([]VRRPInstance, error)
GetAllVRRPInstances retrieves all VRRP instances.
func (*KeepalivedOperations) GetAllVRRPScripts ¶
func (k *KeepalivedOperations) GetAllVRRPScripts(ctx context.Context) ([]VRRPScript, error)
GetAllVRRPScripts retrieves all VRRP scripts.
func (*KeepalivedOperations) GetAllVRRPSyncGroups ¶
func (k *KeepalivedOperations) GetAllVRRPSyncGroups(ctx context.Context) ([]VRRPSyncGroup, error)
GetAllVRRPSyncGroups retrieves all VRRP sync groups.
func (*KeepalivedOperations) GetTransaction ¶
func (k *KeepalivedOperations) GetTransaction(ctx context.Context, txID string) (*KeepalivedTransaction, error)
GetTransaction retrieves a specific Keepalived transaction.
func (*KeepalivedOperations) GetVRRPInstance ¶
func (k *KeepalivedOperations) GetVRRPInstance(ctx context.Context, name string) (*VRRPInstance, error)
GetVRRPInstance retrieves a specific VRRP instance by name.
func (*KeepalivedOperations) GetVRRPScript ¶
func (k *KeepalivedOperations) GetVRRPScript(ctx context.Context, name string) (*VRRPScript, error)
GetVRRPScript retrieves a specific VRRP script by name.
func (*KeepalivedOperations) GetVRRPSyncGroup ¶
func (k *KeepalivedOperations) GetVRRPSyncGroup(ctx context.Context, name string) (*VRRPSyncGroup, error)
GetVRRPSyncGroup retrieves a specific VRRP sync group by name.
func (*KeepalivedOperations) ReplaceVRRPInstance ¶
func (k *KeepalivedOperations) ReplaceVRRPInstance(ctx context.Context, txID, name string, instance *VRRPInstance) error
ReplaceVRRPInstance replaces an existing VRRP instance.
func (*KeepalivedOperations) StartTransaction ¶
func (k *KeepalivedOperations) StartTransaction(ctx context.Context) (string, error)
StartTransaction starts a new Keepalived configuration transaction.
type KeepalivedTransaction ¶
type KeepalivedTransaction = v32ee.KeepalivedTransaction
KeepalivedTransaction represents a Keepalived configuration transaction.
type LogConfiguration ¶
type LogConfiguration = v32ee.LogConfiguration
LogConfiguration represents the HAProxy logging configuration.
type LoggingOperations ¶
type LoggingOperations struct {
// contains filtered or unexported fields
}
LoggingOperations provides operations for HAProxy Enterprise advanced logging.
func NewLoggingOperations ¶
func NewLoggingOperations(c *client.DataplaneClient) *LoggingOperations
NewLoggingOperations creates a new logging operations client.
func (*LoggingOperations) GetLogConfig ¶
func (l *LoggingOperations) GetLogConfig(ctx context.Context) (*LogConfiguration, error)
GetLogConfig retrieves the current log configuration.
func (*LoggingOperations) ReplaceLogConfig ¶
func (l *LoggingOperations) ReplaceLogConfig(ctx context.Context, config *LogConfiguration) error
ReplaceLogConfig replaces the log configuration.
type MiscOperations ¶
type MiscOperations struct {
// contains filtered or unexported fields
}
MiscOperations provides miscellaneous HAProxy Enterprise operations.
func NewMiscOperations ¶
func NewMiscOperations(c *client.DataplaneClient) *MiscOperations
NewMiscOperations creates a new miscellaneous operations client.
func (*MiscOperations) GetStructuredConfig ¶
func (m *MiscOperations) GetStructuredConfig(ctx context.Context, txID string) (*StructuredConfig, error)
GetStructuredConfig retrieves the HAProxy configuration in structured JSON format.
func (*MiscOperations) Ping ¶
func (m *MiscOperations) Ping(ctx context.Context) error
Ping checks if the DataPlane API is responsive. Note: This method is only available in HAProxy Enterprise v3.2+.
func (*MiscOperations) ReplaceStructuredConfig ¶
func (m *MiscOperations) ReplaceStructuredConfig(ctx context.Context, txID string, config *StructuredConfig) error
ReplaceStructuredConfig replaces the HAProxy configuration using structured format.
type Operations ¶
type Operations struct {
// contains filtered or unexported fields
}
Operations provides access to all enterprise-only operations. This is the main entry point for enterprise features.
func NewOperations ¶
func NewOperations(c *client.DataplaneClient) *Operations
NewOperations creates a new enterprise operations client. All operations will check for enterprise edition before executing.
func (*Operations) Capabilities ¶
func (o *Operations) Capabilities() client.Capabilities
Capabilities returns the enterprise capability flags. Use this to check which enterprise features are available.
func (*Operations) Client ¶
func (o *Operations) Client() *client.DataplaneClient
Client returns the underlying DataplaneClient for direct access.
func (*Operations) IsAvailable ¶
func (o *Operations) IsAvailable() bool
IsAvailable returns true if enterprise features are available. This checks whether the connected HAProxy instance is Enterprise edition.
type ServerSwitchingRule ¶
type ServerSwitchingRule = v32ee.ServerSwitchingRule
ServerSwitchingRule represents a server switching rule configuration.
type StructuredConfig ¶
type StructuredConfig = v32ee.Structured
StructuredConfig represents the HAProxy configuration in structured format.
type UDPLBOperations ¶
type UDPLBOperations struct {
// contains filtered or unexported fields
}
UDPLBOperations provides operations for HAProxy Enterprise UDP load balancing. This includes UDP load balancers and their child resources (ACLs, binds, log targets, server switching rules).
func NewUDPLBOperations ¶
func NewUDPLBOperations(c *client.DataplaneClient) *UDPLBOperations
NewUDPLBOperations creates a new UDP load balancing operations client.
func (*UDPLBOperations) CreateACLUDPLb ¶
func (u *UDPLBOperations) CreateACLUDPLb(ctx context.Context, txID, lbName string, index int, acl *ACL) error
CreateACLUDPLb creates a new ACL for a UDP load balancer at the specified index. Note: UDP LB ACLs are only available in HAProxy Enterprise v3.2+.
func (*UDPLBOperations) CreateDgramBindUDPLb ¶
func (u *UDPLBOperations) CreateDgramBindUDPLb(ctx context.Context, txID, lbName string, bind *DgramBind) error
CreateDgramBindUDPLb creates a new dgram bind for a UDP load balancer.
func (*UDPLBOperations) CreateLogTargetUDPLb ¶
func (u *UDPLBOperations) CreateLogTargetUDPLb(ctx context.Context, txID, lbName string, index int, target *LogTarget) error
CreateLogTargetUDPLb creates a new log target for a UDP load balancer at the specified index.
func (*UDPLBOperations) CreateServerSwitchingRuleUDPLb ¶
func (u *UDPLBOperations) CreateServerSwitchingRuleUDPLb(ctx context.Context, txID, lbName string, index int, rule *ServerSwitchingRule) error
CreateServerSwitchingRuleUDPLb creates a new server switching rule for a UDP load balancer at the specified index. Note: UDP LB server switching rules are only available in HAProxy Enterprise v3.2+.
func (*UDPLBOperations) CreateUDPLb ¶
CreateUDPLb creates a new UDP load balancer.
func (*UDPLBOperations) DeleteACLUDPLb ¶
DeleteACLUDPLb deletes an ACL from a UDP load balancer at the specified index. Note: UDP LB ACLs are only available in HAProxy Enterprise v3.2+.
func (*UDPLBOperations) DeleteDgramBindUDPLb ¶
func (u *UDPLBOperations) DeleteDgramBindUDPLb(ctx context.Context, txID, lbName, bindName string) error
DeleteDgramBindUDPLb deletes a dgram bind from a UDP load balancer.
func (*UDPLBOperations) DeleteLogTargetUDPLb ¶
func (u *UDPLBOperations) DeleteLogTargetUDPLb(ctx context.Context, txID, lbName string, index int) error
DeleteLogTargetUDPLb deletes a log target from a UDP load balancer at the specified index.
func (*UDPLBOperations) DeleteServerSwitchingRuleUDPLb ¶
func (u *UDPLBOperations) DeleteServerSwitchingRuleUDPLb(ctx context.Context, txID, lbName string, index int) error
DeleteServerSwitchingRuleUDPLb deletes a server switching rule from a UDP load balancer at the specified index. Note: UDP LB server switching rules are only available in HAProxy Enterprise v3.2+.
func (*UDPLBOperations) DeleteUDPLb ¶
func (u *UDPLBOperations) DeleteUDPLb(ctx context.Context, txID, name string) error
DeleteUDPLb deletes a UDP load balancer.
func (*UDPLBOperations) GetAllACLsUDPLb ¶
GetAllACLsUDPLb retrieves all ACLs for a UDP load balancer. Note: UDP LB ACLs are only available in HAProxy Enterprise v3.2+.
func (*UDPLBOperations) GetAllDgramBindsUDPLb ¶
func (u *UDPLBOperations) GetAllDgramBindsUDPLb(ctx context.Context, txID, lbName string) ([]DgramBind, error)
GetAllDgramBindsUDPLb retrieves all dgram binds for a UDP load balancer.
func (*UDPLBOperations) GetAllLogTargetsUDPLb ¶
func (u *UDPLBOperations) GetAllLogTargetsUDPLb(ctx context.Context, txID, lbName string) ([]LogTarget, error)
GetAllLogTargetsUDPLb retrieves all log targets for a UDP load balancer.
func (*UDPLBOperations) GetAllServerSwitchingRulesUDPLb ¶
func (u *UDPLBOperations) GetAllServerSwitchingRulesUDPLb(ctx context.Context, txID, lbName string) ([]ServerSwitchingRule, error)
GetAllServerSwitchingRulesUDPLb retrieves all server switching rules for a UDP load balancer. Note: UDP LB server switching rules are only available in HAProxy Enterprise v3.2+.
func (*UDPLBOperations) GetAllUDPLbs ¶
GetAllUDPLbs retrieves all UDP load balancers.
func (*UDPLBOperations) ReplaceUDPLb ¶
ReplaceUDPLb replaces an existing UDP load balancer.
type VRRPInstance ¶
type VRRPInstance = v32ee.VrrpInstance
VRRPInstance represents a VRRP instance configuration.
type VRRPScript ¶
type VRRPScript = v32ee.VrrpTrackScript
VRRPScript represents a VRRP tracking script configuration.
type VRRPSyncGroup ¶
type VRRPSyncGroup = v32ee.VrrpSyncGroup
VRRPSyncGroup represents a VRRP sync group configuration.
type WAFOperations ¶
type WAFOperations struct {
// contains filtered or unexported fields
}
WAFOperations provides operations for HAProxy Enterprise WAF management. This includes WAF global settings, profiles, body rules, and rulesets.
func NewWAFOperations ¶
func NewWAFOperations(c *client.DataplaneClient) *WAFOperations
NewWAFOperations creates a new WAF operations client.
func (*WAFOperations) CreateBodyRuleBackend ¶
func (w *WAFOperations) CreateBodyRuleBackend(ctx context.Context, txID, backendName string, index int, rule *WafBodyRule) error
CreateBodyRuleBackend creates a new WAF body rule for a backend at the specified index.
func (*WAFOperations) CreateBodyRuleFrontend ¶
func (w *WAFOperations) CreateBodyRuleFrontend(ctx context.Context, txID, frontendName string, index int, rule *WafBodyRule) error
CreateBodyRuleFrontend creates a new WAF body rule for a frontend at the specified index.
func (*WAFOperations) CreateGlobal ¶
CreateGlobal creates the WAF global configuration. Note: WAF Global is only available in HAProxy Enterprise v3.2+.
func (*WAFOperations) CreateProfile ¶
func (w *WAFOperations) CreateProfile(ctx context.Context, txID string, profile *WafProfile) error
CreateProfile creates a new WAF profile. Note: WAF Profiles are only available in HAProxy Enterprise v3.2+.
func (*WAFOperations) CreateRuleset ¶
CreateRuleset creates a new WAF ruleset from a file.
func (*WAFOperations) CreateRulesetFile ¶
func (w *WAFOperations) CreateRulesetFile(ctx context.Context, rulesetName, subDir string, content io.Reader) error
CreateRulesetFile creates a new file in a WAF ruleset.
func (*WAFOperations) DeleteBodyRuleBackend ¶
func (w *WAFOperations) DeleteBodyRuleBackend(ctx context.Context, txID, backendName string, index int) error
DeleteBodyRuleBackend deletes a WAF body rule for a backend at the specified index.
func (*WAFOperations) DeleteBodyRuleFrontend ¶
func (w *WAFOperations) DeleteBodyRuleFrontend(ctx context.Context, txID, frontendName string, index int) error
DeleteBodyRuleFrontend deletes a WAF body rule for a frontend at the specified index.
func (*WAFOperations) DeleteGlobal ¶
func (w *WAFOperations) DeleteGlobal(ctx context.Context, txID string) error
DeleteGlobal deletes the WAF global configuration. Note: WAF Global is only available in HAProxy Enterprise v3.2+.
func (*WAFOperations) DeleteProfile ¶
func (w *WAFOperations) DeleteProfile(ctx context.Context, txID, name string) error
DeleteProfile deletes a WAF profile. Note: WAF Profiles are only available in HAProxy Enterprise v3.2+.
func (*WAFOperations) DeleteRuleset ¶
func (w *WAFOperations) DeleteRuleset(ctx context.Context, name string) error
DeleteRuleset deletes a WAF ruleset.
func (*WAFOperations) DeleteRulesetFile ¶
func (w *WAFOperations) DeleteRulesetFile(ctx context.Context, rulesetName, fileName, subDir string) error
DeleteRulesetFile deletes a file from a WAF ruleset.
func (*WAFOperations) GetAllBodyRulesBackend ¶
func (w *WAFOperations) GetAllBodyRulesBackend(ctx context.Context, txID, backendName string) ([]WafBodyRule, error)
GetAllBodyRulesBackend retrieves all WAF body rules for a backend.
func (*WAFOperations) GetAllBodyRulesFrontend ¶
func (w *WAFOperations) GetAllBodyRulesFrontend(ctx context.Context, txID, frontendName string) ([]WafBodyRule, error)
GetAllBodyRulesFrontend retrieves all WAF body rules for a frontend.
func (*WAFOperations) GetAllProfiles ¶
func (w *WAFOperations) GetAllProfiles(ctx context.Context, txID string) ([]WafProfile, error)
GetAllProfiles retrieves all WAF profiles. Note: WAF Profiles are only available in HAProxy Enterprise v3.2+.
func (*WAFOperations) GetAllRulesetFiles ¶
func (w *WAFOperations) GetAllRulesetFiles(ctx context.Context, rulesetName, subDir string) ([]string, error)
GetAllRulesetFiles retrieves all files in a WAF ruleset.
func (*WAFOperations) GetAllRulesets ¶
func (w *WAFOperations) GetAllRulesets(ctx context.Context) ([]WafRuleset, error)
GetAllRulesets retrieves all WAF rulesets.
func (*WAFOperations) GetGlobal ¶
GetGlobal retrieves the WAF global configuration. Note: WAF Global is only available in HAProxy Enterprise v3.2+.
func (*WAFOperations) GetProfile ¶
func (w *WAFOperations) GetProfile(ctx context.Context, txID, name string) (*WafProfile, error)
GetProfile retrieves a specific WAF profile by name. Note: WAF Profiles are only available in HAProxy Enterprise v3.2+.
func (*WAFOperations) GetRuleset ¶
func (w *WAFOperations) GetRuleset(ctx context.Context, name string) (*WafRuleset, error)
GetRuleset retrieves a specific WAF ruleset by name.
func (*WAFOperations) GetRulesetFile ¶
func (w *WAFOperations) GetRulesetFile(ctx context.Context, rulesetName, fileName, subDir string) ([]byte, error)
GetRulesetFile retrieves a specific file from a WAF ruleset.
func (*WAFOperations) ReplaceBodyRuleBackend ¶
func (w *WAFOperations) ReplaceBodyRuleBackend(ctx context.Context, txID, backendName string, index int, rule *WafBodyRule) error
ReplaceBodyRuleBackend replaces a WAF body rule for a backend at the specified index.
func (*WAFOperations) ReplaceBodyRuleFrontend ¶
func (w *WAFOperations) ReplaceBodyRuleFrontend(ctx context.Context, txID, frontendName string, index int, rule *WafBodyRule) error
ReplaceBodyRuleFrontend replaces a WAF body rule for a frontend at the specified index.
func (*WAFOperations) ReplaceGlobal ¶
ReplaceGlobal replaces the WAF global configuration. Note: WAF Global is only available in HAProxy Enterprise v3.2+.
func (*WAFOperations) ReplaceProfile ¶
func (w *WAFOperations) ReplaceProfile(ctx context.Context, txID, name string, profile *WafProfile) error
ReplaceProfile replaces an existing WAF profile. Note: WAF Profiles are only available in HAProxy Enterprise v3.2+.
func (*WAFOperations) ReplaceRuleset ¶
ReplaceRuleset replaces a WAF ruleset.
func (*WAFOperations) ReplaceRulesetFile ¶
func (w *WAFOperations) ReplaceRulesetFile(ctx context.Context, rulesetName, fileName, subDir string, content io.Reader) error
ReplaceRulesetFile replaces a file in a WAF ruleset.
type WafBodyRule ¶
type WafBodyRule = v32ee.WafBodyRule
WafBodyRule represents a WAF body rule configuration.
type WafProfile ¶
type WafProfile = v32ee.WafProfile
WafProfile represents a WAF profile configuration. Note: WAF Profiles are only available in HAProxy Enterprise v3.2+.