Files
Charon/backend/internal/models/log_entry.go
GitHub Actions 8294d6ee49 Add QA test outputs, build scripts, and Dockerfile validation
- Created `qa-test-output-after-fix.txt` and `qa-test-output.txt` to log results of certificate page authentication tests.
- Added `build.sh` for deterministic backend builds in CI, utilizing `go list` for efficiency.
- Introduced `codeql_scan.sh` for CodeQL database creation and analysis for Go and JavaScript/TypeScript.
- Implemented `dockerfile_check.sh` to validate Dockerfiles for base image and package manager mismatches.
- Added `sourcery_precommit_wrapper.sh` to facilitate Sourcery CLI usage in pre-commit hooks.
2025-12-11 18:26:24 +00:00

44 lines
1.5 KiB
Go

package models
// CaddyAccessLog represents a structured log entry from Caddy's JSON access logs.
type CaddyAccessLog struct {
Level string `json:"level"`
Ts float64 `json:"ts"`
Logger string `json:"logger"`
Msg string `json:"msg"`
Request struct {
RemoteIP string `json:"remote_ip"`
RemotePort string `json:"remote_port"`
ClientIP string `json:"client_ip"`
Proto string `json:"proto"`
Method string `json:"method"`
Host string `json:"host"`
URI string `json:"uri"`
Headers map[string][]string `json:"headers"`
TLS struct {
Resumed bool `json:"resumed"`
Version int `json:"version"`
CipherSuite int `json:"cipher_suite"`
Proto string `json:"proto"`
ServerName string `json:"server_name"`
} `json:"tls"`
} `json:"request"`
BytesRead int `json:"bytes_read"`
UserID string `json:"user_id"`
Duration float64 `json:"duration"`
Size int `json:"size"`
Status int `json:"status"`
RespHeaders map[string][]string `json:"resp_headers"`
}
// LogFilter defines criteria for filtering logs.
type LogFilter struct {
Search string `form:"search"`
Host string `form:"host"`
Status string `form:"status"` // e.g., "200", "4xx", "5xx"
Level string `form:"level"`
Limit int `form:"limit"`
Offset int `form:"offset"`
Sort string `form:"sort"`
}