Erster Schritt des golangci-lint-Rollouts (non-blocking): 44 misspell + 4 staticcheck automatisch behoben (32 Dateien, nur Tippfehler/mechanisch). build+test grün. Kein Runtime-Change → kein Deploy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
25 lines
1.3 KiB
Go
25 lines
1.3 KiB
Go
package models
|
|
|
|
import "time"
|
|
|
|
// ClusterSettings ist die Singleton-Tabelle (id=1) für VIP/VRRP-
|
|
// und Replikations-Configuration. Angelegt in Migration 0029.
|
|
// hb_* = zweite VRRP-Instanz für Split-Brain-Schutz (0033).
|
|
// gw_check_ip = Gateway-IP für vrrp_script chk_gateway (0033).
|
|
type ClusterSettings struct {
|
|
ID int `gorm:"column:id;primaryKey" json:"id"`
|
|
VIPAddress *string `gorm:"column:vip_address" json:"vip_address,omitempty"`
|
|
VIPInterface *string `gorm:"column:vip_interface" json:"vip_interface,omitempty"`
|
|
VIPAuthPass *string `gorm:"column:vip_auth_pass" json:"vip_auth_pass,omitempty"`
|
|
VRRPRouterID int `gorm:"column:vrrp_router_id" json:"vrrp_router_id"`
|
|
HBInterface *string `gorm:"column:hb_interface" json:"hb_interface,omitempty"`
|
|
HBSrcIP *string `gorm:"column:hb_src_ip" json:"hb_src_ip,omitempty"`
|
|
HBPeerIP *string `gorm:"column:hb_peer_ip" json:"hb_peer_ip,omitempty"`
|
|
HBRouterID int `gorm:"column:hb_router_id" json:"hb_router_id"`
|
|
GWCheckIP *string `gorm:"column:gw_check_ip" json:"gw_check_ip,omitempty"`
|
|
CreatedAt time.Time `gorm:"column:created_at" json:"created_at"`
|
|
UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"`
|
|
}
|
|
|
|
func (ClusterSettings) TableName() string { return "cluster_settings" }
|