Documentation
¶
Index ¶
- Constants
- Variables
- type AuditEvent
- type AuditMatch
- type Store
- func (s *Store) Add(ev AuditEvent) (AuditEvent, error)
- func (s *Store) Clear() error
- func (s *Store) Close() error
- func (s *Store) List(_ int) ([]AuditEvent, error)
- func (s *Store) MaxID() (int64, error)
- func (s *Store) Purge(_ time.Duration) (int64, error)
- func (s *Store) StartPurgeLoop(_ time.Duration, _ time.Duration) func()
- func (s *Store) Update(_ int64, _ func(*AuditEvent)) error
Constants ¶
View Source
const Available = false
Variables ¶
View Source
var ErrNotAvailable = errors.New("auditdb not available in this build")
Functions ¶
This section is empty.
Types ¶
type AuditEvent ¶
type AuditEvent struct {
ID int64 `json:"id"`
Time time.Time `json:"time"`
Host string `json:"host"`
Method string `json:"method"`
Path string `json:"path"`
ContentType string `json:"content_type"`
ContentEncoding string `json:"content_encoding,omitempty"`
Attempted bool `json:"attempted"`
RedactedCount int `json:"redacted_count"`
Matches []AuditMatch `json:"matches"`
Note string `json:"note,omitempty"`
ResponseStatus int `json:"response_status,omitempty"`
ResponseContentType string `json:"response_content_type,omitempty"`
RestoreApplied bool `json:"restore_applied,omitempty"`
RestoredCount int `json:"restored_count,omitempty"`
}
AuditEvent represents one proxy request's audit record (persisted to SQLite).
type AuditMatch ¶
type AuditMatch struct {
Category string `json:"category"`
Placeholder string `json:"placeholder"`
Value string `json:"value"`
IsPreview bool `json:"is_preview"`
Length int `json:"length"`
Truncated bool `json:"truncated"`
}
AuditMatch matches the admin audit display fields (for easier JSON serialization and persistence).
type Store ¶
type Store struct{}
Store is a placeholder implementation for the lite build: SQLite audit persistence is not available.
func (*Store) Add ¶
func (s *Store) Add(ev AuditEvent) (AuditEvent, error)
func (*Store) StartPurgeLoop ¶
Click to show internal directories.
Click to hide internal directories.