Skip to content

Commit 32e3ec9

Browse files
committed
proto/config: style guide and indentation
Signed-off-by: Vincent Batts <[email protected]>
1 parent 113bfe7 commit 32e3ec9

File tree

1 file changed

+52
-42
lines changed

1 file changed

+52
-42
lines changed

proto/config.proto

Lines changed: 52 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,105 @@
11
//package oci.config.bundle;
22
package oci;
33

4-
// Spec is the base configuration for the container. It specifies platform
4+
// Spec is the base configuration for the container. It specifies platform
55
// independent configuration.
66
message Spec {
77
// Version is the version of the specification that is supported.
8-
optional string Version = 1;
8+
optional string version = 1;
99
// Platform is the host information for OS and Arch.
10-
optional Platform Platform = 2; // [default=77];
10+
optional Platform platform = 2; // [default=77];
1111
// Process is the container's main process.
12-
optional Process Process = 3;
12+
optional Process process = 3;
1313
// Root is the root information for the container's filesystem.
14-
optional Root Root = 4;
14+
optional Root root = 4;
1515
// Hostname is the container's host name.
16-
optional string Hostname = 5;
17-
// Mounts profile configuration for adding mounts to the container's filesystem.
18-
repeated MountPoint Mounts = 6;
16+
optional string hostname = 5;
17+
// Mounts profile configuration for adding mounts to the container's
18+
// filesystem.
19+
repeated MountPoint mounts = 6;
1920
}
2021

2122

2223
// LinuxSpec is the full specification for linux containers.
2324
message LinuxSpec {
24-
optional Spec Spec = 1;
25-
// LinuxConfig is platform specific configuration for linux based containers.
26-
optional LinuxConfig LinuxConfig = 2;
25+
optional Spec spec = 1;
26+
// LinuxConfig is platform specific configuration for linux based
27+
// containers.
28+
optional LinuxConfig linux_config = 2;
2729
}
2830

29-
// LinuxConfig contains platform specific configuration for linux based containers.
31+
// LinuxConfig contains platform specific configuration for linux based
32+
// containers.
3033
message LinuxConfig {
3134
// Capabilities are linux capabilities that are kept for the container.
32-
repeated string Capabilities = 1;
35+
repeated string capabilities = 1;
3336
}
3437

35-
// Platform specifies OS and arch information for the host system that the container
36-
// is created for.
38+
// Platform specifies OS and arch information for the host system that the
39+
// container is created for.
3740
message Platform {
3841
// OS is the operating system.
39-
optional string OS = 1;
42+
optional string os = 1;
4043
// Arch is the architecture
41-
optional string Arch = 2;
44+
optional string arch = 2;
4245
}
4346

44-
// Process contains information to start a specific application inside the container.
47+
// Process contains information to start a specific application inside the
48+
// container.
4549
message Process {
4650
// Terminal creates an interactive terminal for the container.
47-
optional bool Terminal = 1;
51+
optional bool terminal = 1;
4852
// User specifies user information for the process.
49-
optional User User = 2;
50-
// Args specifies the binary and arguments for the application to execute.
51-
repeated string Args = 3;
53+
optional User user = 2;
54+
// Args specifies the binary and arguments for the application to
55+
// execute.
56+
repeated string args = 3;
5257
// Env populates the process environment for the process.
53-
repeated string Env = 4;
58+
repeated string env = 4;
5459
// Cwd is the current working directory for the process and must be
5560
// relative to the container's root.
56-
optional string Cwd = 5;
61+
optional string cwd = 5;
5762
}
5863

5964
enum PlatformType {
60-
LINUX = 1;
65+
LINUX = 1;
6166
}
6267

6368
// User specifies user information for the process.
6469
message User {
65-
// Type so that receivers of this message can `switch` for the fields expected
66-
optional PlatformType Type = 1 [default = LINUX];
70+
// Type so that receivers of this message can `switch` for the fields
71+
// expected
72+
optional PlatformType type = 1 [default = LINUX];
6773

68-
optional LinuxUser LinuxUser = 2;
74+
optional LinuxUser linux_type = 2;
6975
}
7076

71-
// User specifies linux specific user and group information for the container's
72-
// main process.
77+
// LinuxUser specifies linux specific user and group information for the
78+
// container's main process.
7379
message LinuxUser {
74-
// UID is the user id.
75-
optional int32 UID = 1;
76-
// GID is the group id.
77-
optional int32 GID = 2;
78-
repeated int32 AdditionalGids = 3;
80+
// Uid is the user id.
81+
optional int32 uid = 1;
82+
// Gid is the group id.
83+
optional int32 gid = 2;
84+
repeated int32 additional_gids = 3;
7985
}
8086

8187
// Root contains information about the container's root filesystem on the host.
8288
message Root {
8389
// Path is the absolute path to the container's root filesystem.
84-
optional string Path = 1;
85-
// Readonly makes the root filesystem for the container readonly before the process is executed.
86-
optional bool Readonly = 2;
90+
optional string path = 1;
91+
// Readonly makes the root filesystem for the container readonly before
92+
// the process is executed.
93+
optional bool readonly = 2;
8794
}
8895

89-
// MountPoint describes a directory that may be fullfilled by a mount in the runtime.json.
96+
// MountPoint describes a directory that may be fullfilled by a mount in the
97+
// runtime.json.
9098
message MountPoint {
9199
// Name is a unique descriptive identifier for this mount point.
92-
optional string Name = 1;
93-
// Path specifies the path of the mount. The path and child directories MUST exist, a runtime MUST NOT create directories automatically to a mount point.
94-
optional string Path = 2;
100+
optional string name = 1;
101+
// Path specifies the path of the mount. The path and child directories
102+
// MUST exist, a runtime MUST NOT create directories automatically to a
103+
// mount point.
104+
optional string path = 2;
95105
}

0 commit comments

Comments
 (0)