Some checks failed
Build docker and publish / prepare (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.admin image_name:ppanel-admin name:admin]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.api image_name:ppanel-api name:api]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.node image_name:ppanel-node name:node]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.queue image_name:ppanel-queue name:queue]) (push) Has been cancelled
Build docker and publish / build (map[dockerfile:deploy/Dockerfile.scheduler image_name:ppanel-scheduler name:scheduler]) (push) Has been cancelled
Build docker and publish / deploy (push) Has been cancelled
Build docker and publish / notify (push) Has been cancelled
62 lines
1.2 KiB
Plaintext
62 lines
1.2 KiB
Plaintext
syntax = "v1"
|
|
|
|
info (
|
|
title: "订阅管理"
|
|
)
|
|
|
|
type (
|
|
AdminSubscribeListReq {
|
|
Page int `form:"page,default=1"`
|
|
PageSize int `form:"page_size,default=20"`
|
|
}
|
|
|
|
AdminSubscribeResp {
|
|
Id int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Price int64 `json:"price"`
|
|
Traffic int64 `json:"traffic"`
|
|
Enable bool `json:"enable"`
|
|
}
|
|
|
|
AdminSubscribeListResp {
|
|
Total int64 `json:"total"`
|
|
List []AdminSubscribeResp `json:"list"`
|
|
}
|
|
|
|
CreateSubscribeReq {
|
|
Name string `json:"name"`
|
|
Price int64 `json:"price"`
|
|
Traffic int64 `json:"traffic"`
|
|
}
|
|
|
|
UpdateSubscribeReq {
|
|
Id int64 `path:"id"`
|
|
Name string `json:"name"`
|
|
Price int64 `json:"price"`
|
|
Traffic int64 `json:"traffic"`
|
|
}
|
|
|
|
DeleteSubscribeReq {
|
|
Id int64 `path:"id"`
|
|
}
|
|
)
|
|
|
|
@server (
|
|
prefix: /api/v1/admin/subscribe
|
|
group: subscribe
|
|
jwt: JwtAuth
|
|
)
|
|
service ppaneladmin {
|
|
@handler GetSubscribeListHandler
|
|
get /list (AdminSubscribeListReq) returns (AdminSubscribeListResp)
|
|
|
|
@handler CreateSubscribeHandler
|
|
post /create (CreateSubscribeReq) returns (AdminSubscribeResp)
|
|
|
|
@handler UpdateSubscribeHandler
|
|
put /:id (UpdateSubscribeReq)
|
|
|
|
@handler DeleteSubscribeHandler
|
|
delete /:id (DeleteSubscribeReq)
|
|
}
|