1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
commonv1 "github.com/johnandersen777/socialweb-computer-kcp/api/common/v1alpha1"
)
type AtprotoIdentity struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AtprotoIdentitySpec `json:"spec,omitempty"`
Status AtprotoIdentityStatus `json:"status,omitempty"`
}
type AtprotoIdentityList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AtprotoIdentity `json:"items"`
}
type IdentityScope string
const (
IdentityScopeAccount IdentityScope = "Account"
IdentityScopeCluster IdentityScope = "Cluster"
)
type AtprotoIdentitySpec struct {
DID string `json:"did"`
Scope IdentityScope `json:"scope"`
ClusterRef *commonv1.LocalObjectRef `json:"clusterRef,omitempty"`
Revoked bool `json:"revoked,omitempty"`
}
type IdentityState string
const (
IdentityActive IdentityState = "Active"
IdentityRevoked IdentityState = "Revoked"
IdentityRevocationPending IdentityState = "RevocationPending"
IdentityColdDeferred IdentityState = "ColdDeferred"
)
type AtprotoIdentityStatus struct {
State IdentityState `json:"state,omitempty"`
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
const FinalizerAtprotoIdentity = "atprotoidentity.socialweb.computer/revocation"