mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-29 22:06:38 +08:00
2cbaf95eae
- Implemented TLS certificate model and service for managing certificates. - Added API endpoints for creating, importing, listing, and deleting TLS certificates. - Enhanced proxy route configuration to support HTTPS with certificate selection. - Updated frontend to include TLS certificate management UI with manual and file import options. - Added validation for HTTPS routes to ensure certificates are selected. - Implemented tests for TLS certificate creation and proxy route validation.
38 lines
1020 B
Go
38 lines
1020 B
Go
package protocol
|
|
|
|
type APIResponse[T any] struct {
|
|
Success bool `json:"success"`
|
|
Message string `json:"message"`
|
|
Data T `json:"data"`
|
|
}
|
|
|
|
type NodePayload struct {
|
|
NodeID string `json:"node_id"`
|
|
Name string `json:"name"`
|
|
IP string `json:"ip"`
|
|
AgentVersion string `json:"agent_version"`
|
|
NginxVersion string `json:"nginx_version"`
|
|
CurrentVersion string `json:"current_version"`
|
|
LastError string `json:"last_error"`
|
|
}
|
|
|
|
type ApplyLogPayload struct {
|
|
NodeID string `json:"node_id"`
|
|
Version string `json:"version"`
|
|
Result string `json:"result"`
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
type ActiveConfigResponse struct {
|
|
Version string `json:"version"`
|
|
Checksum string `json:"checksum"`
|
|
RenderedConfig string `json:"rendered_config"`
|
|
SupportFiles []SupportFile `json:"support_files"`
|
|
CreatedAt string `json:"created_at"`
|
|
}
|
|
|
|
type SupportFile struct {
|
|
Path string `json:"path"`
|
|
Content string `json:"content"`
|
|
}
|