syncthing_types/system/
version.rs1use crate::Timestamp;
2use serde::{Deserialize, Serialize};
3
4#[non_exhaustive]
5#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
6#[serde(rename_all(deserialize = "lowercase"))]
7pub enum GoOS {
8 Aix,
9 Android,
10 Darwin,
11 Dragonfly,
12 Freebsd,
13 Hurd,
14 Illumos,
15 Ios,
16 Js,
17 Linux,
18 Nacl,
19 Netbsd,
20 Openbsd,
21 Plan9,
22 Solaris,
23 Wasip1,
24 Windows,
25 Zos,
26}
27
28#[non_exhaustive]
29#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
30#[serde(rename_all(deserialize = "lowercase"))]
31pub enum GoArch {
32 A386,
33 Amd64,
34 Amd64p32,
35 Arm,
36 Armbe,
37 Arm64,
38 Arm64be,
39 Loong64,
40 Mips,
41 Mipsle,
42 Mips64,
43 Mips64le,
44 Mips64p32,
45 Mips64p32le,
46 Ppc,
47 Ppc64,
48 Ppc64le,
49 Riscv,
50 Riscv64,
51 S390,
52 S390x,
53 Sparc,
54 Sparc64,
55 Wasm,
56}
57
58#[non_exhaustive]
59#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
60#[serde(rename_all(deserialize = "camelCase"))]
61pub struct VersionInfo {
62 pub version: String,
63 pub codename: String,
64 pub long_version: String,
65 pub extra: String,
66 pub os: GoOS,
67 pub arch: GoArch,
68 pub is_beta: bool,
69 pub is_candidate: bool,
70 pub is_release: bool,
71 pub date: Timestamp,
72 #[serde(default)]
73 pub tags: Vec<String>,
74 pub stamp: String,
75 pub user: String,
76 pub container: bool,
77}