Skip to content

Commit

Permalink
Add missing load balancer SSL fields and AutoSSL struct (#352)
Browse files Browse the repository at this point in the history
* Update SSL configs and Add AutoSSL struct

* Add AutoSSL comment

* Add AutoSSL struct
  • Loading branch information
mondragonfx authored Jan 17, 2025
1 parent bb5a413 commit d958d19
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions load_balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type LoadBalancer struct {
HealthCheck *HealthCheck `json:"health_check,omitempty"`
GenericInfo *GenericInfo `json:"generic_info,omitempty"`
SSLInfo *bool `json:"has_ssl,omitempty"`
AutoSSL *AutoSSL `json:"auto_ssl,omitempty"`
HTTP2 *bool `json:"http2,omitempty"`
HTTP3 *bool `json:"http3,omitempty"`
ForwardingRules []ForwardingRule `json:"forwarding_rules,omitempty"`
Expand All @@ -64,7 +65,7 @@ type LoadBalancerReq struct {
StickySessions *StickySessions `json:"sticky_session,omitempty"`
ForwardingRules []ForwardingRule `json:"forwarding_rules,omitempty"`
SSL *SSL `json:"ssl,omitempty"`
AutoSSL *SSL `json:"auto_ssl,omitempty"`
AutoSSL *AutoSSL `json:"auto_ssl,omitempty"`
SSLRedirect *bool `json:"ssl_redirect,omitempty"`
HTTP2 *bool `json:"http2,omitempty"`
HTTP3 *bool `json:"http3,omitempty"`
Expand Down Expand Up @@ -131,9 +132,18 @@ type LBFirewallRule struct {

// SSL represents valid SSL config
type SSL struct {
PrivateKey string `json:"private_key,omitempty"`
Certificate string `json:"certificate,omitempty"`
Chain string `json:"chain,omitempty"`
PrivateKey string `json:"private_key,omitempty"`
Certificate string `json:"certificate,omitempty"`
Chain string `json:"chain,omitempty"`
PrivateKeyB64 string `json:"private_key_b64,omitempty"`
CertificateB64 string `json:"certificate_b64,omitempty"`
ChainB64 string `json:"chain_b64,omitempty"`
}

// AutoSSL represents valid AutoSSL config
type AutoSSL struct {
DomainZone string `json:"domain_zone"`
DomainSub string `json:"domain_sub,omitempty"`
}

type lbsBase struct {
Expand Down

0 comments on commit d958d19

Please sign in to comment.