mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-17 14:29:57 +02:00
hscontrol/util/zlog/zf: add tag, authkey, and route constants
Add new zerolog field constants for improved logging consistency: - Tag fields: CurrentTags, RemovedTags, RejectedTags, NewTags, OldTags, IsTagged, WasAuthKeyTagged - Node fields: ExistingNodeID - AuthKey fields: AuthKeyID, AuthKeyUsed, AuthKeyExpired, AuthKeyReusable, NodeKeyRotation - Route fields: RoutesApprovedOld, RoutesApprovedNew, OldAnnouncedRoutes, NewAnnouncedRoutes, ApprovedRoutes, OldApprovedRoutes, NewApprovedRoutes, AutoApprovedRoutes, AllApprovedRoutes, RouteChanged
This commit is contained in:
@@ -23,6 +23,7 @@ const (
|
|||||||
NodeExpired = "node.expired"
|
NodeExpired = "node.expired"
|
||||||
NodeHostname = "node.hostname"
|
NodeHostname = "node.hostname"
|
||||||
ExistingNodeName = "existing.node.name"
|
ExistingNodeName = "existing.node.name"
|
||||||
|
ExistingNodeID = "existing.node.id"
|
||||||
CurrentHostname = "current_hostname"
|
CurrentHostname = "current_hostname"
|
||||||
RejectedHostname = "rejected_hostname"
|
RejectedHostname = "rejected_hostname"
|
||||||
OldHostname = "old_hostname"
|
OldHostname = "old_hostname"
|
||||||
@@ -36,6 +37,17 @@ const (
|
|||||||
ExpiresAt = "expiresAt"
|
ExpiresAt = "expiresAt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Tag fields for reauth and tag operations.
|
||||||
|
const (
|
||||||
|
CurrentTags = "current.tags"
|
||||||
|
RemovedTags = "removed.tags"
|
||||||
|
RejectedTags = "rejected.tags"
|
||||||
|
NewTags = "new.tags"
|
||||||
|
OldTags = "old.tags"
|
||||||
|
IsTagged = "is.tagged"
|
||||||
|
WasAuthKeyTagged = "was.authkey.tagged"
|
||||||
|
)
|
||||||
|
|
||||||
// Machine fields.
|
// Machine fields.
|
||||||
const (
|
const (
|
||||||
MachineKey = "machine.key"
|
MachineKey = "machine.key"
|
||||||
@@ -54,14 +66,19 @@ const (
|
|||||||
|
|
||||||
// PreAuthKey fields.
|
// PreAuthKey fields.
|
||||||
const (
|
const (
|
||||||
PAKID = "pak.id"
|
PAKID = "pak.id"
|
||||||
PAKPrefix = "pak.prefix"
|
PAKPrefix = "pak.prefix"
|
||||||
PAKTags = "pak.tags"
|
PAKTags = "pak.tags"
|
||||||
PAKReusable = "pak.reusable"
|
PAKReusable = "pak.reusable"
|
||||||
PAKEphemeral = "pak.ephemeral"
|
PAKEphemeral = "pak.ephemeral"
|
||||||
PAKUsed = "pak.used"
|
PAKUsed = "pak.used"
|
||||||
PAKIsTagged = "pak.is_tagged"
|
PAKIsTagged = "pak.is_tagged"
|
||||||
PAKExpiration = "pak.expiration"
|
PAKExpiration = "pak.expiration"
|
||||||
|
AuthKeyID = "authkey.id"
|
||||||
|
AuthKeyUsed = "authkey.used"
|
||||||
|
AuthKeyExpired = "authkey.expired"
|
||||||
|
AuthKeyReusable = "authkey.reusable"
|
||||||
|
NodeKeyRotation = "nodekey.rotation"
|
||||||
)
|
)
|
||||||
|
|
||||||
// APIKey fields.
|
// APIKey fields.
|
||||||
@@ -74,11 +91,21 @@ const (
|
|||||||
|
|
||||||
// Route fields.
|
// Route fields.
|
||||||
const (
|
const (
|
||||||
RoutesAnnounced = "routes.announced"
|
RoutesAnnounced = "routes.announced"
|
||||||
RoutesApproved = "routes.approved"
|
RoutesApproved = "routes.approved"
|
||||||
Prefix = "prefix"
|
RoutesApprovedOld = "routes.approved.old"
|
||||||
FinalState = "finalState"
|
RoutesApprovedNew = "routes.approved.new"
|
||||||
NewState = "newState"
|
OldAnnouncedRoutes = "oldAnnouncedRoutes"
|
||||||
|
NewAnnouncedRoutes = "newAnnouncedRoutes"
|
||||||
|
ApprovedRoutes = "approvedRoutes"
|
||||||
|
OldApprovedRoutes = "oldApprovedRoutes"
|
||||||
|
NewApprovedRoutes = "newApprovedRoutes"
|
||||||
|
AutoApprovedRoutes = "autoApprovedRoutes"
|
||||||
|
AllApprovedRoutes = "allApprovedRoutes"
|
||||||
|
RouteChanged = "routeChanged"
|
||||||
|
Prefix = "prefix"
|
||||||
|
FinalState = "finalState"
|
||||||
|
NewState = "newState"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Request/Response fields.
|
// Request/Response fields.
|
||||||
|
|||||||
Reference in New Issue
Block a user