Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Remove unreachable exported functions from pkg/
rcourtmanf7aa9ee9220a
diff --git a/pkg/auth/policy_evaluator.go b/pkg/auth/policy_evaluator.goindex a05423962d..80dad7de37 100644--- a/pkg/auth/policy_evaluator.go+++ b/pkg/auth/policy_evaluator.go@@ -148,13 +148,6 @@ func (e *PolicyEvaluator) substituteVariables(value, username string, attributesreturn value}-// SetAdminUser implements AdminConfigurable.-// The admin user always has full access regardless of roles.-func (e *PolicyEvaluator) SetAdminUser(username string) {- // Store admin user for bypass - not implemented in this basic version- // The FileManager handles this separately-}-// RBACAuthorizer wraps PolicyEvaluator to implement Authorizer for the RBAC system.type RBACAuthorizer struct {evaluator *PolicyEvaluator@@ -180,18 +173,6 @@ func (a *RBACAuthorizer) Authorize(ctx context.Context, action string, resourcereturn a.evaluator.Authorize(ctx, action, resource)}-// AuthorizeWithAttributes checks authorization with ABAC attributes.-func (a *RBACAuthorizer) AuthorizeWithAttributes(ctx context.Context, action string, resource string, attributes map[string]string) (bool, error) {- username := GetUser(ctx)-- // Admin user bypass- if a.adminUser != "" && username == a.adminUser {- return true, nil- }-- return a.evaluator.AuthorizeWithAttributes(ctx, action, resource, attributes)-}-// SetAdminUser sets the admin user who has full access.func (a *RBACAuthorizer) SetAdminUser(username string) {a.adminUser = usernamediff --git a/pkg/licensing/entitlement_payload.go b/pkg/licensing/entitlement_payload.goindex 648332f675..93de7cdd57 100644--- a/pkg/licensing/entitlement_payload.go+++ b/pkg/licensing/entitlement_payload.go@@ -322,20 +322,6 @@ func BuildEntitlementPayload(status *LicenseStatus, subscriptionState string) Enreturn BuildEntitlementPayloadWithUsage(status, subscriptionState, EntitlementUsageSnapshot{}, nil)}-// BuildCommercialPosturePayload constructs the canonical non-billing-// commercial posture payload from LicenseStatus.-func BuildCommercialPosturePayload(- status *LicenseStatus,- subscriptionState string,-) CommercialPosturePayload {- return BuildCommercialPosturePayloadWithUsage(- status,- subscriptionState,- EntitlementUsageSnapshot{},- nil,- )-}-// BuildRuntimeCapabilitiesPayload constructs the canonical non-commercial// runtime capability payload from LicenseStatus.func BuildRuntimeCapabilitiesPayload(diff --git a/pkg/licensing/legacy_v5_monitored_system_limit_aliases.go b/pkg/licensing/legacy_v5_monitored_system_limit_aliases.goindex 4b9803295f..71440bf580 100644--- a/pkg/licensing/legacy_v5_monitored_system_limit_aliases.go+++ b/pkg/licensing/legacy_v5_monitored_system_limit_aliases.go@@ -1,7 +1,5 @@package licensing-import "strings"-const legacyV5AgentLimitKey = "max_agents"const legacyV5NodeLimitKey = "max_nodes"@@ -9,12 +7,3 @@ var legacyV5MonitoredSystemLimitAliasKeys = [...]string{legacyV5AgentLimitKey,legacyV5NodeLimitKey,}--func canonicalizeLegacyV5MonitoredSystemLimitKey(key string) (string, bool) {- switch strings.TrimSpace(key) {- case legacyV5AgentLimitKey, legacyV5NodeLimitKey:- return MaxMonitoredSystemsLicenseGateKey, true- default:- return "", false- }-}diff --git a/pkg/pulsecli/root.go b/pkg/pulsecli/root.goindex 123a7f1efa..deb3b60efc 100644--- a/pkg/pulsecli/root.go+++ b/pkg/pulsecli/root.go@@ -58,24 +58,6 @@ func NewRootCommand(command CommandSpec, runtime RuntimeSpec, deps CommandDeps)return cmd}-func ResetFlags(config *ConfigDeps) {- if config == nil {- return- }- if config.ExportFile != nil {- *config.ExportFile = ""- }- if config.ImportFile != nil {- *config.ImportFile = ""- }- if config.Passphrase != nil {- *config.Passphrase = ""- }- if config.ForceImport != nil {- *config.ForceImport = false- }-}-func newVersionCmd(command CommandSpec) *cobra.Command {return &cobra.Command{Use: "version",diff --git a/pkg/tlsutil/fingerprint.go b/pkg/tlsutil/fingerprint.goindex 16dda5e80a..98a50abe29 100644--- a/pkg/tlsutil/fingerprint.go+++ b/pkg/tlsutil/fingerprint.go@@ -40,12 +40,6 @@ func UnverifiedPeerCertificateCaptureTLSConfig() *tls.Config {}}-// PeerCertificateCaptureTLSConfig is retained for source compatibility. New-// callers should use the explicitly named unverified capture boundary.-func PeerCertificateCaptureTLSConfig() *tls.Config {- return UnverifiedPeerCertificateCaptureTLSConfig()-}-// FetchFingerprint connects to a host and returns the SHA256 fingerprint of its TLS certificate.// This is used for TOFU (Trust On First Use) when discovering cluster peers.// The host should be in the format "hostname:port" or "https://hostname:port".diff --git a/pkg/tlsutil/tlsutil_test.go b/pkg/tlsutil/tlsutil_test.goindex 45a732ee19..3f5d52c785 100644--- a/pkg/tlsutil/tlsutil_test.go+++ b/pkg/tlsutil/tlsutil_test.go@@ -43,16 +43,16 @@ func TestFingerprintVerifier_NormalizesFingerprint(t *testing.T) {}}-func TestPeerCertificateCaptureTLSConfigRequiresPeerCertificate(t *testing.T) {+func TestUnverifiedPeerCertificateCaptureTLSConfigRequiresPeerCertificate(t *testing.T) {config := UnverifiedPeerCertificateCaptureTLSConfig()if !config.InsecureSkipVerify {- t.Fatal("PeerCertificateCaptureTLSConfig should enable custom verification mode")+ t.Fatal("UnverifiedPeerCertificateCaptureTLSConfig should enable custom verification mode")}if config.VerifyPeerCertificate == nil {- t.Fatal("PeerCertificateCaptureTLSConfig should install a peer-certificate verifier")+ t.Fatal("UnverifiedPeerCertificateCaptureTLSConfig should install a peer-certificate verifier")}if config.MinVersion != minimumTLSVersion {- t.Fatalf("PeerCertificateCaptureTLSConfig MinVersion = %v, want %v", config.MinVersion, minimumTLSVersion)+ t.Fatalf("UnverifiedPeerCertificateCaptureTLSConfig MinVersion = %v, want %v", config.MinVersion, minimumTLSVersion)}err := config.VerifyPeerCertificate(nil, nil)