Skip to content

Commit 342c28b

Browse files
committed
feat: beta sub
1 parent d1adcde commit 342c28b

File tree

5 files changed

+172
-87
lines changed

5 files changed

+172
-87
lines changed

api/installer/openapi.yaml

+64-4
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ paths:
8181
$ref: "#/components/responses/ResponseNotFound"
8282
"500":
8383
$ref: "#/components/responses/ResponseInternalServerError"
84-
84+
8585
/install:
8686
get:
8787
summary: Get the Info of the installation. such as install package path
@@ -108,7 +108,7 @@ paths:
108108
$ref: "#/components/responses/StatusOK"
109109
"500":
110110
$ref: "#/components/responses/ResponseInternalServerError"
111-
111+
112112
/reset:
113113
put:
114114
deprecated: true
@@ -123,6 +123,43 @@ paths:
123123
"500":
124124
$ref: "#/components/responses/ResponseInternalServerError"
125125

126+
/beta-subscription:
127+
get:
128+
tags:
129+
- Common methods
130+
summary: Get beta subscription status
131+
description: |-
132+
Get beta subscription status.
133+
operationId: getBetaSubscriptionStatus
134+
responses:
135+
"200":
136+
$ref: "#/components/responses/GetBetaSubscriptionStatusOK"
137+
"500":
138+
$ref: "#/components/responses/ResponseInternalServerError"
139+
put:
140+
tags:
141+
- Common methods
142+
summary: Enable or disable beta subscription
143+
description: |-
144+
Enable or disable beta subscription.
145+
operationId: setBetaSubscriptionStatus
146+
parameters:
147+
- name: status
148+
in: query
149+
description: beta subscription status
150+
required: true
151+
schema:
152+
type: string
153+
enum:
154+
- enable
155+
- disable
156+
example: "enable"
157+
responses:
158+
"200":
159+
$ref: "#/components/responses/ResponseOK"
160+
"500":
161+
$ref: "#/components/responses/ResponseInternalServerError"
162+
126163
/web/notice:
127164
get:
128165
summary: Get the notice info of Update Info
@@ -134,8 +171,8 @@ paths:
134171
"200":
135172
$ref: "#/components/responses/NoticeInfoOK"
136173
"500":
137-
$ref: "#/components/responses/ResponseInternalServerError"
138-
174+
$ref: "#/components/responses/ResponseInternalServerError"
175+
139176
components:
140177
securitySchemes:
141178
access_token:
@@ -234,6 +271,17 @@ components:
234271
- properties:
235272
data:
236273
$ref: "#/components/schemas/NoticeInfoOKData"
274+
275+
GetBetaSubscriptionStatusOK:
276+
description: OK
277+
content:
278+
application/json:
279+
schema:
280+
allOf:
281+
- $ref: "#/components/schemas/BaseResponse"
282+
- properties:
283+
data:
284+
$ref: "#/components/schemas/Beta"
237285
schemas:
238286
BaseResponse:
239287
properties:
@@ -343,3 +391,15 @@ components:
343391
short:
344392
type: string
345393
example: gateway
394+
395+
Beta:
396+
readOnly: true
397+
required:
398+
- status
399+
properties:
400+
status:
401+
type: string
402+
enum:
403+
- enabled
404+
- disabled
405+
example: "enable"

go.mod

+10-24
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
module github.com/IceWhaleTech/CasaOS-Installer
22

3-
go 1.20
3+
go 1.21
44

