Documentation
¶
Overview ¶
Package sections provides factory functions for creating HAProxy configuration operations.
These factory functions use generic operation types to eliminate repetitive boilerplate while maintaining type safety and compile-time verification.
Package sections provides factory functions for creating HAProxy Enterprise Edition operations.
This file contains factory functions for EE-only sections: - Bot Management Profiles (v3.0+ EE) - Captcha (v3.0+ EE) - WAF Profile (v3.2+ EE) - WAF Global (v3.2+ EE) - UDP LB (v3.0+ EE) - TODO when API support is added
Package sections provides factory functions for creating HAProxy configuration operations.
This file contains helper functions to reduce repetition in factory functions.
Package sections provides generic operation types for HAProxy configuration management.
This file contains type-safe generic operation implementations that replace the repetitive per-section operation struct definitions. Each generic type handles a specific "shape" of API operation pattern.
Index ¶
- Constants
- func ACLName(a *models.ACL) string
- func AcmeProviderName(a *models.AcmeProvider) string
- func BackendName(b *models.Backend) string
- func BindName(b *models.Bind) string
- func BotMgmtProfileName(p *v32ee.BotmgmtProfile) string
- func CacheName(c *models.Cache) string
- func CaptchaEEName(c *v32ee.Captcha) string
- func CrtStoreName(c *models.CrtStore) string
- func DefaultsName(d *models.Defaults) string
- func DescribeACL(op OperationType, aclName, parentType, parentName string) func() string
- func DescribeContainerChild(op OperationType, childType, childName, containerType, containerName string) func() string
- func DescribeIndexChild(op OperationType, childType string, index int, parentType, parentName string) func() string
- func DescribeNamedChild(op OperationType, childType, childName, parentType, parentName string) func() string
- func DescribeSingleton(op OperationType, section string) func() string
- func DescribeTopLevel(op OperationType, section, name string) func() string
- func FCGIAppName(f *models.FCGIApp) string
- func FilterType(f *models.Filter) string
- func FrontendName(f *models.Frontend) string
- func HTTPErrorsSectionName(h *models.HTTPErrorsSection) string
- func IdentityACL(a *models.ACL) *models.ACL
- func IdentityAcmeProvider(a *models.AcmeProvider) *models.AcmeProvider
- func IdentityBackend(b *models.Backend) *models.Backend
- func IdentityBackendSwitchingRule(r *models.BackendSwitchingRule) *models.BackendSwitchingRule
- func IdentityBind(b *models.Bind) *models.Bind
- func IdentityBotMgmtProfile(p *v32ee.BotmgmtProfile) *v32ee.BotmgmtProfile
- func IdentityCache(c *models.Cache) *models.Cache
- func IdentityCaptchaEE(c *v32ee.Captcha) *v32ee.Captcha
- func IdentityCapture(c *models.Capture) *models.Capture
- func IdentityCrtStore(c *models.CrtStore) *models.CrtStore
- func IdentityDefaults(d *models.Defaults) *models.Defaults
- func IdentityFCGIApp(f *models.FCGIApp) *models.FCGIApp
- func IdentityFilter(f *models.Filter) *models.Filter
- func IdentityFrontend(f *models.Frontend) *models.Frontend
- func IdentityGlobal(g *models.Global) *models.Global
- func IdentityHTTPAfterResponseRule(r *models.HTTPAfterResponseRule) *models.HTTPAfterResponseRule
- func IdentityHTTPCheck(c *models.HTTPCheck) *models.HTTPCheck
- func IdentityHTTPErrorsSection(h *models.HTTPErrorsSection) *models.HTTPErrorsSection
- func IdentityHTTPRequestRule(r *models.HTTPRequestRule) *models.HTTPRequestRule
- func IdentityHTTPResponseRule(r *models.HTTPResponseRule) *models.HTTPResponseRule
- func IdentityLogForward(l *models.LogForward) *models.LogForward
- func IdentityLogProfile(l *models.LogProfile) *models.LogProfile
- func IdentityLogTarget(l *models.LogTarget) *models.LogTarget
- func IdentityMailerEntry(m *models.MailerEntry) *models.MailerEntry
- func IdentityMailersSection(m *models.MailersSection) *models.MailersSection
- func IdentityNameserver(n *models.Nameserver) *models.Nameserver
- func IdentityPeerEntry(p *models.PeerEntry) *models.PeerEntry
- func IdentityPeerSection(p *models.PeerSection) *models.PeerSection
- func IdentityProgram(p *models.Program) *models.Program
- func IdentityQUICInitialRule(r *models.QUICInitialRule) *models.QUICInitialRule
- func IdentityResolver(r *models.Resolver) *models.Resolver
- func IdentityRing(r *models.Ring) *models.Ring
- func IdentityServer(s *models.Server) *models.Server
- func IdentityServerSwitchingRule(r *models.ServerSwitchingRule) *models.ServerSwitchingRule
- func IdentityServerTemplate(s *models.ServerTemplate) *models.ServerTemplate
- func IdentityStickRule(r *models.StickRule) *models.StickRule
- func IdentityTCPCheck(c *models.TCPCheck) *models.TCPCheck
- func IdentityTCPRequestRule(r *models.TCPRequestRule) *models.TCPRequestRule
- func IdentityTCPResponseRule(r *models.TCPResponseRule) *models.TCPResponseRule
- func IdentityTraces(t *models.Traces) *models.Traces
- func IdentityUser(u *models.User) *models.User
- func IdentityUserlist(u *models.Userlist) *models.Userlist
- func IdentityWAFGlobal(w *v32ee.WafGlobal) *v32ee.WafGlobal
- func IdentityWAFProfile(p *v32ee.WafProfile) *v32ee.WafProfile
- func LogForwardName(l *models.LogForward) string
- func LogProfileName(l *models.LogProfile) string
- func MailerEntryName(m *models.MailerEntry) string
- func MailersSectionName(m *models.MailersSection) string
- func NameserverName(n *models.Nameserver) string
- func NilACL(_ *models.ACL) *models.ACL
- func NilAcmeProvider(_ *models.AcmeProvider) *models.AcmeProvider
- func NilBackend(_ *models.Backend) *models.Backend
- func NilBackendSwitchingRule(_ *models.BackendSwitchingRule) *models.BackendSwitchingRule
- func NilBind(_ *models.Bind) *models.Bind
- func NilBotMgmtProfile(_ *v32ee.BotmgmtProfile) *v32ee.BotmgmtProfile
- func NilCache(_ *models.Cache) *models.Cache
- func NilCaptchaEE(_ *v32ee.Captcha) *v32ee.Captcha
- func NilCapture(_ *models.Capture) *models.Capture
- func NilCrtStore(_ *models.CrtStore) *models.CrtStore
- func NilDefaults(_ *models.Defaults) *models.Defaults
- func NilFCGIApp(_ *models.FCGIApp) *models.FCGIApp
- func NilFilter(_ *models.Filter) *models.Filter
- func NilFrontend(_ *models.Frontend) *models.Frontend
- func NilHTTPAfterResponseRule(_ *models.HTTPAfterResponseRule) *models.HTTPAfterResponseRule
- func NilHTTPCheck(_ *models.HTTPCheck) *models.HTTPCheck
- func NilHTTPErrorsSection(_ *models.HTTPErrorsSection) *models.HTTPErrorsSection
- func NilHTTPRequestRule(_ *models.HTTPRequestRule) *models.HTTPRequestRule
- func NilHTTPResponseRule(_ *models.HTTPResponseRule) *models.HTTPResponseRule
- func NilLogForward(_ *models.LogForward) *models.LogForward
- func NilLogProfile(_ *models.LogProfile) *models.LogProfile
- func NilLogTarget(_ *models.LogTarget) *models.LogTarget
- func NilMailerEntry(_ *models.MailerEntry) *models.MailerEntry
- func NilMailersSection(_ *models.MailersSection) *models.MailersSection
- func NilNameserver(_ *models.Nameserver) *models.Nameserver
- func NilPeerEntry(_ *models.PeerEntry) *models.PeerEntry
- func NilPeerSection(_ *models.PeerSection) *models.PeerSection
- func NilProgram(_ *models.Program) *models.Program
- func NilQUICInitialRule(_ *models.QUICInitialRule) *models.QUICInitialRule
- func NilResolver(_ *models.Resolver) *models.Resolver
- func NilRing(_ *models.Ring) *models.Ring
- func NilServer(_ *models.Server) *models.Server
- func NilServerSwitchingRule(_ *models.ServerSwitchingRule) *models.ServerSwitchingRule
- func NilServerTemplate(_ *models.ServerTemplate) *models.ServerTemplate
- func NilStickRule(_ *models.StickRule) *models.StickRule
- func NilTCPCheck(_ *models.TCPCheck) *models.TCPCheck
- func NilTCPRequestRule(_ *models.TCPRequestRule) *models.TCPRequestRule
- func NilTCPResponseRule(_ *models.TCPResponseRule) *models.TCPResponseRule
- func NilUser(_ *models.User) *models.User
- func NilUserlist(_ *models.Userlist) *models.Userlist
- func NilWAFGlobal(_ *v32ee.WafGlobal) *v32ee.WafGlobal
- func NilWAFProfile(_ *v32ee.WafProfile) *v32ee.WafProfile
- func PeerEntryName(p *models.PeerEntry) string
- func PeerSectionName(p *models.PeerSection) string
- func ProgramName(p *models.Program) string
- func ResolverName(r *models.Resolver) string
- func RingName(r *models.Ring) string
- func ServerName(s *models.Server) string
- func ServerTemplateName(s *models.ServerTemplate) string
- func UserName(u *models.User) string
- func UserlistName(u *models.Userlist) string
- func WAFProfileName(p *v32ee.WafProfile) string
- type ContainerChildOp
- func (op *ContainerChildOp[TModel, TAPI]) Describe() string
- func (op *ContainerChildOp[TModel, TAPI]) Execute(ctx context.Context, c *client.DataplaneClient, txID string) error
- func (op *ContainerChildOp[TModel, TAPI]) Priority() int
- func (op *ContainerChildOp[TModel, TAPI]) Section() string
- func (op *ContainerChildOp[TModel, TAPI]) Type() OperationType
- type ExecuteContainerChildFunc
- type ExecuteIndexChildFunc
- type ExecuteNameChildFunc
- type ExecuteSingletonFunc
- type ExecuteTopLevelFunc
- type IndexChildOp
- func (op *IndexChildOp[TModel, TAPI]) Describe() string
- func (op *IndexChildOp[TModel, TAPI]) Execute(ctx context.Context, c *client.DataplaneClient, txID string) error
- func (op *IndexChildOp[TModel, TAPI]) Priority() int
- func (op *IndexChildOp[TModel, TAPI]) Section() string
- func (op *IndexChildOp[TModel, TAPI]) Type() OperationType
- type NameChildOp
- func (op *NameChildOp[TModel, TAPI]) Describe() string
- func (op *NameChildOp[TModel, TAPI]) Execute(ctx context.Context, c *client.DataplaneClient, txID string) error
- func (op *NameChildOp[TModel, TAPI]) Priority() int
- func (op *NameChildOp[TModel, TAPI]) Section() string
- func (op *NameChildOp[TModel, TAPI]) Type() OperationType
- type Operation
- func NewACLBackendCreate(backendName string, acl *models.ACL, index int) Operation
- func NewACLBackendDelete(backendName string, acl *models.ACL, index int) Operation
- func NewACLBackendUpdate(backendName string, acl *models.ACL, index int) Operation
- func NewACLFrontendCreate(frontendName string, acl *models.ACL, index int) Operation
- func NewACLFrontendDelete(frontendName string, acl *models.ACL, index int) Operation
- func NewACLFrontendUpdate(frontendName string, acl *models.ACL, index int) Operation
- func NewAcmeProviderCreate(acmeProvider *models.AcmeProvider) Operation
- func NewAcmeProviderDelete(acmeProvider *models.AcmeProvider) Operation
- func NewAcmeProviderUpdate(acmeProvider *models.AcmeProvider) Operation
- func NewBackendCreate(backend *models.Backend) Operation
- func NewBackendDelete(backend *models.Backend) Operation
- func NewBackendSwitchingRuleFrontendCreate(frontendName string, rule *models.BackendSwitchingRule, index int) Operation
- func NewBackendSwitchingRuleFrontendDelete(frontendName string, rule *models.BackendSwitchingRule, index int) Operation
- func NewBackendSwitchingRuleFrontendUpdate(frontendName string, rule *models.BackendSwitchingRule, index int) Operation
- func NewBackendUpdate(backend *models.Backend) Operation
- func NewBindFrontendCreate(frontendName, bindName string, bind *models.Bind) Operation
- func NewBindFrontendDelete(frontendName, bindName string, bind *models.Bind) Operation
- func NewBindFrontendUpdate(frontendName, bindName string, bind *models.Bind) Operation
- func NewBotMgmtProfileCreate(profile *v32ee.BotmgmtProfile) Operation
- func NewBotMgmtProfileDelete(profile *v32ee.BotmgmtProfile) Operation
- func NewBotMgmtProfileUpdate(profile *v32ee.BotmgmtProfile) Operation
- func NewCacheCreate(cache *models.Cache) Operation
- func NewCacheDelete(cache *models.Cache) Operation
- func NewCacheUpdate(cache *models.Cache) Operation
- func NewCaptchaCreate(captcha *v32ee.Captcha) Operation
- func NewCaptchaDelete(captcha *v32ee.Captcha) Operation
- func NewCaptchaUpdate(captcha *v32ee.Captcha) Operation
- func NewCaptureFrontendCreate(frontendName string, capture *models.Capture, index int) Operation
- func NewCaptureFrontendDelete(frontendName string, capture *models.Capture, index int) Operation
- func NewCaptureFrontendUpdate(frontendName string, capture *models.Capture, index int) Operation
- func NewCrtStoreCreate(crtStore *models.CrtStore) Operation
- func NewCrtStoreDelete(crtStore *models.CrtStore) Operation
- func NewCrtStoreUpdate(crtStore *models.CrtStore) Operation
- func NewDefaultsCreate(defaults *models.Defaults) Operation
- func NewDefaultsDelete(defaults *models.Defaults) Operation
- func NewDefaultsUpdate(defaults *models.Defaults) Operation
- func NewFCGIAppCreate(fcgiApp *models.FCGIApp) Operation
- func NewFCGIAppDelete(fcgiApp *models.FCGIApp) Operation
- func NewFCGIAppUpdate(fcgiApp *models.FCGIApp) Operation
- func NewFilterBackendCreate(backendName string, filter *models.Filter, index int) Operation
- func NewFilterBackendDelete(backendName string, filter *models.Filter, index int) Operation
- func NewFilterBackendUpdate(backendName string, filter *models.Filter, index int) Operation
- func NewFilterFrontendCreate(frontendName string, filter *models.Filter, index int) Operation
- func NewFilterFrontendDelete(frontendName string, filter *models.Filter, index int) Operation
- func NewFilterFrontendUpdate(frontendName string, filter *models.Filter, index int) Operation
- func NewFrontendCreate(frontend *models.Frontend) Operation
- func NewFrontendDelete(frontend *models.Frontend) Operation
- func NewFrontendUpdate(frontend *models.Frontend) Operation
- func NewGlobalUpdate(global *models.Global) Operation
- func NewHTTPAfterResponseRuleBackendCreate(backendName string, rule *models.HTTPAfterResponseRule, index int) Operation
- func NewHTTPAfterResponseRuleBackendDelete(backendName string, rule *models.HTTPAfterResponseRule, index int) Operation
- func NewHTTPAfterResponseRuleBackendUpdate(backendName string, rule *models.HTTPAfterResponseRule, index int) Operation
- func NewHTTPCheckBackendCreate(backendName string, check *models.HTTPCheck, index int) Operation
- func NewHTTPCheckBackendDelete(backendName string, check *models.HTTPCheck, index int) Operation
- func NewHTTPCheckBackendUpdate(backendName string, check *models.HTTPCheck, index int) Operation
- func NewHTTPErrorsSectionCreate(section *models.HTTPErrorsSection) Operation
- func NewHTTPErrorsSectionDelete(section *models.HTTPErrorsSection) Operation
- func NewHTTPErrorsSectionUpdate(section *models.HTTPErrorsSection) Operation
- func NewHTTPRequestRuleBackendCreate(backendName string, rule *models.HTTPRequestRule, index int) Operation
- func NewHTTPRequestRuleBackendDelete(backendName string, rule *models.HTTPRequestRule, index int) Operation
- func NewHTTPRequestRuleBackendUpdate(backendName string, rule *models.HTTPRequestRule, index int) Operation
- func NewHTTPRequestRuleFrontendCreate(frontendName string, rule *models.HTTPRequestRule, index int) Operation
- func NewHTTPRequestRuleFrontendDelete(frontendName string, rule *models.HTTPRequestRule, index int) Operation
- func NewHTTPRequestRuleFrontendUpdate(frontendName string, rule *models.HTTPRequestRule, index int) Operation
- func NewHTTPResponseRuleBackendCreate(backendName string, rule *models.HTTPResponseRule, index int) Operation
- func NewHTTPResponseRuleBackendDelete(backendName string, rule *models.HTTPResponseRule, index int) Operation
- func NewHTTPResponseRuleBackendUpdate(backendName string, rule *models.HTTPResponseRule, index int) Operation
- func NewHTTPResponseRuleFrontendCreate(frontendName string, rule *models.HTTPResponseRule, index int) Operation
- func NewHTTPResponseRuleFrontendDelete(frontendName string, rule *models.HTTPResponseRule, index int) Operation
- func NewHTTPResponseRuleFrontendUpdate(frontendName string, rule *models.HTTPResponseRule, index int) Operation
- func NewLogForwardCreate(logForward *models.LogForward) Operation
- func NewLogForwardDelete(logForward *models.LogForward) Operation
- func NewLogForwardUpdate(logForward *models.LogForward) Operation
- func NewLogProfileCreate(logProfile *models.LogProfile) Operation
- func NewLogProfileDelete(logProfile *models.LogProfile) Operation
- func NewLogProfileUpdate(logProfile *models.LogProfile) Operation
- func NewLogTargetBackendCreate(backendName string, logTarget *models.LogTarget, index int) Operation
- func NewLogTargetBackendDelete(backendName string, logTarget *models.LogTarget, index int) Operation
- func NewLogTargetBackendUpdate(backendName string, logTarget *models.LogTarget, index int) Operation
- func NewLogTargetFrontendCreate(frontendName string, logTarget *models.LogTarget, index int) Operation
- func NewLogTargetFrontendDelete(frontendName string, logTarget *models.LogTarget, index int) Operation
- func NewLogTargetFrontendUpdate(frontendName string, logTarget *models.LogTarget, index int) Operation
- func NewMailerEntryCreate(mailersName string, entry *models.MailerEntry) Operation
- func NewMailerEntryDelete(mailersName string, entry *models.MailerEntry) Operation
- func NewMailerEntryUpdate(mailersName string, entry *models.MailerEntry) Operation
- func NewMailersSectionCreate(section *models.MailersSection) Operation
- func NewMailersSectionDelete(section *models.MailersSection) Operation
- func NewMailersSectionUpdate(section *models.MailersSection) Operation
- func NewNameserverCreate(resolverName string, nameserver *models.Nameserver) Operation
- func NewNameserverDelete(resolverName string, nameserver *models.Nameserver) Operation
- func NewNameserverUpdate(resolverName string, nameserver *models.Nameserver) Operation
- func NewPeerEntryCreate(peerSectionName string, entry *models.PeerEntry) Operation
- func NewPeerEntryDelete(peerSectionName string, entry *models.PeerEntry) Operation
- func NewPeerEntryUpdate(peerSectionName string, entry *models.PeerEntry) Operation
- func NewPeerSectionCreate(section *models.PeerSection) Operation
- func NewPeerSectionDelete(section *models.PeerSection) Operation
- func NewPeerSectionUpdate(section *models.PeerSection) Operation
- func NewProgramCreate(program *models.Program) Operation
- func NewProgramDelete(program *models.Program) Operation
- func NewProgramUpdate(program *models.Program) Operation
- func NewQUICInitialRuleDefaultsCreate(defaultsName string, rule *models.QUICInitialRule, index int) Operation
- func NewQUICInitialRuleDefaultsDelete(defaultsName string, rule *models.QUICInitialRule, index int) Operation
- func NewQUICInitialRuleDefaultsUpdate(defaultsName string, rule *models.QUICInitialRule, index int) Operation
- func NewQUICInitialRuleFrontendCreate(frontendName string, rule *models.QUICInitialRule, index int) Operation
- func NewQUICInitialRuleFrontendDelete(frontendName string, rule *models.QUICInitialRule, index int) Operation
- func NewQUICInitialRuleFrontendUpdate(frontendName string, rule *models.QUICInitialRule, index int) Operation
- func NewResolverCreate(resolver *models.Resolver) Operation
- func NewResolverDelete(resolver *models.Resolver) Operation
- func NewResolverUpdate(resolver *models.Resolver) Operation
- func NewRingCreate(ring *models.Ring) Operation
- func NewRingDelete(ring *models.Ring) Operation
- func NewRingUpdate(ring *models.Ring) Operation
- func NewServerCreate(backendName string, server *models.Server) Operation
- func NewServerDelete(backendName string, server *models.Server) Operation
- func NewServerSwitchingRuleBackendCreate(backendName string, rule *models.ServerSwitchingRule, index int) Operation
- func NewServerSwitchingRuleBackendDelete(backendName string, rule *models.ServerSwitchingRule, index int) Operation
- func NewServerSwitchingRuleBackendUpdate(backendName string, rule *models.ServerSwitchingRule, index int) Operation
- func NewServerTemplateCreate(backendName string, serverTemplate *models.ServerTemplate) Operation
- func NewServerTemplateDelete(backendName string, serverTemplate *models.ServerTemplate) Operation
- func NewServerTemplateUpdate(backendName string, serverTemplate *models.ServerTemplate) Operation
- func NewServerUpdate(backendName string, server *models.Server) Operation
- func NewStickRuleBackendCreate(backendName string, rule *models.StickRule, index int) Operation
- func NewStickRuleBackendDelete(backendName string, rule *models.StickRule, index int) Operation
- func NewStickRuleBackendUpdate(backendName string, rule *models.StickRule, index int) Operation
- func NewTCPCheckBackendCreate(backendName string, check *models.TCPCheck, index int) Operation
- func NewTCPCheckBackendDelete(backendName string, check *models.TCPCheck, index int) Operation
- func NewTCPCheckBackendUpdate(backendName string, check *models.TCPCheck, index int) Operation
- func NewTCPRequestRuleBackendCreate(backendName string, rule *models.TCPRequestRule, index int) Operation
- func NewTCPRequestRuleBackendDelete(backendName string, rule *models.TCPRequestRule, index int) Operation
- func NewTCPRequestRuleBackendUpdate(backendName string, rule *models.TCPRequestRule, index int) Operation
- func NewTCPRequestRuleFrontendCreate(frontendName string, rule *models.TCPRequestRule, index int) Operation
- func NewTCPRequestRuleFrontendDelete(frontendName string, rule *models.TCPRequestRule, index int) Operation
- func NewTCPRequestRuleFrontendUpdate(frontendName string, rule *models.TCPRequestRule, index int) Operation
- func NewTCPResponseRuleBackendCreate(backendName string, rule *models.TCPResponseRule, index int) Operation
- func NewTCPResponseRuleBackendDelete(backendName string, rule *models.TCPResponseRule, index int) Operation
- func NewTCPResponseRuleBackendUpdate(backendName string, rule *models.TCPResponseRule, index int) Operation
- func NewTracesUpdate(traces *models.Traces) Operation
- func NewUserCreate(userlistName string, user *models.User) Operation
- func NewUserDelete(userlistName string, user *models.User) Operation
- func NewUserUpdate(userlistName string, user *models.User) Operation
- func NewUserlistCreate(userlist *models.Userlist) Operation
- func NewUserlistDelete(userlist *models.Userlist) Operation
- func NewWAFGlobalCreate(wafGlobal *v32ee.WafGlobal) Operation
- func NewWAFGlobalDelete(wafGlobal *v32ee.WafGlobal) Operation
- func NewWAFGlobalUpdate(wafGlobal *v32ee.WafGlobal) Operation
- func NewWAFProfileCreate(profile *v32ee.WafProfile) Operation
- func NewWAFProfileDelete(profile *v32ee.WafProfile) Operation
- func NewWAFProfileUpdate(profile *v32ee.WafProfile) Operation
- type OperationType
- type SingletonOp
- func (op *SingletonOp[TModel, TAPI]) Describe() string
- func (op *SingletonOp[TModel, TAPI]) Execute(ctx context.Context, c *client.DataplaneClient, txID string) error
- func (op *SingletonOp[TModel, TAPI]) Priority() int
- func (op *SingletonOp[TModel, TAPI]) Section() string
- func (op *SingletonOp[TModel, TAPI]) Type() OperationType
- type TopLevelOp
- func (op *TopLevelOp[TModel, TAPI]) Describe() string
- func (op *TopLevelOp[TModel, TAPI]) Execute(ctx context.Context, c *client.DataplaneClient, txID string) error
- func (op *TopLevelOp[TModel, TAPI]) Priority() int
- func (op *TopLevelOp[TModel, TAPI]) Section() string
- func (op *TopLevelOp[TModel, TAPI]) Type() OperationType
Constants ¶
const ( // PriorityEEBotMgmtProfile is the priority for bot management profile operations. // These are top-level EE sections, similar to resolvers and caches. PriorityEEBotMgmtProfile = 15 // PriorityEECaptcha is the priority for captcha operations. PriorityEECaptcha = 15 // PriorityEEWAFGlobal is the priority for WAF global operations. // WAF global should be created before WAF profiles. PriorityEEWAFGlobal = 12 // PriorityEEWAFProfile is the priority for WAF profile operations. PriorityEEWAFProfile = 15 // PriorityEEUDPLB is the priority for UDP load balancer operations. // Similar priority to backends/frontends. PriorityEEUDPLB = 30 )
Priority constants for Enterprise Edition sections.
const ( // Priority 10 - Top-level sections that must exist first. PriorityGlobal = 10 PriorityDefaults = 20 PriorityUserlist = 10 PriorityCrtStore = 10 PriorityLogForward = 10 PriorityFCGIApp = 10 PriorityProgram = 10 // Priority 15 - Container sections. PriorityPeer = 15 PriorityRing = 15 PriorityMailers = 15 PriorityUser = 15 PriorityCache = 15 PriorityResolver = 15 // Priority 15 - Observability sections (v3.1+ features). PriorityLogProfile = 15 PriorityTraces = 15 // Priority 15 - Certificate automation sections (v3.2+ features). PriorityAcmeProvider = 15 // Priority 20-25 - HTTP errors and other mid-level. PriorityHTTPErrors = 25 // Priority 30 - Frontend/Backend sections. PriorityFrontend = 30 PriorityBackend = 30 // Priority 40 - Direct children of frontends/backends. PriorityBind = 40 PriorityServer = 40 PriorityMailerEntry = 40 PriorityPeerEntry = 40 PriorityNameserver = 40 // Priority 50 - ACLs. PriorityACL = 50 // Priority 60 - Rules (depend on ACLs). PriorityRule = 60 PriorityCapture = 60 PriorityStickRule = 60 PriorityHTTPAfterRule = 60 PriorityServerSwitchingRule = 60 PriorityBackendSwitchingRule = 60 PriorityHTTPCheck = 60 PriorityLogTarget = 60 PriorityTCPCheck = 60 PriorityFilter = 60 PriorityQUICInitialRule = 60 // v3.1+ only )
Priority constants for operation ordering. Lower priority = executed first for Creates, executed last for Deletes. Higher priority = executed last for Creates, executed first for Deletes.
Variables ¶
This section is empty.
Functions ¶
func AcmeProviderName ¶
func AcmeProviderName(a *models.AcmeProvider) string
AcmeProviderName extracts the name from an AcmeProvider model.
func BackendName ¶
BackendName extracts the name from a Backend model.
func BotMgmtProfileName ¶
func BotMgmtProfileName(p *v32ee.BotmgmtProfile) string
BotMgmtProfileName extracts the name from a BotmgmtProfile model.
func CaptchaEEName ¶
CaptchaEEName extracts the name from a Captcha model. Named CaptchaEEName to avoid conflict with CaptchaName in helpers.go.
func CrtStoreName ¶
CrtStoreName extracts the name from a CrtStore model.
func DefaultsName ¶
DefaultsName extracts the name from a Defaults model.
func DescribeACL ¶
func DescribeACL(op OperationType, aclName, parentType, parentName string) func() string
DescribeACL returns a description function for ACL operations with ACL name.
func DescribeContainerChild ¶
func DescribeContainerChild(op OperationType, childType, childName, containerType, containerName string) func() string
DescribeContainerChild returns a description function for container child operations.
func DescribeIndexChild ¶
func DescribeIndexChild(op OperationType, childType string, index int, parentType, parentName string) func() string
DescribeIndexChild returns a description function for indexed child operations.
func DescribeNamedChild ¶
func DescribeNamedChild(op OperationType, childType, childName, parentType, parentName string) func() string
DescribeNamedChild returns a description function for named child operations.
func DescribeSingleton ¶
func DescribeSingleton(op OperationType, section string) func() string
DescribeSingleton returns a description function for singleton operations.
func DescribeTopLevel ¶
func DescribeTopLevel(op OperationType, section, name string) func() string
DescribeTopLevel returns a description function for top-level operations.
func FCGIAppName ¶
FCGIAppName extracts the name from an FCGIApp model.
func FilterType ¶
FilterType extracts the type from a Filter model (for description purposes).
func FrontendName ¶
FrontendName extracts the name from a Frontend model.
func HTTPErrorsSectionName ¶
func HTTPErrorsSectionName(h *models.HTTPErrorsSection) string
HTTPErrorsSectionName extracts the name from an HTTPErrorsSection model.
func IdentityAcmeProvider ¶
func IdentityAcmeProvider(a *models.AcmeProvider) *models.AcmeProvider
IdentityAcmeProvider returns the model as-is.
func IdentityBackend ¶
IdentityBackend returns the model as-is.
func IdentityBackendSwitchingRule ¶
func IdentityBackendSwitchingRule(r *models.BackendSwitchingRule) *models.BackendSwitchingRule
IdentityBackendSwitchingRule returns the model as-is.
func IdentityBind ¶
IdentityBind returns the model as-is.
func IdentityBotMgmtProfile ¶
func IdentityBotMgmtProfile(p *v32ee.BotmgmtProfile) *v32ee.BotmgmtProfile
IdentityBotMgmtProfile returns the model as-is.
func IdentityCache ¶
IdentityCache returns the model as-is.
func IdentityCaptchaEE ¶
IdentityCaptchaEE returns the model as-is. Named IdentityCaptchaEE to avoid conflict with IdentityCapture in helpers.go.
func IdentityCapture ¶
IdentityCapture returns the model as-is.
func IdentityCrtStore ¶
IdentityCrtStore returns the model as-is.
func IdentityDefaults ¶
IdentityDefaults returns the model as-is.
func IdentityFCGIApp ¶
IdentityFCGIApp returns the model as-is.
func IdentityFilter ¶
IdentityFilter returns the model as-is.
func IdentityFrontend ¶
IdentityFrontend returns the model as-is.
func IdentityGlobal ¶
IdentityGlobal returns the model as-is.
func IdentityHTTPAfterResponseRule ¶
func IdentityHTTPAfterResponseRule(r *models.HTTPAfterResponseRule) *models.HTTPAfterResponseRule
IdentityHTTPAfterResponseRule returns the model as-is.
func IdentityHTTPCheck ¶
IdentityHTTPCheck returns the model as-is.
func IdentityHTTPErrorsSection ¶
func IdentityHTTPErrorsSection(h *models.HTTPErrorsSection) *models.HTTPErrorsSection
IdentityHTTPErrorsSection returns the model as-is.
func IdentityHTTPRequestRule ¶
func IdentityHTTPRequestRule(r *models.HTTPRequestRule) *models.HTTPRequestRule
IdentityHTTPRequestRule returns the model as-is.
func IdentityHTTPResponseRule ¶
func IdentityHTTPResponseRule(r *models.HTTPResponseRule) *models.HTTPResponseRule
IdentityHTTPResponseRule returns the model as-is.
func IdentityLogForward ¶
func IdentityLogForward(l *models.LogForward) *models.LogForward
IdentityLogForward returns the model as-is.
func IdentityLogProfile ¶
func IdentityLogProfile(l *models.LogProfile) *models.LogProfile
IdentityLogProfile returns the model as-is.
func IdentityLogTarget ¶
IdentityLogTarget returns the model as-is.
func IdentityMailerEntry ¶
func IdentityMailerEntry(m *models.MailerEntry) *models.MailerEntry
IdentityMailerEntry returns the model as-is.
func IdentityMailersSection ¶
func IdentityMailersSection(m *models.MailersSection) *models.MailersSection
IdentityMailersSection returns the model as-is.
func IdentityNameserver ¶
func IdentityNameserver(n *models.Nameserver) *models.Nameserver
IdentityNameserver returns the model as-is.
func IdentityPeerEntry ¶
IdentityPeerEntry returns the model as-is.
func IdentityPeerSection ¶
func IdentityPeerSection(p *models.PeerSection) *models.PeerSection
IdentityPeerSection returns the model as-is.
func IdentityProgram ¶
IdentityProgram returns the model as-is.
func IdentityQUICInitialRule ¶
func IdentityQUICInitialRule(r *models.QUICInitialRule) *models.QUICInitialRule
IdentityQUICInitialRule returns the model as-is.
func IdentityResolver ¶
IdentityResolver returns the model as-is.
func IdentityRing ¶
IdentityRing returns the model as-is.
func IdentityServer ¶
IdentityServer returns the model as-is.
func IdentityServerSwitchingRule ¶
func IdentityServerSwitchingRule(r *models.ServerSwitchingRule) *models.ServerSwitchingRule
IdentityServerSwitchingRule returns the model as-is.
func IdentityServerTemplate ¶
func IdentityServerTemplate(s *models.ServerTemplate) *models.ServerTemplate
IdentityServerTemplate returns the model as-is.
func IdentityStickRule ¶
IdentityStickRule returns the model as-is.
func IdentityTCPCheck ¶
IdentityTCPCheck returns the model as-is.
func IdentityTCPRequestRule ¶
func IdentityTCPRequestRule(r *models.TCPRequestRule) *models.TCPRequestRule
IdentityTCPRequestRule returns the model as-is.
func IdentityTCPResponseRule ¶
func IdentityTCPResponseRule(r *models.TCPResponseRule) *models.TCPResponseRule
IdentityTCPResponseRule returns the model as-is.
func IdentityTraces ¶
IdentityTraces returns the model as-is.
func IdentityUser ¶
IdentityUser returns the model as-is.
func IdentityUserlist ¶
IdentityUserlist returns the model as-is.
func IdentityWAFGlobal ¶
IdentityWAFGlobal returns the model as-is.
func IdentityWAFProfile ¶
func IdentityWAFProfile(p *v32ee.WafProfile) *v32ee.WafProfile
IdentityWAFProfile returns the model as-is.
func LogForwardName ¶
func LogForwardName(l *models.LogForward) string
LogForwardName extracts the name from a LogForward model.
func LogProfileName ¶
func LogProfileName(l *models.LogProfile) string
LogProfileName extracts the name from a LogProfile model.
func MailerEntryName ¶
func MailerEntryName(m *models.MailerEntry) string
MailerEntryName extracts the name from a MailerEntry model.
func MailersSectionName ¶
func MailersSectionName(m *models.MailersSection) string
MailersSectionName extracts the name from a MailersSection model.
func NameserverName ¶
func NameserverName(n *models.Nameserver) string
NameserverName extracts the name from a Nameserver model.
func NilAcmeProvider ¶
func NilAcmeProvider(_ *models.AcmeProvider) *models.AcmeProvider
NilAcmeProvider returns nil, used for delete operations where model isn't needed.
func NilBackend ¶
NilBackend returns nil, used for delete operations where model isn't needed.
func NilBackendSwitchingRule ¶
func NilBackendSwitchingRule(_ *models.BackendSwitchingRule) *models.BackendSwitchingRule
NilBackendSwitchingRule returns nil, used for delete operations where model isn't needed.
func NilBotMgmtProfile ¶
func NilBotMgmtProfile(_ *v32ee.BotmgmtProfile) *v32ee.BotmgmtProfile
NilBotMgmtProfile returns nil, used for delete operations where model isn't needed.
func NilCaptchaEE ¶
NilCaptchaEE returns nil, used for delete operations where model isn't needed. Named NilCaptchaEE to avoid conflict with NilCapture in helpers.go.
func NilCapture ¶
NilCapture returns nil, used for delete operations where model isn't needed.
func NilCrtStore ¶
NilCrtStore returns nil, used for delete operations where model isn't needed.
func NilDefaults ¶
NilDefaults returns nil, used for delete operations where model isn't needed.
func NilFCGIApp ¶
NilFCGIApp returns nil, used for delete operations where model isn't needed.
func NilFrontend ¶
NilFrontend returns nil, used for delete operations where model isn't needed.
func NilHTTPAfterResponseRule ¶
func NilHTTPAfterResponseRule(_ *models.HTTPAfterResponseRule) *models.HTTPAfterResponseRule
NilHTTPAfterResponseRule returns nil, used for delete operations where model isn't needed.
func NilHTTPCheck ¶
NilHTTPCheck returns nil, used for delete operations where model isn't needed.
func NilHTTPErrorsSection ¶
func NilHTTPErrorsSection(_ *models.HTTPErrorsSection) *models.HTTPErrorsSection
NilHTTPErrorsSection returns nil, used for delete operations where model isn't needed.
func NilHTTPRequestRule ¶
func NilHTTPRequestRule(_ *models.HTTPRequestRule) *models.HTTPRequestRule
NilHTTPRequestRule returns nil, used for delete operations where model isn't needed.
func NilHTTPResponseRule ¶
func NilHTTPResponseRule(_ *models.HTTPResponseRule) *models.HTTPResponseRule
NilHTTPResponseRule returns nil, used for delete operations where model isn't needed.
func NilLogForward ¶
func NilLogForward(_ *models.LogForward) *models.LogForward
NilLogForward returns nil, used for delete operations where model isn't needed.
func NilLogProfile ¶
func NilLogProfile(_ *models.LogProfile) *models.LogProfile
NilLogProfile returns nil, used for delete operations where model isn't needed.
func NilLogTarget ¶
NilLogTarget returns nil, used for delete operations where model isn't needed.
func NilMailerEntry ¶
func NilMailerEntry(_ *models.MailerEntry) *models.MailerEntry
NilMailerEntry returns nil, used for delete operations where model isn't needed.
func NilMailersSection ¶
func NilMailersSection(_ *models.MailersSection) *models.MailersSection
NilMailersSection returns nil, used for delete operations where model isn't needed.
func NilNameserver ¶
func NilNameserver(_ *models.Nameserver) *models.Nameserver
NilNameserver returns nil, used for delete operations where model isn't needed.
func NilPeerEntry ¶
NilPeerEntry returns nil, used for delete operations where model isn't needed.
func NilPeerSection ¶
func NilPeerSection(_ *models.PeerSection) *models.PeerSection
NilPeerSection returns nil, used for delete operations where model isn't needed.
func NilProgram ¶
NilProgram returns nil, used for delete operations where model isn't needed.
func NilQUICInitialRule ¶
func NilQUICInitialRule(_ *models.QUICInitialRule) *models.QUICInitialRule
NilQUICInitialRule returns nil, used for delete operations where model isn't needed.
func NilResolver ¶
NilResolver returns nil, used for delete operations where model isn't needed.
func NilServerSwitchingRule ¶
func NilServerSwitchingRule(_ *models.ServerSwitchingRule) *models.ServerSwitchingRule
NilServerSwitchingRule returns nil, used for delete operations where model isn't needed.
func NilServerTemplate ¶
func NilServerTemplate(_ *models.ServerTemplate) *models.ServerTemplate
NilServerTemplate returns nil, used for delete operations where model isn't needed.
func NilStickRule ¶
NilStickRule returns nil, used for delete operations where model isn't needed.
func NilTCPCheck ¶
NilTCPCheck returns nil, used for delete operations where model isn't needed.
func NilTCPRequestRule ¶
func NilTCPRequestRule(_ *models.TCPRequestRule) *models.TCPRequestRule
NilTCPRequestRule returns nil, used for delete operations where model isn't needed.
func NilTCPResponseRule ¶
func NilTCPResponseRule(_ *models.TCPResponseRule) *models.TCPResponseRule
NilTCPResponseRule returns nil, used for delete operations where model isn't needed.
func NilUserlist ¶
NilUserlist returns nil, used for delete operations where model isn't needed.
func NilWAFGlobal ¶
NilWAFGlobal returns nil, used for delete operations where model isn't needed.
func NilWAFProfile ¶
func NilWAFProfile(_ *v32ee.WafProfile) *v32ee.WafProfile
NilWAFProfile returns nil, used for delete operations where model isn't needed.
func PeerEntryName ¶
PeerEntryName extracts the name from a PeerEntry model.
func PeerSectionName ¶
func PeerSectionName(p *models.PeerSection) string
PeerSectionName extracts the name from a PeerSection model.
func ProgramName ¶
ProgramName extracts the name from a Program model.
func ResolverName ¶
ResolverName extracts the name from a Resolver model.
func ServerName ¶
ServerName extracts the name from a Server model.
func ServerTemplateName ¶
func ServerTemplateName(s *models.ServerTemplate) string
ServerTemplateName extracts the prefix from a ServerTemplate model.
func UserlistName ¶
UserlistName extracts the name from a Userlist model.
func WAFProfileName ¶
func WAFProfileName(p *v32ee.WafProfile) string
WAFProfileName extracts the name from a WafProfile model.
Types ¶
type ContainerChildOp ¶
ContainerChildOp handles operations for container child resources like user, mailer_entry. These resources belong to a container (userlist, mailers) where the parent is passed via params.
func NewContainerChildOp ¶
func NewContainerChildOp[TModel any, TAPI any]( opType OperationType, sectionName string, priority int, containerName string, model TModel, transformFn func(TModel) TAPI, nameFn func(TModel) string, executeFn ExecuteContainerChildFunc[TAPI], describeFn func() string, ) *ContainerChildOp[TModel, TAPI]
NewContainerChildOp creates a new container child operation.
func (*ContainerChildOp[TModel, TAPI]) Describe ¶
func (op *ContainerChildOp[TModel, TAPI]) Describe() string
func (*ContainerChildOp[TModel, TAPI]) Execute ¶
func (op *ContainerChildOp[TModel, TAPI]) Execute(ctx context.Context, c *client.DataplaneClient, txID string) error
func (*ContainerChildOp[TModel, TAPI]) Priority ¶
func (op *ContainerChildOp[TModel, TAPI]) Priority() int
func (*ContainerChildOp[TModel, TAPI]) Section ¶
func (op *ContainerChildOp[TModel, TAPI]) Section() string
func (*ContainerChildOp[TModel, TAPI]) Type ¶
func (op *ContainerChildOp[TModel, TAPI]) Type() OperationType
type ExecuteContainerChildFunc ¶
type ExecuteContainerChildFunc[TAPI any] func( ctx context.Context, c *client.DataplaneClient, txID string, containerName string, childName string, model TAPI, ) error
ExecuteContainerChildFunc is the function signature for container child operations. Used by user, mailer_entry, peer_entry, nameserver where parent is in params.
type ExecuteIndexChildFunc ¶
type ExecuteIndexChildFunc[TAPI any] func( ctx context.Context, c *client.DataplaneClient, txID string, parent string, index int, model TAPI, ) error
ExecuteIndexChildFunc is the function signature for index-based child operations. Used by ACL, HTTP rules, TCP rules, filters, etc.
type ExecuteNameChildFunc ¶
type ExecuteNameChildFunc[TAPI any] func( ctx context.Context, c *client.DataplaneClient, txID string, parent string, childName string, model TAPI, ) error
ExecuteNameChildFunc is the function signature for name-based child operations. Used by bind, server_template.
type ExecuteSingletonFunc ¶
type ExecuteSingletonFunc[TAPI any] func( ctx context.Context, c *client.DataplaneClient, txID string, model TAPI, ) error
ExecuteSingletonFunc is the function signature for singleton operations. Used by global section which only supports update.
type ExecuteTopLevelFunc ¶
type ExecuteTopLevelFunc[TAPI any] func( ctx context.Context, c *client.DataplaneClient, txID string, model TAPI, name string, ) error
ExecuteTopLevelFunc is the function signature for top-level resource operations. Used by backend, frontend, defaults, cache, etc.
type IndexChildOp ¶
IndexChildOp handles operations for index-based child resources like ACL, HTTP rules, TCP rules. These resources belong to a parent (frontend/backend) and are identified by index position.
func NewIndexChildOp ¶
func NewIndexChildOp[TModel any, TAPI any]( opType OperationType, sectionName string, priority int, parentName string, index int, model TModel, transformFn func(TModel) TAPI, executeFn ExecuteIndexChildFunc[TAPI], describeFn func() string, ) *IndexChildOp[TModel, TAPI]
NewIndexChildOp creates a new index-based child operation.
func (*IndexChildOp[TModel, TAPI]) Describe ¶
func (op *IndexChildOp[TModel, TAPI]) Describe() string
func (*IndexChildOp[TModel, TAPI]) Execute ¶
func (op *IndexChildOp[TModel, TAPI]) Execute(ctx context.Context, c *client.DataplaneClient, txID string) error
func (*IndexChildOp[TModel, TAPI]) Priority ¶
func (op *IndexChildOp[TModel, TAPI]) Priority() int
func (*IndexChildOp[TModel, TAPI]) Section ¶
func (op *IndexChildOp[TModel, TAPI]) Section() string
func (*IndexChildOp[TModel, TAPI]) Type ¶
func (op *IndexChildOp[TModel, TAPI]) Type() OperationType
type NameChildOp ¶
NameChildOp handles operations for name-based child resources like bind, server_template. These resources belong to a parent and are identified by name (not index).
func NewNameChildOp ¶
func NewNameChildOp[TModel any, TAPI any]( opType OperationType, sectionName string, priority int, parentName string, childName string, model TModel, transformFn func(TModel) TAPI, executeFn ExecuteNameChildFunc[TAPI], describeFn func() string, ) *NameChildOp[TModel, TAPI]
NewNameChildOp creates a new name-based child operation.
func (*NameChildOp[TModel, TAPI]) Describe ¶
func (op *NameChildOp[TModel, TAPI]) Describe() string
func (*NameChildOp[TModel, TAPI]) Execute ¶
func (op *NameChildOp[TModel, TAPI]) Execute(ctx context.Context, c *client.DataplaneClient, txID string) error
func (*NameChildOp[TModel, TAPI]) Priority ¶
func (op *NameChildOp[TModel, TAPI]) Priority() int
func (*NameChildOp[TModel, TAPI]) Section ¶
func (op *NameChildOp[TModel, TAPI]) Section() string
func (*NameChildOp[TModel, TAPI]) Type ¶
func (op *NameChildOp[TModel, TAPI]) Type() OperationType
type Operation ¶
type Operation interface {
// Type returns the operation type (Create, Update, Delete)
Type() OperationType
// Section returns the configuration section this operation affects
Section() string
// Priority returns the execution priority (lower = first for creates, higher = first for deletes)
Priority() int
// Execute performs the operation via the Dataplane API
Execute(ctx context.Context, c *client.DataplaneClient, txID string) error
// Describe returns a human-readable description of the operation
Describe() string
}
Operation defines the interface for all HAProxy configuration operations. This interface is implemented by all generic operation types (TopLevelOp, IndexChildOp, etc.)
func NewACLBackendCreate ¶
NewACLBackendCreate creates an operation to create an ACL in a backend.
func NewACLBackendDelete ¶
NewACLBackendDelete creates an operation to delete an ACL from a backend.
func NewACLBackendUpdate ¶
NewACLBackendUpdate creates an operation to update an ACL in a backend.
func NewACLFrontendCreate ¶
NewACLFrontendCreate creates an operation to create an ACL in a frontend.
func NewACLFrontendDelete ¶
NewACLFrontendDelete creates an operation to delete an ACL from a frontend.
func NewACLFrontendUpdate ¶
NewACLFrontendUpdate creates an operation to update an ACL in a frontend.
func NewAcmeProviderCreate ¶
func NewAcmeProviderCreate(acmeProvider *models.AcmeProvider) Operation
NewAcmeProviderCreate creates an operation to create an acme section. ACME providers are only available in HAProxy DataPlane API v3.2+.
func NewAcmeProviderDelete ¶
func NewAcmeProviderDelete(acmeProvider *models.AcmeProvider) Operation
NewAcmeProviderDelete creates an operation to delete an acme section. ACME providers are only available in HAProxy DataPlane API v3.2+.
func NewAcmeProviderUpdate ¶
func NewAcmeProviderUpdate(acmeProvider *models.AcmeProvider) Operation
NewAcmeProviderUpdate creates an operation to update an acme section. ACME providers are only available in HAProxy DataPlane API v3.2+.
func NewBackendCreate ¶
NewBackendCreate creates an operation to create a backend.
func NewBackendDelete ¶
NewBackendDelete creates an operation to delete a backend.
func NewBackendSwitchingRuleFrontendCreate ¶
func NewBackendSwitchingRuleFrontendCreate(frontendName string, rule *models.BackendSwitchingRule, index int) Operation
NewBackendSwitchingRuleFrontendCreate creates an operation to create a backend switching rule.
func NewBackendSwitchingRuleFrontendDelete ¶
func NewBackendSwitchingRuleFrontendDelete(frontendName string, rule *models.BackendSwitchingRule, index int) Operation
NewBackendSwitchingRuleFrontendDelete creates an operation to delete a backend switching rule.
func NewBackendSwitchingRuleFrontendUpdate ¶
func NewBackendSwitchingRuleFrontendUpdate(frontendName string, rule *models.BackendSwitchingRule, index int) Operation
NewBackendSwitchingRuleFrontendUpdate creates an operation to update a backend switching rule.
func NewBackendUpdate ¶
NewBackendUpdate creates an operation to update a backend.
func NewBindFrontendCreate ¶
NewBindFrontendCreate creates an operation to create a bind in a frontend.
func NewBindFrontendDelete ¶
NewBindFrontendDelete creates an operation to delete a bind from a frontend.
func NewBindFrontendUpdate ¶
NewBindFrontendUpdate creates an operation to update a bind in a frontend.
func NewBotMgmtProfileCreate ¶
func NewBotMgmtProfileCreate(profile *v32ee.BotmgmtProfile) Operation
NewBotMgmtProfileCreate creates an operation to create a bot management profile. Bot management profiles are only available in HAProxy Enterprise Edition.
func NewBotMgmtProfileDelete ¶
func NewBotMgmtProfileDelete(profile *v32ee.BotmgmtProfile) Operation
NewBotMgmtProfileDelete creates an operation to delete a bot management profile.
func NewBotMgmtProfileUpdate ¶
func NewBotMgmtProfileUpdate(profile *v32ee.BotmgmtProfile) Operation
NewBotMgmtProfileUpdate creates an operation to update a bot management profile.
func NewCacheCreate ¶
NewCacheCreate creates an operation to create a cache section.
func NewCacheDelete ¶
NewCacheDelete creates an operation to delete a cache section.
func NewCacheUpdate ¶
NewCacheUpdate creates an operation to update a cache section.
func NewCaptchaCreate ¶
NewCaptchaCreate creates an operation to create a captcha section. Captcha is only available in HAProxy Enterprise Edition.
func NewCaptchaDelete ¶
NewCaptchaDelete creates an operation to delete a captcha section.
func NewCaptchaUpdate ¶
NewCaptchaUpdate creates an operation to update a captcha section.
func NewCaptureFrontendCreate ¶
NewCaptureFrontendCreate creates an operation to create a capture declaration in a frontend.
func NewCaptureFrontendDelete ¶
NewCaptureFrontendDelete creates an operation to delete a capture declaration from a frontend.
func NewCaptureFrontendUpdate ¶
NewCaptureFrontendUpdate creates an operation to update a capture declaration in a frontend.
func NewCrtStoreCreate ¶
NewCrtStoreCreate creates an operation to create a crt-store section.
func NewCrtStoreDelete ¶
NewCrtStoreDelete creates an operation to delete a crt-store section.
func NewCrtStoreUpdate ¶
NewCrtStoreUpdate creates an operation to update a crt-store section.
func NewDefaultsCreate ¶
NewDefaultsCreate creates an operation to create a defaults section.
func NewDefaultsDelete ¶
NewDefaultsDelete creates an operation to delete a defaults section.
func NewDefaultsUpdate ¶
NewDefaultsUpdate creates an operation to update a defaults section.
func NewFCGIAppCreate ¶
NewFCGIAppCreate creates an operation to create a fcgi-app section.
func NewFCGIAppDelete ¶
NewFCGIAppDelete creates an operation to delete a fcgi-app section.
func NewFCGIAppUpdate ¶
NewFCGIAppUpdate creates an operation to update a fcgi-app section.
func NewFilterBackendCreate ¶
NewFilterBackendCreate creates an operation to create a filter in a backend.
func NewFilterBackendDelete ¶
NewFilterBackendDelete creates an operation to delete a filter from a backend.
func NewFilterBackendUpdate ¶
NewFilterBackendUpdate creates an operation to update a filter in a backend.
func NewFilterFrontendCreate ¶
NewFilterFrontendCreate creates an operation to create a filter in a frontend.
func NewFilterFrontendDelete ¶
NewFilterFrontendDelete creates an operation to delete a filter from a frontend.
func NewFilterFrontendUpdate ¶
NewFilterFrontendUpdate creates an operation to update a filter in a frontend.
func NewFrontendCreate ¶
NewFrontendCreate creates an operation to create a frontend.
func NewFrontendDelete ¶
NewFrontendDelete creates an operation to delete a frontend.
func NewFrontendUpdate ¶
NewFrontendUpdate creates an operation to update a frontend.
func NewGlobalUpdate ¶
NewGlobalUpdate creates an operation to update the global section.
func NewHTTPAfterResponseRuleBackendCreate ¶
func NewHTTPAfterResponseRuleBackendCreate(backendName string, rule *models.HTTPAfterResponseRule, index int) Operation
NewHTTPAfterResponseRuleBackendCreate creates an operation to create an HTTP after-response rule in a backend.
func NewHTTPAfterResponseRuleBackendDelete ¶
func NewHTTPAfterResponseRuleBackendDelete(backendName string, rule *models.HTTPAfterResponseRule, index int) Operation
NewHTTPAfterResponseRuleBackendDelete creates an operation to delete an HTTP after-response rule from a backend.
func NewHTTPAfterResponseRuleBackendUpdate ¶
func NewHTTPAfterResponseRuleBackendUpdate(backendName string, rule *models.HTTPAfterResponseRule, index int) Operation
NewHTTPAfterResponseRuleBackendUpdate creates an operation to update an HTTP after-response rule in a backend.
func NewHTTPCheckBackendCreate ¶
NewHTTPCheckBackendCreate creates an operation to create an HTTP check in a backend.
func NewHTTPCheckBackendDelete ¶
NewHTTPCheckBackendDelete creates an operation to delete an HTTP check from a backend.
func NewHTTPCheckBackendUpdate ¶
NewHTTPCheckBackendUpdate creates an operation to update an HTTP check in a backend.
func NewHTTPErrorsSectionCreate ¶
func NewHTTPErrorsSectionCreate(section *models.HTTPErrorsSection) Operation
NewHTTPErrorsSectionCreate creates an operation to create an http-errors section.
func NewHTTPErrorsSectionDelete ¶
func NewHTTPErrorsSectionDelete(section *models.HTTPErrorsSection) Operation
NewHTTPErrorsSectionDelete creates an operation to delete an http-errors section.
func NewHTTPErrorsSectionUpdate ¶
func NewHTTPErrorsSectionUpdate(section *models.HTTPErrorsSection) Operation
NewHTTPErrorsSectionUpdate creates an operation to update an http-errors section.
func NewHTTPRequestRuleBackendCreate ¶
func NewHTTPRequestRuleBackendCreate(backendName string, rule *models.HTTPRequestRule, index int) Operation
NewHTTPRequestRuleBackendCreate creates an operation to create an HTTP request rule in a backend.
func NewHTTPRequestRuleBackendDelete ¶
func NewHTTPRequestRuleBackendDelete(backendName string, rule *models.HTTPRequestRule, index int) Operation
NewHTTPRequestRuleBackendDelete creates an operation to delete an HTTP request rule from a backend.
func NewHTTPRequestRuleBackendUpdate ¶
func NewHTTPRequestRuleBackendUpdate(backendName string, rule *models.HTTPRequestRule, index int) Operation
NewHTTPRequestRuleBackendUpdate creates an operation to update an HTTP request rule in a backend.
func NewHTTPRequestRuleFrontendCreate ¶
func NewHTTPRequestRuleFrontendCreate(frontendName string, rule *models.HTTPRequestRule, index int) Operation
NewHTTPRequestRuleFrontendCreate creates an operation to create an HTTP request rule in a frontend.
func NewHTTPRequestRuleFrontendDelete ¶
func NewHTTPRequestRuleFrontendDelete(frontendName string, rule *models.HTTPRequestRule, index int) Operation
NewHTTPRequestRuleFrontendDelete creates an operation to delete an HTTP request rule from a frontend.
func NewHTTPRequestRuleFrontendUpdate ¶
func NewHTTPRequestRuleFrontendUpdate(frontendName string, rule *models.HTTPRequestRule, index int) Operation
NewHTTPRequestRuleFrontendUpdate creates an operation to update an HTTP request rule in a frontend.
func NewHTTPResponseRuleBackendCreate ¶
func NewHTTPResponseRuleBackendCreate(backendName string, rule *models.HTTPResponseRule, index int) Operation
NewHTTPResponseRuleBackendCreate creates an operation to create an HTTP response rule in a backend.
func NewHTTPResponseRuleBackendDelete ¶
func NewHTTPResponseRuleBackendDelete(backendName string, rule *models.HTTPResponseRule, index int) Operation
NewHTTPResponseRuleBackendDelete creates an operation to delete an HTTP response rule from a backend.
func NewHTTPResponseRuleBackendUpdate ¶
func NewHTTPResponseRuleBackendUpdate(backendName string, rule *models.HTTPResponseRule, index int) Operation
NewHTTPResponseRuleBackendUpdate creates an operation to update an HTTP response rule in a backend.
func NewHTTPResponseRuleFrontendCreate ¶
func NewHTTPResponseRuleFrontendCreate(frontendName string, rule *models.HTTPResponseRule, index int) Operation
NewHTTPResponseRuleFrontendCreate creates an operation to create an HTTP response rule in a frontend.
func NewHTTPResponseRuleFrontendDelete ¶
func NewHTTPResponseRuleFrontendDelete(frontendName string, rule *models.HTTPResponseRule, index int) Operation
NewHTTPResponseRuleFrontendDelete creates an operation to delete an HTTP response rule from a frontend.
func NewHTTPResponseRuleFrontendUpdate ¶
func NewHTTPResponseRuleFrontendUpdate(frontendName string, rule *models.HTTPResponseRule, index int) Operation
NewHTTPResponseRuleFrontendUpdate creates an operation to update an HTTP response rule in a frontend.
func NewLogForwardCreate ¶
func NewLogForwardCreate(logForward *models.LogForward) Operation
NewLogForwardCreate creates an operation to create a log-forward section.
func NewLogForwardDelete ¶
func NewLogForwardDelete(logForward *models.LogForward) Operation
NewLogForwardDelete creates an operation to delete a log-forward section.
func NewLogForwardUpdate ¶
func NewLogForwardUpdate(logForward *models.LogForward) Operation
NewLogForwardUpdate creates an operation to update a log-forward section.
func NewLogProfileCreate ¶
func NewLogProfileCreate(logProfile *models.LogProfile) Operation
NewLogProfileCreate creates an operation to create a log-profile section. Log profiles are only available in HAProxy DataPlane API v3.1+.
func NewLogProfileDelete ¶
func NewLogProfileDelete(logProfile *models.LogProfile) Operation
NewLogProfileDelete creates an operation to delete a log-profile section. Log profiles are only available in HAProxy DataPlane API v3.1+.
func NewLogProfileUpdate ¶
func NewLogProfileUpdate(logProfile *models.LogProfile) Operation
NewLogProfileUpdate creates an operation to update a log-profile section. Log profiles are only available in HAProxy DataPlane API v3.1+.
func NewLogTargetBackendCreate ¶
func NewLogTargetBackendCreate(backendName string, logTarget *models.LogTarget, index int) Operation
NewLogTargetBackendCreate creates an operation to create a log target in a backend.
func NewLogTargetBackendDelete ¶
func NewLogTargetBackendDelete(backendName string, logTarget *models.LogTarget, index int) Operation
NewLogTargetBackendDelete creates an operation to delete a log target from a backend.
func NewLogTargetBackendUpdate ¶
func NewLogTargetBackendUpdate(backendName string, logTarget *models.LogTarget, index int) Operation
NewLogTargetBackendUpdate creates an operation to update a log target in a backend.
func NewLogTargetFrontendCreate ¶
func NewLogTargetFrontendCreate(frontendName string, logTarget *models.LogTarget, index int) Operation
NewLogTargetFrontendCreate creates an operation to create a log target in a frontend.
func NewLogTargetFrontendDelete ¶
func NewLogTargetFrontendDelete(frontendName string, logTarget *models.LogTarget, index int) Operation
NewLogTargetFrontendDelete creates an operation to delete a log target from a frontend.
func NewLogTargetFrontendUpdate ¶
func NewLogTargetFrontendUpdate(frontendName string, logTarget *models.LogTarget, index int) Operation
NewLogTargetFrontendUpdate creates an operation to update a log target in a frontend.
func NewMailerEntryCreate ¶
func NewMailerEntryCreate(mailersName string, entry *models.MailerEntry) Operation
NewMailerEntryCreate creates an operation to create a mailer entry.
func NewMailerEntryDelete ¶
func NewMailerEntryDelete(mailersName string, entry *models.MailerEntry) Operation
NewMailerEntryDelete creates an operation to delete a mailer entry.
func NewMailerEntryUpdate ¶
func NewMailerEntryUpdate(mailersName string, entry *models.MailerEntry) Operation
NewMailerEntryUpdate creates an operation to update a mailer entry.
func NewMailersSectionCreate ¶
func NewMailersSectionCreate(section *models.MailersSection) Operation
NewMailersSectionCreate creates an operation to create a mailers section.
func NewMailersSectionDelete ¶
func NewMailersSectionDelete(section *models.MailersSection) Operation
NewMailersSectionDelete creates an operation to delete a mailers section.
func NewMailersSectionUpdate ¶
func NewMailersSectionUpdate(section *models.MailersSection) Operation
NewMailersSectionUpdate creates an operation to update a mailers section.
func NewNameserverCreate ¶
func NewNameserverCreate(resolverName string, nameserver *models.Nameserver) Operation
NewNameserverCreate creates an operation to create a nameserver in a resolver.
func NewNameserverDelete ¶
func NewNameserverDelete(resolverName string, nameserver *models.Nameserver) Operation
NewNameserverDelete creates an operation to delete a nameserver from a resolver.
func NewNameserverUpdate ¶
func NewNameserverUpdate(resolverName string, nameserver *models.Nameserver) Operation
NewNameserverUpdate creates an operation to update a nameserver in a resolver.
func NewPeerEntryCreate ¶
NewPeerEntryCreate creates an operation to create a peer entry.
func NewPeerEntryDelete ¶
NewPeerEntryDelete creates an operation to delete a peer entry.
func NewPeerEntryUpdate ¶
NewPeerEntryUpdate creates an operation to update a peer entry.
func NewPeerSectionCreate ¶
func NewPeerSectionCreate(section *models.PeerSection) Operation
NewPeerSectionCreate creates an operation to create a peer section.
func NewPeerSectionDelete ¶
func NewPeerSectionDelete(section *models.PeerSection) Operation
NewPeerSectionDelete creates an operation to delete a peer section.
func NewPeerSectionUpdate ¶
func NewPeerSectionUpdate(section *models.PeerSection) Operation
NewPeerSectionUpdate creates an operation to update a peer section. Note: This operation will fail at execution time as the HAProxy Dataplane API does not support updating peer sections directly.
func NewProgramCreate ¶
NewProgramCreate creates an operation to create a program section.
func NewProgramDelete ¶
NewProgramDelete creates an operation to delete a program section.
func NewProgramUpdate ¶
NewProgramUpdate creates an operation to update a program section.
func NewQUICInitialRuleDefaultsCreate ¶
func NewQUICInitialRuleDefaultsCreate(defaultsName string, rule *models.QUICInitialRule, index int) Operation
NewQUICInitialRuleDefaultsCreate creates an operation to create a QUIC initial rule in defaults. QUIC initial rules are only available in HAProxy DataPlane API v3.1+.
func NewQUICInitialRuleDefaultsDelete ¶
func NewQUICInitialRuleDefaultsDelete(defaultsName string, rule *models.QUICInitialRule, index int) Operation
NewQUICInitialRuleDefaultsDelete creates an operation to delete a QUIC initial rule from defaults. QUIC initial rules are only available in HAProxy DataPlane API v3.1+.
func NewQUICInitialRuleDefaultsUpdate ¶
func NewQUICInitialRuleDefaultsUpdate(defaultsName string, rule *models.QUICInitialRule, index int) Operation
NewQUICInitialRuleDefaultsUpdate creates an operation to update a QUIC initial rule in defaults. QUIC initial rules are only available in HAProxy DataPlane API v3.1+.
func NewQUICInitialRuleFrontendCreate ¶
func NewQUICInitialRuleFrontendCreate(frontendName string, rule *models.QUICInitialRule, index int) Operation
NewQUICInitialRuleFrontendCreate creates an operation to create a QUIC initial rule in a frontend. QUIC initial rules are only available in HAProxy DataPlane API v3.1+.
func NewQUICInitialRuleFrontendDelete ¶
func NewQUICInitialRuleFrontendDelete(frontendName string, rule *models.QUICInitialRule, index int) Operation
NewQUICInitialRuleFrontendDelete creates an operation to delete a QUIC initial rule from a frontend. QUIC initial rules are only available in HAProxy DataPlane API v3.1+.
func NewQUICInitialRuleFrontendUpdate ¶
func NewQUICInitialRuleFrontendUpdate(frontendName string, rule *models.QUICInitialRule, index int) Operation
NewQUICInitialRuleFrontendUpdate creates an operation to update a QUIC initial rule in a frontend. QUIC initial rules are only available in HAProxy DataPlane API v3.1+.
func NewResolverCreate ¶
NewResolverCreate creates an operation to create a resolver section.
func NewResolverDelete ¶
NewResolverDelete creates an operation to delete a resolver section.
func NewResolverUpdate ¶
NewResolverUpdate creates an operation to update a resolver section.
func NewRingCreate ¶
NewRingCreate creates an operation to create a ring section.
func NewRingDelete ¶
NewRingDelete creates an operation to delete a ring section.
func NewRingUpdate ¶
NewRingUpdate creates an operation to update a ring section.
func NewServerCreate ¶
NewServerCreate creates an operation to create a server in a backend.
func NewServerDelete ¶
NewServerDelete creates an operation to delete a server from a backend.
func NewServerSwitchingRuleBackendCreate ¶
func NewServerSwitchingRuleBackendCreate(backendName string, rule *models.ServerSwitchingRule, index int) Operation
NewServerSwitchingRuleBackendCreate creates an operation to create a server switching rule in a backend.
func NewServerSwitchingRuleBackendDelete ¶
func NewServerSwitchingRuleBackendDelete(backendName string, rule *models.ServerSwitchingRule, index int) Operation
NewServerSwitchingRuleBackendDelete creates an operation to delete a server switching rule from a backend.
func NewServerSwitchingRuleBackendUpdate ¶
func NewServerSwitchingRuleBackendUpdate(backendName string, rule *models.ServerSwitchingRule, index int) Operation
NewServerSwitchingRuleBackendUpdate creates an operation to update a server switching rule in a backend.
func NewServerTemplateCreate ¶
func NewServerTemplateCreate(backendName string, serverTemplate *models.ServerTemplate) Operation
NewServerTemplateCreate creates an operation to create a server template in a backend.
func NewServerTemplateDelete ¶
func NewServerTemplateDelete(backendName string, serverTemplate *models.ServerTemplate) Operation
NewServerTemplateDelete creates an operation to delete a server template from a backend.
func NewServerTemplateUpdate ¶
func NewServerTemplateUpdate(backendName string, serverTemplate *models.ServerTemplate) Operation
NewServerTemplateUpdate creates an operation to update a server template in a backend.
func NewServerUpdate ¶
NewServerUpdate creates an operation to update a server in a backend.
func NewStickRuleBackendCreate ¶
NewStickRuleBackendCreate creates an operation to create a stick rule in a backend.
func NewStickRuleBackendDelete ¶
NewStickRuleBackendDelete creates an operation to delete a stick rule from a backend.
func NewStickRuleBackendUpdate ¶
NewStickRuleBackendUpdate creates an operation to update a stick rule in a backend.
func NewTCPCheckBackendCreate ¶
NewTCPCheckBackendCreate creates an operation to create a TCP check in a backend.
func NewTCPCheckBackendDelete ¶
NewTCPCheckBackendDelete creates an operation to delete a TCP check from a backend.
func NewTCPCheckBackendUpdate ¶
NewTCPCheckBackendUpdate creates an operation to update a TCP check in a backend.
func NewTCPRequestRuleBackendCreate ¶
func NewTCPRequestRuleBackendCreate(backendName string, rule *models.TCPRequestRule, index int) Operation
NewTCPRequestRuleBackendCreate creates an operation to create a TCP request rule in a backend.
func NewTCPRequestRuleBackendDelete ¶
func NewTCPRequestRuleBackendDelete(backendName string, rule *models.TCPRequestRule, index int) Operation
NewTCPRequestRuleBackendDelete creates an operation to delete a TCP request rule from a backend.
func NewTCPRequestRuleBackendUpdate ¶
func NewTCPRequestRuleBackendUpdate(backendName string, rule *models.TCPRequestRule, index int) Operation
NewTCPRequestRuleBackendUpdate creates an operation to update a TCP request rule in a backend.
func NewTCPRequestRuleFrontendCreate ¶
func NewTCPRequestRuleFrontendCreate(frontendName string, rule *models.TCPRequestRule, index int) Operation
NewTCPRequestRuleFrontendCreate creates an operation to create a TCP request rule in a frontend.
func NewTCPRequestRuleFrontendDelete ¶
func NewTCPRequestRuleFrontendDelete(frontendName string, rule *models.TCPRequestRule, index int) Operation
NewTCPRequestRuleFrontendDelete creates an operation to delete a TCP request rule from a frontend.
func NewTCPRequestRuleFrontendUpdate ¶
func NewTCPRequestRuleFrontendUpdate(frontendName string, rule *models.TCPRequestRule, index int) Operation
NewTCPRequestRuleFrontendUpdate creates an operation to update a TCP request rule in a frontend.
func NewTCPResponseRuleBackendCreate ¶
func NewTCPResponseRuleBackendCreate(backendName string, rule *models.TCPResponseRule, index int) Operation
NewTCPResponseRuleBackendCreate creates an operation to create a TCP response rule in a backend.
func NewTCPResponseRuleBackendDelete ¶
func NewTCPResponseRuleBackendDelete(backendName string, rule *models.TCPResponseRule, index int) Operation
NewTCPResponseRuleBackendDelete creates an operation to delete a TCP response rule from a backend.
func NewTCPResponseRuleBackendUpdate ¶
func NewTCPResponseRuleBackendUpdate(backendName string, rule *models.TCPResponseRule, index int) Operation
NewTCPResponseRuleBackendUpdate creates an operation to update a TCP response rule in a backend.
func NewTracesUpdate ¶
NewTracesUpdate creates an operation to update the traces section. The traces section is a singleton - it can be created or replaced. Traces configuration is only available in HAProxy DataPlane API v3.1+.
func NewUserCreate ¶
NewUserCreate creates an operation to create a user in a userlist.
func NewUserDelete ¶
NewUserDelete creates an operation to delete a user from a userlist.
func NewUserUpdate ¶
NewUserUpdate creates an operation to update a user in a userlist.
func NewUserlistCreate ¶
NewUserlistCreate creates an operation to create a userlist section.
func NewUserlistDelete ¶
NewUserlistDelete creates an operation to delete a userlist section.
func NewWAFGlobalCreate ¶
NewWAFGlobalCreate creates an operation to create the WAF global configuration. WAF global is a singleton section (only one per configuration).
func NewWAFGlobalDelete ¶
NewWAFGlobalDelete creates an operation to delete the WAF global configuration.
func NewWAFGlobalUpdate ¶
NewWAFGlobalUpdate creates an operation to update the WAF global configuration.
func NewWAFProfileCreate ¶
func NewWAFProfileCreate(profile *v32ee.WafProfile) Operation
NewWAFProfileCreate creates an operation to create a WAF profile. WAF profiles are only available in HAProxy Enterprise Edition v3.2+.
func NewWAFProfileDelete ¶
func NewWAFProfileDelete(profile *v32ee.WafProfile) Operation
NewWAFProfileDelete creates an operation to delete a WAF profile.
func NewWAFProfileUpdate ¶
func NewWAFProfileUpdate(profile *v32ee.WafProfile) Operation
NewWAFProfileUpdate creates an operation to update a WAF profile.
type OperationType ¶
type OperationType int
OperationType represents the type of HAProxy configuration operation.
const ( OperationCreate OperationType = iota OperationUpdate OperationDelete )
type SingletonOp ¶
SingletonOp handles operations for singleton sections like global, traces, or waf-global. Supports create, update, and delete operations for singleton resources.
func NewSingletonOp ¶
func NewSingletonOp[TModel any, TAPI any]( opType OperationType, sectionName string, priority int, model TModel, transformFn func(TModel) TAPI, executeFn ExecuteSingletonFunc[TAPI], describeFn func() string, ) *SingletonOp[TModel, TAPI]
NewSingletonOp creates a new singleton operation with the specified operation type.
func (*SingletonOp[TModel, TAPI]) Describe ¶
func (op *SingletonOp[TModel, TAPI]) Describe() string
func (*SingletonOp[TModel, TAPI]) Execute ¶
func (op *SingletonOp[TModel, TAPI]) Execute(ctx context.Context, c *client.DataplaneClient, txID string) error
func (*SingletonOp[TModel, TAPI]) Priority ¶
func (op *SingletonOp[TModel, TAPI]) Priority() int
func (*SingletonOp[TModel, TAPI]) Section ¶
func (op *SingletonOp[TModel, TAPI]) Section() string
func (*SingletonOp[TModel, TAPI]) Type ¶
func (op *SingletonOp[TModel, TAPI]) Type() OperationType
type TopLevelOp ¶
TopLevelOp handles operations for top-level named resources like backend, frontend, defaults. These resources are identified by a single name and use DispatchCreate/Update/Delete.
func NewTopLevelOp ¶
func NewTopLevelOp[TModel any, TAPI any]( opType OperationType, sectionName string, priority int, model TModel, transformFn func(TModel) TAPI, nameFn func(TModel) string, executeFn ExecuteTopLevelFunc[TAPI], describeFn func() string, ) *TopLevelOp[TModel, TAPI]
NewTopLevelOp creates a new top-level operation.
func (*TopLevelOp[TModel, TAPI]) Describe ¶
func (op *TopLevelOp[TModel, TAPI]) Describe() string
func (*TopLevelOp[TModel, TAPI]) Execute ¶
func (op *TopLevelOp[TModel, TAPI]) Execute(ctx context.Context, c *client.DataplaneClient, txID string) error
func (*TopLevelOp[TModel, TAPI]) Priority ¶
func (op *TopLevelOp[TModel, TAPI]) Priority() int
func (*TopLevelOp[TModel, TAPI]) Section ¶
func (op *TopLevelOp[TModel, TAPI]) Section() string
func (*TopLevelOp[TModel, TAPI]) Type ¶
func (op *TopLevelOp[TModel, TAPI]) Type() OperationType