Skip to content

Commit a23cca3

Browse files
committed
update oss .md
1 parent c5c9f45 commit a23cca3

File tree

3 files changed

+68
-187
lines changed

3 files changed

+68
-187
lines changed

website/docs/doc/GeneralClient.OSS.md

Lines changed: 22 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,31 @@ public sealed class GeneralClientOSS
2828

2929
### Example
3030

31+
| Description | Address |
32+
| --------------------------- | ------------------------------------------------------------ |
33+
| Address of code example | [Enter](https://github.com/GeneralLibrary/GeneralUpdate-Samples/tree/main/src/OSS) |
34+
| Hashing algorithm (sha256) | [Enter](https://github.com/GeneralLibrary/GeneralUpdate/blob/master/src/c%23/GeneralUpdate.Core/Pipeline/HashMiddleware.cs) |
35+
| Test script (oss_start.cmd) | [Enter](https://github.com/GeneralLibrary/GeneralUpdate-Samples/tree/main/src) |
36+
3137
#### OSS Process
3238

3339
![](imgs/oss_flow.png)
3440

3541
1. Prepare the version.json configuration file and update files (update.zip) just like in previous packaging methods.
3642

37-
![](imgs/oss_version_json.png)
43+
```json
44+
[
45+
{
46+
"PacketName": "packet_20250102230201638_1.0.0.1",
47+
"Hash": "ad1a85a9169ca0083ab54ba390e085c56b9059efc3ca8aa1ec9ed857683cc4b1",
48+
"Version": "1.0.0.1",
49+
"Url": "http://localhost:5000/packages/packet_20250102230201638_1.0.0.1.zip",
50+
"PubTime": "2025-01-02T23:48:21"
51+
}
52+
]
53+
```
54+
55+
3856

3957
2. When the Client starts, it directly requests the OSS server or file server to download the version.json file.
4058

@@ -50,6 +68,8 @@ public sealed class GeneralClientOSS
5068

5169
The following example defines methods, including the usage of GeneralClientOSS , GeneralUpdateOSS.
5270

71+
GeneralClientOSS :
72+
5373
```c#
5474
using System.Text;
5575
using GeneralUpdate.ClientCore;
@@ -67,7 +87,7 @@ var paramsOSS = new GlobalConfigInfoOSS
6787
await GeneralClientOSS.Start(paramsOSS, "OSSUpgradeSample.exe");
6888
```
6989

70-
90+
GeneralUpdateOSS :
7191

7292
```
7393
using GeneralUpdate.Core;
@@ -92,67 +112,6 @@ catch (Exception ex)
92112

93113

94114

95-
### Annotation
96-
97-
GeneralUpdateOSS provides the following capabilities.
98-
99-
#### Properties
100-
101-
| Properties | Description |
102-
| ---------- | ------------------------------------ |
103-
| ParamsOSS | OSS update configuration parameters. |
104-
105-
106-
107-
#### Methods
108-
109-
| Method | Description |
110-
| ---------------------- | ----------------------------------------------------------- |
111-
| Start() | Start the OSS update. |
112-
| AddListenerException() | Listen for internal exception information of the component. |
113-
114-
115-
116-
### 🌴ParamsOSS
117-
118-
**Properties**
119-
120-
**Url** string: HTTP API server request address.
121-
122-
**AppName** string: Application name.
123-
124-
**CurrentVersion** string: Current version.
125-
126-
**VersionFileName** string: Version file name.
127-
128-
129-
130-
### 🌼Start()
131-
132-
**Method**
133-
134-
Start the OSS update.
135-
136-
```c#
137-
public static async Task Start(ParamsOSS configParams, string upgradeAppName = "GeneralUpdate.Upgrade");
138-
```
139-
140-
141-
142-
**Parameter Types**
143-
144-
ParamsOSS: Update configuration parameters, detailed content can be found in this document under 🌴ParamsOSS.
145-
146-
147-
148-
**Parameters**
149-
150-
**parameter** ParamsOSS: Update configuration parameters for the Android platform.
151-
152-
**upgradeAppName**: Name of the application to be upgraded.
153-
154-
155-
156115
### Applicable to
157116

158117
| Product | Version |

website/i18n/en/docusaurus-plugin-content-docs/current/docs/doc/GeneralClient.OSS.md

Lines changed: 22 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,31 @@ public sealed class GeneralClientOSS
2828

2929
### Example
3030

31+
| Description | Address |
32+
| --------------------------- | ------------------------------------------------------------ |
33+
| Address of code example | [Enter](https://github.com/GeneralLibrary/GeneralUpdate-Samples/tree/main/src/OSS) |
34+
| Hashing algorithm (sha256) | [Enter](https://github.com/GeneralLibrary/GeneralUpdate/blob/master/src/c%23/GeneralUpdate.Core/Pipeline/HashMiddleware.cs) |
35+
| Test script (oss_start.cmd) | [Enter](https://github.com/GeneralLibrary/GeneralUpdate-Samples/tree/main/src) |
36+
3137
#### OSS Process
3238

3339
![](imgs/oss_flow.png)
3440

3541
1. Prepare the version.json configuration file and update files (update.zip) just like in previous packaging methods.
3642

37-
![](imgs/oss_version_json.png)
43+
```json
44+
[
45+
{
46+
"PacketName": "packet_20250102230201638_1.0.0.1",
47+
"Hash": "ad1a85a9169ca0083ab54ba390e085c56b9059efc3ca8aa1ec9ed857683cc4b1",
48+
"Version": "1.0.0.1",
49+
"Url": "http://localhost:5000/packages/packet_20250102230201638_1.0.0.1.zip",
50+
"PubTime": "2025-01-02T23:48:21"
51+
}
52+
]
53+
```
54+
55+
3856

3957
2. When the Client starts, it directly requests the OSS server or file server to download the version.json file.
4058

@@ -50,6 +68,8 @@ public sealed class GeneralClientOSS
5068

5169
The following example defines methods, including the usage of GeneralClientOSS , GeneralUpdateOSS.
5270

71+
GeneralClientOSS :
72+
5373
```c#
5474
using System.Text;
5575
using GeneralUpdate.ClientCore;
@@ -67,7 +87,7 @@ var paramsOSS = new GlobalConfigInfoOSS
6787
await GeneralClientOSS.Start(paramsOSS, "OSSUpgradeSample.exe");
6888
```
6989

70-
90+
GeneralUpdateOSS :
7191

7292
```
7393
using GeneralUpdate.Core;
@@ -92,66 +112,6 @@ catch (Exception ex)
92112

93113

94114

95-
### Annotation
96-
97-
GeneralUpdateOSS provides the following capabilities.
98-
99-
#### Properties
100-
101-
| Properties | Description |
102-
| ---------- | ------------------------------------ |
103-
| ParamsOSS | OSS update configuration parameters. |
104-
105-
106-
107-
#### Methods
108-
109-
| Method | Description |
110-
| ------- | --------------------- |
111-
| Start() | Start the OSS update. |
112-
113-
114-
115-
### 🌴ParamsOSS
116-
117-
**Properties**
118-
119-
**Url** string: HTTP API server request address.
120-
121-
**AppName** string: Application name.
122-
123-
**CurrentVersion** string: Current version.
124-
125-
**VersionFileName** string: Version file name.
126-
127-
128-
129-
### 🌼Start()
130-
131-
**Method**
132-
133-
Start the OSS update.
134-
135-
```c#
136-
public static async Task Start(ParamsOSS configParams, string upgradeAppName = "GeneralUpdate.Upgrade");
137-
```
138-
139-
140-
141-
**Parameter Types**
142-
143-
ParamsOSS: Update configuration parameters, detailed content can be found in this document under 🌴ParamsOSS.
144-
145-
146-
147-
**Parameters**
148-
149-
**parameter** ParamsOSS: Update configuration parameters for the Android platform.
150-
151-
**upgradeAppName**: Name of the application to be upgraded.
152-
153-
154-
155115
### Applicable to
156116

157117
| Product | Version |

website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralClient.OSS.md

Lines changed: 24 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sidebar_position: 9
1212

1313
**OSS**
1414

15-
OSS的全称是对象存储服务(Object Storage Service),做服务端技术栈开发的小伙伴肯定对这个不陌生在 各大云服务器厂商都会提供类似的服务,说简单点就是一个文件服务器。例如:阿里云OSS、腾讯云COS、华 为云OBS,其实它们只是名字不一样功能服务都差不多。然后本更新组件新功能的实现思路非常相似那么就 选择了OSS来为该功能命名,而且方便开发者一眼能get到这个功能的作用(需要使用组件 GeneralUpdate.ClientCore、GeneralUpdate.Core)。
15+
OSS的全称是对象存储服务(Object Storage Service),做服务端技术栈开发的小伙伴肯定对这个不陌生在 各大云服务器厂商都会提供类似的服务,说简单点就是一个文件服务器。例如:阿里云OSS、腾讯云COS、华为云OBS,其实它们只是名字不一样功能服务都差不多。然后本更新组件新功能的实现思路非常相似那么就 选择了OSS来为该功能命名,而且方便开发者一眼能get到这个功能的作用(需要使用组件 GeneralUpdate.ClientCore、GeneralUpdate.Core)。
1616

1717

1818

@@ -28,13 +28,31 @@ public sealed class GeneralClientOSS
2828

2929
### 示例
3030

31+
| 说明 | 地址 |
32+
| ------------------------- | ------------------------------------------------------------ |
33+
| 代码示例地址 | [进入](https://github.com/GeneralLibrary/GeneralUpdate-Samples/tree/main/src/OSS) |
34+
| 哈希算法(sha256) | [进入](https://github.com/GeneralLibrary/GeneralUpdate/blob/master/src/c%23/GeneralUpdate.Core/Pipeline/HashMiddleware.cs) |
35+
| 测试脚本(oss_start.cmd) | [进入](https://github.com/GeneralLibrary/GeneralUpdate-Samples/tree/main/src) |
36+
37+
38+
3139
#### OSS流程
3240

3341
![](imgs/oss_flow.png)
3442

3543
1.准备version.json版本信息配置文件,更新文件(update.zip)更新文件和之前的打包方式一样。
3644

37-
![](imgs/oss_version_json.png)
45+
```json
46+
[
47+
{
48+
"PacketName": "packet_20250102230201638_1.0.0.1",
49+
"Hash": "ad1a85a9169ca0083ab54ba390e085c56b9059efc3ca8aa1ec9ed857683cc4b1",
50+
"Version": "1.0.0.1",
51+
"Url": "http://localhost:5000/packages/packet_20250102230201638_1.0.0.1.zip",
52+
"PubTime": "2025-01-02T23:48:21"
53+
}
54+
]
55+
```
3856

3957
2.Client启动时直接请求OSS服务器或文件服务器,下载version.json文件。
4058

@@ -50,6 +68,8 @@ public sealed class GeneralClientOSS
5068

5169
以下示例定义方法,包含GeneralClientOSS、GeneralUpdateOSS 使用示例:
5270

71+
GeneralClientOSS:
72+
5373
```c#
5474
using System.Text;
5575
using GeneralUpdate.ClientCore;
@@ -69,6 +89,8 @@ await GeneralClientOSS.Start(paramsOSS, "OSSUpgradeSample.exe");
6989

7090

7191

92+
GeneralUpdateOSS:
93+
7294
```
7395
using GeneralUpdate.Core;
7496
@@ -92,66 +114,6 @@ catch (Exception ex)
92114

93115

94116

95-
### 注解
96-
97-
GeneralUpdateOSS提供以下能力。
98-
99-
#### 属性
100-
101-
| Properties | |
102-
| ---------- | ----------------- |
103-
| ParamsOSS | OSS更新配置参数。 |
104-
105-
106-
107-
#### 方法
108-
109-
| Method | |
110-
| ------- | ------------- |
111-
| Start() | 启动OSS更新。 |
112-
113-
114-
115-
### 🌴ParamsOSS
116-
117-
**属性**
118-
119-
**Url** string http的api服务端请求地址。
120-
121-
**AppName** string 应用名称。
122-
123-
**CurrentVersion** string 当前版本。
124-
125-
**VersionFileName** string 版本文件名称。
126-
127-
128-
129-
### 🌼Start()
130-
131-
**方法**
132-
133-
启动OSS更新。
134-
135-
```c#
136-
public static async Task Start(ParamsOSS configParams, string upgradeAppName = "GeneralUpdate.Upgrade");
137-
```
138-
139-
140-
141-
**参数类型**
142-
143-
ParamsOSS 更新配置参数,详细内容参考本文档🌴ParamsOSS。
144-
145-
146-
147-
**参数**
148-
149-
**parameter** ParamsOSS 安卓平台的跟新配置参数。
150-
151-
**upgradeAppName** 需要升级的应用名称。
152-
153-
154-
155117
### 适用于
156118

157119
| 产品 | 版本 |

0 commit comments

Comments
 (0)