Repository navigation
Expand file tree
/
Copy pathmodel.rs
More file actions
55 lines (50 loc) · 1.51 KB
/
Copy pathmodel.rs
File metadata and controls
55 lines (50 loc) · 1.51 KB
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
use serde::{Deserialize, Serialize};
use crate::GitHubOperation;
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct HatPermissionGrant {
pub resource: String,
pub operation: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct HatGitHubGrant {
pub schema: String,
pub grant_id: String,
pub package_id: String,
pub package_digest_sha256: String,
pub binding_digest_sha256: String,
pub revision: u64,
pub connection_ref: String,
pub owner: String,
pub repositories: Vec<String>,
pub permissions: Vec<HatPermissionGrant>,
pub valid_from_epoch_s: u64,
pub valid_until_epoch_s: u64,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct HatGitHubInvocation {
pub schema: String,
pub request_id: String,
pub invocation_id: String,
pub grant_id: String,
pub package_id: String,
pub package_digest_sha256: String,
pub binding_digest_sha256: String,
pub connection_ref: String,
pub owner: String,
pub repository: String,
pub operation: GitHubOperation,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct ZixcelGitHubApiRequest {
pub schema: String,
pub request_id: String,
pub operation_id: String,
pub connection_ref: String,
pub owner: String,
pub repository: String,
pub action: GitHubOperation,
}