diff options
author | Cara Salter <cara@devcara.com> | 2022-07-09 22:27:43 -0400 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2022-07-09 22:42:41 -0400 |
commit | 5429fcc0859c93da965e91e94e6676c2e6cdd24e (patch) | |
tree | 3adda02260db5a63f1b5dec706f39b99b4b6ac4f /src/ship.rs | |
parent | ec087f3d08f5861b6ffcce00a632858a57c86d31 (diff) | |
download | solarlib-5429fcc0859c93da965e91e94e6676c2e6cdd24e.tar.gz solarlib-5429fcc0859c93da965e91e94e6676c2e6cdd24e.zip |
colony: Initial cloud-init support
Diffstat (limited to 'src/ship.rs')
-rw-r--r-- | src/ship.rs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/ship.rs b/src/ship.rs index 7b684b3..a76ea54 100644 --- a/src/ship.rs +++ b/src/ship.rs @@ -39,6 +39,8 @@ pub struct Ship { pub download_url: String, /// The commonly accepted version (e.g "rolling", "21.11", "unstable") pub version: String, + /// Whether this ship supports the use of cloud-init (Colonies) + pub colonizable: bool } /// Describes a starship generated from a database @@ -50,7 +52,8 @@ pub struct DbShip { pub name: String, pub shasum: String, pub download_url: String, - pub version: String + pub version: String, + pub colonizable: bool, } impl From<DbShip> for Ship { @@ -59,7 +62,8 @@ impl From<DbShip> for Ship { name: o.name, shasum: Sha256(o.shasum), download_url: o.download_url, - version: o.version + version: o.version, + colonizable: o.colonizable } } } @@ -68,13 +72,15 @@ impl Ship { pub fn new(name: String, shasum: String, download_url: String, - version: String + version: String, + colonizable: bool, ) -> Self { Self { name, shasum: Sha256(shasum), download_url, - version + version, + colonizable } } |