Skip to content

Commit f6c8ba2

Browse files
committed
feat: 全部调整成统一风格
1 parent 9964f9b commit f6c8ba2

File tree

685 files changed

+38677
-31115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

685 files changed

+38677
-31115
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ endif
5656

5757
.PHONY: gen-k8s
5858
gen-k8s: ## Generate all necessary kubernetes related files, such as deepcopy files
59-
@$(ONEX_ROOT)/scripts/update-codegen.sh
59+
@$(PROJ_ROOT_DIR)/scripts/update-codegen.sh
6060
# The following command is old generate way with makefile script.
6161
# Comment here as a code history.
6262
# $(MAKE) -s generated.files
@@ -141,7 +141,7 @@ ifeq ($(ALL),1)
141141
@$(FIND) -type f -name 'zz_generated.*go' -delete
142142
@$(FIND) -type f -name '*_generated.go' -delete
143143
@$(FIND) -type f -name 'types_swagger_doc_generated.go' -delete
144-
@-rm -vrf $(ONEX_ROOT)/pkg/generated
144+
@-rm -vrf $(PROJ_ROOT_DIR)/pkg/generated
145145
@-rm -vrf $(GENERATED_DOCKERFILE_DIR)
146146
endif
147147

README.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ For more `make` operations, please refer to `make help`.
106106
## Usage/Examples
107107

108108
```bash
109-
$ kubectl create -f ${ONEX_ROOT}/manifests/sample/onex/minerset.yaml
109+
$ kubectl create -f ${PROJ_ROOT_DIR}/manifests/sample/onex/minerset.yaml
110110
$ onexctl --config ${ONEX_CONFIG_DIR}/onexctl.yaml minerset list
111111
```
112112

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ $ make push # 构建并推送镜像
106106
## Usage/Examples
107107

108108
```bash
109-
$ kubectl create -f ${ONEX_ROOT}/manifests/sample/onex/minerset.yaml
109+
$ kubectl create -f ${PROJ_ROOT_DIR}/manifests/sample/onex/minerset.yaml
110110
$ onexctl --config ${ONEX_CONFIG_DIR}/onexctl.yaml minerset list
111111
```
112112

api/openapi/cacheserver/v1/cacheserver.swagger.json

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,42 @@
1717
],
1818
"paths": {},
1919
"definitions": {
20+
"cacheserverv1GetSecretResponse": {
21+
"type": "object",
22+
"properties": {
23+
"userID": {
24+
"type": "string"
25+
},
26+
"name": {
27+
"type": "string"
28+
},
29+
"secretID": {
30+
"type": "string"
31+
},
32+
"secretKey": {
33+
"type": "string"
34+
},
35+
"expires": {
36+
"type": "string",
37+
"format": "int64"
38+
},
39+
"status": {
40+
"type": "integer",
41+
"format": "int32"
42+
},
43+
"description": {
44+
"type": "string"
45+
},
46+
"createdAt": {
47+
"type": "string",
48+
"format": "date-time"
49+
},
50+
"updatedAt": {
51+
"type": "string",
52+
"format": "date-time"
53+
}
54+
}
55+
},
2056
"googlerpcStatus": {
2157
"type": "object",
2258
"properties": {
@@ -30,6 +66,7 @@
3066
"details": {
3167
"type": "array",
3268
"items": {
69+
"type": "object",
3370
"$ref": "#/definitions/protobufAny"
3471
}
3572
}
@@ -56,42 +93,6 @@
5693
"type": "string"
5794
}
5895
}
59-
},
60-
"v1GetSecretResponse": {
61-
"type": "object",
62-
"properties": {
63-
"userID": {
64-
"type": "string"
65-
},
66-
"name": {
67-
"type": "string"
68-
},
69-
"secretID": {
70-
"type": "string"
71-
},
72-
"secretKey": {
73-
"type": "string"
74-
},
75-
"expires": {
76-
"type": "string",
77-
"format": "int64"
78-
},
79-
"status": {
80-
"type": "integer",
81-
"format": "int32"
82-
},
83-
"description": {
84-
"type": "string"
85-
},
86-
"createdAt": {
87-
"type": "string",
88-
"format": "date-time"
89-
},
90-
"updatedAt": {
91-
"type": "string",
92-
"format": "date-time"
93-
}
94-
}
9596
}
9697
}
9798
}

api/openapi/cacheserver/v1/errors.swagger.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"details": {
2626
"type": "array",
2727
"items": {
28+
"type": "object",
2829
"$ref": "#/definitions/protobufAny"
2930
}
3031
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "告诉编译器此文件使用什么版本的语法",
5+
"version": "version not set"
6+
},
7+
"consumes": [
8+
"application/json"
9+
],
10+
"produces": [
11+
"application/json"
12+
],
13+
"paths": {},
14+
"definitions": {
15+
"googlerpcStatus": {
16+
"type": "object",
17+
"properties": {
18+
"code": {
19+
"type": "integer",
20+
"format": "int32"
21+
},
22+
"message": {
23+
"type": "string"
24+
},
25+
"details": {
26+
"type": "array",
27+
"items": {
28+
"type": "object",
29+
"$ref": "#/definitions/protobufAny"
30+
}
31+
}
32+
}
33+
},
34+
"protobufAny": {
35+
"type": "object",
36+
"properties": {
37+
"@type": {
38+
"type": "string",
39+
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
40+
}
41+
},
42+
"additionalProperties": {},
43+
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
44+
}
45+
}
46+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "告诉编译器此文件使用什么版本的语法",
5+
"version": "version not set"
6+
},
7+
"consumes": [
8+
"application/json"
9+
],
10+
"produces": [
11+
"application/json"
12+
],
13+
"paths": {},
14+
"definitions": {
15+
"googlerpcStatus": {
16+
"type": "object",
17+
"properties": {
18+
"code": {
19+
"type": "integer",
20+
"format": "int32"
21+
},
22+
"message": {
23+
"type": "string"
24+
},
25+
"details": {
26+
"type": "array",
27+
"items": {
28+
"type": "object",
29+
"$ref": "#/definitions/protobufAny"
30+
}
31+
}
32+
}
33+
},
34+
"protobufAny": {
35+
"type": "object",
36+
"properties": {
37+
"@type": {
38+
"type": "string",
39+
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
40+
}
41+
},
42+
"additionalProperties": {},
43+
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
44+
}
45+
}
46+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "errno/errno.proto",
5+
"version": "version not set"
6+
},
7+
"consumes": [
8+
"application/json"
9+
],
10+
"produces": [
11+
"application/json"
12+
],
13+
"paths": {},
14+
"definitions": {
15+
"googlerpcStatus": {
16+
"type": "object",
17+
"properties": {
18+
"code": {
19+
"type": "integer",
20+
"format": "int32"
21+
},
22+
"message": {
23+
"type": "string"
24+
},
25+
"details": {
26+
"type": "array",
27+
"items": {
28+
"type": "object",
29+
"$ref": "#/definitions/protobufAny"
30+
}
31+
}
32+
}
33+
},
34+
"protobufAny": {
35+
"type": "object",
36+
"properties": {
37+
"@type": {
38+
"type": "string",
39+
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
40+
}
41+
},
42+
"additionalProperties": {},
43+
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
44+
}
45+
}
46+
}

api/openapi/fakeserver/v1/errors.swagger.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"details": {
2626
"type": "array",
2727
"items": {
28+
"type": "object",
2829
"$ref": "#/definitions/protobufAny"
2930
}
3031
}

0 commit comments

Comments
 (0)