1use serde::Deserialize;
2use serde::Serialize;
3
4use k8_obj_metadata::Crd;
5use k8_obj_metadata::CrdNames;
6use k8_obj_metadata::DefaultHeader;
7use k8_obj_metadata::Spec;
8use k8_obj_metadata::Status;
9
10const CREDENTIAL_API: Crd = Crd {
11 group: "client.authentication.k8s.io",
12 version: "v1",
13 names: CrdNames {
14 kind: "ExecCrendetial",
15 plural: "credentials",
16 singular: "credential",
17 },
18};
19
20#[derive(Deserialize, Serialize, Debug, Default, Clone)]
21#[serde(rename_all = "camelCase")]
22pub struct ExecCredentialSpec {}
23
24impl Spec for ExecCredentialSpec {
25 type Status = ExecCredentialStatus;
26 type Header = DefaultHeader;
27
28 fn metadata() -> &'static Crd {
29 &CREDENTIAL_API
30 }
31}
32
33#[derive(Deserialize, Serialize, Debug, Default, Clone)]
34#[serde(rename_all = "camelCase")]
35pub struct ExecCredentialStatus {
36 pub expiration_timestamp: String,
37 pub token: String,
38}
39
40impl Status for ExecCredentialStatus {}