enterprise

package
v0.1.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("resource not found")

ErrNotFound is returned when a requested resource does not exist.

View Source
var ErrPingRequiresV32 = errors.New("ping endpoint requires HAProxy Enterprise v3.2+")

ErrPingRequiresV32 is returned when Ping is called on v3.0 or v3.1.

View Source
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.

View Source
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.

View Source
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).

View Source
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 ACL

type ACL = v32ee.Acl

ACL represents an ACL configuration.

type ALOHAAction

type ALOHAAction = v32ee.AlohaAction

ALOHAAction represents an ALOHA action.

type ALOHAEndpoints

type ALOHAEndpoints = v32ee.Endpoints

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 Captcha

type Captcha = v32ee.Captcha

Captcha represents a CAPTCHA configuration.

type DgramBind

type DgramBind = v32ee.DgramBind

DgramBind represents a datagram bind 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

func (d *DynamicUpdateOperations) DeleteRule(ctx context.Context, txID string, index int) error

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 Facts

type Facts = v32ee.Facts

Facts represents system facts information.

type GitAction

type GitAction = v32ee.GitAction

GitAction represents a Git action.

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

func (g *GitOperations) ExecuteAction(ctx context.Context, action *GitAction) (*GitAction, error)

ExecuteAction executes a Git action.

func (*GitOperations) GetAction

func (g *GitOperations) GetAction(ctx context.Context, id string) (*GitAction, error)

GetAction retrieves a specific Git action by ID.

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 LogTarget

type LogTarget = v32ee.LogTarget

LogTarget represents a log target 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) GetFacts

func (m *MiscOperations) GetFacts(ctx context.Context, refresh bool) (*Facts, error)

GetFacts retrieves system facts.

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

func (u *UDPLBOperations) CreateUDPLb(ctx context.Context, txID string, lb *UDPLb) error

CreateUDPLb creates a new UDP load balancer.

func (*UDPLBOperations) DeleteACLUDPLb

func (u *UDPLBOperations) DeleteACLUDPLb(ctx context.Context, txID, lbName string, index int) error

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

func (u *UDPLBOperations) GetAllACLsUDPLb(ctx context.Context, txID, lbName string) ([]ACL, error)

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

func (u *UDPLBOperations) GetAllUDPLbs(ctx context.Context, txID string) ([]UDPLb, error)

GetAllUDPLbs retrieves all UDP load balancers.

func (*UDPLBOperations) GetUDPLb

func (u *UDPLBOperations) GetUDPLb(ctx context.Context, txID, name string) (*UDPLb, error)

GetUDPLb retrieves a specific UDP load balancer by name.

func (*UDPLBOperations) ReplaceUDPLb

func (u *UDPLBOperations) ReplaceUDPLb(ctx context.Context, txID, name string, lb *UDPLb) error

ReplaceUDPLb replaces an existing UDP load balancer.

type UDPLb

type UDPLb = v32ee.UDPLb

UDPLb represents a UDP load balancer configuration.

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

func (w *WAFOperations) CreateGlobal(ctx context.Context, txID string, global *WafGlobal) error

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

func (w *WAFOperations) CreateRuleset(ctx context.Context, content io.Reader) error

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

func (w *WAFOperations) GetGlobal(ctx context.Context, txID string) (*WafGlobal, error)

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

func (w *WAFOperations) ReplaceGlobal(ctx context.Context, txID string, global *WafGlobal) error

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

func (w *WAFOperations) ReplaceRuleset(ctx context.Context, name string, content io.Reader) error

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 WafGlobal

type WafGlobal = v32ee.WafGlobal

WafGlobal represents WAF global configuration.

type WafProfile

type WafProfile = v32ee.WafProfile

WafProfile represents a WAF profile configuration. Note: WAF Profiles are only available in HAProxy Enterprise v3.2+.

type WafRuleset

type WafRuleset = v32ee.WafRuleset

WafRuleset represents a WAF ruleset.

Jump to

Keyboard shortcuts

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