From fcad80f3770cf051234181c0b0cca4df2358cf50 Mon Sep 17 00:00:00 2001 From: peefy Date: Thu, 22 Aug 2024 18:08:53 +0800 Subject: [PATCH] fix: tour protocol examples Signed-off-by: peefy --- docs/reference/lang/tour.md | 14 +++++++------- .../current/reference/lang/tour.md | 14 +++++++------- .../version-0.10/reference/lang/tour.md | 14 +++++++------- .../version-0.4/reference/lang/tour.md | 18 +++++++++--------- .../version-0.5/reference/lang/tour.md | 18 +++++++++--------- .../version-0.6/reference/lang/tour.md | 14 +++++++------- .../version-0.7/reference/lang/tour.md | 14 +++++++------- .../version-0.8/reference/lang/tour.md | 14 +++++++------- .../version-0.9/reference/lang/tour.md | 14 +++++++------- .../version-0.10/reference/lang/tour.md | 14 +++++++------- .../version-0.4/reference/lang/tour.md | 18 +++++++++--------- .../version-0.5/reference/lang/tour.md | 18 +++++++++--------- .../version-0.6/reference/lang/tour.md | 14 +++++++------- .../version-0.7/reference/lang/tour.md | 14 +++++++------- .../version-0.8/reference/lang/tour.md | 14 +++++++------- .../version-0.9/reference/lang/tour.md | 14 +++++++------- 16 files changed, 120 insertions(+), 120 deletions(-) diff --git a/docs/reference/lang/tour.md b/docs/reference/lang/tour.md index e4e7e82d..64eb8d42 100644 --- a/docs/reference/lang/tour.md +++ b/docs/reference/lang/tour.md @@ -2700,26 +2700,26 @@ We can use protocol to implement type checking of rule structure: ```python # Protocol definition -protocol Service: +protocol ServiceProtocol: clusterIp: str $type: str # Protocol definition -protocol Volume: - mountPath: [str] +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2735,7 +2735,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [ diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/lang/tour.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/lang/tour.md index de28b43a..113f6617 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/lang/tour.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/reference/lang/tour.md @@ -2633,26 +2633,26 @@ rule2 = SomeRule {} ```python # Protocol definition -protocol Service: +protocol ServiceProtocol: clusterIp: str $type: str # Protocol definition -protocol Volume: - mountPath: [str] +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2668,7 +2668,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [ diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.10/reference/lang/tour.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.10/reference/lang/tour.md index de28b43a..113f6617 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.10/reference/lang/tour.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.10/reference/lang/tour.md @@ -2633,26 +2633,26 @@ rule2 = SomeRule {} ```python # Protocol definition -protocol Service: +protocol ServiceProtocol: clusterIp: str $type: str # Protocol definition -protocol Volume: - mountPath: [str] +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2668,7 +2668,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [ diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.4/reference/lang/tour.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.4/reference/lang/tour.md index aa628bde..9e0f0fdd 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.4/reference/lang/tour.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.4/reference/lang/tour.md @@ -2558,27 +2558,27 @@ rule2 = SomeRule {} 可以使用 protocol 和 for 绑定语句为 rule 增加类型约束: ```python -# Schema definition -protocol Service: +# Protocol definition +protocol ServiceProtocol: clusterIp: str $type: str -# Schema definition -protocol Volume: - mountPath: [str] +# Protocol definition +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2594,7 +2594,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [ diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.5/reference/lang/tour.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.5/reference/lang/tour.md index ef4c8121..cb2d31c7 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.5/reference/lang/tour.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.5/reference/lang/tour.md @@ -2567,27 +2567,27 @@ rule2 = SomeRule {} 可以使用 protocol 和 for 绑定语句为 rule 增加类型约束: ```python -# Schema definition -protocol Service: +# Protocol definition +protocol ServiceProtocol: clusterIp: str $type: str -# Schema definition -protocol Volume: - mountPath: [str] +# Protocol definition +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2603,7 +2603,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [ diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.6/reference/lang/tour.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.6/reference/lang/tour.md index 8238cd40..e33dba35 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.6/reference/lang/tour.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.6/reference/lang/tour.md @@ -2609,26 +2609,26 @@ rule2 = SomeRule {} ```python # Protocol definition -protocol Service: +protocol ServiceProtocol: clusterIp: str $type: str # Protocol definition -protocol Volume: - mountPath: [str] +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2644,7 +2644,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [ diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.7/reference/lang/tour.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.7/reference/lang/tour.md index a98654ff..e91087cc 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.7/reference/lang/tour.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.7/reference/lang/tour.md @@ -2623,26 +2623,26 @@ rule2 = SomeRule {} ```python # Protocol definition -protocol Service: +protocol ServiceProtocol: clusterIp: str $type: str # Protocol definition -protocol Volume: - mountPath: [str] +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2658,7 +2658,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [ diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.8/reference/lang/tour.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.8/reference/lang/tour.md index a98654ff..e91087cc 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.8/reference/lang/tour.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.8/reference/lang/tour.md @@ -2623,26 +2623,26 @@ rule2 = SomeRule {} ```python # Protocol definition -protocol Service: +protocol ServiceProtocol: clusterIp: str $type: str # Protocol definition -protocol Volume: - mountPath: [str] +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2658,7 +2658,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [ diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.9/reference/lang/tour.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.9/reference/lang/tour.md index de28b43a..113f6617 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.9/reference/lang/tour.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.9/reference/lang/tour.md @@ -2633,26 +2633,26 @@ rule2 = SomeRule {} ```python # Protocol definition -protocol Service: +protocol ServiceProtocol: clusterIp: str $type: str # Protocol definition -protocol Volume: - mountPath: [str] +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2668,7 +2668,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [ diff --git a/versioned_docs/version-0.10/reference/lang/tour.md b/versioned_docs/version-0.10/reference/lang/tour.md index e4e7e82d..64eb8d42 100644 --- a/versioned_docs/version-0.10/reference/lang/tour.md +++ b/versioned_docs/version-0.10/reference/lang/tour.md @@ -2700,26 +2700,26 @@ We can use protocol to implement type checking of rule structure: ```python # Protocol definition -protocol Service: +protocol ServiceProtocol: clusterIp: str $type: str # Protocol definition -protocol Volume: - mountPath: [str] +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2735,7 +2735,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [ diff --git a/versioned_docs/version-0.4/reference/lang/tour.md b/versioned_docs/version-0.4/reference/lang/tour.md index 590430ad..c427bae6 100644 --- a/versioned_docs/version-0.4/reference/lang/tour.md +++ b/versioned_docs/version-0.4/reference/lang/tour.md @@ -2639,27 +2639,27 @@ rule2 = SomeRule {} # Rule call We can use protocol to implement type checking of rule structure: ```python -# Schema definition -protocol Service: +# Protocol definition +protocol ServiceProtocol: clusterIp: str $type: str -# Schema definition -protocol Volume: - mountPath: [str] +# Protocol definition +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2675,7 +2675,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [ diff --git a/versioned_docs/version-0.5/reference/lang/tour.md b/versioned_docs/version-0.5/reference/lang/tour.md index f3fe18c4..344d3bc2 100644 --- a/versioned_docs/version-0.5/reference/lang/tour.md +++ b/versioned_docs/version-0.5/reference/lang/tour.md @@ -2648,27 +2648,27 @@ rule2 = SomeRule {} # Rule call We can use protocol to implement type checking of rule structure: ```python -# Schema definition -protocol Service: +# Protocol definition +protocol ServiceProtocol: clusterIp: str $type: str -# Schema definition -protocol Volume: - mountPath: [str] +# Protocol definition +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2684,7 +2684,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [ diff --git a/versioned_docs/version-0.6/reference/lang/tour.md b/versioned_docs/version-0.6/reference/lang/tour.md index 5243a387..37456635 100644 --- a/versioned_docs/version-0.6/reference/lang/tour.md +++ b/versioned_docs/version-0.6/reference/lang/tour.md @@ -2690,26 +2690,26 @@ We can use protocol to implement type checking of rule structure: ```python # Protocol definition -protocol Service: +protocol ServiceProtocol: clusterIp: str $type: str # Protocol definition -protocol Volume: - mountPath: [str] +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2725,7 +2725,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [ diff --git a/versioned_docs/version-0.7/reference/lang/tour.md b/versioned_docs/version-0.7/reference/lang/tour.md index 58eabdcf..5225c619 100644 --- a/versioned_docs/version-0.7/reference/lang/tour.md +++ b/versioned_docs/version-0.7/reference/lang/tour.md @@ -2690,26 +2690,26 @@ We can use protocol to implement type checking of rule structure: ```python # Protocol definition -protocol Service: +protocol ServiceProtocol: clusterIp: str $type: str # Protocol definition -protocol Volume: - mountPath: [str] +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2725,7 +2725,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [ diff --git a/versioned_docs/version-0.8/reference/lang/tour.md b/versioned_docs/version-0.8/reference/lang/tour.md index 58eabdcf..5225c619 100644 --- a/versioned_docs/version-0.8/reference/lang/tour.md +++ b/versioned_docs/version-0.8/reference/lang/tour.md @@ -2690,26 +2690,26 @@ We can use protocol to implement type checking of rule structure: ```python # Protocol definition -protocol Service: +protocol ServiceProtocol: clusterIp: str $type: str # Protocol definition -protocol Volume: - mountPath: [str] +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2725,7 +2725,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [ diff --git a/versioned_docs/version-0.9/reference/lang/tour.md b/versioned_docs/version-0.9/reference/lang/tour.md index e4e7e82d..64eb8d42 100644 --- a/versioned_docs/version-0.9/reference/lang/tour.md +++ b/versioned_docs/version-0.9/reference/lang/tour.md @@ -2700,26 +2700,26 @@ We can use protocol to implement type checking of rule structure: ```python # Protocol definition -protocol Service: +protocol ServiceProtocol: clusterIp: str $type: str # Protocol definition -protocol Volume: - mountPath: [str] +protocol VolumeProtocol: + mountPath: str # Protocol protocol SomeProtocol: id: int env: {str: any} - services: [Service] - volumes: [Volume] + services: [ServiceProtocol] + volumes: [VolumeProtocol] rule SomeChecker for SomeProtocol: id > 0, "id must >0" all service in services { - service.clusterIP == "NONE" if service.type == "ClusterIP" + service.clusterIp == "NONE" if service.type == "ClusterIP" } any volume in volumes { @@ -2735,7 +2735,7 @@ SomeChecker { services = [ { type = "ClusterIP" - clusterIP = "NONE" + clusterIp = "NONE" } ] volumes = [