Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
Timestamp time.Time `json:"timestamp"`
Event EventType `json:"event"`
Peer string `json:"peer,omitempty"`
File string `json:"file,omitempty"`
VarsChanged int `json:"vars_changed,omitempty"`
DeliveryCount int `json:"delivery_count,omitempty"`
Method string `json:"method,omitempty"`
Details string `json:"details,omitempty"`
PrevHash string `json:"prev_hash,omitempty"`
HMAC string `json:"hmac,omitempty"`
}
Entry is a single audit log entry with tamper-evident chaining.
type EventType ¶
type EventType string
EventType identifies an audit event.
const ( EventPush EventType = "push" EventPull EventType = "pull" EventInvite EventType = "invite" EventJoin EventType = "join" EventRevoke EventType = "revoke" EventKeyRotate EventType = "key_rotate" EventOwnershipTransfer EventType = "ownership_transfer" EventConflictResolved EventType = "conflict_resolved" EventBackup EventType = "backup" EventRestore EventType = "restore" )
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is an append-only, tamper-evident audit log.
func (*Logger) FilterByEvent ¶
FilterByEvent returns entries of a specific event type.
func (*Logger) FilterByPeer ¶
FilterByPeer returns entries for a specific peer.
Click to show internal directories.
Click to hide internal directories.