forked from kyma-project/kyma
/
model.go
executable file
·83 lines (67 loc) · 1.71 KB
/
model.go
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package testkit
import "crypto/x509"
type TokenResponse struct {
URL string `json:"url"`
Token string `json:"token"`
}
type InfoResponse struct {
CertUrl string `json:"csrUrl"`
Api ApiInfo `json:"api"`
Certificate CertInfo `json:"certificate"`
}
type ManagementInfoResponse struct {
URLs ManagementInfoURLs `json:"urls"`
ClientIdentity ApplicationClientIdentity `json:"clientIdentity"`
Certificate CertInfo `json:"certificate"`
}
type ApplicationClientIdentity struct {
Application string `json:"application,omitempty"`
ClusterClientIdentity
}
type ClusterClientIdentity struct {
Group string `json:"group"`
Tenant string `json:"tenant"`
}
type ManagementInfoURLs struct {
*RuntimeURLs
RenewCertUrl string `json:"renewCertUrl"`
RevokeCertURL string `json:"revokeCertUrl"`
}
type RuntimeURLs struct {
MetadataUrl string `json:"metadataUrl"`
EventsUrl string `json:"eventsUrl"`
}
type ApiInfo struct {
*RuntimeURLs
ManagementInfoURL string `json:"infoUrl"`
CertificatesUrl string `json:"certificatesUrl"`
}
type CertInfo struct {
Subject string `json:"subject"`
Extensions string `json:"extensions"`
KeyAlgorithm string `json:"key-algorithm"`
}
type CsrRequest struct {
Csr string `json:"csr"`
}
type CrtResponse struct {
CRTChain string `json:"crt"`
ClientCRT string `json:"clientCrt"`
CaCRT string `json:"caCrt"`
}
type ErrorResponse struct {
Code int `json:"code"`
Error string `json:"error"`
}
type Error struct {
StatusCode int
ErrorResponse ErrorResponse
}
type DecodedCrtResponse struct {
CRTChain []*x509.Certificate
ClientCRT *x509.Certificate
CaCRT *x509.Certificate
}
type RevocationBody struct {
Hash string
}