-
Notifications
You must be signed in to change notification settings - Fork 236
Wire up experimental OCI runtime support #416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -296,8 +296,8 @@ public struct Mount: Codable, Sendable { | |
| public var destination: String | ||
| public var options: [String] | ||
|
|
||
| public var uidMappings: [LinuxIDMapping] | ||
| public var gidMappings: [LinuxIDMapping] | ||
| public var uidMappings: [LinuxIDMapping]? | ||
| public var gidMappings: [LinuxIDMapping]? | ||
|
|
||
| public enum CodingKeys: String, CodingKey { | ||
| case type | ||
|
|
@@ -313,8 +313,8 @@ public struct Mount: Codable, Sendable { | |
| source: String = "", | ||
| destination: String, | ||
| options: [String] = [], | ||
| uidMappings: [LinuxIDMapping] = [], | ||
| gidMappings: [LinuxIDMapping] = [] | ||
| uidMappings: [LinuxIDMapping]? = nil, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Side note: In case we ever want to take a crack at generating Swift from spec, https://github.pie.apple.com/vessel/swift-docker-api demonstrates an approach for converting Open API/Swagger to Swift bindings with some stuff to handle things that are optional in practice but required according to what the spec says. |
||
| gidMappings: [LinuxIDMapping]? = nil | ||
| ) { | ||
| self.destination = destination | ||
| self.type = type | ||
|
|
@@ -330,8 +330,18 @@ public struct Mount: Codable, Sendable { | |
| self.source = try container.decodeIfPresent(String.self, forKey: .source) ?? "" | ||
| self.destination = try container.decode(String.self, forKey: .destination) | ||
| self.options = try container.decodeIfPresent([String].self, forKey: .options) ?? [] | ||
| self.uidMappings = try container.decodeIfPresent([LinuxIDMapping].self, forKey: .uidMappings) ?? [] | ||
| self.gidMappings = try container.decodeIfPresent([LinuxIDMapping].self, forKey: .gidMappings) ?? [] | ||
| self.uidMappings = try container.decodeIfPresent([LinuxIDMapping].self, forKey: .uidMappings) | ||
| self.gidMappings = try container.decodeIfPresent([LinuxIDMapping].self, forKey: .gidMappings) | ||
| } | ||
|
|
||
| public func encode(to encoder: Encoder) throws { | ||
| var container = encoder.container(keyedBy: CodingKeys.self) | ||
| try container.encode(type, forKey: .type) | ||
| try container.encode(source, forKey: .source) | ||
| try container.encode(destination, forKey: .destination) | ||
| try container.encode(options, forKey: .options) | ||
| try container.encodeIfPresent(uidMappings, forKey: .uidMappings) | ||
| try container.encodeIfPresent(gidMappings, forKey: .gidMappings) | ||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the semantics such that if defined, this overrides using the default runtime offered by the VMM? It might be good to spell this out in this docc.