diff options
author | Rasmus Dahlberg <rasmus@rgdd.se> | 2023-12-31 09:39:25 +0100 |
---|---|---|
committer | Rasmus Dahlberg <rasmus@rgdd.se> | 2024-01-07 20:22:23 +0100 |
commit | e18d36ebae30536c77c61cd5da123991e0ca1629 (patch) | |
tree | bf4880c0019a6009ab1b671e23ef4a1a4a5e8e08 /pkg/monitor/errors.go | |
parent | 54d980afcbd6f0011d6a162e0003587d26a3e311 (diff) |
Add drafty prototype
Diffstat (limited to 'pkg/monitor/errors.go')
-rw-r--r-- | pkg/monitor/errors.go | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/pkg/monitor/errors.go b/pkg/monitor/errors.go deleted file mode 100644 index 4d676af..0000000 --- a/pkg/monitor/errors.go +++ /dev/null @@ -1,41 +0,0 @@ -package monitor - -import ( - "fmt" - - ct "github.com/google/certificate-transparency-go" -) - -// ErrorFetch occurs if there's a problem hitting the log's HTTP API. An STH is -// provided if available, since it might carry evidence of some log misbehavior. -type ErrorFetch struct { - URL string - Msg string - Err error - STH *ct.SignedTreeHead -} - -func (e ErrorFetch) Error() string { - return fmt.Sprintf("%s: %s: %v", e.URL, e.Msg, e.Err) -} - -// ErrorMerkleTree occurs if the log's Merkle tree can't be verified. An STH is -// provided if available (i.e., won't be available for internal tree building). -type ErrorMerkleTree struct { - URL string - Msg string - Err error - STH *ct.SignedTreeHead -} - -func (e ErrorMerkleTree) Error() string { - return fmt.Sprintf("%s: %s: %v", e.URL, e.Msg, e.Err) -} - -// TODO: MMD violations -// TODO: Growing read-only logs - -// noout implements the Logger interface to discard unwanted output -type noout struct{} - -func (n *noout) Printf(string, ...interface{}) {} |