增加API文档注释

This commit is contained in:
刘祥超
2023-11-24 09:06:36 +08:00
parent 7c5c6267d4
commit 7dbf5add34
9 changed files with 102 additions and 102 deletions

View File

@@ -25,29 +25,29 @@ type User struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 用户ID
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // 用户名
Fullname string `protobuf:"bytes,3,opt,name=fullname,proto3" json:"fullname,omitempty"` // 全称
Mobile string `protobuf:"bytes,4,opt,name=mobile,proto3" json:"mobile,omitempty"` // 手机号码
Tel string `protobuf:"bytes,5,opt,name=tel,proto3" json:"tel,omitempty"` // 联系电话
Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` // 联系邮箱
VerifiedEmail string `protobuf:"bytes,20,opt,name=verifiedEmail,proto3" json:"verifiedEmail,omitempty"` // 已验证邮箱
VerifiedMobile string `protobuf:"bytes,23,opt,name=verifiedMobile,proto3" json:"verifiedMobile,omitempty"` // 已验证手机号码
Remark string `protobuf:"bytes,7,opt,name=remark,proto3" json:"remark,omitempty"`
IsOn bool `protobuf:"varint,8,opt,name=isOn,proto3" json:"isOn,omitempty"`
CreatedAt int64 `protobuf:"varint,9,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
RegisteredIP string `protobuf:"bytes,12,opt,name=registeredIP,proto3" json:"registeredIP,omitempty"`
IsVerified bool `protobuf:"varint,13,opt,name=isVerified,proto3" json:"isVerified,omitempty"`
IsRejected bool `protobuf:"varint,14,opt,name=isRejected,proto3" json:"isRejected,omitempty"`
RejectReason string `protobuf:"bytes,15,opt,name=rejectReason,proto3" json:"rejectReason,omitempty"`
IsDeleted bool `protobuf:"varint,16,opt,name=isDeleted,proto3" json:"isDeleted,omitempty"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 用户ID
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // 用户名
Fullname string `protobuf:"bytes,3,opt,name=fullname,proto3" json:"fullname,omitempty"` // 全称
Mobile string `protobuf:"bytes,4,opt,name=mobile,proto3" json:"mobile,omitempty"` // 手机号码
Tel string `protobuf:"bytes,5,opt,name=tel,proto3" json:"tel,omitempty"` // 联系电话
Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` // 联系邮箱
VerifiedEmail string `protobuf:"bytes,20,opt,name=verifiedEmail,proto3" json:"verifiedEmail,omitempty"` // 已验证邮箱
VerifiedMobile string `protobuf:"bytes,23,opt,name=verifiedMobile,proto3" json:"verifiedMobile,omitempty"` // 已验证手机号码
Remark string `protobuf:"bytes,7,opt,name=remark,proto3" json:"remark,omitempty"` // 备注
IsOn bool `protobuf:"varint,8,opt,name=isOn,proto3" json:"isOn,omitempty"` // 是否启用
CreatedAt int64 `protobuf:"varint,9,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // 创建时间
RegisteredIP string `protobuf:"bytes,12,opt,name=registeredIP,proto3" json:"registeredIP,omitempty"` // 注册IP
IsVerified bool `protobuf:"varint,13,opt,name=isVerified,proto3" json:"isVerified,omitempty"` // 是否已实名认证
IsRejected bool `protobuf:"varint,14,opt,name=isRejected,proto3" json:"isRejected,omitempty"` // 实名认证是否已拒绝
RejectReason string `protobuf:"bytes,15,opt,name=rejectReason,proto3" json:"rejectReason,omitempty"` // 实名认证拒绝理由
IsDeleted bool `protobuf:"varint,16,opt,name=isDeleted,proto3" json:"isDeleted,omitempty"` // 是否已删除
IsIndividualIdentified bool `protobuf:"varint,17,opt,name=isIndividualIdentified,proto3" json:"isIndividualIdentified,omitempty"` // 是否已通过个人验证
IsEnterpriseIdentified bool `protobuf:"varint,18,opt,name=isEnterpriseIdentified,proto3" json:"isEnterpriseIdentified,omitempty"` // 是否已通过企业验证
BandwidthAlgo string `protobuf:"bytes,21,opt,name=bandwidthAlgo,proto3" json:"bandwidthAlgo,omitempty"` // 带宽算法
Lang string `protobuf:"bytes,22,opt,name=lang,proto3" json:"lang,omitempty"` // 语言代号
OtpLogin *Login `protobuf:"bytes,19,opt,name=otpLogin,proto3" json:"otpLogin,omitempty"` // OTP认证
NodeCluster *NodeCluster `protobuf:"bytes,10,opt,name=nodeCluster,proto3" json:"nodeCluster,omitempty"`
Features []*UserFeature `protobuf:"bytes,11,rep,name=features,proto3" json:"features,omitempty"`
NodeCluster *NodeCluster `protobuf:"bytes,10,opt,name=nodeCluster,proto3" json:"nodeCluster,omitempty"` // 集群信息
Features []*UserFeature `protobuf:"bytes,11,rep,name=features,proto3" json:"features,omitempty"` // 开通功能
}
func (x *User) Reset() {

View File

@@ -25,11 +25,11 @@ type UserAccount struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"`
Total float64 `protobuf:"fixed64,3,opt,name=total,proto3" json:"total,omitempty"`
TotalFrozen float64 `protobuf:"fixed64,4,opt,name=totalFrozen,proto3" json:"totalFrozen,omitempty"`
User *User `protobuf:"bytes,30,opt,name=user,proto3" json:"user,omitempty"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 账户ID
UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
Total float64 `protobuf:"fixed64,3,opt,name=total,proto3" json:"total,omitempty"` // 总可用余额
TotalFrozen float64 `protobuf:"fixed64,4,opt,name=totalFrozen,proto3" json:"totalFrozen,omitempty"` // 总冻结余额
User *User `protobuf:"bytes,30,opt,name=user,proto3" json:"user,omitempty"` // 用户信息
}
func (x *UserAccount) Reset() {

View File

@@ -89,7 +89,7 @@ type CreateReverseProxyResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"`
ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` // 反向代理ID
}
func (x *CreateReverseProxyResponse) Reset() {
@@ -137,7 +137,7 @@ type FindEnabledReverseProxyRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"`
ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` // 反向代理ID
}
func (x *FindEnabledReverseProxyRequest) Reset() {
@@ -184,7 +184,7 @@ type FindEnabledReverseProxyResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ReverseProxy *ReverseProxy `protobuf:"bytes,1,opt,name=reverseProxy,proto3" json:"reverseProxy,omitempty"`
ReverseProxy *ReverseProxy `protobuf:"bytes,1,opt,name=reverseProxy,proto3" json:"reverseProxy,omitempty"` // 反向代理信息
}
func (x *FindEnabledReverseProxyResponse) Reset() {
@@ -232,7 +232,7 @@ type FindEnabledReverseProxyConfigRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"`
ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` // 反向代理ID
}
func (x *FindEnabledReverseProxyConfigRequest) Reset() {
@@ -279,7 +279,7 @@ type FindEnabledReverseProxyConfigResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ReverseProxyJSON []byte `protobuf:"bytes,1,opt,name=reverseProxyJSON,proto3" json:"reverseProxyJSON,omitempty"`
ReverseProxyJSON []byte `protobuf:"bytes,1,opt,name=reverseProxyJSON,proto3" json:"reverseProxyJSON,omitempty"` // 反向代理配置
}
func (x *FindEnabledReverseProxyConfigResponse) Reset() {
@@ -327,8 +327,8 @@ type UpdateReverseProxySchedulingRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"`
SchedulingJSON []byte `protobuf:"bytes,2,opt,name=schedulingJSON,proto3" json:"schedulingJSON,omitempty"`
ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` // 反向代理ID
SchedulingJSON []byte `protobuf:"bytes,2,opt,name=schedulingJSON,proto3" json:"schedulingJSON,omitempty"` // 调度配置 @link json:scheduling
}
func (x *UpdateReverseProxySchedulingRequest) Reset() {
@@ -383,8 +383,8 @@ type UpdateReverseProxyPrimaryOriginsRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"`
OriginsJSON []byte `protobuf:"bytes,2,opt,name=originsJSON,proto3" json:"originsJSON,omitempty"`
ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` // 反向代理ID
OriginsJSON []byte `protobuf:"bytes,2,opt,name=originsJSON,proto3" json:"originsJSON,omitempty"` // 源站配置 @link json:origin_refs
}
func (x *UpdateReverseProxyPrimaryOriginsRequest) Reset() {
@@ -439,8 +439,8 @@ type UpdateReverseProxyBackupOriginsRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"`
OriginsJSON []byte `protobuf:"bytes,2,opt,name=originsJSON,proto3" json:"originsJSON,omitempty"`
ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` // 反向代理ID
OriginsJSON []byte `protobuf:"bytes,2,opt,name=originsJSON,proto3" json:"originsJSON,omitempty"` // 源站配置 @link json:origin_refs
}
func (x *UpdateReverseProxyBackupOriginsRequest) Reset() {

View File

@@ -26,7 +26,7 @@ type CountUserAccountsRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"`
Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` // 关键词
}
func (x *CountUserAccountsRequest) Reset() {
@@ -74,7 +74,7 @@ type ListUserAccountsRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"`
Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` // 关键词
Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
}
@@ -137,7 +137,7 @@ type ListUserAccountsResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserAccounts []*UserAccount `protobuf:"bytes,1,rep,name=userAccounts,proto3" json:"userAccounts,omitempty"`
UserAccounts []*UserAccount `protobuf:"bytes,1,rep,name=userAccounts,proto3" json:"userAccounts,omitempty"` // 用户账户列表
}
func (x *ListUserAccountsResponse) Reset() {
@@ -185,7 +185,7 @@ type FindEnabledUserAccountWithUserIdRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
}
func (x *FindEnabledUserAccountWithUserIdRequest) Reset() {
@@ -232,7 +232,7 @@ type FindEnabledUserAccountWithUserIdResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserAccount *UserAccount `protobuf:"bytes,1,opt,name=userAccount,proto3" json:"userAccount,omitempty"`
UserAccount *UserAccount `protobuf:"bytes,1,opt,name=userAccount,proto3" json:"userAccount,omitempty"` // 用户账户
}
func (x *FindEnabledUserAccountWithUserIdResponse) Reset() {
@@ -280,7 +280,7 @@ type FindEnabledUserAccountRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserAccountId int64 `protobuf:"varint,1,opt,name=userAccountId,proto3" json:"userAccountId,omitempty"`
UserAccountId int64 `protobuf:"varint,1,opt,name=userAccountId,proto3" json:"userAccountId,omitempty"` // 用户账户ID
}
func (x *FindEnabledUserAccountRequest) Reset() {
@@ -327,7 +327,7 @@ type FindEnabledUserAccountResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserAccount *UserAccount `protobuf:"bytes,1,opt,name=userAccount,proto3" json:"userAccount,omitempty"`
UserAccount *UserAccount `protobuf:"bytes,1,opt,name=userAccount,proto3" json:"userAccount,omitempty"` // 用户账户
}
func (x *FindEnabledUserAccountResponse) Reset() {
@@ -375,11 +375,11 @@ type UpdateUserAccountRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserAccountId int64 `protobuf:"varint,1,opt,name=userAccountId,proto3" json:"userAccountId,omitempty"`
Delta float64 `protobuf:"fixed64,2,opt,name=delta,proto3" json:"delta,omitempty"`
EventType string `protobuf:"bytes,3,opt,name=eventType,proto3" json:"eventType,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
ParamsJSON []byte `protobuf:"bytes,5,opt,name=paramsJSON,proto3" json:"paramsJSON,omitempty"`
UserAccountId int64 `protobuf:"varint,1,opt,name=userAccountId,proto3" json:"userAccountId,omitempty"` // 用户账户ID非用户ID
Delta float64 `protobuf:"fixed64,2,opt,name=delta,proto3" json:"delta,omitempty"` // 操作的数值,正值表示增加,负值表示减少
EventType string `protobuf:"bytes,3,opt,name=eventType,proto3" json:"eventType,omitempty"` // 事件类型charge, award, buyPlan, payBill, refund, withdraw, buyNSPlan, buyTrafficPackage, buyAntiDDoSPackage, renewAntiDDoSPackage
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // 描述
ParamsJSON []byte `protobuf:"bytes,5,opt,name=paramsJSON,proto3" json:"paramsJSON,omitempty"` // 相关参数
}
func (x *UpdateUserAccountRequest) Reset() {