Versions in this module Expand all Collapse all v0 v0.7.21 Dec 6, 2026 v0.7.20 Dec 6, 2026 Changes in this version + func Emit(ctx context.Context, h Hook, e Event) + func SessionRef(key []byte, id string) string + type Count struct + N uint64 + Outcome Outcome + Reason Reason + Type Type + type Counter struct + func (c *Counter) Record(_ context.Context, e Event) + func (c *Counter) Snapshot() []Count + type Credential struct + CertIssuer string + CertSHA256 string + CertSerial string + CertSubject string + Expires time.Time + ID string + Issuer string + KeyID string + Scopes []string + Subject string + type Direction string + const Inbound + const Outbound + type Event struct + AuthMethod string + Authenticated bool + AuthenticatedAs string + Command int + Credential *Credential + CryptoMethod string + Direction Direction + Encrypted bool + Err error + Expires time.Time + Lease time.Duration + Levels []string + Limits []string + Outcome Outcome + Peer string + Reason Reason + SessionID string + SessionPeer string + Stage Stage + Time time.Time + Type Type + User string + ValidCommands int + type Hook func(ctx context.Context, e Event) + type Outcome string + const Denied + const Failure + const Success + type Reason string + const ReasonAuthFailed + const ReasonAuthPolicyMismatch + const ReasonCanceled + const ReasonClaim + const ReasonClaimMinted + const ReasonCleared + const ReasonClientGaveUp + const ReasonCommandNotFound + const ReasonEncryptionPolicyMismatch + const ReasonExpired + const ReasonFileTransfer + const ReasonHandler + const ReasonIO + const ReasonInherited + const ReasonInvalidated + const ReasonKeyExchange + const ReasonLevelNotGranted + const ReasonMethodUnsupported + const ReasonMinted + const ReasonNoCommonAuthMethod + const ReasonNoCommonCryptoMethod + const ReasonNoCredential + const ReasonNoMethodSelected + const ReasonOutsideLimits + const ReasonProtocol + const ReasonReplaced + const ReasonSecurityLevel + const ReasonSessionKeyMissing + const ReasonSessionNotFound + const ReasonUnsupportedCrypto + type Stage string + const StageAuthenticate + const StageCommand + const StageKeyExchange + const StageNegotiate + const StagePostAuth + const StageRequest + const StageResume + type Type string + const AuthAttempt + const AuthzAllowed + const AuthzDenied + const CommandFailed + const HandshakeFailed + const SessionCreated + const SessionEnded + const SessionImported + const SessionResumeFailed + const SessionResumed