Support configurable TLS probes in the API and dashboard

This commit is contained in:
ayurishchev committed 2026-11-20 21:15:22 +03:00
1 parent 0bde5627f0
commit c7fdd2c430
38 files changed
+495 -203

No files matched your search

+9 -3
View File
@@ -11,6 +11,8 @@ import (
"strconv"
"strings"
"time"
"cloudipvalidator/internal/inbound"
)
// apiErr is returned by every client method for a non-2xx response from
@@ -490,10 +492,14 @@ func (c *client) GetInboundChecks(ctx context.Context) (inboundChecksDTO, error)
return out, err
}
func (c *client) PutInboundChecks(ctx context.Context, ports []int, icmp bool) (inboundChecksDTO, error) {
func (c *client) PutInboundChecks(ctx context.Context, ports []int, icmp bool, tlsChecks *[]inbound.TLSCheck) (inboundChecksDTO, error) {
var out inboundChecksDTO
err := c.do(ctx, http.MethodPut, "/api/v1/admin/config/inbound-checks",
inboundChecksDTO{Ports: ports, ICMP: icmp}, &out)
body := struct {
Ports []int `json:"ports"`
ICMP bool `json:"icmp"`
TLSChecks *[]inbound.TLSCheck `json:"tls_checks,omitempty"`
}{Ports: ports, ICMP: icmp, TLSChecks: tlsChecks}
err := c.do(ctx, http.MethodPut, "/api/v1/admin/config/inbound-checks", body, &out)
return out, err
}