diff --git a/lib/virt/crun/model.v b/lib/virt/crun/model.v index f099a408..61543980 100644 --- a/lib/virt/crun/model.v +++ b/lib/virt/crun/model.v @@ -3,7 +3,7 @@ module crun // OCI Runtime Spec structures that can be directly encoded to JSON pub struct Spec { pub mut: - oci_version string + oci_version string @[json: 'ociVersion'] platform Platform process Process root Root @@ -21,21 +21,21 @@ pub mut: pub struct Process { pub mut: - terminal bool = true - user User - args []string - env []string - cwd string = '/' - capabilities Capabilities - rlimits []Rlimit - no_new_privileges bool + terminal bool = true + user User + args []string + env []string + cwd string = '/' + capabilities Capabilities + rlimits []Rlimit + no_new_privileges bool @[json: 'noNewPrivileges'] } pub struct User { pub mut: uid u32 gid u32 - additional_gids []u32 + additional_gids []u32 @[json: 'additionalGids'] } pub struct Capabilities { @@ -49,7 +49,7 @@ pub mut: pub struct Rlimit { pub mut: - typ string + typ string @[json: 'type'] hard u64 soft u64 } @@ -63,25 +63,25 @@ pub mut: pub struct Mount { pub mut: destination string - typ string + typ string @[json: 'type'] source string options []string } pub struct Linux { pub mut: - namespaces []LinuxNamespace - resources LinuxResources - devices []LinuxDevice - masked_paths []string - readonly_paths []string - uid_mappings []LinuxIDMapping - gid_mappings []LinuxIDMapping + namespaces []LinuxNamespace + resources LinuxResources + devices []LinuxDevice + masked_paths []string @[json: 'maskedPaths'] + readonly_paths []string @[json: 'readonlyPaths'] + uid_mappings []LinuxIDMapping @[json: 'uidMappings'] + gid_mappings []LinuxIDMapping @[json: 'gidMappings'] } pub struct LinuxNamespace { pub mut: - typ string + typ string @[json: 'type'] path string } @@ -123,19 +123,19 @@ pub mut: pub struct LinuxDevice { pub mut: - path string - typ string - major i64 - minor i64 - file_mode u32 - uid u32 - gid u32 + path string + typ string @[json: 'type'] + major i64 + minor i64 + file_mode u32 @[json: 'fileMode'] + uid u32 + gid u32 } pub struct LinuxIDMapping { pub mut: - container_id u32 - host_id u32 + container_id u32 @[json: 'containerID'] + host_id u32 @[json: 'hostID'] size u32 } @@ -235,4 +235,4 @@ pub enum RlimitType { rlimit_nice rlimit_rtprio rlimit_rttime -} \ No newline at end of file +}