55
require (
6-
github.com/IceWhaleTech/CasaOS-Common v0.4.8-alpha3
6+
github.com/IceWhaleTech/CasaOS-Common v0.4.10
77
github.com/Masterminds/semver/v3 v3.2.1
88
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
99
github.com/deepmap/oapi-codegen v1.12.4
1010
github.com/fsnotify/fsnotify v1.6.0
1111
github.com/getkin/kin-openapi v0.117.0
1212
github.com/hashicorp/go-getter v1.7.5
13-
github.com/labstack/echo/v4 v4.11.4
13+
github.com/labstack/echo/v4 v4.12.0
1414
github.com/oapi-codegen/runtime v1.1.1
1515
github.com/robfig/cron/v3 v3.0.1
1616
github.com/samber/lo v1.38.1
@@ -25,19 +25,22 @@ require (
2525
require (
2626
cloud.google.com/go/compute/metadata v0.2.3 // indirect
2727
github.com/benbjohnson/clock v1.3.1 // indirect
28-
github.com/chenzhuoyu/iasm v0.9.0 // indirect
2928
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
30-
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
3129
github.com/go-ole/go-ole v1.2.6 // indirect
3230
github.com/godbus/dbus/v5 v5.1.0 // indirect
3331
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
32+
github.com/golang-jwt/jwt/v5 v5.0.0 // indirect
33+
github.com/google/safetext v0.0.0-20240104143208-7a7d9b3d812f // indirect
3434
github.com/gorilla/mux v1.8.0 // indirect
35-
github.com/kr/pretty v0.3.1 // indirect
35+
github.com/labstack/echo-jwt/v4 v4.2.0 // indirect
3636
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
37-
github.com/rogpeppe/go-internal v1.10.0 // indirect
37+
github.com/tidwall/gjson v1.17.0 // indirect
38+
github.com/tidwall/match v1.1.1 // indirect
39+
github.com/tidwall/pretty v1.2.0 // indirect
3840
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect
3941
github.com/yusufpapurcu/wmi v1.2.4 // indirect
4042
golang.org/x/time v0.8.0 // indirect
43+
mvdan.cc/sh/v3 v3.7.0 // indirect
4144
)
4245

4346
require (
@@ -49,19 +52,11 @@ require (
4952
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
5053
github.com/aws/aws-sdk-go v1.44.218 // indirect
5154
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
52-
github.com/bytedance/sonic v1.10.0-rc3 // indirect
53-
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
5455
github.com/davecgh/go-spew v1.1.1 // indirect
5556
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect
56-
github.com/gin-contrib/sse v0.1.0 // indirect
57-
github.com/gin-gonic/gin v1.9.1 // indirect
5857
github.com/go-openapi/jsonpointer v0.19.6 // indirect
5958
github.com/go-openapi/swag v0.22.3 // indirect
60-
github.com/go-playground/locales v0.14.1 // indirect
61-
github.com/go-playground/universal-translator v0.18.1 // indirect
62-
github.com/go-playground/validator/v10 v10.14.1 // indirect
6359
github.com/go-resty/resty/v2 v2.7.0
64-
github.com/goccy/go-json v0.10.2 // indirect
6560
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
6661
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
6762
github.com/golang/protobuf v1.5.3 // indirect
@@ -78,36 +73,27 @@ require (
7873
github.com/invopop/yaml v0.2.0 // indirect
7974
github.com/jmespath/go-jmespath v0.4.0 // indirect
8075
github.com/josharian/intern v1.0.0 // indirect
81-
github.com/json-iterator/go v1.1.12 // indirect
8276
github.com/klauspost/compress v1.16.7 // indirect
83-
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
8477
github.com/klauspost/pgzip v1.2.5 // indirect
8578
github.com/labstack/gommon v0.4.2 // indirect
86-
github.com/leodido/go-urn v1.2.4 // indirect
8779
github.com/mailru/easyjson v0.7.7 // indirect
8880
github.com/mattn/go-colorable v0.1.13 // indirect
8981
github.com/mattn/go-isatty v0.0.20 // indirect
9082
github.com/mholt/archiver/v3 v3.5.1 // indirect
9183
github.com/mitchellh/go-homedir v1.1.0 // indirect
9284
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
93-
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
94-
github.com/modern-go/reflect2 v1.0.2 // indirect
9585
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
9686
github.com/nwaples/rardecode v1.1.3 // indirect
97-
github.com/pelletier/go-toml/v2 v2.0.9 // indirect
9887
github.com/perimeterx/marshmallow v1.1.4 // indirect
9988
github.com/pierrec/lz4/v4 v4.1.17 // indirect
10089
github.com/pmezard/go-difflib v1.0.0 // indirect
101-
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
102-
github.com/ugorji/go/codec v1.2.11 // indirect
10390
github.com/ulikunitz/xz v0.5.11 // indirect
10491
github.com/valyala/bytebufferpool v1.0.0 // indirect
10592
github.com/valyala/fasttemplate v1.2.2 // indirect
10693
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
10794
go.opencensus.io v0.24.0 // indirect
10895
go.uber.org/atomic v1.10.0 // indirect
10996
go.uber.org/multierr v1.11.0 // indirect
110-
golang.org/x/arch v0.4.0 // indirect
11197
golang.org/x/crypto v0.31.0 // indirect
11298
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect
11399
golang.org/x/net v0.32.0 // indirect

0 commit comments

Comments
 (0)