Documentation
¶
Overview ¶
internal/history/events.go
internal/history/history.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Op OpKind `json:"op"`
ID string `json:"id"`
At time.Time `json:"at,omitempty"` // revoke/expire
TokenHash string `json:"token_hash,omitempty"` // share (hex)
Src string `json:"src,omitempty"` // share
Name string `json:"name,omitempty"` // share
CreatedAt time.Time `json:"created_at,omitempty"` // share
ExpiresAt time.Time `json:"expires_at,omitempty"` // share
Reason string `json:"reason,omitempty"` // expire
}
Event is the on-disk representation of a history event. Exactly one of the op-specific fields is populated, determined by Op.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a single-writer append-only JSONL history store.
func Open ¶
Open creates or opens the history file, truncating any trailing partial line that might be left over from a crash.
Click to show internal directories.
Click to hide internal directories.