1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package revocation
type PLCResolution struct {
Found bool
Err error
Keys []string
}
func Sweep(r PLCResolution) (revoke bool, why string) {
switch {
case r.Err != nil:
return false, "the directory is unreachable: an outage is not a deletion"
case !r.Found:
return true, "the directory answered 404: the account is gone"
case len(r.Keys) == 0:
return true, "the document carries no verification key"
default:
return false, "the document is live"
}
}