-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtypes.ts
More file actions
95 lines (85 loc) · 1.93 KB
/
types.ts
File metadata and controls
95 lines (85 loc) · 1.93 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
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
84
85
86
87
88
89
90
91
92
93
94
95
export interface User {
name: string;
gecos?: string;
shell?: string;
primary_group?: string;
groups?: string[];
passwd?: string;
plain_text_passwd?: string;
ssh_authorized_keys?: string[];
expiredate?: string;
inactive?: number;
sudo?: string | boolean;
lock_passwd?: boolean;
system?: boolean;
}
export interface ChpasswdUser {
name: string;
password: string;
}
export interface Group {
name: string;
members?: string[];
}
export interface FileConfig {
path: string;
permissions?: string;
owner?: string;
content?: string;
encoding?: 'plain' | 'b64';
}
export interface NetworkV1Route {
network: string;
netmask: string;
gateway: string;
metric?: number;
}
export interface NetworkV1Subnet {
type: 'dhcp' | 'static' | 'dhcp4' | 'dhcp6';
address?: string;
netmask?: string;
gateway?: string;
dns_nameservers?: string[];
routes?: NetworkV1Route[];
}
export interface NetworkV1Interface {
name: string;
type: 'physical' | 'bond' | 'vlan';
mac_address?: string;
subnets: NetworkV1Subnet[];
}
export interface HostEntry {
ip: string;
hostnames: string;
}
export interface NetworkV2Interface {
name: string;
dhcp4: boolean;
dhcp6: boolean;
addresses: string;
gateway4?: string;
nameservers: string;
match_mac_address?: string;
set_name?: string;
}
export type ThemeName = 'suse' | 'ocean';
export interface AppState {
users: User[];
chpasswdUsers: ChpasswdUser[];
chpasswdExpire: boolean;
groups: (Group | string)[];
packages: string[];
package_update: boolean;
files: FileConfig[];
runcmd: string[];
bootcmd: string[];
hostname: string;
manageHosts: boolean;
hosts: HostEntry[];
networkVersion: 'v1' | 'v2';
networkV1: NetworkV1Interface[];
networkV2: NetworkV2Interface[];
networkV2Yaml: string; // Keeping for advanced/fallback if needed, or we can remove. Let's keep for now but maybe unused.
ssh_pwauth: boolean;
global_ssh_keys: string[];
}