Skip to content

Commit

Permalink
change config
Browse files Browse the repository at this point in the history
  • Loading branch information
zhufuyi committed Nov 30, 2023
1 parent 18e3aa8 commit 43b606a
Show file tree
Hide file tree
Showing 47 changed files with 132 additions and 69 deletions.
2 changes: 1 addition & 1 deletion 1_web-gin-CRUD/configs/user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ etcd:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
2 changes: 1 addition & 1 deletion 1_web-gin-CRUD/configs/user_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nacos:
port: 8848 # listening port
scheme: "http" # http or https
contextPath: "/nacos" # path
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
group: "dev" # group name: dev, prod, test
dataID: "user.yml" # config file id
format: "yaml" # configuration file type: json,yaml,toml
2 changes: 1 addition & 1 deletion 1_web-gin-CRUD/deployments/kubernetes/user-configmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ data:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
2 changes: 1 addition & 1 deletion 2_micro-grpc-CRUD/configs/user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ etcd:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
2 changes: 1 addition & 1 deletion 2_micro-grpc-CRUD/configs/user_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nacos:
port: 8848 # listening port
scheme: "http" # http or https
contextPath: "/nacos" # path
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
group: "dev" # group name: dev, prod, test
dataID: "user.yml" # config file id
format: "yaml" # configuration file type: json,yaml,toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ data:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
2 changes: 1 addition & 1 deletion 3_web-gin-protobuf/configs/user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ etcd:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
2 changes: 1 addition & 1 deletion 3_web-gin-protobuf/configs/user_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nacos:
port: 8848 # listening port
scheme: "http" # http or https
contextPath: "/nacos" # path
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
group: "dev" # group name: dev, prod, test
dataID: "user.yml" # config file id
format: "yaml" # configuration file type: json,yaml,toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ data:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
2 changes: 0 additions & 2 deletions 3_web-gin-protobuf/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,6 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/zhufuyi/sponge v1.5.6 h1:PlmHVD2wRzG7LIuWyb6YyhycTGo8c5M8CoLqMPFfzJw=
github.com/zhufuyi/sponge v1.5.6/go.mod h1:jqHdQEmKK7tDUTrecEWhq0c2UO1WE5/HjaY2y4dGmEE=
github.com/zhufuyi/sponge v1.5.7 h1:qb3FbgeBel3drC82NfRWpGQBsvFS4eqgRS3bm+IZQz8=
github.com/zhufuyi/sponge v1.5.7/go.mod h1:jqHdQEmKK7tDUTrecEWhq0c2UO1WE5/HjaY2y4dGmEE=
go.etcd.io/etcd/api/v3 v3.5.4 h1:OHVyt3TopwtUQ2GKdd5wu3PmmipR4FTwCqoEjSyRdIc=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ enum Scheme {
// info: {
// title: "Echo API";
// version: "1.0";
// description: ";
// description: "";
// contact: {
// name: "gRPC-Gateway project";
// url: "https://github.com/grpc-ecosystem/grpc-gateway";
// email: "[email protected]";
// };
// license: {
// name: "BSD 3-Clause License";
// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
// };
// };
// schemes: HTTPS;
Expand Down Expand Up @@ -92,12 +92,14 @@ message Swagger {
// (that is, there is a logical OR between the security requirements).
// Individual operations can override this definition.
repeated SecurityRequirement security = 12;
// field 13 is reserved for 'tags', which are supposed to be exposed as and
// customizable as proto services. TODO(ivucica): add processing of proto
// service objects into OpenAPI v2 Tag objects.
reserved 13;
// A list of tags for API documentation control. Tags can be used for logical
// grouping of operations by resources or any other qualifier.
repeated Tag tags = 13;
// Additional external documentation.
ExternalDocumentation external_docs = 14;
// Custom properties that start with "x-" such as "x-foo" used to describe
// extra functionality that is not covered by the standard OpenAPI Specification.
// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, google.protobuf.Value> extensions = 15;
}

Expand Down Expand Up @@ -169,7 +171,55 @@ message Operation {
// definition overrides any declared top-level security. To remove a top-level
// security declaration, an empty array can be used.
repeated SecurityRequirement security = 12;
// Custom properties that start with "x-" such as "x-foo" used to describe
// extra functionality that is not covered by the standard OpenAPI Specification.
// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, google.protobuf.Value> extensions = 13;
// Custom parameters such as HTTP request headers.
// See: https://swagger.io/docs/specification/2-0/describing-parameters/
// and https://swagger.io/specification/v2/#parameter-object.
Parameters parameters = 14;
}

// `Parameters` is a representation of OpenAPI v2 specification's parameters object.
// Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
// allow header parameters to be set here since we do not want users specifying custom non-header
// parameters beyond those inferred from the Protobuf schema.
// See: https://swagger.io/specification/v2/#parameter-object
message Parameters {
// `Headers` is one or more HTTP header parameter.
// See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
repeated HeaderParameter headers = 1;
}

// `HeaderParameter` a HTTP header parameter.
// See: https://swagger.io/specification/v2/#parameter-object
message HeaderParameter {
// `Type` is a a supported HTTP header type.
// See https://swagger.io/specification/v2/#parameterType.
enum Type {
UNKNOWN = 0;
STRING = 1;
NUMBER = 2;
INTEGER = 3;
BOOLEAN = 4;
}

// `Name` is the header name.
string name = 1;
// `Description` is a short description of the header.
string description = 2;
// `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
// See: https://swagger.io/specification/v2/#parameterType.
Type type = 3;
// `Format` The extending format for the previously mentioned type.
string format = 4;
// `Required` indicates if the header is optional
bool required = 5;
// field 6 is reserved for 'items', but in OpenAPI-specific way.
reserved 6;
// field 7 is reserved `Collection Format`. Determines the format of the array if type array is used.
reserved 7;
}

// `Header` is a representation of OpenAPI v2 specification's Header object.
Expand Down Expand Up @@ -235,6 +285,9 @@ message Response {
// `Examples` gives per-mimetype response examples.
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
map<string, string> examples = 4;
// Custom properties that start with "x-" such as "x-foo" used to describe
// extra functionality that is not covered by the standard OpenAPI Specification.
// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, google.protobuf.Value> extensions = 5;
}

Expand All @@ -248,15 +301,15 @@ message Response {
// info: {
// title: "Echo API";
// version: "1.0";
// description: ";
// description: "";
// contact: {
// name: "gRPC-Gateway project";
// url: "https://github.com/grpc-ecosystem/grpc-gateway";
// email: "[email protected]";
// };
// license: {
// name: "BSD 3-Clause License";
// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
// };
// };
// ...
Expand All @@ -277,6 +330,9 @@ message Info {
// Provides the version of the application API (not to be confused
// with the specification version).
string version = 6;
// Custom properties that start with "x-" such as "x-foo" used to describe
// extra functionality that is not covered by the standard OpenAPI Specification.
// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, google.protobuf.Value> extensions = 7;
}

Expand Down Expand Up @@ -321,7 +377,7 @@ message Contact {
// ...
// license: {
// name: "BSD 3-Clause License";
// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
// };
// ...
// };
Expand Down Expand Up @@ -518,6 +574,9 @@ message JSONSchema {
// for overlapping paths.
string path_param_name = 47;
}
// Custom properties that start with "x-" such as "x-foo" used to describe
// extra functionality that is not covered by the standard OpenAPI Specification.
// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, google.protobuf.Value> extensions = 48;
}

Expand All @@ -526,20 +585,19 @@ message JSONSchema {
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
//
message Tag {
// field 1 is reserved for 'name'. In our generator, this is (to be) extracted
// from the name of proto service, and thus not exposed to the user, as
// changing tag object's name would break the link to the references to the
// tag in individual operation specifications.
//
// TODO(ivucica): Add 'name' property. Use it to allow override of the name of
// The name of the tag. Use it to allow override of the name of a
// global Tag object, then use that name to reference the tag throughout the
// OpenAPI file.
reserved 1;
string name = 1;
// A short description for the tag. GFM syntax can be used for rich text
// representation.
string description = 2;
// Additional external documentation for this tag.
ExternalDocumentation external_docs = 3;
// Custom properties that start with "x-" such as "x-foo" used to describe
// extra functionality that is not covered by the standard OpenAPI Specification.
// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, google.protobuf.Value> extensions = 4;
}

// `SecurityDefinitions` is a representation of OpenAPI v2 specification's
Expand Down Expand Up @@ -619,6 +677,9 @@ message SecurityScheme {
// The available scopes for the OAuth2 security scheme.
// Valid for oauth2.
Scopes scopes = 8;
// Custom properties that start with "x-" such as "x-foo" used to describe
// extra functionality that is not covered by the standard OpenAPI Specification.
// See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, google.protobuf.Value> extensions = 9;
}

Expand Down
2 changes: 1 addition & 1 deletion 4_micro-grpc-protobuf/configs/user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ etcd:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
2 changes: 1 addition & 1 deletion 4_micro-grpc-protobuf/configs/user_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nacos:
port: 8848 # listening port
scheme: "http" # http or https
contextPath: "/nacos" # path
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
group: "dev" # group name: dev, prod, test
dataID: "user.yml" # config file id
format: "yaml" # configuration file type: json,yaml,toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ data:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ etcd:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nacos:
port: 8848 # listening port
scheme: "http" # http or https
contextPath: "/nacos" # path
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
group: "dev" # group name: dev, prod, test
dataID: "edusys_gw.yml" # config file id
format: "yaml" # configuration file type: json,yaml,toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ data:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
2 changes: 1 addition & 1 deletion 6_micro-cluster/comment/configs/comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ etcd:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
2 changes: 1 addition & 1 deletion 6_micro-cluster/comment/configs/comment_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nacos:
port: 8848 # listening port
scheme: "http" # http or https
contextPath: "/nacos" # path
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
group: "dev" # group name: dev, prod, test
dataID: "comment.yml" # config file id
format: "yaml" # configuration file type: json,yaml,toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ data:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
2 changes: 1 addition & 1 deletion 6_micro-cluster/inventory/configs/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ etcd:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
2 changes: 1 addition & 1 deletion 6_micro-cluster/inventory/configs/inventory_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nacos:
port: 8848 # listening port
scheme: "http" # http or https
contextPath: "/nacos" # path
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
group: "dev" # group name: dev, prod, test
dataID: "inventory.yml" # config file id
format: "yaml" # configuration file type: json,yaml,toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ data:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
2 changes: 1 addition & 1 deletion 6_micro-cluster/product/configs/product.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ etcd:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
2 changes: 1 addition & 1 deletion 6_micro-cluster/product/configs/product_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nacos:
port: 8848 # listening port
scheme: "http" # http or https
contextPath: "/nacos" # path
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
group: "dev" # group name: dev, prod, test
dataID: "product.yml" # config file id
format: "yaml" # configuration file type: json,yaml,toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ data:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
2 changes: 1 addition & 1 deletion 6_micro-cluster/shop_gw/configs/shop_gw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ etcd:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
2 changes: 1 addition & 1 deletion 6_micro-cluster/shop_gw/configs/shop_gw_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nacos:
port: 8848 # listening port
scheme: "http" # http or https
contextPath: "/nacos" # path
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
group: "dev" # group name: dev, prod, test
dataID: "shop_gw.yml" # config file id
format: "yaml" # configuration file type: json,yaml,toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ data:
nacosRd:
ipAddr: "192.168.3.37"
port: 8848
namespaceID: "3454d2b5-2455-4d0e-bf6d-e033b086bb4c" # namespace id
namespaceID: "3195f5fb-1bcc-4340-999a-5028660a4ae2" # namespace id
Loading

0 comments on commit 43b606a

Please sign in to comment.