Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add missing load balancer SSL fields and AutoSSL struct #352

Merged
merged 3 commits into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading