Compare commits
180 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca8226fe9d | ||
|
|
a6395b34a3 | ||
|
|
97f56c7bb1 | ||
|
|
c0856d3b46 | ||
|
|
4e80f62837 | ||
|
|
753552d4a4 | ||
|
|
1f7e60d062 | ||
|
|
9dc9cdb28f | ||
|
|
90bba69ee5 | ||
|
|
498f388cf2 | ||
|
|
8adb09b95f | ||
|
|
521eee5f2f | ||
|
|
caf544eff1 | ||
|
|
c9ae3df3d3 | ||
|
|
3485db9a4a | ||
|
|
1b368ee490 | ||
|
|
9ec79adac6 | ||
|
|
c3e43503a0 | ||
|
|
eb5d47935c | ||
|
|
5521c42cb6 | ||
|
|
226e91a106 | ||
|
|
917f8d76a1 | ||
|
|
cfc1a7461c | ||
|
|
67941b5379 | ||
|
|
e35caae373 | ||
|
|
ad84614b2e | ||
|
|
32c89d3ae7 | ||
|
|
22bf132efb | ||
|
|
67aafeee30 | ||
|
|
033a3a624d | ||
|
|
8d067b6efc | ||
|
|
602a89602e | ||
|
|
0036b0730b | ||
|
|
4b0fe4b78d | ||
|
|
ca580e820b | ||
|
|
9681b29f2c | ||
|
|
b2224aa4ae | ||
|
|
fad1c3c6ae | ||
|
|
995acfe133 | ||
|
|
9b943f7f03 | ||
|
|
d43cbc4f90 | ||
|
|
914070f7cc | ||
|
|
46dc42ffe3 | ||
|
|
e938bb34f1 | ||
|
|
3ad6c00956 | ||
|
|
e6efbacb98 | ||
|
|
37e05101be | ||
|
|
a6830af28e | ||
|
|
65973c65ac | ||
|
|
01890aa83d | ||
|
|
34f33a0979 | ||
|
|
dd3b6b0fe8 | ||
|
|
4c7618f623 | ||
|
|
c73a05eceb | ||
|
|
f4a690a5c3 | ||
|
|
866697ddd0 | ||
|
|
22b945ec40 | ||
|
|
d835b36660 | ||
|
|
b375a40340 | ||
|
|
a068ce9a4f | ||
|
|
4379acbeea | ||
|
|
a086496d7c | ||
|
|
7d80c58871 | ||
|
|
0933ae903b | ||
|
|
727ac23e17 | ||
|
|
99acf99a48 | ||
|
|
23db1c4b77 | ||
|
|
d03775957e | ||
|
|
ec166af0c3 | ||
|
|
be29ba72a0 | ||
|
|
ce72dcf4dc | ||
|
|
c024049778 | ||
|
|
0863912e0c | ||
|
|
b19c7f5aa6 | ||
|
|
f5bdf33618 | ||
|
|
c6face62b1 | ||
|
|
d3c8d8fd04 | ||
|
|
16e418447a | ||
|
|
c77724cf9e | ||
|
|
606a73f6dd | ||
|
|
f48a441f23 | ||
|
|
8d55c38459 | ||
|
|
37e045876e | ||
|
|
bd5a1c5eda | ||
|
|
bd4cc6f5f5 | ||
|
|
d417f6f751 | ||
|
|
d48697f4ce | ||
|
|
841a98349d | ||
|
|
24d710d39c | ||
|
|
1ed754f285 | ||
|
|
243ceab3db | ||
|
|
eaca98ee3e | ||
|
|
11b0a12304 | ||
|
|
ce7911c3fe | ||
|
|
44a3952f05 | ||
|
|
a8340b8a8a | ||
|
|
b4f56c044c | ||
|
|
8b2088d498 | ||
|
|
e7bf608552 | ||
|
|
2c06c8932d | ||
|
|
789aeab579 | ||
|
|
a95d202ef0 | ||
|
|
64f54d462e | ||
|
|
52a20b9915 | ||
|
|
69ab70b750 | ||
|
|
890296c88b | ||
|
|
e5ba474419 | ||
|
|
0f7482511e | ||
|
|
ea58e6094c | ||
|
|
4d5fd28f97 | ||
|
|
7a139b43a9 | ||
|
|
0d1108387d | ||
|
|
e67af97487 | ||
|
|
629a2a5a8e | ||
|
|
884776fb85 | ||
|
|
f0e9b5c7e1 | ||
|
|
3849b651af | ||
|
|
4d550577ee | ||
|
|
b3e64f7241 | ||
|
|
f315b7b1d6 | ||
|
|
2de1a8aa4e | ||
|
|
cb3bf14df8 | ||
|
|
1d66029ef0 | ||
|
|
b795f60672 | ||
|
|
76e98174ee | ||
|
|
18765d29f2 | ||
|
|
9a38d40937 | ||
|
|
43ad1ff67e | ||
|
|
9f4e838f1d | ||
|
|
e95909e293 | ||
|
|
759189bca1 | ||
|
|
3dd24dc5e7 | ||
|
|
156172dacf | ||
|
|
b6e0740b27 | ||
|
|
57f3c72058 | ||
|
|
a9789c2f22 | ||
|
|
ca02782ba5 | ||
|
|
1e75f61464 | ||
|
|
e98de100b9 | ||
|
|
387ee8d9c9 | ||
|
|
a5af5e0597 | ||
|
|
9af8721d8d | ||
|
|
0d8c8064bf | ||
|
|
010a9b61d5 | ||
|
|
b277af4ac2 | ||
|
|
b85016d6c9 | ||
|
|
10ea8911bc | ||
|
|
fbfcc8d2c0 | ||
|
|
11c2682f59 | ||
|
|
8a005850db | ||
|
|
a0acc54565 | ||
|
|
8234d0301f | ||
|
|
59de46d34f | ||
|
|
0dcdde06e0 | ||
|
|
b9b7ca4c41 | ||
|
|
5244b53270 | ||
|
|
dd460bc40d | ||
|
|
d9fb6a2c84 | ||
|
|
c05072d12e | ||
|
|
caba96bfeb | ||
|
|
a36344f3bb | ||
|
|
5db4568d7e | ||
|
|
4e219b09e0 | ||
|
|
1d7986289d | ||
|
|
710ec09b14 | ||
|
|
324d24fe5a | ||
|
|
0f060002e3 | ||
|
|
2eb19348cc | ||
|
|
a92d8887e3 | ||
|
|
f914802b06 | ||
|
|
a2f21e8d58 | ||
|
|
cf4b9a49ed | ||
|
|
da02e6df4a | ||
|
|
a092f496dd | ||
|
|
98ad80e1cb | ||
|
|
6ed4e2315f | ||
|
|
55ce6570f8 | ||
|
|
70fa03e93b | ||
|
|
8fe1480d8d | ||
|
|
f796dc5921 |
@@ -14,6 +14,7 @@ pkg/
|
||||
userconfigs - 用户相关配置
|
||||
|
||||
configutils/ - 配置公共函数等
|
||||
iplibrary/ - IP库
|
||||
errors/ - 错误处理
|
||||
rpc/ - RPC通讯
|
||||
protos/ RPC数据和接口定义
|
||||
|
||||
18152
build/rpc.json
18152
build/rpc.json
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -111,6 +112,9 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
// 排序以保证输出内容的稳定性
|
||||
sort.Strings(rootDirs)
|
||||
|
||||
for _, rootDir := range rootDirs {
|
||||
files, err := filepath.Glob(rootDir + "/service_*.go")
|
||||
if err != nil {
|
||||
@@ -118,6 +122,9 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
// 排序以保证输出内容的稳定性
|
||||
sort.Strings(files)
|
||||
|
||||
var methodNameReg = regexp.MustCompile(`func\s*\(\w+\s+\*\s*(\w+Service)\)\s*(\w+)\s*\(`) // $1: serviceName, $2 methodName
|
||||
for _, file := range files {
|
||||
data, err := os.ReadFile(file)
|
||||
@@ -154,13 +161,36 @@ func main() {
|
||||
roles = append(roles, "node")
|
||||
}
|
||||
if strings.Contains(methodSource, ".ValidateUserNode(") {
|
||||
roles = append(roles, "user")
|
||||
var hasRoles = false
|
||||
var wordIndex = strings.Index(methodSource, ".ValidateUserNode(")
|
||||
if wordIndex > 0 {
|
||||
if len(methodSource[wordIndex:]) > 100 {
|
||||
if strings.Contains(methodSource[wordIndex:wordIndex+100], ".ValidateUserNode(ctx, false)") {
|
||||
hasRoles = true
|
||||
}
|
||||
}
|
||||
if !hasRoles {
|
||||
roles = append(roles, "user")
|
||||
}
|
||||
}
|
||||
}
|
||||
if strings.Contains(methodSource, ".ValidateAdmin(") {
|
||||
roles = append(roles, "admin")
|
||||
}
|
||||
if strings.Contains(methodSource, ".ValidateAdminAndUser(") {
|
||||
roles = append(roles, "admin", "user")
|
||||
var hasRoles = false
|
||||
var wordIndex = strings.Index(methodSource, ".ValidateAdminAndUser(")
|
||||
if wordIndex > 0 {
|
||||
if len(methodSource[wordIndex:]) > 100 {
|
||||
if strings.Contains(methodSource[wordIndex:wordIndex+100], ".ValidateAdminAndUser(ctx, false)") {
|
||||
roles = append(roles, "admin")
|
||||
hasRoles = true
|
||||
}
|
||||
}
|
||||
if !hasRoles {
|
||||
roles = append(roles, "admin", "user")
|
||||
}
|
||||
}
|
||||
}
|
||||
if strings.Contains(methodSource, ".ValidateNSNode(") {
|
||||
roles = append(roles, "dns")
|
||||
@@ -211,6 +241,9 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
// 排序以保持稳定性
|
||||
sort.Strings(files)
|
||||
|
||||
for _, path := range files {
|
||||
func(path string) {
|
||||
var filename = filepath.Base(path)
|
||||
@@ -362,6 +395,9 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
// 排序以保持稳定性
|
||||
sort.Strings(files)
|
||||
|
||||
for _, path := range files {
|
||||
func(path string) {
|
||||
var name = strings.TrimSuffix(filepath.Base(path), ".md")
|
||||
@@ -381,6 +417,11 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
// 对消息进行排序,以保持稳定性
|
||||
sort.Slice(messages, func(i, j int) bool {
|
||||
return messages[i].Name < messages[j].Name
|
||||
})
|
||||
|
||||
var rpcList = &RPCList{
|
||||
Services: services,
|
||||
Messages: messages,
|
||||
|
||||
6
go.mod
6
go.mod
@@ -5,14 +5,14 @@ go 1.18
|
||||
require (
|
||||
github.com/golang/protobuf v1.5.2
|
||||
github.com/iwind/TeaGo v0.0.0-20220304043459-0dd944a5b475
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f
|
||||
golang.org/x/net v0.8.0
|
||||
google.golang.org/grpc v1.45.0
|
||||
google.golang.org/protobuf v1.27.1
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
|
||||
)
|
||||
|
||||
require (
|
||||
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/sys v0.6.0 // indirect
|
||||
golang.org/x/text v0.8.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e // indirect
|
||||
)
|
||||
|
||||
16
go.sum
16
go.sum
@@ -113,8 +113,10 @@ golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=
|
||||
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
|
||||
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
|
||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@@ -136,15 +138,17 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 h1:OH54vjqzRWmbJ62fjuhxy7AxFFgoHN0/DPc/UrL8cAs=
|
||||
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
|
||||
@@ -50,8 +50,8 @@ func MatchDomain(pattern string, domain string) (isMatched bool) {
|
||||
}
|
||||
|
||||
// 其他匹配
|
||||
patternPieces := strings.Split(pattern, ".")
|
||||
domainPieces := strings.Split(domain, ".")
|
||||
var patternPieces = strings.Split(pattern, ".")
|
||||
var domainPieces = strings.Split(domain, ".")
|
||||
if len(patternPieces) != len(domainPieces) {
|
||||
return
|
||||
}
|
||||
@@ -60,6 +60,15 @@ func MatchDomain(pattern string, domain string) (isMatched bool) {
|
||||
if patternPiece == "" || patternPiece == "*" || patternPiece == domainPieces[index] {
|
||||
continue
|
||||
}
|
||||
if strings.HasSuffix(patternPiece, ":*") {
|
||||
var portIndex = strings.LastIndex(patternPiece, ":*")
|
||||
if portIndex >= 0 {
|
||||
var prefix = patternPiece[:portIndex]
|
||||
if strings.HasPrefix(domainPieces[index], prefix+":") || domainPieces[index] == prefix {
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
isMatched = false
|
||||
break
|
||||
}
|
||||
|
||||
@@ -6,86 +6,110 @@ import (
|
||||
)
|
||||
|
||||
func TestMatchDomain(t *testing.T) {
|
||||
a := assert.NewAssertion(t)
|
||||
var a = assert.NewAssertion(t)
|
||||
{
|
||||
ok := MatchDomains([]string{}, "example.com")
|
||||
var ok = MatchDomains([]string{}, "example.com")
|
||||
a.IsFalse(ok)
|
||||
}
|
||||
|
||||
{
|
||||
ok := MatchDomains([]string{"example.com"}, "example.com")
|
||||
var ok = MatchDomains([]string{"example.com"}, "example.com")
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
|
||||
{
|
||||
ok := MatchDomains([]string{"www.example.com"}, "example.com")
|
||||
var ok = MatchDomains([]string{"www.example.com"}, "example.com")
|
||||
a.IsFalse(ok)
|
||||
}
|
||||
|
||||
{
|
||||
ok := MatchDomains([]string{".example.com"}, "www.example.com")
|
||||
var ok = MatchDomains([]string{".example.com"}, "www.example.com")
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
|
||||
{
|
||||
ok := MatchDomains([]string{".example.com"}, "a.www.example.com")
|
||||
var ok = MatchDomains([]string{".example.com"}, "a.www.example.com")
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
|
||||
{
|
||||
ok := MatchDomains([]string{".example.com"}, "a.www.example123.com")
|
||||
var ok = MatchDomains([]string{".example.com"}, "a.www.example123.com")
|
||||
a.IsFalse(ok)
|
||||
}
|
||||
|
||||
{
|
||||
ok := MatchDomains([]string{"*.example.com"}, "www.example.com")
|
||||
var ok = MatchDomains([]string{"*.example.com"}, "www.example.com")
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
|
||||
{
|
||||
ok := MatchDomains([]string{"*.*.com"}, "www.example.com")
|
||||
var ok = MatchDomains([]string{"*.*.com"}, "www.example.com")
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
|
||||
{
|
||||
ok := MatchDomains([]string{"www.*.com"}, "www.example.com")
|
||||
var ok = MatchDomains([]string{"www.*.com"}, "www.example.com")
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
|
||||
{
|
||||
ok := MatchDomains([]string{"gallery.*.com"}, "www.example.com")
|
||||
var ok = MatchDomains([]string{"gallery.*.com"}, "www.example.com")
|
||||
a.IsFalse(ok)
|
||||
}
|
||||
|
||||
{
|
||||
ok := MatchDomains([]string{"~\\w+.example.com"}, "www.example.com")
|
||||
var ok = MatchDomains([]string{"~\\w+.example.com"}, "www.example.com")
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
|
||||
{
|
||||
ok := MatchDomains([]string{"~\\w+.example.com"}, "a.www.example.com")
|
||||
var ok = MatchDomains([]string{"~\\w+.example.com"}, "a.www.example.com")
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
|
||||
{
|
||||
ok := MatchDomains([]string{"~^\\d+.example.com$"}, "www.example.com")
|
||||
var ok = MatchDomains([]string{"~^\\d+.example.com$"}, "www.example.com")
|
||||
a.IsFalse(ok)
|
||||
}
|
||||
|
||||
{
|
||||
ok := MatchDomains([]string{"~^\\d+.example.com$"}, "123.example.com")
|
||||
var ok = MatchDomains([]string{"~^\\d+.example.com$"}, "123.example.com")
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
{
|
||||
ok := MatchDomains([]string{"*"}, "example.com")
|
||||
var ok = MatchDomains([]string{"*"}, "example.com")
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
|
||||
// port
|
||||
{
|
||||
ok := MatchDomains([]string{"example.com:8001"}, "example.com:8001")
|
||||
var ok = MatchDomains([]string{"example.com:8001"}, "example.com:8001")
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
{
|
||||
var ok = MatchDomains([]string{"example.com:8002"}, "example.com:8001")
|
||||
a.IsFalse(ok)
|
||||
}
|
||||
{
|
||||
var ok = MatchDomains([]string{"*.example.com:8001"}, "a.example.com:8001")
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
{
|
||||
var ok = MatchDomains([]string{"a.example.com:*"}, "a.example.com:8001")
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
{
|
||||
var ok = MatchDomains([]string{"a.example.com:*"}, "a.example.com")
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
{
|
||||
var ok = MatchDomains([]string{"*.example.com:*"}, "a.example.com:8001")
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
{
|
||||
var ok = MatchDomains([]string{"*.example.com:8002"}, "a.example.com:8001")
|
||||
a.IsFalse(ok)
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsSpecialDomain(t *testing.T) {
|
||||
|
||||
@@ -55,11 +55,13 @@ func BenchmarkParseVariables(b *testing.B) {
|
||||
|
||||
b.ResetTimer()
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
_ = ParseVariables("hello, ${name}, ${age}, ${gender}, ${home}, world", func(s string) string {
|
||||
return "Lu"
|
||||
})
|
||||
}
|
||||
b.RunParallel(func(pb *testing.PB) {
|
||||
for pb.Next() {
|
||||
_ = ParseVariables("hello, ${name}, ${age}, ${gender}, ${home}, world", func(s string) string {
|
||||
return "Lu"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func BenchmarkParseVariablesFromHolders(b *testing.B) {
|
||||
|
||||
1
pkg/dnsconfigs/.gitignore
vendored
Normal file
1
pkg/dnsconfigs/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
ns_*
|
||||
@@ -2,11 +2,18 @@ package dnsconfigs
|
||||
|
||||
// ClusterDNSConfig 集群的DNS设置
|
||||
type ClusterDNSConfig struct {
|
||||
CNameRecords []string `yaml:"cnameRecords" json:"cnameRecords"` // 自动加入的CNAME
|
||||
CNAMERecords []string `yaml:"cnameRecords" json:"cnameRecords"` // 自动加入的CNAME
|
||||
TTL int32 `yaml:"ttl" json:"ttl"` // 默认TTL,各个DNS服务商对记录的TTL的限制各有不同
|
||||
CNameAsDomain bool `yaml:"cnameAsDomain" json:"cnameAsDomain"` // 是否可以像域名一样直接访问CNAME
|
||||
CNAMEAsDomain bool `yaml:"cnameAsDomain" json:"cnameAsDomain"` // 是否可以像域名一样直接访问CNAME
|
||||
IncludingLnNodes bool `yaml:"includingLnNodes" json:"includingLnNodes"` // 是否包含Ln节点
|
||||
|
||||
NodesAutoSync bool `yaml:"nodesAutoSync" json:"nodesAutoSync"` // 是否自动同步节点状态
|
||||
ServersAutoSync bool `yaml:"serversAutoSync" json:"serversAutoSync"` // 是否自动同步服务状态
|
||||
}
|
||||
|
||||
func DefaultClusterDNSConfig() *ClusterDNSConfig {
|
||||
return &ClusterDNSConfig{
|
||||
CNAMEAsDomain: true,
|
||||
IncludingLnNodes: true,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
|
||||
package dnsconfigs
|
||||
|
||||
type NSDomainStatus = string
|
||||
|
||||
const (
|
||||
NSDomainStatusNone = "none"
|
||||
NSDomainStatusVerified = "verified"
|
||||
)
|
||||
@@ -1,37 +0,0 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package dnsconfigs
|
||||
|
||||
import "github.com/iwind/TeaGo/maps"
|
||||
|
||||
// 一组系统默认值
|
||||
// 修改单个IP相关限制值时要考虑到NAT中每个IP会代表很多个主机,并非1对1的关系
|
||||
|
||||
const (
|
||||
DefaultMaxThreads = 20000 // 单节点最大线程数
|
||||
DefaultMaxThreadsMin = 1000 // 单节点最大线程数最小值
|
||||
DefaultMaxThreadsMax = 100_000 // 单节点最大线程数最大值
|
||||
|
||||
DefaultTCPMaxConnections = 100_000 // 单节点TCP最大连接数
|
||||
DefaultTCPMaxConnectionsPerIP = 1000 // 单IP最大连接数
|
||||
DefaultTCPMinConnectionsPerIP = 5 // 单IP最小连接数
|
||||
|
||||
DefaultTCPNewConnectionsMinutelyRate = 500 // 单IP连接速率限制(按分钟)
|
||||
DefaultTCPNewConnectionsMinMinutelyRate = 3 // 单IP最小连接速率
|
||||
|
||||
DefaultTCPNewConnectionsSecondlyRate = 300 // 单IP连接速率限制(按秒)
|
||||
DefaultTCPNewConnectionsMinSecondlyRate = 3 // 单IP最小连接速率
|
||||
|
||||
DefaultTCPLinger = 3 // 单节点TCP Linger值
|
||||
DefaultTLSHandshakeTimeout = 3 // TLS握手超时时间
|
||||
)
|
||||
|
||||
var DefaultConfigs = maps.Map{
|
||||
"tcpMaxConnections": DefaultTCPMaxConnections,
|
||||
"tcpMaxConnectionsPerIP": DefaultTCPMaxConnectionsPerIP,
|
||||
"tcpMinConnectionsPerIP": DefaultTCPMinConnectionsPerIP,
|
||||
"tcpNewConnectionsMinutelyRate": DefaultTCPNewConnectionsMinutelyRate,
|
||||
"tcpNewConnectionsMinMinutelyRate": DefaultTCPNewConnectionsMinMinutelyRate,
|
||||
"tcpNewConnectionsSecondlyRate": DefaultTCPNewConnectionsSecondlyRate,
|
||||
"tcpNewConnectionsMinSecondlyRate": DefaultTCPNewConnectionsMinSecondlyRate,
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package dnsconfigs
|
||||
|
||||
type NSAccessLogRef struct {
|
||||
IsPrior bool `yaml:"isPrior" json:"isPrior"` // 是否覆盖
|
||||
IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用
|
||||
LogMissingDomains bool `yaml:"logMissingDomains" json:"logMissingDomains"` // 是否记录找不到的域名
|
||||
}
|
||||
|
||||
func (this *NSAccessLogRef) Init() error {
|
||||
return nil
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package dnsconfigs
|
||||
|
||||
type KeyAlgorithmType = string
|
||||
|
||||
const (
|
||||
KeyAlgorithmTypeHmacSHA1 KeyAlgorithmType = "hmac-sha1."
|
||||
KeyAlgorithmTypeHmacSHA224 KeyAlgorithmType = "hmac-sha224."
|
||||
KeyAlgorithmTypeHmacSHA256 KeyAlgorithmType = "hmac-sha256."
|
||||
KeyAlgorithmTypeHmacSHA384 KeyAlgorithmType = "hmac-sha384."
|
||||
KeyAlgorithmTypeHmacSHA512 KeyAlgorithmType = "hmac-sha512."
|
||||
)
|
||||
|
||||
type KeyAlgorithmDefinition struct {
|
||||
Name string `json:"name"`
|
||||
Code string `json:"code"`
|
||||
}
|
||||
|
||||
func FindAllKeyAlgorithmTypes() []*KeyAlgorithmDefinition {
|
||||
return []*KeyAlgorithmDefinition{
|
||||
{
|
||||
Name: "HmacSHA1",
|
||||
Code: KeyAlgorithmTypeHmacSHA1,
|
||||
},
|
||||
{
|
||||
Name: "HmacSHA224",
|
||||
Code: KeyAlgorithmTypeHmacSHA224,
|
||||
},
|
||||
{
|
||||
Name: "HmacSHA256",
|
||||
Code: KeyAlgorithmTypeHmacSHA256,
|
||||
},
|
||||
{
|
||||
Name: "HmacSHA384",
|
||||
Code: KeyAlgorithmTypeHmacSHA384,
|
||||
},
|
||||
{
|
||||
Name: "HmacSHA512",
|
||||
Code: KeyAlgorithmTypeHmacSHA512,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func FindKeyAlgorithmTypeName(algoType KeyAlgorithmType) string {
|
||||
for _, def := range FindAllKeyAlgorithmTypes() {
|
||||
if def.Code == algoType {
|
||||
return def.Name
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type NSKeySecretType = string
|
||||
|
||||
const (
|
||||
NSKeySecretTypeClear NSKeySecretType = "clear"
|
||||
NSKeySecretTypeBase64 NSKeySecretType = "base64"
|
||||
)
|
||||
|
||||
func FindKeySecretTypeName(secretType NSKeySecretType) string {
|
||||
switch secretType {
|
||||
case NSKeySecretTypeClear:
|
||||
return "明文"
|
||||
case NSKeySecretTypeBase64:
|
||||
return "BASE64"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package dnsconfigs
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/ddosconfigs"
|
||||
)
|
||||
|
||||
type NSNodeConfig struct {
|
||||
Id int64 `yaml:"id" json:"id"`
|
||||
NodeId string `yaml:"nodeId" json:"nodeId"`
|
||||
Secret string `yaml:"secret" json:"secret"`
|
||||
ClusterId int64 `yaml:"clusterId" json:"clusterId"`
|
||||
AccessLogRef *NSAccessLogRef `yaml:"accessLogRef" json:"accessLogRef"`
|
||||
RecursionConfig *RecursionConfig `yaml:"recursionConfig" json:"recursionConfig"`
|
||||
DDoSProtection *ddosconfigs.ProtectionConfig `yaml:"ddosProtection" json:"ddosProtection"`
|
||||
AllowedIPs []string `yaml:"allowedIPs" json:"allowedIPs"`
|
||||
|
||||
TCP *serverconfigs.TCPProtocolConfig `yaml:"tcp" json:"tcp"` // TCP配置
|
||||
TLS *serverconfigs.TLSProtocolConfig `yaml:"tls" json:"tls"` // TLS配置
|
||||
UDP *serverconfigs.UDPProtocolConfig `yaml:"udp" json:"udp"` // UDP配置
|
||||
|
||||
paddedId string
|
||||
}
|
||||
|
||||
func (this *NSNodeConfig) Init() error {
|
||||
this.paddedId = fmt.Sprintf("%08d", this.Id)
|
||||
|
||||
// accessLog
|
||||
if this.AccessLogRef != nil {
|
||||
err := this.AccessLogRef.Init()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// 递归DNS
|
||||
if this.RecursionConfig != nil {
|
||||
err := this.RecursionConfig.Init()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// DDoS
|
||||
if this.DDoSProtection != nil {
|
||||
err := this.DDoSProtection.Init()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// tcp
|
||||
if this.TCP != nil {
|
||||
err := this.TCP.Init()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// tls
|
||||
if this.TLS != nil {
|
||||
err := this.TLS.Init()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// udp
|
||||
if this.UDP != nil {
|
||||
err := this.UDP.Init()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *NSNodeConfig) PaddedId() string {
|
||||
return this.paddedId
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package dnsconfigs
|
||||
|
||||
type NSSetting struct {
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package dnsconfigs
|
||||
|
||||
type RecordTTL struct {
|
||||
Name string `json:"name"`
|
||||
Value int `json:"value"`
|
||||
}
|
||||
|
||||
func FindAllRecordTTL() []*RecordTTL {
|
||||
return []*RecordTTL{
|
||||
{
|
||||
Name: "5秒",
|
||||
Value: 5,
|
||||
},
|
||||
{
|
||||
Name: "10秒",
|
||||
Value: 10,
|
||||
},
|
||||
{
|
||||
Name: "30秒",
|
||||
Value: 30,
|
||||
},
|
||||
{
|
||||
Name: "1分钟",
|
||||
Value: 60,
|
||||
},
|
||||
{
|
||||
Name: "3分钟",
|
||||
Value: 3 * 60,
|
||||
},
|
||||
{
|
||||
Name: "5分钟",
|
||||
Value: 5 * 60,
|
||||
},
|
||||
{
|
||||
Name: "10分钟",
|
||||
Value: 10 * 60,
|
||||
},
|
||||
{
|
||||
Name: "30分钟",
|
||||
Value: 30 * 60,
|
||||
},
|
||||
{
|
||||
Name: "1小时",
|
||||
Value: 3600,
|
||||
},
|
||||
{
|
||||
Name: "12小时",
|
||||
Value: 12 * 3600,
|
||||
},
|
||||
{
|
||||
Name: "1天",
|
||||
Value: 86400,
|
||||
},
|
||||
{
|
||||
Name: "30天",
|
||||
Value: 30 * 86400,
|
||||
},
|
||||
{
|
||||
Name: "一年",
|
||||
Value: 365 * 86400,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -13,11 +13,13 @@ const (
|
||||
RecordTypeSRV RecordType = "SRV"
|
||||
RecordTypeTXT RecordType = "TXT"
|
||||
RecordTypeCAA RecordType = "CAA"
|
||||
RecordTypeSOA RecordType = "SOA"
|
||||
)
|
||||
|
||||
type RecordTypeDefinition struct {
|
||||
Type RecordType `json:"type"`
|
||||
Description string `json:"description"`
|
||||
CanDefine bool `json:"canDefine"` // 用户是否可以自定义
|
||||
}
|
||||
|
||||
func FindAllRecordTypeDefinitions() []*RecordTypeDefinition {
|
||||
@@ -25,34 +27,57 @@ func FindAllRecordTypeDefinitions() []*RecordTypeDefinition {
|
||||
{
|
||||
Type: RecordTypeA,
|
||||
Description: "将域名指向一个IPV4地址",
|
||||
CanDefine: true,
|
||||
},
|
||||
{
|
||||
Type: RecordTypeCNAME,
|
||||
Description: "将域名指向另外一个域名",
|
||||
CanDefine: true,
|
||||
},
|
||||
{
|
||||
Type: RecordTypeAAAA,
|
||||
Description: "将域名指向一个IPV6地址",
|
||||
CanDefine: true,
|
||||
},
|
||||
{
|
||||
Type: RecordTypeNS,
|
||||
Description: "将子域名指定其他DNS服务器解析",
|
||||
CanDefine: false,
|
||||
},
|
||||
{
|
||||
Type: RecordTypeSOA,
|
||||
Description: "起始授权机构记录",
|
||||
CanDefine: false,
|
||||
},
|
||||
{
|
||||
Type: RecordTypeMX,
|
||||
Description: "将域名指向邮件服务器地址",
|
||||
CanDefine: true,
|
||||
},
|
||||
{
|
||||
Type: RecordTypeSRV,
|
||||
Description: "记录提供特定的服务的服务器",
|
||||
CanDefine: true,
|
||||
},
|
||||
{
|
||||
Type: RecordTypeTXT,
|
||||
Description: "文本长度限制512,通常做SPF记录或者校验域名所有者",
|
||||
CanDefine: true,
|
||||
},
|
||||
{
|
||||
Type: RecordTypeCAA,
|
||||
Description: "CA证书颁发机构授权校验",
|
||||
CanDefine: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func FindAllUserRecordTypeDefinitions() []*RecordTypeDefinition {
|
||||
var result = []*RecordTypeDefinition{}
|
||||
for _, r := range FindAllRecordTypeDefinitions() {
|
||||
if r.CanDefine {
|
||||
result = append(result, r)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package dnsconfigs
|
||||
|
||||
type DNSHost struct {
|
||||
Host string `json:"host"`
|
||||
Port int `json:"port"`
|
||||
Protocol string `json:"protocol"`
|
||||
}
|
||||
|
||||
// RecursionConfig 递归DNS设置
|
||||
type RecursionConfig struct {
|
||||
IsOn bool `json:"isOn"`
|
||||
Hosts []*DNSHost `json:"hosts"`
|
||||
UseLocalHosts bool `json:"useLocalHosts"` // 自动从本机读取DNS
|
||||
AllowDomains []string `json:"allowDomains"`
|
||||
DenyDomains []string `json:"denyDomains"`
|
||||
}
|
||||
|
||||
func (this *RecursionConfig) Init() error {
|
||||
return nil
|
||||
}
|
||||
@@ -1,262 +0,0 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package dnsconfigs
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/configutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared"
|
||||
"github.com/iwind/TeaGo/maps"
|
||||
"net"
|
||||
)
|
||||
|
||||
type RouteRangeType = string
|
||||
|
||||
const (
|
||||
RouteRangeTypeIP RouteRangeType = "ipRange" // IP范围
|
||||
RouteRangeTypeCIDR RouteRangeType = "cidr" // CIDR
|
||||
RouteRangeTypeRegion RouteRangeType = "region" // 区域
|
||||
)
|
||||
|
||||
func AllRouteRangeTypes() []*shared.Definition {
|
||||
return []*shared.Definition{
|
||||
{
|
||||
Name: "IP范围",
|
||||
Code: RouteRangeTypeIP,
|
||||
},
|
||||
{
|
||||
Name: "CIDR",
|
||||
Code: RouteRangeTypeCIDR,
|
||||
},
|
||||
{
|
||||
Name: "区域",
|
||||
Code: RouteRangeTypeRegion,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// RouteRegionResolver 解析IP接口
|
||||
type RouteRegionResolver interface {
|
||||
Resolve(ip net.IP) (countryId int64, provinceId int64, cityId int64, providerId int64)
|
||||
}
|
||||
|
||||
// RouteRangeInterface 线路范围接口
|
||||
type RouteRangeInterface interface {
|
||||
// Init 初始化
|
||||
Init() error
|
||||
|
||||
// Contains 判断是否包含
|
||||
Contains(ip net.IP) bool
|
||||
|
||||
// SetRegionResolver 设置IP解析接口
|
||||
SetRegionResolver(resolver RouteRegionResolver)
|
||||
|
||||
// IsExcluding 是否为排除
|
||||
IsExcluding() bool
|
||||
}
|
||||
|
||||
type BaseRouteRange struct {
|
||||
IsReverse bool `json:"isReverse"`
|
||||
|
||||
routeRegionResolver RouteRegionResolver
|
||||
}
|
||||
|
||||
func (this *BaseRouteRange) SetRegionResolver(resolver RouteRegionResolver) {
|
||||
this.routeRegionResolver = resolver
|
||||
}
|
||||
|
||||
func (this *BaseRouteRange) IsExcluding() bool {
|
||||
return this.IsReverse
|
||||
}
|
||||
|
||||
// RouteRangeIPRange IP范围配置
|
||||
// IPv4和IPv6不能混用
|
||||
type RouteRangeIPRange struct {
|
||||
BaseRouteRange
|
||||
|
||||
IPFrom string `json:"ipFrom"`
|
||||
IPTo string `json:"ipTo"`
|
||||
|
||||
ipFromLong uint64
|
||||
ipToLong uint64
|
||||
|
||||
ipVersion int // 4|6
|
||||
}
|
||||
|
||||
func (this *RouteRangeIPRange) Init() error {
|
||||
var ipFrom = net.ParseIP(this.IPFrom)
|
||||
var ipTo = net.ParseIP(this.IPTo)
|
||||
if ipFrom == nil {
|
||||
return errors.New("invalid ipFrom '" + this.IPFrom + "'")
|
||||
}
|
||||
if ipTo == nil {
|
||||
return errors.New("invalid ipTo '" + this.IPTo + "'")
|
||||
}
|
||||
|
||||
var ipFromVersion = configutils.IPVersion(ipFrom)
|
||||
var ipToVersion = configutils.IPVersion(ipTo)
|
||||
if ipFromVersion != ipToVersion {
|
||||
return errors.New("ipFrom and ipTo version are not same")
|
||||
}
|
||||
this.ipVersion = ipFromVersion
|
||||
|
||||
this.ipFromLong = configutils.IP2Long(ipFrom)
|
||||
this.ipToLong = configutils.IP2Long(ipTo)
|
||||
|
||||
if this.ipFromLong > this.ipToLong {
|
||||
this.ipFromLong, this.ipToLong = this.ipToLong, this.ipFromLong
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *RouteRangeIPRange) Contains(netIP net.IP) bool {
|
||||
if len(netIP) == 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
var version = configutils.IPVersion(netIP)
|
||||
if version != this.ipVersion {
|
||||
return false
|
||||
}
|
||||
|
||||
var ipLong = configutils.IP2Long(netIP)
|
||||
return ipLong >= this.ipFromLong && ipLong <= this.ipToLong
|
||||
}
|
||||
|
||||
// RouteRangeCIDR CIDR范围配置
|
||||
type RouteRangeCIDR struct {
|
||||
BaseRouteRange
|
||||
|
||||
CIDR string `json:"cidr"`
|
||||
|
||||
cidr *net.IPNet
|
||||
}
|
||||
|
||||
func (this *RouteRangeCIDR) Init() error {
|
||||
_, ipNet, err := net.ParseCIDR(this.CIDR)
|
||||
if err != nil {
|
||||
return errors.New("parse cidr failed: " + err.Error())
|
||||
}
|
||||
|
||||
this.cidr = ipNet
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *RouteRangeCIDR) Contains(netIP net.IP) bool {
|
||||
if netIP == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
if this.cidr == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return this.cidr.Contains(netIP)
|
||||
}
|
||||
|
||||
// RouteRangeRegion 区域范围
|
||||
// country:ID, province:ID, city:ID, isp:ID
|
||||
type RouteRangeRegion struct {
|
||||
BaseRouteRange
|
||||
|
||||
Regions []*routeRegion `json:"regions"`
|
||||
}
|
||||
|
||||
func (this *RouteRangeRegion) Init() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *RouteRangeRegion) Contains(netIP net.IP) bool {
|
||||
if this.routeRegionResolver == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
if len(this.Regions) == 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
countryId, provinceId, cityId, providerId := this.routeRegionResolver.Resolve(netIP)
|
||||
if countryId <= 0 && provinceId <= 0 && cityId <= 0 && providerId <= 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
for _, region := range this.Regions {
|
||||
if region.Id <= 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
switch region.Type {
|
||||
case "country":
|
||||
if region.Id == countryId {
|
||||
return true
|
||||
}
|
||||
case "province":
|
||||
if region.Id == provinceId {
|
||||
return true
|
||||
}
|
||||
case "city":
|
||||
if region.Id == cityId {
|
||||
return true
|
||||
}
|
||||
case "isp":
|
||||
if region.Id == providerId {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
type routeRegion struct {
|
||||
Type string `json:"type"` // country|province|city|isp
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// InitRangesFromJSON 从JSON中初始化线路范围
|
||||
func InitRangesFromJSON(rangesJSON []byte) (ranges []RouteRangeInterface, err error) {
|
||||
if len(rangesJSON) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
var rangeMaps = []maps.Map{}
|
||||
err = json.Unmarshal(rangesJSON, &rangeMaps)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, rangeMap := range rangeMaps {
|
||||
var rangeType = rangeMap.GetString("type")
|
||||
paramsJSON, err := json.Marshal(rangeMap.Get("params"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var r RouteRangeInterface
|
||||
|
||||
switch rangeType {
|
||||
case RouteRangeTypeIP:
|
||||
r = &RouteRangeIPRange{}
|
||||
case RouteRangeTypeCIDR:
|
||||
r = &RouteRangeCIDR{}
|
||||
case RouteRangeTypeRegion:
|
||||
r = &RouteRangeRegion{}
|
||||
default:
|
||||
return nil, errors.New("invalid route line type '" + rangeType + "'")
|
||||
}
|
||||
|
||||
err = json.Unmarshal(paramsJSON, r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = r.Init()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ranges = append(ranges, r)
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
|
||||
package dnsconfigs
|
||||
|
||||
import (
|
||||
"github.com/iwind/TeaGo/assert"
|
||||
"net"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestRouteRangeIPRange_Contains(t *testing.T) {
|
||||
var a = assert.NewAssertion(t)
|
||||
|
||||
// ipv4
|
||||
{
|
||||
var r = &RouteRangeIPRange{
|
||||
IPFrom: "192.168.1.100",
|
||||
IPTo: "192.168.3.200",
|
||||
}
|
||||
err := r.Init()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
a.IsFalse(r.Contains(net.ParseIP("aaa")))
|
||||
a.IsTrue(r.Contains(net.ParseIP("192.168.1.200")))
|
||||
a.IsTrue(r.Contains(net.ParseIP("192.168.3.200")))
|
||||
a.IsFalse(r.Contains(net.ParseIP("192.168.4.1")))
|
||||
a.IsFalse(r.Contains(net.ParseIP("::1")))
|
||||
}
|
||||
|
||||
// ipv6
|
||||
{
|
||||
var prefix = "1:2:3:4:5:6"
|
||||
var r = &RouteRangeIPRange{
|
||||
IPFrom: prefix + ":1:8",
|
||||
IPTo: prefix + ":5:10",
|
||||
}
|
||||
err := r.Init()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
a.IsFalse(r.Contains(net.ParseIP("aaa")))
|
||||
a.IsTrue(r.Contains(net.ParseIP(prefix + ":3:4")))
|
||||
a.IsTrue(r.Contains(net.ParseIP(prefix + ":5:9")))
|
||||
a.IsTrue(r.Contains(net.ParseIP(prefix + ":5:10")))
|
||||
a.IsTrue(r.Contains(net.ParseIP(prefix + ":4:8")))
|
||||
a.IsFalse(r.Contains(net.ParseIP(prefix + ":5:11")))
|
||||
}
|
||||
|
||||
{
|
||||
var r = &RouteRangeCIDR{
|
||||
CIDR: "192.168.2.1/24",
|
||||
}
|
||||
err := r.Init()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
a.IsFalse(r.Contains(net.ParseIP("aaa")))
|
||||
a.IsTrue(r.Contains(net.ParseIP("192.168.2.1")))
|
||||
a.IsTrue(r.Contains(net.ParseIP("192.168.2.254")))
|
||||
a.IsTrue(r.Contains(net.ParseIP("192.168.2.100")))
|
||||
a.IsFalse(r.Contains(net.ParseIP("192.168.3.1")))
|
||||
a.IsFalse(r.Contains(net.ParseIP("192.168.1.1")))
|
||||
}
|
||||
|
||||
// reverse ipv4
|
||||
{
|
||||
var r = &RouteRangeIPRange{
|
||||
IPFrom: "192.168.1.100",
|
||||
IPTo: "192.168.3.200",
|
||||
}
|
||||
err := r.Init()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
a.IsFalse(r.Contains(net.ParseIP("aaa")))
|
||||
a.IsTrue(r.Contains(net.ParseIP("192.168.1.200")))
|
||||
a.IsTrue(r.Contains(net.ParseIP("192.168.3.200")))
|
||||
a.IsFalse(r.Contains(net.ParseIP("192.168.4.1")))
|
||||
}
|
||||
|
||||
// reverse cidr
|
||||
{
|
||||
var r = &RouteRangeCIDR{
|
||||
CIDR: "192.168.2.1/24",
|
||||
}
|
||||
err := r.Init()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
a.IsFalse(r.Contains(net.ParseIP("aaa")))
|
||||
a.IsTrue(r.Contains(net.ParseIP("192.168.2.1")))
|
||||
a.IsTrue(r.Contains(net.ParseIP("192.168.2.254")))
|
||||
a.IsTrue(r.Contains(net.ParseIP("192.168.2.100")))
|
||||
a.IsFalse(r.Contains(net.ParseIP("192.168.3.1")))
|
||||
a.IsFalse(r.Contains(net.ParseIP("192.168.1.1")))
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,86 +0,0 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package dnsconfigs
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestRoutes(t *testing.T) {
|
||||
// 检查代号是否有空,或者代号是否重复
|
||||
|
||||
var codeMap = map[string]bool{} // code => true
|
||||
|
||||
for _, routes := range [][]*Route{
|
||||
AllDefaultChinaProvinceRoutes,
|
||||
AllDefaultISPRoutes,
|
||||
AllDefaultWorldRegionRoutes,
|
||||
} {
|
||||
for _, route := range routes {
|
||||
if len(route.Name) == 0 {
|
||||
t.Fatal("route name should not empty:", route)
|
||||
}
|
||||
if len(route.AliasNames) == 0 {
|
||||
t.Fatal("route alias names should not empty:", route)
|
||||
}
|
||||
if len(route.Code) == 0 || route.Code == "world:" {
|
||||
t.Fatal("route code should not empty:", route)
|
||||
}
|
||||
|
||||
_, ok := codeMap[route.Code]
|
||||
if ok {
|
||||
t.Fatal("code duplicated:", route)
|
||||
}
|
||||
|
||||
codeMap[route.Code] = true
|
||||
|
||||
if strings.HasPrefix(route.Code, "world:sp:") || (strings.HasPrefix(route.Code, "world:") && route.Code != "world:UAR" && len(route.Code) != 8) {
|
||||
t.Log("no shorten code:", route)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestFindDefaultRoute(t *testing.T) {
|
||||
t.Log(FindDefaultRoute("isp:china_unicom"))
|
||||
t.Log(FindDefaultRoute("china:province:beijing"))
|
||||
t.Log(FindDefaultRoute("world:CN"))
|
||||
t.Log(FindDefaultRoute("world:US"))
|
||||
}
|
||||
|
||||
func TestRoutes_Markdown(t *testing.T) {
|
||||
var markdown = ""
|
||||
|
||||
for index, routes := range [][]*Route{
|
||||
AllDefaultRoutes,
|
||||
AllDefaultChinaProvinceRoutes,
|
||||
AllDefaultISPRoutes,
|
||||
AllDefaultWorldRegionRoutes,
|
||||
} {
|
||||
switch index {
|
||||
case 0:
|
||||
markdown += "## 默认线路\n"
|
||||
case 1:
|
||||
markdown += "## 中国省市\n"
|
||||
case 2:
|
||||
markdown += "## 运营商\n"
|
||||
case 3:
|
||||
markdown += "## 全球地区\n"
|
||||
}
|
||||
|
||||
markdown += "| 名称 | 代号 |\n"
|
||||
markdown += "|-----------|-----------|\n"
|
||||
for _, route := range routes {
|
||||
markdown += "| " + route.Name + " | " + route.Code + " |\n"
|
||||
}
|
||||
markdown += "\n"
|
||||
}
|
||||
t.Log(markdown)
|
||||
}
|
||||
|
||||
func BenchmarkFindDefaultRoute(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
_ = FindDefaultRoute("world:CN")
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package dnsconfigs
|
||||
|
||||
// TSIGConfig 配置
|
||||
type TSIGConfig struct {
|
||||
IsOn bool `yaml:"isOn" json:"isOn"`
|
||||
}
|
||||
@@ -29,7 +29,7 @@ func (this *errorObj) Error() string {
|
||||
return s
|
||||
}
|
||||
|
||||
// 新错误
|
||||
// New 新错误
|
||||
func New(errText string) error {
|
||||
ptr, file, line, ok := runtime.Caller(1)
|
||||
funcName := ""
|
||||
@@ -45,7 +45,7 @@ func New(errText string) error {
|
||||
}
|
||||
}
|
||||
|
||||
// 包装已有错误
|
||||
// Wrap 包装已有错误
|
||||
func Wrap(err error) error {
|
||||
if err == nil {
|
||||
return nil
|
||||
|
||||
2
pkg/iplibrary/.gitignore
vendored
2
pkg/iplibrary/.gitignore
vendored
@@ -1 +1 @@
|
||||
ip.db
|
||||
*-plus.db
|
||||
@@ -7,26 +7,48 @@ import (
|
||||
"compress/gzip"
|
||||
_ "embed"
|
||||
"net"
|
||||
"sync"
|
||||
)
|
||||
|
||||
//go:embed internal-ip-library.db
|
||||
var ipLibraryData []byte
|
||||
|
||||
var defaultLibrary = NewIPLibrary()
|
||||
var commonLibrary *IPLibrary
|
||||
|
||||
var libraryLocker = &sync.Mutex{} // 为了保持加载顺序性
|
||||
|
||||
func DefaultIPLibraryData() []byte {
|
||||
return ipLibraryData
|
||||
}
|
||||
|
||||
// InitDefault 加载默认的IP库
|
||||
func InitDefault() error {
|
||||
defaultLibrary.reader = nil
|
||||
return defaultLibrary.InitFromData(ipLibraryData)
|
||||
libraryLocker.Lock()
|
||||
defer libraryLocker.Unlock()
|
||||
|
||||
if commonLibrary != nil {
|
||||
defaultLibrary = commonLibrary
|
||||
return nil
|
||||
}
|
||||
|
||||
var library = NewIPLibrary()
|
||||
err := library.InitFromData(ipLibraryData, "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
commonLibrary = library
|
||||
defaultLibrary = commonLibrary
|
||||
return nil
|
||||
}
|
||||
|
||||
// Lookup 查询IP信息
|
||||
func Lookup(ip net.IP) *QueryResult {
|
||||
return defaultLibrary.Lookup(ip)
|
||||
}
|
||||
|
||||
// LookupIP 查询IP信息
|
||||
func LookupIP(ip string) *QueryResult {
|
||||
return defaultLibrary.LookupIP(ip)
|
||||
}
|
||||
@@ -43,10 +65,19 @@ func NewIPLibraryWithReader(reader *Reader) *IPLibrary {
|
||||
return &IPLibrary{reader: reader}
|
||||
}
|
||||
|
||||
func (this *IPLibrary) InitFromData(data []byte) error {
|
||||
func (this *IPLibrary) InitFromData(data []byte, password string) error {
|
||||
if len(data) == 0 || this.reader != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if len(password) > 0 {
|
||||
srcData, err := NewEncrypt().Decode(data, password)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
data = srcData
|
||||
}
|
||||
|
||||
var reader = bytes.NewReader(data)
|
||||
gzipReader, err := gzip.NewReader(reader)
|
||||
if err != nil {
|
||||
@@ -84,3 +115,10 @@ func (this *IPLibrary) LookupIP(ip string) *QueryResult {
|
||||
}
|
||||
return this.Lookup(net.ParseIP(ip))
|
||||
}
|
||||
|
||||
func (this *IPLibrary) Destroy() {
|
||||
if this.reader != nil {
|
||||
this.reader.Destroy()
|
||||
this.reader = nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,12 +15,21 @@ import (
|
||||
func TestIPLibrary_Init(t *testing.T) {
|
||||
var lib = iplibrary.NewIPLibrary()
|
||||
|
||||
err := lib.InitFromData(iplibrary.DefaultIPLibraryData())
|
||||
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestIPLibrary_Load(t *testing.T) {
|
||||
for i := 0; i < 10; i++ {
|
||||
err := iplibrary.InitDefault()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestIPLibrary_Lookup(t *testing.T) {
|
||||
var stat1 = &runtime.MemStats{}
|
||||
runtime.ReadMemStats(stat1)
|
||||
@@ -29,7 +38,7 @@ func TestIPLibrary_Lookup(t *testing.T) {
|
||||
|
||||
var before = time.Now()
|
||||
|
||||
err := lib.InitFromData(iplibrary.DefaultIPLibraryData())
|
||||
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -48,6 +57,7 @@ func TestIPLibrary_Lookup(t *testing.T) {
|
||||
"8.8.8.8",
|
||||
"4.4.4.4",
|
||||
"202.96.0.20",
|
||||
"111.197.165.199",
|
||||
"66.249.66.69",
|
||||
"2222", // wrong ip
|
||||
"2406:8c00:0:3401:133:18:168:70", // ipv6
|
||||
@@ -59,7 +69,7 @@ func TestIPLibrary_Lookup(t *testing.T) {
|
||||
|
||||
func TestIPLibrary_LookupIP(t *testing.T) {
|
||||
var lib = iplibrary.NewIPLibrary()
|
||||
err := lib.InitFromData(iplibrary.DefaultIPLibraryData())
|
||||
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -78,7 +88,7 @@ func TestIPLibrary_LookupIP(t *testing.T) {
|
||||
|
||||
func BenchmarkIPLibrary_Lookup(b *testing.B) {
|
||||
var lib = iplibrary.NewIPLibrary()
|
||||
err := lib.InitFromData(iplibrary.DefaultIPLibraryData())
|
||||
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "")
|
||||
if err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
|
||||
32
pkg/iplibrary/encrypt.go
Normal file
32
pkg/iplibrary/encrypt.go
Normal file
@@ -0,0 +1,32 @@
|
||||
// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
|
||||
package iplibrary
|
||||
|
||||
import "github.com/TeaOSLab/EdgeCommon/pkg/nodeutils"
|
||||
|
||||
type Encrypt struct {
|
||||
}
|
||||
|
||||
func NewEncrypt() *Encrypt {
|
||||
return &Encrypt{}
|
||||
}
|
||||
|
||||
func (this *Encrypt) Encode(srcData []byte, password string) ([]byte, error) {
|
||||
var method = nodeutils.AES256CFBMethod{}
|
||||
err := method.Init([]byte(password), []byte(password))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return method.Encrypt(srcData)
|
||||
}
|
||||
|
||||
func (this *Encrypt) Decode(encodedData []byte, password string) ([]byte, error) {
|
||||
var method = nodeutils.AES256CFBMethod{}
|
||||
err := method.Init([]byte(password), []byte(password))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return method.Decrypt(encodedData)
|
||||
}
|
||||
Binary file not shown.
@@ -3,12 +3,17 @@
|
||||
package iplibrary
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"github.com/iwind/TeaGo/types"
|
||||
)
|
||||
|
||||
type ipItem struct {
|
||||
type ipv4Item struct {
|
||||
IPFrom uint32
|
||||
IPTo uint32
|
||||
|
||||
Region *ipRegion
|
||||
}
|
||||
|
||||
type ipv6Item struct {
|
||||
IPFrom uint64
|
||||
IPTo uint64
|
||||
|
||||
@@ -16,23 +21,14 @@ type ipItem struct {
|
||||
}
|
||||
|
||||
type ipRegion struct {
|
||||
CountryId uint32
|
||||
ProvinceId uint32
|
||||
CountryId uint16
|
||||
ProvinceId uint16
|
||||
CityId uint32
|
||||
TownId uint32
|
||||
ProviderId uint32
|
||||
ProviderId uint16
|
||||
}
|
||||
|
||||
func (this *ipItem) AsBinary() ([]byte, error) {
|
||||
var buf = &bytes.Buffer{}
|
||||
err := binary.Write(buf, binary.BigEndian, this)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
func HashRegion(countryId uint32, provinceId uint32, cityId uint32, townId uint32, providerId uint32) string {
|
||||
func HashRegion(countryId uint16, provinceId uint16, cityId uint32, townId uint32, providerId uint16) string {
|
||||
var providerHash = ""
|
||||
if providerId > 0 {
|
||||
providerHash = "_" + types.String(providerId)
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
package iplibrary
|
||||
|
||||
type Country struct {
|
||||
Id uint32 `json:"id"`
|
||||
Id uint16 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Codes []string `json:"codes"`
|
||||
}
|
||||
|
||||
type Province struct {
|
||||
Id uint32 `json:"id"`
|
||||
Id uint16 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Codes []string `json:"codes"`
|
||||
}
|
||||
@@ -27,7 +27,7 @@ type Town struct {
|
||||
}
|
||||
|
||||
type Provider struct {
|
||||
Id uint32 `json:"id"`
|
||||
Id uint16 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Codes []string `json:"codes"`
|
||||
}
|
||||
@@ -43,19 +43,19 @@ type Meta struct {
|
||||
Providers []*Provider `json:"providers"`
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
|
||||
countryMap map[uint32]*Country // id => *Country
|
||||
provinceMap map[uint32]*Province // id => *Province
|
||||
countryMap map[uint16]*Country // id => *Country
|
||||
provinceMap map[uint16]*Province // id => *Province
|
||||
cityMap map[uint32]*City // id => *City
|
||||
townMap map[uint32]*Town // id => *Town
|
||||
providerMap map[uint32]*Provider // id => *Provider
|
||||
providerMap map[uint16]*Provider // id => *Provider
|
||||
}
|
||||
|
||||
func (this *Meta) Init() {
|
||||
this.countryMap = map[uint32]*Country{}
|
||||
this.provinceMap = map[uint32]*Province{}
|
||||
this.countryMap = map[uint16]*Country{}
|
||||
this.provinceMap = map[uint16]*Province{}
|
||||
this.cityMap = map[uint32]*City{}
|
||||
this.townMap = map[uint32]*Town{}
|
||||
this.providerMap = map[uint32]*Provider{}
|
||||
this.providerMap = map[uint16]*Provider{}
|
||||
|
||||
for _, country := range this.Countries {
|
||||
this.countryMap[country.Id] = country
|
||||
@@ -74,11 +74,11 @@ func (this *Meta) Init() {
|
||||
}
|
||||
}
|
||||
|
||||
func (this *Meta) CountryWithId(countryId uint32) *Country {
|
||||
func (this *Meta) CountryWithId(countryId uint16) *Country {
|
||||
return this.countryMap[countryId]
|
||||
}
|
||||
|
||||
func (this *Meta) ProvinceWithId(provinceId uint32) *Province {
|
||||
func (this *Meta) ProvinceWithId(provinceId uint16) *Province {
|
||||
return this.provinceMap[provinceId]
|
||||
}
|
||||
|
||||
@@ -90,6 +90,6 @@ func (this *Meta) TownWithId(townId uint32) *Town {
|
||||
return this.townMap[townId]
|
||||
}
|
||||
|
||||
func (this *Meta) ProviderWithId(providerId uint32) *Provider {
|
||||
func (this *Meta) ProviderWithId(providerId uint16) *Provider {
|
||||
return this.providerMap[providerId]
|
||||
}
|
||||
|
||||
@@ -7,22 +7,31 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/configutils"
|
||||
"github.com/iwind/TeaGo/types"
|
||||
"io"
|
||||
"net"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Reader IP库Reader
|
||||
type Reader struct {
|
||||
meta *Meta
|
||||
|
||||
regionMap map[string]*ipRegion
|
||||
regionMap map[string]*ipRegion // 缓存重复的区域用来节约内存
|
||||
|
||||
ipV4Items []*ipItem
|
||||
ipV6Items []*ipItem
|
||||
ipV4Items []*ipv4Item
|
||||
ipV6Items []*ipv6Item
|
||||
|
||||
lastIPFrom uint64
|
||||
lastCountryId uint16
|
||||
lastProvinceId uint16
|
||||
lastCityId uint32
|
||||
lastTownId uint32
|
||||
lastProviderId uint16
|
||||
}
|
||||
|
||||
// NewReader 创建新Reader对象
|
||||
func NewReader(reader io.Reader) (*Reader, error) {
|
||||
var libReader = &Reader{
|
||||
regionMap: map[string]*ipRegion{},
|
||||
@@ -34,6 +43,7 @@ func NewReader(reader io.Reader) (*Reader, error) {
|
||||
return libReader, nil
|
||||
}
|
||||
|
||||
// 从Reader中加载数据
|
||||
func (this *Reader) load(reader io.Reader) error {
|
||||
var buf = make([]byte, 1024)
|
||||
var metaLine = []byte{}
|
||||
@@ -102,6 +112,9 @@ func (this *Reader) load(reader io.Reader) error {
|
||||
return from0 < from1
|
||||
})
|
||||
|
||||
// 清理内存
|
||||
this.regionMap = nil
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -112,12 +125,12 @@ func (this *Reader) Lookup(ip net.IP) *QueryResult {
|
||||
|
||||
var ipLong = configutils.IP2Long(ip)
|
||||
var isV4 = configutils.IsIPv4(ip)
|
||||
var resultItem *ipItem
|
||||
var resultItem any
|
||||
if isV4 {
|
||||
sort.Search(len(this.ipV4Items), func(i int) bool {
|
||||
var item = this.ipV4Items[i]
|
||||
if item.IPFrom <= ipLong {
|
||||
if item.IPTo >= ipLong {
|
||||
if item.IPFrom <= uint32(ipLong) {
|
||||
if item.IPTo >= uint32(ipLong) {
|
||||
resultItem = item
|
||||
return false
|
||||
}
|
||||
@@ -149,80 +162,35 @@ func (this *Reader) Meta() *Meta {
|
||||
return this.meta
|
||||
}
|
||||
|
||||
func (this *Reader) IPv4Items() []*ipItem {
|
||||
func (this *Reader) IPv4Items() []*ipv4Item {
|
||||
return this.ipV4Items
|
||||
}
|
||||
|
||||
func (this *Reader) IPv6Items() []*ipItem {
|
||||
func (this *Reader) IPv6Items() []*ipv6Item {
|
||||
return this.ipV6Items
|
||||
}
|
||||
|
||||
func (this *Reader) Destroy() {
|
||||
this.meta = nil
|
||||
this.regionMap = nil
|
||||
this.ipV4Items = nil
|
||||
this.ipV6Items = nil
|
||||
}
|
||||
|
||||
// 分析数据
|
||||
func (this *Reader) parse(data []byte) (left []byte, err error) {
|
||||
if len(data) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
for {
|
||||
var index = bytes.IndexByte(data, '\n')
|
||||
if index >= 0 {
|
||||
var line = data[:index]
|
||||
var pieces = strings.Split(string(line), "|")
|
||||
if len(pieces) != 8 {
|
||||
return nil, errors.New("invalid ip definition '" + string(line) + "'")
|
||||
err = this.parseLine(line)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var version = pieces[0]
|
||||
if len(version) == 0 {
|
||||
version = "4"
|
||||
}
|
||||
|
||||
if version != "4" && version != "6" {
|
||||
return nil, errors.New("invalid ip version '" + string(line) + "'")
|
||||
}
|
||||
|
||||
var ipFrom uint64
|
||||
var ipTo uint64
|
||||
if len(pieces[2]) == 0 {
|
||||
pieces[2] = pieces[1]
|
||||
ipFrom = types.Uint64(pieces[1])
|
||||
ipTo = types.Uint64(pieces[2])
|
||||
} else {
|
||||
ipFrom = types.Uint64(pieces[1])
|
||||
ipTo = types.Uint64(pieces[2]) + ipFrom
|
||||
}
|
||||
|
||||
var countryId = types.Uint32(pieces[3])
|
||||
var provinceId = types.Uint32(pieces[4])
|
||||
var cityId = types.Uint32(pieces[5])
|
||||
var townId = types.Uint32(pieces[6])
|
||||
var providerId = types.Uint32(pieces[7])
|
||||
var hash = HashRegion(countryId, provinceId, cityId, townId, providerId)
|
||||
|
||||
region, ok := this.regionMap[hash]
|
||||
if !ok {
|
||||
region = &ipRegion{
|
||||
CountryId: countryId,
|
||||
ProvinceId: provinceId,
|
||||
CityId: cityId,
|
||||
TownId: townId,
|
||||
ProviderId: providerId,
|
||||
}
|
||||
this.regionMap[hash] = region
|
||||
}
|
||||
|
||||
if version == "4" {
|
||||
this.ipV4Items = append(this.ipV4Items, &ipItem{
|
||||
IPFrom: ipFrom,
|
||||
IPTo: ipTo,
|
||||
Region: region,
|
||||
})
|
||||
} else {
|
||||
this.ipV6Items = append(this.ipV6Items, &ipItem{
|
||||
IPFrom: ipFrom,
|
||||
IPTo: ipTo,
|
||||
Region: region,
|
||||
})
|
||||
}
|
||||
|
||||
data = data[index+1:]
|
||||
} else {
|
||||
left = data
|
||||
@@ -231,3 +199,124 @@ func (this *Reader) parse(data []byte) (left []byte, err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 单行分析
|
||||
func (this *Reader) parseLine(line []byte) error {
|
||||
const maxPieces = 8
|
||||
var pieces = strings.Split(string(line), "|")
|
||||
var countPieces = len(pieces)
|
||||
if countPieces < maxPieces { // 补足一行
|
||||
for i := 0; i < maxPieces-countPieces; i++ {
|
||||
pieces = append(pieces, "")
|
||||
}
|
||||
} else if countPieces > maxPieces {
|
||||
return errors.New("invalid ip definition '" + string(line) + "'")
|
||||
}
|
||||
|
||||
var version = pieces[0]
|
||||
if len(version) == 0 {
|
||||
version = "4"
|
||||
}
|
||||
|
||||
if version != "4" && version != "6" {
|
||||
return errors.New("invalid ip version '" + string(line) + "'")
|
||||
}
|
||||
|
||||
// ip range
|
||||
var ipFrom uint64
|
||||
var ipTo uint64
|
||||
if strings.HasPrefix(pieces[1], "+") {
|
||||
ipFrom = this.lastIPFrom + this.decodeUint64(pieces[1][1:])
|
||||
} else {
|
||||
ipFrom = this.decodeUint64(pieces[1])
|
||||
}
|
||||
if len(pieces[2]) == 0 {
|
||||
ipTo = ipFrom
|
||||
} else {
|
||||
ipTo = this.decodeUint64(pieces[2]) + ipFrom
|
||||
}
|
||||
this.lastIPFrom = ipFrom
|
||||
|
||||
// country
|
||||
var countryId uint16
|
||||
if pieces[3] == "+" {
|
||||
countryId = this.lastCountryId
|
||||
} else {
|
||||
countryId = uint16(this.decodeUint64(pieces[3]))
|
||||
}
|
||||
this.lastCountryId = countryId
|
||||
|
||||
var provinceId uint16
|
||||
if pieces[4] == "+" {
|
||||
provinceId = this.lastProvinceId
|
||||
} else {
|
||||
provinceId = uint16(this.decodeUint64(pieces[4]))
|
||||
}
|
||||
this.lastProvinceId = provinceId
|
||||
|
||||
// city
|
||||
var cityId uint32
|
||||
if pieces[5] == "+" {
|
||||
cityId = this.lastCityId
|
||||
} else {
|
||||
cityId = uint32(this.decodeUint64(pieces[5]))
|
||||
}
|
||||
this.lastCityId = cityId
|
||||
|
||||
// town
|
||||
var townId uint32
|
||||
if pieces[6] == "+" {
|
||||
townId = this.lastTownId
|
||||
} else {
|
||||
townId = uint32(this.decodeUint64(pieces[6]))
|
||||
}
|
||||
this.lastTownId = townId
|
||||
|
||||
// provider
|
||||
var providerId uint16
|
||||
if pieces[7] == "+" {
|
||||
providerId = this.lastProviderId
|
||||
} else {
|
||||
providerId = uint16(this.decodeUint64(pieces[7]))
|
||||
}
|
||||
this.lastProviderId = providerId
|
||||
|
||||
var hash = HashRegion(countryId, provinceId, cityId, townId, providerId)
|
||||
|
||||
region, ok := this.regionMap[hash]
|
||||
if !ok {
|
||||
region = &ipRegion{
|
||||
CountryId: countryId,
|
||||
ProvinceId: provinceId,
|
||||
CityId: cityId,
|
||||
TownId: townId,
|
||||
ProviderId: providerId,
|
||||
}
|
||||
this.regionMap[hash] = region
|
||||
}
|
||||
|
||||
if version == "4" {
|
||||
this.ipV4Items = append(this.ipV4Items, &ipv4Item{
|
||||
IPFrom: uint32(ipFrom),
|
||||
IPTo: uint32(ipTo),
|
||||
Region: region,
|
||||
})
|
||||
} else {
|
||||
this.ipV6Items = append(this.ipV6Items, &ipv6Item{
|
||||
IPFrom: ipFrom,
|
||||
IPTo: ipTo,
|
||||
Region: region,
|
||||
})
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *Reader) decodeUint64(s string) uint64 {
|
||||
if this.meta != nil && this.meta.Version == Version2 {
|
||||
i, _ := strconv.ParseUint(s, 32, 64)
|
||||
return i
|
||||
}
|
||||
i, _ := strconv.ParseUint(s, 10, 64)
|
||||
return i
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
package iplibrary
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"errors"
|
||||
"io"
|
||||
@@ -12,9 +13,10 @@ import (
|
||||
|
||||
type FileReader struct {
|
||||
rawReader *Reader
|
||||
password string
|
||||
}
|
||||
|
||||
func NewFileReader(path string) (*FileReader, error) {
|
||||
func NewFileReader(path string, password string) (*FileReader, error) {
|
||||
fp, err := os.Open(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -23,10 +25,24 @@ func NewFileReader(path string) (*FileReader, error) {
|
||||
_ = fp.Close()
|
||||
}()
|
||||
|
||||
return NewFileDataReader(fp)
|
||||
return NewFileDataReader(fp, password)
|
||||
}
|
||||
|
||||
func NewFileDataReader(dataReader io.Reader) (*FileReader, error) {
|
||||
func NewFileDataReader(dataReader io.Reader, password string) (*FileReader, error) {
|
||||
if len(password) > 0 {
|
||||
data, err := io.ReadAll(dataReader)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
sourceData, err := NewEncrypt().Decode(data, password)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
dataReader = bytes.NewReader(sourceData)
|
||||
}
|
||||
|
||||
gzReader, err := gzip.NewReader(dataReader)
|
||||
if err != nil {
|
||||
return nil, errors.New("create gzip reader failed: " + err.Error())
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func TestNewFileReader(t *testing.T) {
|
||||
reader, err := iplibrary.NewFileReader("./ip")
|
||||
reader, err := iplibrary.NewFileReader("./ip-20c1461c.db", "123456")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
type QueryResult struct {
|
||||
item *ipItem
|
||||
item any
|
||||
meta *Meta
|
||||
}
|
||||
|
||||
@@ -17,18 +17,16 @@ func (this *QueryResult) IsOk() bool {
|
||||
}
|
||||
|
||||
func (this *QueryResult) CountryId() int64 {
|
||||
if this.item != nil {
|
||||
return int64(this.item.Region.CountryId)
|
||||
}
|
||||
return 0
|
||||
return int64(this.realCountryId())
|
||||
}
|
||||
|
||||
func (this *QueryResult) CountryName() string {
|
||||
if this.item == nil {
|
||||
return ""
|
||||
}
|
||||
if this.item.Region.CountryId > 0 {
|
||||
var country = this.meta.CountryWithId(this.item.Region.CountryId)
|
||||
var countryId = this.realCountryId()
|
||||
if countryId > 0 {
|
||||
var country = this.meta.CountryWithId(countryId)
|
||||
if country != nil {
|
||||
return country.Name
|
||||
}
|
||||
@@ -40,8 +38,9 @@ func (this *QueryResult) CountryCodes() []string {
|
||||
if this.item == nil {
|
||||
return nil
|
||||
}
|
||||
if this.item.Region.CountryId > 0 {
|
||||
var country = this.meta.CountryWithId(this.item.Region.CountryId)
|
||||
var countryId = this.realCountryId()
|
||||
if countryId > 0 {
|
||||
var country = this.meta.CountryWithId(countryId)
|
||||
if country != nil {
|
||||
return country.Codes
|
||||
}
|
||||
@@ -50,18 +49,16 @@ func (this *QueryResult) CountryCodes() []string {
|
||||
}
|
||||
|
||||
func (this *QueryResult) ProvinceId() int64 {
|
||||
if this.item != nil {
|
||||
return int64(this.item.Region.ProvinceId)
|
||||
}
|
||||
return 0
|
||||
return int64(this.realProvinceId())
|
||||
}
|
||||
|
||||
func (this *QueryResult) ProvinceName() string {
|
||||
if this.item == nil {
|
||||
return ""
|
||||
}
|
||||
if this.item.Region.ProvinceId > 0 {
|
||||
var province = this.meta.ProvinceWithId(this.item.Region.ProvinceId)
|
||||
var provinceId = this.realProvinceId()
|
||||
if provinceId > 0 {
|
||||
var province = this.meta.ProvinceWithId(provinceId)
|
||||
if province != nil {
|
||||
return province.Name
|
||||
}
|
||||
@@ -73,8 +70,9 @@ func (this *QueryResult) ProvinceCodes() []string {
|
||||
if this.item == nil {
|
||||
return nil
|
||||
}
|
||||
if this.item.Region.ProvinceId > 0 {
|
||||
var province = this.meta.ProvinceWithId(this.item.Region.ProvinceId)
|
||||
var provinceId = this.realProvinceId()
|
||||
if provinceId > 0 {
|
||||
var province = this.meta.ProvinceWithId(provinceId)
|
||||
if province != nil {
|
||||
return province.Codes
|
||||
}
|
||||
@@ -83,18 +81,16 @@ func (this *QueryResult) ProvinceCodes() []string {
|
||||
}
|
||||
|
||||
func (this *QueryResult) CityId() int64 {
|
||||
if this.item != nil {
|
||||
return int64(this.item.Region.CityId)
|
||||
}
|
||||
return 0
|
||||
return int64(this.realCityId())
|
||||
}
|
||||
|
||||
func (this *QueryResult) CityName() string {
|
||||
if this.item == nil {
|
||||
return ""
|
||||
}
|
||||
if this.item.Region.CityId > 0 {
|
||||
var city = this.meta.CityWithId(this.item.Region.CityId)
|
||||
var cityId = this.realCityId()
|
||||
if cityId > 0 {
|
||||
var city = this.meta.CityWithId(cityId)
|
||||
if city != nil {
|
||||
return city.Name
|
||||
}
|
||||
@@ -103,18 +99,16 @@ func (this *QueryResult) CityName() string {
|
||||
}
|
||||
|
||||
func (this *QueryResult) TownId() int64 {
|
||||
if this.item != nil {
|
||||
return int64(this.item.Region.TownId)
|
||||
}
|
||||
return 0
|
||||
return int64(this.realTownId())
|
||||
}
|
||||
|
||||
func (this *QueryResult) TownName() string {
|
||||
if this.item == nil {
|
||||
return ""
|
||||
}
|
||||
if this.item.Region.TownId > 0 {
|
||||
var town = this.meta.TownWithId(this.item.Region.TownId)
|
||||
var townId = this.realTownId()
|
||||
if townId > 0 {
|
||||
var town = this.meta.TownWithId(townId)
|
||||
if town != nil {
|
||||
return town.Name
|
||||
}
|
||||
@@ -123,18 +117,16 @@ func (this *QueryResult) TownName() string {
|
||||
}
|
||||
|
||||
func (this *QueryResult) ProviderId() int64 {
|
||||
if this.item != nil {
|
||||
return int64(this.item.Region.ProviderId)
|
||||
}
|
||||
return 0
|
||||
return int64(this.realProviderId())
|
||||
}
|
||||
|
||||
func (this *QueryResult) ProviderName() string {
|
||||
if this.item == nil {
|
||||
return ""
|
||||
}
|
||||
if this.item.Region.ProviderId > 0 {
|
||||
var provider = this.meta.ProviderWithId(this.item.Region.ProviderId)
|
||||
var providerId = this.realProviderId()
|
||||
if providerId > 0 {
|
||||
var provider = this.meta.ProviderWithId(providerId)
|
||||
if provider != nil {
|
||||
return provider.Name
|
||||
}
|
||||
@@ -146,8 +138,9 @@ func (this *QueryResult) ProviderCodes() []string {
|
||||
if this.item == nil {
|
||||
return nil
|
||||
}
|
||||
if this.item.Region.ProviderId > 0 {
|
||||
var provider = this.meta.ProviderWithId(this.item.Region.ProviderId)
|
||||
var providerId = this.realProviderId()
|
||||
if providerId > 0 {
|
||||
var provider = this.meta.ProviderWithId(providerId)
|
||||
if provider != nil {
|
||||
return provider.Codes
|
||||
}
|
||||
@@ -177,7 +170,7 @@ func (this *QueryResult) Summary() string {
|
||||
pieces = append(pieces, cityName)
|
||||
}
|
||||
if len(townName) > 0 && !lists.ContainsString(pieces, townName) && !lists.ContainsString(pieces, strings.TrimSuffix(townName, "县")) {
|
||||
pieces = append(pieces, cityName)
|
||||
pieces = append(pieces, townName)
|
||||
}
|
||||
|
||||
if len(providerName) > 0 && !lists.ContainsString(pieces, providerName) {
|
||||
@@ -189,3 +182,68 @@ func (this *QueryResult) Summary() string {
|
||||
|
||||
return strings.Join(pieces, " ")
|
||||
}
|
||||
|
||||
func (this *QueryResult) realCountryId() uint16 {
|
||||
if this.item != nil {
|
||||
switch item := this.item.(type) {
|
||||
case *ipv4Item:
|
||||
return item.Region.CountryId
|
||||
case *ipv6Item:
|
||||
return item.Region.CountryId
|
||||
}
|
||||
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (this *QueryResult) realProvinceId() uint16 {
|
||||
if this.item != nil {
|
||||
switch item := this.item.(type) {
|
||||
case *ipv4Item:
|
||||
return item.Region.ProvinceId
|
||||
case *ipv6Item:
|
||||
return item.Region.ProvinceId
|
||||
}
|
||||
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (this *QueryResult) realCityId() uint32 {
|
||||
if this.item != nil {
|
||||
switch item := this.item.(type) {
|
||||
case *ipv4Item:
|
||||
return item.Region.CityId
|
||||
case *ipv6Item:
|
||||
return item.Region.CityId
|
||||
}
|
||||
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (this *QueryResult) realTownId() uint32 {
|
||||
if this.item != nil {
|
||||
switch item := this.item.(type) {
|
||||
case *ipv4Item:
|
||||
return item.Region.TownId
|
||||
case *ipv6Item:
|
||||
return item.Region.TownId
|
||||
}
|
||||
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (this *QueryResult) realProviderId() uint16 {
|
||||
if this.item != nil {
|
||||
switch item := this.item.(type) {
|
||||
case *ipv4Item:
|
||||
return item.Region.ProviderId
|
||||
case *ipv6Item:
|
||||
return item.Region.ProviderId
|
||||
}
|
||||
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ func (this *Template) init() error {
|
||||
|
||||
return keyword
|
||||
})
|
||||
reg, err := regexp.Compile(template)
|
||||
reg, err := regexp.Compile("^(?U)" + template + "\n?$")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -13,11 +13,25 @@ func TestNewTemplate(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, s := range []string{
|
||||
"0.0.0.0|0.255.255.255|0|0|0|内网IP|内网IP",
|
||||
"42.0.32.0|42.0.63.255|中国|0|广东省|广州市|电信",
|
||||
"42.0.32.0|42.0.63.255|中国|0|广东省|广州市|电信\n123",
|
||||
"42.0.32.0|42.0.63.255|中国||广东省|广州市|电信",
|
||||
"42.0.32.0|42.0.63.255|中国|0||广州市|电信",
|
||||
"42.0.32.0|42.0.63.255|中国|0|广东省|广州市",
|
||||
} {
|
||||
values, ok := template.Extract(s, []string{})
|
||||
t.Log(ok, s, "=>\n", values)
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewTemplate2(t *testing.T) {
|
||||
template, err := iplibrary.NewTemplate("${any},${any},${ipFrom},${ipTo},${country},${province},${city},${town},${provider},${any},${any}")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, s := range []string{
|
||||
"22723584,22723839,1.90.188.0,1.90.188.255,中国,北京,北京,房山,歌华有线,102400,010,城域网",
|
||||
} {
|
||||
values, _ := template.Extract(s, []string{})
|
||||
t.Log(s, "=>\n", values)
|
||||
|
||||
@@ -213,7 +213,7 @@ func (this *Updater) Loop() error {
|
||||
func (this *Updater) loadFile(fp *os.File) error {
|
||||
this.source.LogInfo("load ip library from '" + fp.Name() + "' ...")
|
||||
|
||||
fileReader, err := NewFileDataReader(fp)
|
||||
fileReader, err := NewFileDataReader(fp, "")
|
||||
if err != nil {
|
||||
return errors.New("load ip library from reader failed: " + err.Error())
|
||||
}
|
||||
|
||||
@@ -6,4 +6,5 @@ type Version = int
|
||||
|
||||
const (
|
||||
Version1 Version = 1
|
||||
Version2 Version = 2 // 主要变更为数字使用32进制
|
||||
)
|
||||
|
||||
@@ -8,10 +8,10 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/configutils"
|
||||
"github.com/iwind/TeaGo/types"
|
||||
"hash"
|
||||
"io"
|
||||
"net"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
@@ -41,13 +41,20 @@ func (this *hashWriter) Sum() string {
|
||||
type Writer struct {
|
||||
writer *hashWriter
|
||||
meta *Meta
|
||||
|
||||
lastIPFrom uint64 // 上一次的IP
|
||||
lastCountryId int64
|
||||
lastProvinceId int64
|
||||
lastCityId int64
|
||||
lastTownId int64
|
||||
lastProviderId int64
|
||||
}
|
||||
|
||||
func NewWriter(writer io.Writer, meta *Meta) *Writer {
|
||||
if meta == nil {
|
||||
meta = &Meta{}
|
||||
}
|
||||
meta.Version = Version1
|
||||
meta.Version = Version2
|
||||
meta.CreatedAt = time.Now().Unix()
|
||||
|
||||
var libWriter = &Writer{
|
||||
@@ -103,51 +110,81 @@ func (this *Writer) Write(ipFrom string, ipTo string, countryId int64, provinceI
|
||||
fromIPLong, toIPLong = toIPLong, fromIPLong
|
||||
}
|
||||
|
||||
pieces = append(pieces, types.String(fromIPLong))
|
||||
if this.lastIPFrom > 0 && fromIPLong > this.lastIPFrom {
|
||||
pieces = append(pieces, "+"+this.formatUint64(fromIPLong-this.lastIPFrom))
|
||||
} else {
|
||||
pieces = append(pieces, this.formatUint64(fromIPLong))
|
||||
}
|
||||
this.lastIPFrom = fromIPLong
|
||||
if ipFrom == ipTo {
|
||||
// 2
|
||||
pieces = append(pieces, "")
|
||||
} else {
|
||||
// 2
|
||||
pieces = append(pieces, types.String(toIPLong-fromIPLong))
|
||||
pieces = append(pieces, this.formatUint64(toIPLong-fromIPLong))
|
||||
}
|
||||
|
||||
// 3
|
||||
if countryId > 0 {
|
||||
pieces = append(pieces, types.String(countryId))
|
||||
if countryId == this.lastCountryId {
|
||||
pieces = append(pieces, "+")
|
||||
} else {
|
||||
pieces = append(pieces, this.formatUint64(uint64(countryId)))
|
||||
}
|
||||
} else {
|
||||
pieces = append(pieces, "")
|
||||
}
|
||||
this.lastCountryId = countryId
|
||||
|
||||
// 4
|
||||
if provinceId > 0 {
|
||||
pieces = append(pieces, types.String(provinceId))
|
||||
if provinceId == this.lastProvinceId {
|
||||
pieces = append(pieces, "+")
|
||||
} else {
|
||||
pieces = append(pieces, this.formatUint64(uint64(provinceId)))
|
||||
}
|
||||
} else {
|
||||
pieces = append(pieces, "")
|
||||
}
|
||||
this.lastProvinceId = provinceId
|
||||
|
||||
// 5
|
||||
if cityId > 0 {
|
||||
pieces = append(pieces, types.String(cityId))
|
||||
if cityId == this.lastCityId {
|
||||
pieces = append(pieces, "+")
|
||||
} else {
|
||||
pieces = append(pieces, this.formatUint64(uint64(cityId)))
|
||||
}
|
||||
} else {
|
||||
pieces = append(pieces, "")
|
||||
}
|
||||
this.lastCityId = cityId
|
||||
|
||||
// 6
|
||||
if townId > 0 {
|
||||
pieces = append(pieces, types.String(townId))
|
||||
if townId == this.lastTownId {
|
||||
pieces = append(pieces, "+")
|
||||
} else {
|
||||
pieces = append(pieces, this.formatUint64(uint64(townId)))
|
||||
}
|
||||
} else {
|
||||
pieces = append(pieces, "")
|
||||
}
|
||||
this.lastTownId = townId
|
||||
|
||||
// 7
|
||||
if providerId > 0 {
|
||||
pieces = append(pieces, types.String(providerId))
|
||||
if providerId == this.lastProviderId {
|
||||
pieces = append(pieces, "+")
|
||||
} else {
|
||||
pieces = append(pieces, this.formatUint64(uint64(providerId)))
|
||||
}
|
||||
} else {
|
||||
pieces = append(pieces, "")
|
||||
}
|
||||
this.lastProviderId = providerId
|
||||
|
||||
_, err := this.writer.Write([]byte(strings.Join(pieces, "|")))
|
||||
_, err := this.writer.Write([]byte(strings.TrimRight(strings.Join(pieces, "|"), "|")))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -159,3 +196,7 @@ func (this *Writer) Write(ipFrom string, ipTo string, countryId int64, provinceI
|
||||
func (this *Writer) Sum() string {
|
||||
return this.writer.Sum()
|
||||
}
|
||||
|
||||
func (this *Writer) formatUint64(i uint64) string {
|
||||
return strconv.FormatUint(i, 32)
|
||||
}
|
||||
|
||||
@@ -10,11 +10,12 @@ import (
|
||||
type FileWriter struct {
|
||||
fp *os.File
|
||||
gzWriter *gzip.Writer
|
||||
password string
|
||||
|
||||
rawWriter *Writer
|
||||
}
|
||||
|
||||
func NewFileWriter(path string, meta *Meta) (*FileWriter, error) {
|
||||
func NewFileWriter(path string, meta *Meta, password string) (*FileWriter, error) {
|
||||
fp, err := os.OpenFile(path, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0666)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -29,6 +30,7 @@ func NewFileWriter(path string, meta *Meta) (*FileWriter, error) {
|
||||
fp: fp,
|
||||
gzWriter: gzWriter,
|
||||
rawWriter: NewWriter(gzWriter, meta),
|
||||
password: password,
|
||||
}
|
||||
return writer, nil
|
||||
}
|
||||
@@ -54,5 +56,25 @@ func (this *FileWriter) Close() error {
|
||||
if err2 != nil {
|
||||
return err2
|
||||
}
|
||||
|
||||
// 加密内容
|
||||
if len(this.password) > 0 {
|
||||
var filePath = this.fp.Name()
|
||||
data, err := os.ReadFile(filePath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(data) > 0 {
|
||||
encodedData, err := NewEncrypt().Encode(data, this.password)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = os.WriteFile(filePath, encodedData, 0666)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -10,9 +10,9 @@ import (
|
||||
)
|
||||
|
||||
func TestNewFileWriter(t *testing.T) {
|
||||
writer, err := iplibrary.NewFileWriter("./internal-ip-library.db", &iplibrary.Meta{
|
||||
writer, err := iplibrary.NewFileWriter("./internal-ip-library-test.db", &iplibrary.Meta{
|
||||
Author: "GoEdge",
|
||||
})
|
||||
}, "")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -41,7 +41,7 @@ func TestNewFileWriter(t *testing.T) {
|
||||
return types.String(rands.Int(0, 255))
|
||||
}
|
||||
|
||||
for i := 0; i < 1_000_000; i++ {
|
||||
for i := 0; i < 1; i++ {
|
||||
err = writer.Write(n()+"."+n()+"."+n()+"."+n(), n()+"."+n()+"."+n()+"."+n(), int64(i)+100, 201, 301, 401, 501)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
22
pkg/nodeconfigs/clock_config.go
Normal file
22
pkg/nodeconfigs/clock_config.go
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
|
||||
package nodeconfigs
|
||||
|
||||
func DefaultClockConfig() *ClockConfig {
|
||||
return &ClockConfig{
|
||||
AutoSync: true,
|
||||
Server: "",
|
||||
CheckChrony: true,
|
||||
}
|
||||
}
|
||||
|
||||
// ClockConfig 时钟相关配置
|
||||
type ClockConfig struct {
|
||||
AutoSync bool `yaml:"autoSync" json:"autoSync"` // 自动尝试同步时钟
|
||||
Server string `yaml:"server" json:"server"` // 时钟同步服务器
|
||||
CheckChrony bool `yaml:"checkChrony" json:"checkChrony"` // 检查 chronyd 是否在运行
|
||||
}
|
||||
|
||||
func (this *ClockConfig) Init() error {
|
||||
return nil
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
package nodeconfigs
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"crypto/sha256"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/nodeutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/ddosconfigs"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/firewallconfigs"
|
||||
@@ -14,9 +18,12 @@ import (
|
||||
"os"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
||||
var sharedNodeConfig *NodeConfig = nil
|
||||
var uamPolicyLocker = &sync.RWMutex{}
|
||||
|
||||
type ServerError struct {
|
||||
Id int64
|
||||
@@ -29,42 +36,54 @@ func NewServerError(serverId int64, message string) *ServerError {
|
||||
|
||||
// NodeConfig 边缘节点配置
|
||||
type NodeConfig struct {
|
||||
Id int64 `yaml:"id" json:"id"`
|
||||
NodeId string `yaml:"nodeId" json:"nodeId"`
|
||||
Secret string `yaml:"secret" json:"secret"`
|
||||
IsOn bool `yaml:"isOn" json:"isOn"`
|
||||
Servers []*serverconfigs.ServerConfig `yaml:"servers" json:"servers"`
|
||||
SupportCNAME bool `yaml:"supportCNAME" json:"supportCNAME"`
|
||||
Version int64 `yaml:"version" json:"version"`
|
||||
Name string `yaml:"name" json:"name"`
|
||||
GroupId int64 `yaml:"groupId" json:"groupId"`
|
||||
RegionId int64 `yaml:"regionId" json:"regionId"`
|
||||
OCSPVersion int64 `yaml:"ocspVersion" json:"ocspVersion"`
|
||||
Id int64 `yaml:"id" json:"id"`
|
||||
Edition string `yaml:"edition" json:"edition"`
|
||||
NodeId string `yaml:"nodeId" json:"nodeId"`
|
||||
Secret string `yaml:"secret" json:"secret"`
|
||||
IsOn bool `yaml:"isOn" json:"isOn"`
|
||||
Servers []*serverconfigs.ServerConfig `yaml:"servers" json:"servers"`
|
||||
SupportCNAME bool `yaml:"supportCNAME" json:"supportCNAME"`
|
||||
Version int64 `yaml:"version" json:"version"`
|
||||
Name string `yaml:"name" json:"name"`
|
||||
GroupId int64 `yaml:"groupId" json:"groupId"`
|
||||
RegionId int64 `yaml:"regionId" json:"regionId"`
|
||||
OCSPVersion int64 `yaml:"ocspVersion" json:"ocspVersion"`
|
||||
DataMap *shared.DataMap `yaml:"dataMap" json:"dataMap"`
|
||||
UpdatingServerListId int64 `yaml:"updatingServerListId" json:"updatingServerListId"`
|
||||
|
||||
// 性能
|
||||
MaxCPU int32 `yaml:"maxCPU" json:"maxCPU"`
|
||||
CacheDiskDir string `yaml:"cacheDiskDir" json:"cacheDiskDir"` // 文件缓存目录
|
||||
MaxCacheDiskCapacity *shared.SizeCapacity `yaml:"maxCacheDiskCapacity" json:"maxCacheDiskCapacity"` // 文件缓存容量
|
||||
MaxCPU int32 `yaml:"maxCPU" json:"maxCPU"`
|
||||
APINodeAddrs []*serverconfigs.NetworkAddressConfig `yaml:"apiNodeAddrs" json:"apiNodeAddrs"`
|
||||
|
||||
CacheDiskDir string `yaml:"cacheDiskDir" json:"cacheDiskDir"` // 文件缓存目录
|
||||
MaxCacheDiskCapacity *shared.SizeCapacity `yaml:"maxCacheDiskCapacity" json:"maxCacheDiskCapacity"` // 文件缓存容量
|
||||
|
||||
CacheDiskSubDirs []*serverconfigs.CacheDir `yaml:"cacheDiskSubDirs" json:"cacheDiskSubDirs"` // 其余缓存目录
|
||||
|
||||
MaxCacheMemoryCapacity *shared.SizeCapacity `yaml:"maxCacheMemoryCapacity" json:"maxCacheMemoryCapacity"` // 内容缓存容量
|
||||
MaxThreads int `yaml:"maxThreads" json:"maxThreads"` // 最大线程数
|
||||
DDoSProtection *ddosconfigs.ProtectionConfig `yaml:"ddosProtection" json:"ddosProtection"`
|
||||
DDoSProtection *ddosconfigs.ProtectionConfig `yaml:"ddosProtection" json:"ddosProtection"` // DDoS防护
|
||||
EnableIPLists bool `yaml:"enableIPLists" json:"enableIPLists"` // 启用IP名单
|
||||
|
||||
// 级别
|
||||
Level int32 `yaml:"level" json:"level"`
|
||||
ParentNodes map[int64][]*ParentNodeConfig `yaml:"parentNodes" json:"parentNodes"` // clusterId => []*ParentNodeConfig
|
||||
|
||||
// 全局配置
|
||||
GlobalConfig *serverconfigs.GlobalConfig `yaml:"globalConfig" json:"globalConfig"` // 全局配置
|
||||
ProductConfig *ProductConfig `yaml:"productConfig" json:"productConfig"`
|
||||
GlobalConfig *serverconfigs.GlobalConfig `yaml:"globalConfig" json:"globalConfig"` // 全局配置
|
||||
GlobalServerConfig *serverconfigs.GlobalServerConfig `yaml:"globalServerConfig" json:"globalServerConfig"` // 服务全局配置,用来替代 GlobalConfig
|
||||
ProductConfig *ProductConfig `yaml:"productConfig" json:"productConfig"`
|
||||
|
||||
// 集群统一配置
|
||||
HTTPFirewallPolicies []*firewallconfigs.HTTPFirewallPolicy `yaml:"httpFirewallPolicies" json:"httpFirewallPolicies"`
|
||||
HTTPCachePolicies []*serverconfigs.HTTPCachePolicy `yaml:"httpCachePolicies" json:"httpCachePolicies"`
|
||||
TOA *TOAConfig `yaml:"toa" json:"toa"`
|
||||
SystemServices map[string]maps.Map `yaml:"systemServices" json:"systemServices"` // 系统服务配置 type => params
|
||||
FirewallActions []*firewallconfigs.FirewallActionConfig `yaml:"firewallActions" json:"firewallActions"`
|
||||
TimeZone string `yaml:"timeZone" json:"timeZone"`
|
||||
AutoOpenPorts bool `yaml:"autoOpenPorts" json:"autoOpenPorts"`
|
||||
SystemServices map[string]maps.Map `yaml:"systemServices" json:"systemServices"` // 系统服务配置 type => params
|
||||
FirewallActions []*firewallconfigs.FirewallActionConfig `yaml:"firewallActions" json:"firewallActions"` // 防火墙动作
|
||||
TimeZone string `yaml:"timeZone" json:"timeZone"` // 自动设置时区
|
||||
AutoOpenPorts bool `yaml:"autoOpenPorts" json:"autoOpenPorts"` // 自动开放所需端口
|
||||
Clock *ClockConfig `yaml:"clock" json:"clock"` // 时钟配置
|
||||
AutoInstallNftables bool `yaml:"autoInstallNftables" json:"autoInstallNftables"` // 自动安装nftables
|
||||
|
||||
// 指标
|
||||
MetricItems []*serverconfigs.MetricItemConfig `yaml:"metricItems" json:"metricItems"`
|
||||
@@ -113,17 +132,50 @@ func SharedNodeConfig() (*NodeConfig, error) {
|
||||
return sharedNodeConfig, nil
|
||||
}
|
||||
|
||||
data, err := os.ReadFile(Tea.ConfigFile("node.json"))
|
||||
// 从本地缓存读取
|
||||
var configFile = Tea.ConfigFile("node.json")
|
||||
var readCacheOk = false
|
||||
defer func() {
|
||||
if !readCacheOk {
|
||||
_ = os.Remove(configFile)
|
||||
}
|
||||
}()
|
||||
|
||||
data, err := os.ReadFile(configFile)
|
||||
if err != nil {
|
||||
return &NodeConfig{}, err
|
||||
}
|
||||
|
||||
config := &NodeConfig{}
|
||||
err = json.Unmarshal(data, &config)
|
||||
encodedNodeInfo, encodedJSONData, found := bytes.Cut(data, []byte("\n"))
|
||||
if !found {
|
||||
// 删除缓存文件
|
||||
return &NodeConfig{}, errors.New("node.json: invalid data format")
|
||||
}
|
||||
|
||||
encodedNodeInfoData, err := base64.StdEncoding.DecodeString(string(encodedNodeInfo))
|
||||
if err != nil {
|
||||
// 删除缓存文件
|
||||
return &NodeConfig{}, err
|
||||
}
|
||||
|
||||
nodeUniqueId, nodeSecret, found := strings.Cut(string(encodedNodeInfoData), "|")
|
||||
if !found {
|
||||
// 删除缓存文件
|
||||
return &NodeConfig{}, errors.New("node.json: node info: invalid data format")
|
||||
}
|
||||
|
||||
jsonData, err := nodeutils.DecryptData(nodeUniqueId, nodeSecret, string(encodedJSONData))
|
||||
if err != nil {
|
||||
return &NodeConfig{}, err
|
||||
}
|
||||
|
||||
var config = &NodeConfig{}
|
||||
err = json.Unmarshal(jsonData, &config)
|
||||
if err != nil {
|
||||
return &NodeConfig{}, err
|
||||
}
|
||||
|
||||
readCacheOk = true
|
||||
sharedNodeConfig = config
|
||||
return config, nil
|
||||
}
|
||||
@@ -141,6 +193,9 @@ func CloneNodeConfig(nodeConfig *NodeConfig) (*NodeConfig, error) {
|
||||
return nil, errors.New("node config should not be nil")
|
||||
}
|
||||
|
||||
uamPolicyLocker.RLock()
|
||||
defer uamPolicyLocker.RUnlock()
|
||||
|
||||
var newConfigValue = reflect.Indirect(reflect.ValueOf(&NodeConfig{}))
|
||||
var oldValue = reflect.Indirect(reflect.ValueOf(nodeConfig))
|
||||
var valueType = oldValue.Type()
|
||||
@@ -163,14 +218,25 @@ func CloneNodeConfig(nodeConfig *NodeConfig) (*NodeConfig, error) {
|
||||
}
|
||||
|
||||
// Init 初始化
|
||||
func (this *NodeConfig) Init() (err error, serverErrors []*ServerError) {
|
||||
func (this *NodeConfig) Init(ctx context.Context) (err error, serverErrors []*ServerError) {
|
||||
// 设置Context
|
||||
if ctx == nil {
|
||||
ctx = context.Background()
|
||||
}
|
||||
ctx = context.WithValue(ctx, "DataMap", this.DataMap)
|
||||
|
||||
this.secretHash = fmt.Sprintf("%x", sha256.Sum256([]byte(this.NodeId+"@"+this.Secret)))
|
||||
this.paddedId = fmt.Sprintf("%08d", this.Id)
|
||||
|
||||
// servers
|
||||
for _, server := range this.Servers {
|
||||
// 避免在运行时重新初始化
|
||||
if server.IsInitialized() {
|
||||
continue
|
||||
}
|
||||
|
||||
// 初始化
|
||||
errs := server.Init()
|
||||
errs := server.Init(ctx)
|
||||
if len(errs) > 0 {
|
||||
// 这里不返回错误,而是继续往下,防止单个服务错误而影响其他服务
|
||||
for _, serverErr := range errs {
|
||||
@@ -314,14 +380,17 @@ func (this *NodeConfig) Init() (err error, serverErrors []*ServerError) {
|
||||
}
|
||||
|
||||
// uam policy
|
||||
uamPolicyLocker.RLock()
|
||||
if this.UAMPolicies != nil {
|
||||
for _, policy := range this.UAMPolicies {
|
||||
err = policy.Init()
|
||||
if err != nil {
|
||||
uamPolicyLocker.RUnlock()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
uamPolicyLocker.RUnlock()
|
||||
|
||||
// dns resolver
|
||||
if this.DNSResolver != nil {
|
||||
@@ -331,6 +400,24 @@ func (this *NodeConfig) Init() (err error, serverErrors []*ServerError) {
|
||||
}
|
||||
}
|
||||
|
||||
// 全局服务设置
|
||||
if this.GlobalServerConfig != nil {
|
||||
err = this.GlobalServerConfig.Init()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// api node addrs
|
||||
if len(this.APINodeAddrs) > 0 {
|
||||
for _, addr := range this.APINodeAddrs {
|
||||
err := addr.Init()
|
||||
if err != nil {
|
||||
return err, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -365,7 +452,7 @@ func (this *NodeConfig) RemoveServer(serverId int64) {
|
||||
|
||||
// AvailableGroups 根据网络地址和协议分组
|
||||
func (this *NodeConfig) AvailableGroups() []*serverconfigs.ServerAddressGroup {
|
||||
groupMapping := map[string]*serverconfigs.ServerAddressGroup{} // protocol://addr => Server Group
|
||||
var groupMapping = map[string]*serverconfigs.ServerAddressGroup{} // protocol://addr => Server Group
|
||||
for _, server := range this.Servers {
|
||||
if !server.IsOk() || !server.IsOn {
|
||||
continue
|
||||
@@ -381,7 +468,7 @@ func (this *NodeConfig) AvailableGroups() []*serverconfigs.ServerAddressGroup {
|
||||
groupMapping[addr] = group
|
||||
}
|
||||
}
|
||||
result := []*serverconfigs.ServerAddressGroup{}
|
||||
var result = []*serverconfigs.ServerAddressGroup{}
|
||||
for _, group := range groupMapping {
|
||||
result = append(result, group)
|
||||
}
|
||||
@@ -403,7 +490,14 @@ func (this *NodeConfig) Save() error {
|
||||
return err
|
||||
}
|
||||
|
||||
return os.WriteFile(Tea.ConfigFile("node.json"), data, 0777)
|
||||
var headerData = []byte(base64.StdEncoding.EncodeToString([]byte(this.NodeId+"|"+this.Secret)) + "\n")
|
||||
|
||||
encodedData, err := nodeutils.EncryptData(this.NodeId, this.Secret, data)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return os.WriteFile(Tea.ConfigFile("node.json"), append(headerData, encodedData...), 0777)
|
||||
}
|
||||
|
||||
// PaddedId 获取填充后的ID
|
||||
@@ -523,12 +617,21 @@ func (this *NodeConfig) FindWebPImagePolicyWithClusterId(clusterId int64) *WebPI
|
||||
|
||||
// FindUAMPolicyWithClusterId 使用集群ID查找UAM策略
|
||||
func (this *NodeConfig) FindUAMPolicyWithClusterId(clusterId int64) *UAMPolicy {
|
||||
uamPolicyLocker.RLock()
|
||||
defer uamPolicyLocker.RUnlock()
|
||||
if this.UAMPolicies == nil {
|
||||
return nil
|
||||
}
|
||||
return this.UAMPolicies[clusterId]
|
||||
}
|
||||
|
||||
// UpdateUAMPolicies 修改集群UAM策略
|
||||
func (this *NodeConfig) UpdateUAMPolicies(policies map[int64]*UAMPolicy) {
|
||||
uamPolicyLocker.Lock()
|
||||
defer uamPolicyLocker.Unlock()
|
||||
this.UAMPolicies = policies
|
||||
}
|
||||
|
||||
// SecretHash 对Id和Secret的Hash计算
|
||||
func (this *NodeConfig) SecretHash() string {
|
||||
return this.secretHash
|
||||
|
||||
@@ -97,5 +97,24 @@ func TestNodeConfig_AddServer(t *testing.T) {
|
||||
for _, s := range config.Servers {
|
||||
t.Log(s.Id)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestCloneNodeConfig_UAMPolicies(t *testing.T) {
|
||||
var config = &NodeConfig{}
|
||||
config.UAMPolicies = map[int64]*UAMPolicy{}
|
||||
t.Logf("%p", config.UAMPolicies)
|
||||
|
||||
clonedConfig, err := CloneNodeConfig(config)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Logf("%p", clonedConfig.UAMPolicies)
|
||||
}
|
||||
|
||||
func BenchmarkNodeConfig(b *testing.B) {
|
||||
var config = &NodeConfig{}
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
_, _ = CloneNodeConfig(config)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,10 @@ type NodeStatus struct {
|
||||
Load1m float64 `json:"load1m"`
|
||||
Load5m float64 `json:"load5m"`
|
||||
Load15m float64 `json:"load15m"`
|
||||
ConnectionCount int `json:"connectionCount"` // 连接数
|
||||
ExePath string `json:"exePath"` // 可执行文件路径
|
||||
ConnectionCount int `json:"connectionCount"` // 连接数
|
||||
ExePath string `json:"exePath"` // 可执行文件路径
|
||||
APISuccessPercent float64 `json:"apiSuccessPercent"` // API成功比例
|
||||
APIAvgCostSeconds float64 `json:"apiAvgCostSeconds"` // API平均耗时
|
||||
|
||||
TrafficInBytes uint64 `json:"trafficInBytes"`
|
||||
TrafficOutBytes uint64 `json:"trafficOutBytes"`
|
||||
|
||||
11
pkg/nodeconfigs/ssh_params.go
Normal file
11
pkg/nodeconfigs/ssh_params.go
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
|
||||
package nodeconfigs
|
||||
|
||||
func DefaultSSHParams() *SSHParams {
|
||||
return &SSHParams{Port: 22}
|
||||
}
|
||||
|
||||
type SSHParams struct {
|
||||
Port int `json:"port"`
|
||||
}
|
||||
@@ -1,26 +1,12 @@
|
||||
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
//go:build !plus
|
||||
|
||||
package nodeconfigs
|
||||
|
||||
func init() {
|
||||
_ = DefaultUAMPolicy.Init()
|
||||
}
|
||||
|
||||
var DefaultUAMPolicy = &UAMPolicy{
|
||||
IsOn: true,
|
||||
AllowSearchEngines: true,
|
||||
DenySpiders: true,
|
||||
UITitle: "",
|
||||
UIBody: "",
|
||||
}
|
||||
var DefaultUAMPolicy = &UAMPolicy{}
|
||||
|
||||
type UAMPolicy struct {
|
||||
IsOn bool `yaml:"isOn" json:"isOn"`
|
||||
AllowSearchEngines bool `yaml:"allowSearchEngines" json:"allowSearchEngines"` // 直接跳过常见搜索引擎
|
||||
DenySpiders bool `yaml:"denySpiders" json:"denySpiders"` // 拦截常见爬虫
|
||||
|
||||
UITitle string `yaml:"uiTitle" json:"uiTitle"` // 页面标题
|
||||
UIBody string `yaml:"uiBody" json:"uiBody"` // 页面内容
|
||||
IsOn bool `yaml:"isOn" json:"isOn"`
|
||||
}
|
||||
|
||||
func (this *UAMPolicy) Init() error {
|
||||
|
||||
@@ -13,7 +13,7 @@ type AES256CFBMethod struct {
|
||||
|
||||
func (this *AES256CFBMethod) Init(key, iv []byte) error {
|
||||
// 判断key是否为32长度
|
||||
l := len(key)
|
||||
var l = len(key)
|
||||
if l > 32 {
|
||||
key = key[:32]
|
||||
} else if l < 32 {
|
||||
@@ -27,7 +27,7 @@ func (this *AES256CFBMethod) Init(key, iv []byte) error {
|
||||
this.block = block
|
||||
|
||||
// 判断iv长度
|
||||
l2 := len(iv)
|
||||
var l2 = len(iv)
|
||||
if l2 > aes.BlockSize {
|
||||
iv = iv[:aes.BlockSize]
|
||||
} else if l2 < aes.BlockSize {
|
||||
@@ -49,7 +49,7 @@ func (this *AES256CFBMethod) Encrypt(src []byte) (dst []byte, err error) {
|
||||
|
||||
dst = make([]byte, len(src))
|
||||
|
||||
encrypter := cipher.NewCFBEncrypter(this.block, this.iv)
|
||||
var encrypter = cipher.NewCFBEncrypter(this.block, this.iv)
|
||||
encrypter.XORKeyStream(dst, src)
|
||||
|
||||
return
|
||||
@@ -65,7 +65,7 @@ func (this *AES256CFBMethod) Decrypt(dst []byte) (src []byte, err error) {
|
||||
}()
|
||||
|
||||
src = make([]byte, len(dst))
|
||||
decrypter := cipher.NewCFBDecrypter(this.block, this.iv)
|
||||
var decrypter = cipher.NewCFBDecrypter(this.block, this.iv)
|
||||
decrypter.XORKeyStream(src, dst)
|
||||
|
||||
return
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// EncryptData 加密
|
||||
func EncryptData(nodeUniqueId string, nodeSecret string, data maps.Map, timeout int32) (string, error) {
|
||||
// EncryptMap 加密
|
||||
func EncryptMap(nodeUniqueId string, nodeSecret string, data maps.Map, timeout int32) (string, error) {
|
||||
if data == nil {
|
||||
data = maps.Map{}
|
||||
}
|
||||
@@ -42,8 +42,8 @@ func EncryptData(nodeUniqueId string, nodeSecret string, data maps.Map, timeout
|
||||
return base64.StdEncoding.EncodeToString(result), nil
|
||||
}
|
||||
|
||||
// DecryptData 解密
|
||||
func DecryptData(nodeUniqueId string, nodeSecret string, encodedString string) (maps.Map, error) {
|
||||
// DecryptMap 解密
|
||||
func DecryptMap(nodeUniqueId string, nodeSecret string, encodedString string) (maps.Map, error) {
|
||||
var method = &AES256CFBMethod{}
|
||||
err := method.Init([]byte(nodeUniqueId), []byte(nodeSecret))
|
||||
if err != nil {
|
||||
@@ -73,3 +73,42 @@ func DecryptData(nodeUniqueId string, nodeSecret string, encodedString string) (
|
||||
|
||||
return result.GetMap("data"), nil
|
||||
}
|
||||
|
||||
// EncryptData 加密
|
||||
func EncryptData(nodeUniqueId string, nodeSecret string, data []byte) (string, error) {
|
||||
if len(data) == 0 {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
var method = &AES256CFBMethod{}
|
||||
err := method.Init([]byte(nodeUniqueId), []byte(nodeSecret))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
result, err := method.Encrypt(data)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return base64.StdEncoding.EncodeToString(result), nil
|
||||
}
|
||||
|
||||
// DecryptData 解密
|
||||
func DecryptData(nodeUniqueId string, nodeSecret string, encodedString string) ([]byte, error) {
|
||||
if len(encodedString) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
var method = &AES256CFBMethod{}
|
||||
err := method.Init([]byte(nodeUniqueId), []byte(nodeSecret))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
encodedData, err := base64.StdEncoding.DecodeString(encodedString)
|
||||
if err != nil {
|
||||
return nil, errors.New("base64 decode failed: " + err.Error())
|
||||
}
|
||||
|
||||
return method.Decrypt(encodedData)
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestEncryptData(t *testing.T) {
|
||||
e, err := EncryptData("a", "b", maps.Map{
|
||||
func TestEncryptMap(t *testing.T) {
|
||||
e, err := EncryptMap("a", "b", maps.Map{
|
||||
"c": 1,
|
||||
}, 5)
|
||||
if err != nil {
|
||||
@@ -16,16 +16,30 @@ func TestEncryptData(t *testing.T) {
|
||||
}
|
||||
t.Log("e:", e)
|
||||
|
||||
s, err := DecryptData("a", "b", e)
|
||||
s, err := DecryptMap("a", "b", e)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log("s:", s)
|
||||
}
|
||||
|
||||
func TestEncryptData(t *testing.T) {
|
||||
encoded, err := EncryptData("a", "b", []byte("Hello, World"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log("encoded:", encoded)
|
||||
|
||||
source, err := DecryptData("a", "b", encoded)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log("source:", string(source))
|
||||
}
|
||||
|
||||
func BenchmarkEncryptData(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
_, _ = EncryptData("a", "b", maps.Map{
|
||||
_, _ = EncryptMap("a", "b", maps.Map{
|
||||
"c": 1,
|
||||
}, 5)
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ type RPCClient interface {
|
||||
SysSettingRPC() pb.SysSettingServiceClient
|
||||
NodeClusterRPC() pb.NodeClusterServiceClient
|
||||
NodeRegionRPC() pb.NodeRegionServiceClient
|
||||
NodePriceItemRPC() pb.NodePriceItemServiceClient
|
||||
ServerRPC() pb.ServerServiceClient
|
||||
ServerGroupRPC() pb.ServerGroupServiceClient
|
||||
OriginRPC() pb.OriginServiceClient
|
||||
@@ -46,6 +45,4 @@ type RPCClient interface {
|
||||
ACMEUserRPC() pb.ACMEUserServiceClient
|
||||
ACMETaskRPC() pb.ACMETaskServiceClient
|
||||
UserRPC() pb.UserServiceClient
|
||||
UserBillRPC() pb.UserBillServiceClient
|
||||
UserNodeRPC() pb.UserNodeServiceClient
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
{
|
||||
"type": "url-extension",
|
||||
"isRequest": true,
|
||||
"param": "${requestPathExtension}",
|
||||
"param": "${requestPathLowerExtension}",
|
||||
"operator": "in",
|
||||
"value": "[\".css\",\".png\",\".js\",\".woff2\"]",
|
||||
"isReverse": false,
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
{
|
||||
"type": "url-extension",
|
||||
"isRequest": true,
|
||||
"param": "${requestPathExtension}",
|
||||
"param": "${requestPathLowerExtension}",
|
||||
"operator": "in",
|
||||
"value": "[\".css\",\".png\",\".js\",\".woff2\"]",
|
||||
"isReverse": false,
|
||||
|
||||
176
pkg/rpc/pb/model_ad_network.pb.go
Normal file
176
pkg/rpc/pb/model_ad_network.pb.go
Normal file
@@ -0,0 +1,176 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_ad_network.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 高防线路
|
||||
type ADNetwork struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ADNetwork) Reset() {
|
||||
*x = ADNetwork{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_ad_network_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ADNetwork) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ADNetwork) ProtoMessage() {}
|
||||
|
||||
func (x *ADNetwork) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_ad_network_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ADNetwork.ProtoReflect.Descriptor instead.
|
||||
func (*ADNetwork) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_ad_network_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ADNetwork) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ADNetwork) GetIsOn() bool {
|
||||
if x != nil {
|
||||
return x.IsOn
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *ADNetwork) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ADNetwork) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_models_model_ad_network_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_ad_network_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61,
|
||||
0x64, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x02, 0x70, 0x62, 0x22, 0x65, 0x0a, 0x09, 0x41, 0x44, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04,
|
||||
0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
|
||||
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64,
|
||||
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f,
|
||||
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_ad_network_proto_rawDescOnce sync.Once
|
||||
file_models_model_ad_network_proto_rawDescData = file_models_model_ad_network_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_ad_network_proto_rawDescGZIP() []byte {
|
||||
file_models_model_ad_network_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_ad_network_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_ad_network_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_ad_network_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_ad_network_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_ad_network_proto_goTypes = []interface{}{
|
||||
(*ADNetwork)(nil), // 0: pb.ADNetwork
|
||||
}
|
||||
var file_models_model_ad_network_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_ad_network_proto_init() }
|
||||
func file_models_model_ad_network_proto_init() {
|
||||
if File_models_model_ad_network_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_ad_network_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ADNetwork); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_ad_network_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_ad_network_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_ad_network_proto_depIdxs,
|
||||
MessageInfos: file_models_model_ad_network_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_ad_network_proto = out.File
|
||||
file_models_model_ad_network_proto_rawDesc = nil
|
||||
file_models_model_ad_network_proto_goTypes = nil
|
||||
file_models_model_ad_network_proto_depIdxs = nil
|
||||
}
|
||||
250
pkg/rpc/pb/model_ad_package.pb.go
Normal file
250
pkg/rpc/pb/model_ad_package.pb.go
Normal file
@@ -0,0 +1,250 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_ad_package.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 高防产品
|
||||
type ADPackage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
AdNetworkId int64 `protobuf:"varint,3,opt,name=adNetworkId,proto3" json:"adNetworkId,omitempty"`
|
||||
ProtectionBandwidthSize int32 `protobuf:"varint,4,opt,name=protectionBandwidthSize,proto3" json:"protectionBandwidthSize,omitempty"`
|
||||
ProtectionBandwidthUnit string `protobuf:"bytes,5,opt,name=protectionBandwidthUnit,proto3" json:"protectionBandwidthUnit,omitempty"`
|
||||
ServerBandwidthSize int32 `protobuf:"varint,6,opt,name=serverBandwidthSize,proto3" json:"serverBandwidthSize,omitempty"`
|
||||
ServerBandwidthUnit string `protobuf:"bytes,7,opt,name=serverBandwidthUnit,proto3" json:"serverBandwidthUnit,omitempty"`
|
||||
AdNetwork *ADNetwork `protobuf:"bytes,30,opt,name=adNetwork,proto3" json:"adNetwork,omitempty"`
|
||||
Summary string `protobuf:"bytes,31,opt,name=summary,proto3" json:"summary,omitempty"` // 概述
|
||||
CountIdleADPackageInstances int64 `protobuf:"varint,32,opt,name=countIdleADPackageInstances,proto3" json:"countIdleADPackageInstances,omitempty"` // 剩余可用的实例数,只有在获取可用高防产品的时候才会返回
|
||||
}
|
||||
|
||||
func (x *ADPackage) Reset() {
|
||||
*x = ADPackage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_ad_package_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ADPackage) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ADPackage) ProtoMessage() {}
|
||||
|
||||
func (x *ADPackage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_ad_package_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ADPackage.ProtoReflect.Descriptor instead.
|
||||
func (*ADPackage) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_ad_package_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ADPackage) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ADPackage) GetIsOn() bool {
|
||||
if x != nil {
|
||||
return x.IsOn
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *ADPackage) GetAdNetworkId() int64 {
|
||||
if x != nil {
|
||||
return x.AdNetworkId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ADPackage) GetProtectionBandwidthSize() int32 {
|
||||
if x != nil {
|
||||
return x.ProtectionBandwidthSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ADPackage) GetProtectionBandwidthUnit() string {
|
||||
if x != nil {
|
||||
return x.ProtectionBandwidthUnit
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ADPackage) GetServerBandwidthSize() int32 {
|
||||
if x != nil {
|
||||
return x.ServerBandwidthSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ADPackage) GetServerBandwidthUnit() string {
|
||||
if x != nil {
|
||||
return x.ServerBandwidthUnit
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ADPackage) GetAdNetwork() *ADNetwork {
|
||||
if x != nil {
|
||||
return x.AdNetwork
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ADPackage) GetSummary() string {
|
||||
if x != nil {
|
||||
return x.Summary
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ADPackage) GetCountIdleADPackageInstances() int64 {
|
||||
if x != nil {
|
||||
return x.CountIdleADPackageInstances
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_models_model_ad_package_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_ad_package_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61,
|
||||
0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x02, 0x70, 0x62, 0x1a, 0x1d, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65,
|
||||
0x6c, 0x5f, 0x61, 0x64, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x22, 0xb2, 0x03, 0x0a, 0x09, 0x41, 0x44, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04,
|
||||
0x69, 0x73, 0x4f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x64, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x64, 0x4e, 0x65, 0x74,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x53, 0x69, 0x7a,
|
||||
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x53, 0x69, 0x7a, 0x65,
|
||||
0x12, 0x38, 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61,
|
||||
0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6e,
|
||||
0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x30, 0x0a, 0x13, 0x73, 0x65,
|
||||
0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x53, 0x69, 0x7a,
|
||||
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42,
|
||||
0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x30, 0x0a, 0x13,
|
||||
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x55,
|
||||
0x6e, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x2b,
|
||||
0x0a, 0x09, 0x61, 0x64, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x1e, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x44, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x52, 0x09, 0x61, 0x64, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x73,
|
||||
0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75,
|
||||
0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x40, 0x0a, 0x1b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64,
|
||||
0x6c, 0x65, 0x41, 0x44, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61,
|
||||
0x6e, 0x63, 0x65, 0x73, 0x18, 0x20, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1b, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x49, 0x64, 0x6c, 0x65, 0x41, 0x44, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e,
|
||||
0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_ad_package_proto_rawDescOnce sync.Once
|
||||
file_models_model_ad_package_proto_rawDescData = file_models_model_ad_package_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_ad_package_proto_rawDescGZIP() []byte {
|
||||
file_models_model_ad_package_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_ad_package_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_ad_package_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_ad_package_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_ad_package_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_ad_package_proto_goTypes = []interface{}{
|
||||
(*ADPackage)(nil), // 0: pb.ADPackage
|
||||
(*ADNetwork)(nil), // 1: pb.ADNetwork
|
||||
}
|
||||
var file_models_model_ad_package_proto_depIdxs = []int32{
|
||||
1, // 0: pb.ADPackage.adNetwork:type_name -> pb.ADNetwork
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_ad_package_proto_init() }
|
||||
func file_models_model_ad_package_proto_init() {
|
||||
if File_models_model_ad_package_proto != nil {
|
||||
return
|
||||
}
|
||||
file_models_model_ad_network_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_ad_package_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ADPackage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_ad_package_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_ad_package_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_ad_package_proto_depIdxs,
|
||||
MessageInfos: file_models_model_ad_package_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_ad_package_proto = out.File
|
||||
file_models_model_ad_package_proto_rawDesc = nil
|
||||
file_models_model_ad_package_proto_goTypes = nil
|
||||
file_models_model_ad_package_proto_depIdxs = nil
|
||||
}
|
||||
274
pkg/rpc/pb/model_ad_package_instance.pb.go
Normal file
274
pkg/rpc/pb/model_ad_package_instance.pb.go
Normal file
@@ -0,0 +1,274 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_ad_package_instance.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 高防产品实例
|
||||
type ADPackageInstance struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
AdPackageId int64 `protobuf:"varint,3,opt,name=adPackageId,proto3" json:"adPackageId,omitempty"`
|
||||
NodeClusterId int64 `protobuf:"varint,4,opt,name=nodeClusterId,proto3" json:"nodeClusterId,omitempty"`
|
||||
NodeIds []int64 `protobuf:"varint,5,rep,packed,name=nodeIds,proto3" json:"nodeIds,omitempty"`
|
||||
IpAddresses []string `protobuf:"bytes,6,rep,name=ipAddresses,proto3" json:"ipAddresses,omitempty"`
|
||||
UserId int64 `protobuf:"varint,7,opt,name=userId,proto3" json:"userId,omitempty"` // 租用用户ID
|
||||
UserDayTo string `protobuf:"bytes,8,opt,name=userDayTo,proto3" json:"userDayTo,omitempty"` // 租用日期
|
||||
UserInstanceId int64 `protobuf:"varint,9,opt,name=userInstanceId,proto3" json:"userInstanceId,omitempty"` // 当前绑定的用户实例ID
|
||||
NodeCluster *NodeCluster `protobuf:"bytes,30,opt,name=nodeCluster,proto3" json:"nodeCluster,omitempty"`
|
||||
AdPackage *ADPackage `protobuf:"bytes,31,opt,name=adPackage,proto3" json:"adPackage,omitempty"`
|
||||
User *User `protobuf:"bytes,32,opt,name=user,proto3" json:"user,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ADPackageInstance) Reset() {
|
||||
*x = ADPackageInstance{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_ad_package_instance_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ADPackageInstance) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ADPackageInstance) ProtoMessage() {}
|
||||
|
||||
func (x *ADPackageInstance) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_ad_package_instance_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ADPackageInstance.ProtoReflect.Descriptor instead.
|
||||
func (*ADPackageInstance) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_ad_package_instance_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ADPackageInstance) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ADPackageInstance) GetIsOn() bool {
|
||||
if x != nil {
|
||||
return x.IsOn
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *ADPackageInstance) GetAdPackageId() int64 {
|
||||
if x != nil {
|
||||
return x.AdPackageId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ADPackageInstance) GetNodeClusterId() int64 {
|
||||
if x != nil {
|
||||
return x.NodeClusterId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ADPackageInstance) GetNodeIds() []int64 {
|
||||
if x != nil {
|
||||
return x.NodeIds
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ADPackageInstance) GetIpAddresses() []string {
|
||||
if x != nil {
|
||||
return x.IpAddresses
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ADPackageInstance) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ADPackageInstance) GetUserDayTo() string {
|
||||
if x != nil {
|
||||
return x.UserDayTo
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ADPackageInstance) GetUserInstanceId() int64 {
|
||||
if x != nil {
|
||||
return x.UserInstanceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ADPackageInstance) GetNodeCluster() *NodeCluster {
|
||||
if x != nil {
|
||||
return x.NodeCluster
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ADPackageInstance) GetAdPackage() *ADPackage {
|
||||
if x != nil {
|
||||
return x.AdPackage
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ADPackageInstance) GetUser() *User {
|
||||
if x != nil {
|
||||
return x.User
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_models_model_ad_package_instance_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_ad_package_instance_proto_rawDesc = []byte{
|
||||
0x0a, 0x26, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61,
|
||||
0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
|
||||
0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1f, 0x6d, 0x6f,
|
||||
0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f,
|
||||
0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x6d,
|
||||
0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x64, 0x5f, 0x70,
|
||||
0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x6d, 0x6f,
|
||||
0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x03, 0x0a, 0x11, 0x41, 0x44, 0x50, 0x61, 0x63, 0x6b,
|
||||
0x61, 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69,
|
||||
0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12,
|
||||
0x20, 0x0a, 0x0b, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49,
|
||||
0x64, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
||||
0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
|
||||
0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x49,
|
||||
0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64,
|
||||
0x73, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73,
|
||||
0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
|
||||
0x73, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x75,
|
||||
0x73, 0x65, 0x72, 0x44, 0x61, 0x79, 0x54, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||
0x75, 0x73, 0x65, 0x72, 0x44, 0x61, 0x79, 0x54, 0x6f, 0x12, 0x26, 0x0a, 0x0e, 0x75, 0x73, 0x65,
|
||||
0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49,
|
||||
0x64, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
||||
0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75,
|
||||
0x73, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x09, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67,
|
||||
0x65, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x44, 0x50,
|
||||
0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x09, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67,
|
||||
0x65, 0x12, 0x1c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x08, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_ad_package_instance_proto_rawDescOnce sync.Once
|
||||
file_models_model_ad_package_instance_proto_rawDescData = file_models_model_ad_package_instance_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_ad_package_instance_proto_rawDescGZIP() []byte {
|
||||
file_models_model_ad_package_instance_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_ad_package_instance_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_ad_package_instance_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_ad_package_instance_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_ad_package_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_ad_package_instance_proto_goTypes = []interface{}{
|
||||
(*ADPackageInstance)(nil), // 0: pb.ADPackageInstance
|
||||
(*NodeCluster)(nil), // 1: pb.NodeCluster
|
||||
(*ADPackage)(nil), // 2: pb.ADPackage
|
||||
(*User)(nil), // 3: pb.User
|
||||
}
|
||||
var file_models_model_ad_package_instance_proto_depIdxs = []int32{
|
||||
1, // 0: pb.ADPackageInstance.nodeCluster:type_name -> pb.NodeCluster
|
||||
2, // 1: pb.ADPackageInstance.adPackage:type_name -> pb.ADPackage
|
||||
3, // 2: pb.ADPackageInstance.user:type_name -> pb.User
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_ad_package_instance_proto_init() }
|
||||
func file_models_model_ad_package_instance_proto_init() {
|
||||
if File_models_model_ad_package_instance_proto != nil {
|
||||
return
|
||||
}
|
||||
file_models_model_node_cluster_proto_init()
|
||||
file_models_model_ad_package_proto_init()
|
||||
file_models_model_user_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_ad_package_instance_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ADPackageInstance); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_ad_package_instance_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_ad_package_instance_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_ad_package_instance_proto_depIdxs,
|
||||
MessageInfos: file_models_model_ad_package_instance_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_ad_package_instance_proto = out.File
|
||||
file_models_model_ad_package_instance_proto_rawDesc = nil
|
||||
file_models_model_ad_package_instance_proto_goTypes = nil
|
||||
file_models_model_ad_package_instance_proto_depIdxs = nil
|
||||
}
|
||||
186
pkg/rpc/pb/model_ad_package_period.pb.go
Normal file
186
pkg/rpc/pb/model_ad_package_period.pb.go
Normal file
@@ -0,0 +1,186 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_ad_package_period.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 高防实例有效期
|
||||
type ADPackagePeriod struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
|
||||
Unit string `protobuf:"bytes,4,opt,name=unit,proto3" json:"unit,omitempty"`
|
||||
Months int32 `protobuf:"varint,5,opt,name=months,proto3" json:"months,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ADPackagePeriod) Reset() {
|
||||
*x = ADPackagePeriod{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_ad_package_period_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ADPackagePeriod) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ADPackagePeriod) ProtoMessage() {}
|
||||
|
||||
func (x *ADPackagePeriod) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_ad_package_period_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ADPackagePeriod.ProtoReflect.Descriptor instead.
|
||||
func (*ADPackagePeriod) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_ad_package_period_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ADPackagePeriod) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ADPackagePeriod) GetIsOn() bool {
|
||||
if x != nil {
|
||||
return x.IsOn
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *ADPackagePeriod) GetCount() int32 {
|
||||
if x != nil {
|
||||
return x.Count
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ADPackagePeriod) GetUnit() string {
|
||||
if x != nil {
|
||||
return x.Unit
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ADPackagePeriod) GetMonths() int32 {
|
||||
if x != nil {
|
||||
return x.Months
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_models_model_ad_package_period_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_ad_package_period_proto_rawDesc = []byte{
|
||||
0x0a, 0x24, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61,
|
||||
0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x77, 0x0a, 0x0f, 0x41, 0x44,
|
||||
0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f,
|
||||
0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d,
|
||||
0x6f, 0x6e, 0x74, 0x68, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6d, 0x6f, 0x6e,
|
||||
0x74, 0x68, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_ad_package_period_proto_rawDescOnce sync.Once
|
||||
file_models_model_ad_package_period_proto_rawDescData = file_models_model_ad_package_period_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_ad_package_period_proto_rawDescGZIP() []byte {
|
||||
file_models_model_ad_package_period_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_ad_package_period_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_ad_package_period_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_ad_package_period_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_ad_package_period_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_ad_package_period_proto_goTypes = []interface{}{
|
||||
(*ADPackagePeriod)(nil), // 0: pb.ADPackagePeriod
|
||||
}
|
||||
var file_models_model_ad_package_period_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_ad_package_period_proto_init() }
|
||||
func file_models_model_ad_package_period_proto_init() {
|
||||
if File_models_model_ad_package_period_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_ad_package_period_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ADPackagePeriod); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_ad_package_period_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_ad_package_period_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_ad_package_period_proto_depIdxs,
|
||||
MessageInfos: file_models_model_ad_package_period_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_ad_package_period_proto = out.File
|
||||
file_models_model_ad_package_period_proto_rawDesc = nil
|
||||
file_models_model_ad_package_period_proto_goTypes = nil
|
||||
file_models_model_ad_package_period_proto_depIdxs = nil
|
||||
}
|
||||
170
pkg/rpc/pb/model_ad_package_price.pb.go
Normal file
170
pkg/rpc/pb/model_ad_package_price.pb.go
Normal file
@@ -0,0 +1,170 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_ad_package_price.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 高防产品价格定义
|
||||
type ADPackagePrice struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
AdPackageId int64 `protobuf:"varint,1,opt,name=adPackageId,proto3" json:"adPackageId,omitempty"`
|
||||
AdPackagePeriodId int64 `protobuf:"varint,2,opt,name=adPackagePeriodId,proto3" json:"adPackagePeriodId,omitempty"`
|
||||
Price float64 `protobuf:"fixed64,3,opt,name=price,proto3" json:"price,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ADPackagePrice) Reset() {
|
||||
*x = ADPackagePrice{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_ad_package_price_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ADPackagePrice) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ADPackagePrice) ProtoMessage() {}
|
||||
|
||||
func (x *ADPackagePrice) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_ad_package_price_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ADPackagePrice.ProtoReflect.Descriptor instead.
|
||||
func (*ADPackagePrice) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_ad_package_price_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ADPackagePrice) GetAdPackageId() int64 {
|
||||
if x != nil {
|
||||
return x.AdPackageId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ADPackagePrice) GetAdPackagePeriodId() int64 {
|
||||
if x != nil {
|
||||
return x.AdPackagePeriodId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ADPackagePrice) GetPrice() float64 {
|
||||
if x != nil {
|
||||
return x.Price
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_models_model_ad_package_price_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_ad_package_price_proto_rawDesc = []byte{
|
||||
0x0a, 0x23, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61,
|
||||
0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x76, 0x0a, 0x0e, 0x41, 0x44, 0x50,
|
||||
0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61,
|
||||
0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x0b, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x2c, 0x0a,
|
||||
0x11, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64,
|
||||
0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b,
|
||||
0x61, 0x67, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70,
|
||||
0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63,
|
||||
0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_ad_package_price_proto_rawDescOnce sync.Once
|
||||
file_models_model_ad_package_price_proto_rawDescData = file_models_model_ad_package_price_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_ad_package_price_proto_rawDescGZIP() []byte {
|
||||
file_models_model_ad_package_price_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_ad_package_price_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_ad_package_price_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_ad_package_price_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_ad_package_price_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_ad_package_price_proto_goTypes = []interface{}{
|
||||
(*ADPackagePrice)(nil), // 0: pb.ADPackagePrice
|
||||
}
|
||||
var file_models_model_ad_package_price_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_ad_package_price_proto_init() }
|
||||
func file_models_model_ad_package_price_proto_init() {
|
||||
if File_models_model_ad_package_price_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_ad_package_price_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ADPackagePrice); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_ad_package_price_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_ad_package_price_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_ad_package_price_proto_depIdxs,
|
||||
MessageInfos: file_models_model_ad_package_price_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_ad_package_price_proto = out.File
|
||||
file_models_model_ad_package_price_proto_rawDesc = nil
|
||||
file_models_model_ad_package_price_proto_goTypes = nil
|
||||
file_models_model_ad_package_price_proto_depIdxs = nil
|
||||
}
|
||||
@@ -30,15 +30,16 @@ type Admin struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Fullname string `protobuf:"bytes,2,opt,name=fullname,proto3" json:"fullname,omitempty"`
|
||||
Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
|
||||
IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
IsSuper bool `protobuf:"varint,5,opt,name=isSuper,proto3" json:"isSuper,omitempty"`
|
||||
CreatedAt int64 `protobuf:"varint,6,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
Modules []*AdminModule `protobuf:"bytes,7,rep,name=Modules,proto3" json:"Modules,omitempty"`
|
||||
OtpLogin *Login `protobuf:"bytes,8,opt,name=otpLogin,proto3" json:"otpLogin,omitempty"` // OTP认证
|
||||
CanLogin bool `protobuf:"varint,9,opt,name=canLogin,proto3" json:"canLogin,omitempty"` // 是否可以登录
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // ID
|
||||
Fullname string `protobuf:"bytes,2,opt,name=fullname,proto3" json:"fullname,omitempty"` // 全称
|
||||
Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` // 用户名
|
||||
IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"` // 是否启用
|
||||
IsSuper bool `protobuf:"varint,5,opt,name=isSuper,proto3" json:"isSuper,omitempty"` // 是否为超级用户
|
||||
CreatedAt int64 `protobuf:"varint,6,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // 创建时间
|
||||
Modules []*AdminModule `protobuf:"bytes,7,rep,name=Modules,proto3" json:"Modules,omitempty"` // 有权限的模块
|
||||
OtpLogin *Login `protobuf:"bytes,8,opt,name=otpLogin,proto3" json:"otpLogin,omitempty"` // OTP认证
|
||||
CanLogin bool `protobuf:"varint,9,opt,name=canLogin,proto3" json:"canLogin,omitempty"` // 是否可以登录
|
||||
HasWeakPassword bool `protobuf:"varint,10,opt,name=hasWeakPassword,proto3" json:"hasWeakPassword,omitempty"` // 是否设置了弱密码,只有超级管理员能看到此项
|
||||
}
|
||||
|
||||
func (x *Admin) Reset() {
|
||||
@@ -136,6 +137,13 @@ func (x *Admin) GetCanLogin() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Admin) GetHasWeakPassword() bool {
|
||||
if x != nil {
|
||||
return x.HasWeakPassword
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_models_model_admin_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_admin_proto_rawDesc = []byte{
|
||||
@@ -144,7 +152,7 @@ var file_models_model_admin_proto_rawDesc = []byte{
|
||||
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x64, 0x6d,
|
||||
0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
||||
0x18, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6c, 0x6f,
|
||||
0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x02, 0x0a, 0x05, 0x41, 0x64,
|
||||
0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb3, 0x02, 0x0a, 0x05, 0x41, 0x64,
|
||||
0x6d, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x12,
|
||||
@@ -161,8 +169,10 @@ var file_models_model_admin_proto_rawDesc = []byte{
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52,
|
||||
0x08, 0x6f, 0x74, 0x70, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x6e,
|
||||
0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x63, 0x61, 0x6e,
|
||||
0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x68, 0x61, 0x73, 0x57, 0x65, 0x61, 0x6b,
|
||||
0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f,
|
||||
0x68, 0x61, 0x73, 0x57, 0x65, 0x61, 0x6b, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -40,6 +40,8 @@ type AuthorityKey struct {
|
||||
Company string `protobuf:"bytes,7,opt,name=company,proto3" json:"company,omitempty"`
|
||||
Nodes int32 `protobuf:"varint,8,opt,name=nodes,proto3" json:"nodes,omitempty"`
|
||||
Components []string `protobuf:"bytes,9,rep,name=components,proto3" json:"components,omitempty"`
|
||||
Edition string `protobuf:"bytes,10,opt,name=edition,proto3" json:"edition,omitempty"`
|
||||
RequestCode string `protobuf:"bytes,11,opt,name=requestCode,proto3" json:"requestCode,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AuthorityKey) Reset() {
|
||||
@@ -137,12 +139,26 @@ func (x *AuthorityKey) GetComponents() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *AuthorityKey) GetEdition() string {
|
||||
if x != nil {
|
||||
return x.Edition
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AuthorityKey) GetRequestCode() string {
|
||||
if x != nil {
|
||||
return x.RequestCode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_models_model_authority_key_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_authority_key_proto_rawDesc = []byte{
|
||||
0x0a, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61,
|
||||
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x82, 0x02, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x6f,
|
||||
0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xbe, 0x02, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x6f,
|
||||
0x72, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x64, 0x61, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
||||
@@ -158,8 +174,12 @@ var file_models_model_authority_key_proto_rawDesc = []byte{
|
||||
0x6d, 0x70, 0x61, 0x6e, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x08,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x63,
|
||||
0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65,
|
||||
0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x64,
|
||||
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x43, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
185
pkg/rpc/pb/model_client_agent.pb.go
Normal file
185
pkg/rpc/pb/model_client_agent.pb.go
Normal file
@@ -0,0 +1,185 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_client_agent.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type ClientAgent struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
|
||||
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
|
||||
CountIPs int64 `protobuf:"varint,5,opt,name=countIPs,proto3" json:"countIPs,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ClientAgent) Reset() {
|
||||
*x = ClientAgent{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_client_agent_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ClientAgent) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ClientAgent) ProtoMessage() {}
|
||||
|
||||
func (x *ClientAgent) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_client_agent_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ClientAgent.ProtoReflect.Descriptor instead.
|
||||
func (*ClientAgent) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_client_agent_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ClientAgent) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ClientAgent) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ClientAgent) GetCode() string {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ClientAgent) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ClientAgent) GetCountIPs() int64 {
|
||||
if x != nil {
|
||||
return x.CountIPs
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_models_model_client_agent_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_client_agent_proto_rawDesc = []byte{
|
||||
0x0a, 0x1f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x63,
|
||||
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x83, 0x01, 0x0a, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
|
||||
0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64,
|
||||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a,
|
||||
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x50, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x08, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x50, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_client_agent_proto_rawDescOnce sync.Once
|
||||
file_models_model_client_agent_proto_rawDescData = file_models_model_client_agent_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_client_agent_proto_rawDescGZIP() []byte {
|
||||
file_models_model_client_agent_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_client_agent_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_client_agent_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_client_agent_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_client_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_client_agent_proto_goTypes = []interface{}{
|
||||
(*ClientAgent)(nil), // 0: pb.ClientAgent
|
||||
}
|
||||
var file_models_model_client_agent_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_client_agent_proto_init() }
|
||||
func file_models_model_client_agent_proto_init() {
|
||||
if File_models_model_client_agent_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_client_agent_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ClientAgent); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_client_agent_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_client_agent_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_client_agent_proto_depIdxs,
|
||||
MessageInfos: file_models_model_client_agent_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_client_agent_proto = out.File
|
||||
file_models_model_client_agent_proto_rawDesc = nil
|
||||
file_models_model_client_agent_proto_goTypes = nil
|
||||
file_models_model_client_agent_proto_depIdxs = nil
|
||||
}
|
||||
181
pkg/rpc/pb/model_client_agent_ip.pb.go
Normal file
181
pkg/rpc/pb/model_client_agent_ip.pb.go
Normal file
@@ -0,0 +1,181 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_client_agent_ip.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type ClientAgentIP struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
|
||||
Ptr string `protobuf:"bytes,3,opt,name=ptr,proto3" json:"ptr,omitempty"`
|
||||
ClientAgent *ClientAgent `protobuf:"bytes,30,opt,name=clientAgent,proto3" json:"clientAgent,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ClientAgentIP) Reset() {
|
||||
*x = ClientAgentIP{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_client_agent_ip_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ClientAgentIP) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ClientAgentIP) ProtoMessage() {}
|
||||
|
||||
func (x *ClientAgentIP) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_client_agent_ip_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ClientAgentIP.ProtoReflect.Descriptor instead.
|
||||
func (*ClientAgentIP) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_client_agent_ip_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ClientAgentIP) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ClientAgentIP) GetIp() string {
|
||||
if x != nil {
|
||||
return x.Ip
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ClientAgentIP) GetPtr() string {
|
||||
if x != nil {
|
||||
return x.Ptr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ClientAgentIP) GetClientAgent() *ClientAgent {
|
||||
if x != nil {
|
||||
return x.ClientAgent
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_models_model_client_agent_ip_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_client_agent_ip_proto_rawDesc = []byte{
|
||||
0x0a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x63,
|
||||
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x70, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73,
|
||||
0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x67,
|
||||
0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x74, 0x0a, 0x0d, 0x43, 0x6c, 0x69,
|
||||
0x65, 0x6e, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x50, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x74,
|
||||
0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x74, 0x72, 0x12, 0x31, 0x0a, 0x0b,
|
||||
0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x1e, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x65,
|
||||
0x6e, 0x74, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_client_agent_ip_proto_rawDescOnce sync.Once
|
||||
file_models_model_client_agent_ip_proto_rawDescData = file_models_model_client_agent_ip_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_client_agent_ip_proto_rawDescGZIP() []byte {
|
||||
file_models_model_client_agent_ip_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_client_agent_ip_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_client_agent_ip_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_client_agent_ip_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_client_agent_ip_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_client_agent_ip_proto_goTypes = []interface{}{
|
||||
(*ClientAgentIP)(nil), // 0: pb.ClientAgentIP
|
||||
(*ClientAgent)(nil), // 1: pb.ClientAgent
|
||||
}
|
||||
var file_models_model_client_agent_ip_proto_depIdxs = []int32{
|
||||
1, // 0: pb.ClientAgentIP.clientAgent:type_name -> pb.ClientAgent
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_client_agent_ip_proto_init() }
|
||||
func file_models_model_client_agent_ip_proto_init() {
|
||||
if File_models_model_client_agent_ip_proto != nil {
|
||||
return
|
||||
}
|
||||
file_models_model_client_agent_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_client_agent_ip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ClientAgentIP); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_client_agent_ip_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_client_agent_ip_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_client_agent_ip_proto_depIdxs,
|
||||
MessageInfos: file_models_model_client_agent_ip_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_client_agent_ip_proto = out.File
|
||||
file_models_model_client_agent_ip_proto_rawDesc = nil
|
||||
file_models_model_client_agent_ip_proto_goTypes = nil
|
||||
file_models_model_client_agent_ip_proto_depIdxs = nil
|
||||
}
|
||||
185
pkg/rpc/pb/model_formal_client_browser.pb.go
Normal file
185
pkg/rpc/pb/model_formal_client_browser.pb.go
Normal file
@@ -0,0 +1,185 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_formal_client_browser.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type FormalClientBrowser struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Codes []string `protobuf:"bytes,3,rep,name=codes,proto3" json:"codes,omitempty"`
|
||||
DataId string `protobuf:"bytes,4,opt,name=dataId,proto3" json:"dataId,omitempty"`
|
||||
State int32 `protobuf:"varint,5,opt,name=state,proto3" json:"state,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FormalClientBrowser) Reset() {
|
||||
*x = FormalClientBrowser{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_formal_client_browser_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FormalClientBrowser) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FormalClientBrowser) ProtoMessage() {}
|
||||
|
||||
func (x *FormalClientBrowser) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_formal_client_browser_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FormalClientBrowser.ProtoReflect.Descriptor instead.
|
||||
func (*FormalClientBrowser) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_formal_client_browser_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *FormalClientBrowser) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *FormalClientBrowser) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *FormalClientBrowser) GetCodes() []string {
|
||||
if x != nil {
|
||||
return x.Codes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *FormalClientBrowser) GetDataId() string {
|
||||
if x != nil {
|
||||
return x.DataId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *FormalClientBrowser) GetState() int32 {
|
||||
if x != nil {
|
||||
return x.State
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_models_model_formal_client_browser_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_formal_client_browser_proto_rawDesc = []byte{
|
||||
0x0a, 0x28, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x66,
|
||||
0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x72, 0x6f,
|
||||
0x77, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x7d,
|
||||
0x0a, 0x13, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x72,
|
||||
0x6f, 0x77, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64,
|
||||
0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x64, 0x61, 0x74, 0x61, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x06, 0x64, 0x61, 0x74, 0x61, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_formal_client_browser_proto_rawDescOnce sync.Once
|
||||
file_models_model_formal_client_browser_proto_rawDescData = file_models_model_formal_client_browser_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_formal_client_browser_proto_rawDescGZIP() []byte {
|
||||
file_models_model_formal_client_browser_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_formal_client_browser_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_formal_client_browser_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_formal_client_browser_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_formal_client_browser_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_formal_client_browser_proto_goTypes = []interface{}{
|
||||
(*FormalClientBrowser)(nil), // 0: pb.FormalClientBrowser
|
||||
}
|
||||
var file_models_model_formal_client_browser_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_formal_client_browser_proto_init() }
|
||||
func file_models_model_formal_client_browser_proto_init() {
|
||||
if File_models_model_formal_client_browser_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_formal_client_browser_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FormalClientBrowser); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_formal_client_browser_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_formal_client_browser_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_formal_client_browser_proto_depIdxs,
|
||||
MessageInfos: file_models_model_formal_client_browser_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_formal_client_browser_proto = out.File
|
||||
file_models_model_formal_client_browser_proto_rawDesc = nil
|
||||
file_models_model_formal_client_browser_proto_goTypes = nil
|
||||
file_models_model_formal_client_browser_proto_depIdxs = nil
|
||||
}
|
||||
185
pkg/rpc/pb/model_formal_client_system.pb.go
Normal file
185
pkg/rpc/pb/model_formal_client_system.pb.go
Normal file
@@ -0,0 +1,185 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_formal_client_system.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type FormalClientSystem struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Codes []string `protobuf:"bytes,3,rep,name=codes,proto3" json:"codes,omitempty"`
|
||||
DataId string `protobuf:"bytes,4,opt,name=dataId,proto3" json:"dataId,omitempty"`
|
||||
State int32 `protobuf:"varint,5,opt,name=state,proto3" json:"state,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FormalClientSystem) Reset() {
|
||||
*x = FormalClientSystem{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_formal_client_system_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FormalClientSystem) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FormalClientSystem) ProtoMessage() {}
|
||||
|
||||
func (x *FormalClientSystem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_formal_client_system_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FormalClientSystem.ProtoReflect.Descriptor instead.
|
||||
func (*FormalClientSystem) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_formal_client_system_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *FormalClientSystem) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *FormalClientSystem) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *FormalClientSystem) GetCodes() []string {
|
||||
if x != nil {
|
||||
return x.Codes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *FormalClientSystem) GetDataId() string {
|
||||
if x != nil {
|
||||
return x.DataId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *FormalClientSystem) GetState() int32 {
|
||||
if x != nil {
|
||||
return x.State
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_models_model_formal_client_system_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_formal_client_system_proto_rawDesc = []byte{
|
||||
0x0a, 0x27, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x66,
|
||||
0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x79, 0x73,
|
||||
0x74, 0x65, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x7c, 0x0a,
|
||||
0x12, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x79, 0x73,
|
||||
0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x73,
|
||||
0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x64, 0x61, 0x74, 0x61, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64,
|
||||
0x61, 0x74, 0x61, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_formal_client_system_proto_rawDescOnce sync.Once
|
||||
file_models_model_formal_client_system_proto_rawDescData = file_models_model_formal_client_system_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_formal_client_system_proto_rawDescGZIP() []byte {
|
||||
file_models_model_formal_client_system_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_formal_client_system_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_formal_client_system_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_formal_client_system_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_formal_client_system_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_formal_client_system_proto_goTypes = []interface{}{
|
||||
(*FormalClientSystem)(nil), // 0: pb.FormalClientSystem
|
||||
}
|
||||
var file_models_model_formal_client_system_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_formal_client_system_proto_init() }
|
||||
func file_models_model_formal_client_system_proto_init() {
|
||||
if File_models_model_formal_client_system_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_formal_client_system_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FormalClientSystem); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_formal_client_system_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_formal_client_system_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_formal_client_system_proto_depIdxs,
|
||||
MessageInfos: file_models_model_formal_client_system_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_formal_client_system_proto = out.File
|
||||
file_models_model_formal_client_system_proto_rawDesc = nil
|
||||
file_models_model_formal_client_system_proto_goTypes = nil
|
||||
file_models_model_formal_client_system_proto_depIdxs = nil
|
||||
}
|
||||
@@ -72,8 +72,9 @@ type HTTPAccessLog struct {
|
||||
ServerPort int32 `protobuf:"varint,38,opt,name=serverPort,proto3" json:"serverPort,omitempty"`
|
||||
ServerProtocol string `protobuf:"bytes,39,opt,name=serverProtocol,proto3" json:"serverProtocol,omitempty"`
|
||||
Hostname string `protobuf:"bytes,40,opt,name=hostname,proto3" json:"hostname,omitempty"`
|
||||
// 代理相关
|
||||
// 源站相关
|
||||
OriginAddress string `protobuf:"bytes,41,opt,name=originAddress,proto3" json:"originAddress,omitempty"`
|
||||
OriginStatus int32 `protobuf:"varint,52,opt,name=originStatus,proto3" json:"originStatus,omitempty"`
|
||||
// 错误信息
|
||||
Errors []string `protobuf:"bytes,42,rep,name=errors,proto3" json:"errors,omitempty"`
|
||||
// 扩展
|
||||
@@ -415,6 +416,13 @@ func (x *HTTPAccessLog) GetOriginAddress() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *HTTPAccessLog) GetOriginStatus() int32 {
|
||||
if x != nil {
|
||||
return x.OriginStatus
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *HTTPAccessLog) GetErrors() []string {
|
||||
if x != nil {
|
||||
return x.Errors
|
||||
@@ -532,7 +540,7 @@ var file_models_model_http_access_log_proto_rawDesc = []byte{
|
||||
0x74, 0x74, 0x70, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73,
|
||||
0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x22, 0xdd, 0x0f, 0x0a, 0x0d, 0x48, 0x54, 0x54, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x6f, 0x22, 0x81, 0x10, 0x0a, 0x0d, 0x48, 0x54, 0x54, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x4c, 0x6f, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64,
|
||||
0x18, 0x30, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49,
|
||||
0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20,
|
||||
@@ -619,49 +627,51 @@ var file_models_model_http_access_log_proto_rawDesc = []byte{
|
||||
0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f,
|
||||
0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e,
|
||||
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x29, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f,
|
||||
0x72, 0x69, 0x67, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x2a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72,
|
||||
0x72, 0x6f, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x2b, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x41, 0x63, 0x63,
|
||||
0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x66, 0x69, 0x72, 0x65,
|
||||
0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x2c, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x10, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
|
||||
0x63, 0x79, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x13, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
|
||||
0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x2d, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x13, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47,
|
||||
0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61,
|
||||
0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x49, 0x64, 0x18, 0x2e, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x11, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x53,
|
||||
0x65, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
|
||||
0x52, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x66, 0x69,
|
||||
0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f,
|
||||
0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
|
||||
0x31, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x41,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x32,
|
||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x6f,
|
||||
0x64, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x1a, 0x4a, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x74,
|
||||
0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x45, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a,
|
||||
0x46, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
|
||||
0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x05, 0x76, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x73,
|
||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
||||
0x01, 0x22, 0x21, 0x0a, 0x07, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
0x72, 0x69, 0x67, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x22, 0x0a, 0x0c,
|
||||
0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x34, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x2a, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72,
|
||||
0x73, 0x18, 0x2b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54,
|
||||
0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x73,
|
||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x10,
|
||||
0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64,
|
||||
0x18, 0x2c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
|
||||
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x13, 0x66, 0x69, 0x72, 0x65,
|
||||
0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18,
|
||||
0x2d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52,
|
||||
0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x66, 0x69,
|
||||
0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x49, 0x64, 0x18,
|
||||
0x2e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52,
|
||||
0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x69, 0x72, 0x65,
|
||||
0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x0e, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x64,
|
||||
0x12, 0x28, 0x0a, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x18, 0x31, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x66, 0x69, 0x72, 0x65, 0x77,
|
||||
0x61, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61,
|
||||
0x67, 0x73, 0x18, 0x32, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x1c,
|
||||
0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x1a, 0x4a, 0x0a, 0x0f,
|
||||
0x53, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x6f, 0x6b,
|
||||
0x69, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
|
||||
0x02, 0x38, 0x01, 0x1a, 0x46, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x45, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73,
|
||||
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x41,
|
||||
0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
||||
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x21, 0x0a, 0x07, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -34,9 +34,10 @@ type IPLibraryArtifact struct {
|
||||
FileId int64 `protobuf:"varint,2,opt,name=fileId,proto3" json:"fileId,omitempty"`
|
||||
CreatedAt int64 `protobuf:"varint,3,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
MetaJSON []byte `protobuf:"bytes,4,opt,name=metaJSON,proto3" json:"metaJSON,omitempty"`
|
||||
IsPublic bool `protobuf:"varint,5,opt,name=isPublic,proto3" json:"isPublic,omitempty"`
|
||||
IsPublic bool `protobuf:"varint,5,opt,name=isPublic,proto3" json:"isPublic,omitempty"` // 是否公开
|
||||
Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Code string `protobuf:"bytes,7,opt,name=code,proto3" json:"code,omitempty"`
|
||||
File *File `protobuf:"bytes,30,opt,name=file,proto3" json:"file,omitempty"` // 文件信息
|
||||
}
|
||||
|
||||
func (x *IPLibraryArtifact) Reset() {
|
||||
@@ -120,25 +121,35 @@ func (x *IPLibraryArtifact) GetCode() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *IPLibraryArtifact) GetFile() *File {
|
||||
if x != nil {
|
||||
return x.File
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_models_model_ip_library_artifact_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_ip_library_artifact_proto_rawDesc = []byte{
|
||||
0x0a, 0x26, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x69,
|
||||
0x70, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61,
|
||||
0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xb9, 0x01, 0x0a,
|
||||
0x11, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61,
|
||||
0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02,
|
||||
0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61,
|
||||
0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61,
|
||||
0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x17, 0x6d, 0x6f,
|
||||
0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd7, 0x01, 0x0a, 0x11, 0x49, 0x50, 0x4c, 0x69, 0x62, 0x72,
|
||||
0x61, 0x72, 0x79, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x66, 0x69, 0x6c,
|
||||
0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41,
|
||||
0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x69, 0x73, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x08, 0x69, 0x73, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64,
|
||||
0x65, 0x12, 0x1c, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x08, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -156,13 +167,15 @@ func file_models_model_ip_library_artifact_proto_rawDescGZIP() []byte {
|
||||
var file_models_model_ip_library_artifact_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_ip_library_artifact_proto_goTypes = []interface{}{
|
||||
(*IPLibraryArtifact)(nil), // 0: pb.IPLibraryArtifact
|
||||
(*File)(nil), // 1: pb.File
|
||||
}
|
||||
var file_models_model_ip_library_artifact_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
1, // 0: pb.IPLibraryArtifact.file:type_name -> pb.File
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_ip_library_artifact_proto_init() }
|
||||
@@ -170,6 +183,7 @@ func file_models_model_ip_library_artifact_proto_init() {
|
||||
if File_models_model_ip_library_artifact_proto != nil {
|
||||
return
|
||||
}
|
||||
file_models_model_file_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_ip_library_artifact_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*IPLibraryArtifact); i {
|
||||
|
||||
@@ -44,6 +44,7 @@ type IPLibraryFile struct {
|
||||
Cities []*IPLibraryFile_City `protobuf:"bytes,12,rep,name=cities,proto3" json:"cities,omitempty"`
|
||||
Towns []*IPLibraryFile_Town `protobuf:"bytes,13,rep,name=towns,proto3" json:"towns,omitempty"`
|
||||
ProviderNames []string `protobuf:"bytes,14,rep,name=providerNames,proto3" json:"providerNames,omitempty"`
|
||||
Password string `protobuf:"bytes,15,opt,name=password,proto3" json:"password,omitempty"` // 密码
|
||||
}
|
||||
|
||||
func (x *IPLibraryFile) Reset() {
|
||||
@@ -176,6 +177,13 @@ func (x *IPLibraryFile) GetProviderNames() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *IPLibraryFile) GetPassword() string {
|
||||
if x != nil {
|
||||
return x.Password
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type IPLibraryFile_Province struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -370,7 +378,7 @@ var File_models_model_ip_library_file_proto protoreflect.FileDescriptor
|
||||
var file_models_model_ip_library_file_proto_rawDesc = []byte{
|
||||
0x0a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x69,
|
||||
0x70, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xb8, 0x06, 0x0a, 0x0d, 0x49, 0x50, 0x4c,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xd4, 0x06, 0x0a, 0x0d, 0x49, 0x50, 0x4c,
|
||||
0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16,
|
||||
@@ -402,28 +410,29 @@ var file_models_model_ip_library_file_proto_rawDesc = []byte{
|
||||
0x6f, 0x77, 0x6e, 0x52, 0x05, 0x74, 0x6f, 0x77, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x72,
|
||||
0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28,
|
||||
0x09, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x1a, 0x50, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22,
|
||||
0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x4e, 0x61,
|
||||
0x6d, 0x65, 0x1a, 0x68, 0x0a, 0x04, 0x43, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c,
|
||||
0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x12, 0x1a, 0x0a, 0x08, 0x63, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x08, 0x63, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x84, 0x01, 0x0a,
|
||||
0x04, 0x54, 0x6f, 0x77, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69,
|
||||
0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70,
|
||||
0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63,
|
||||
0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63,
|
||||
0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x6f, 0x77, 0x6e, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x77, 0x6e, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0f, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x50, 0x0a, 0x08,
|
||||
0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72,
|
||||
0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x68,
|
||||
0x0a, 0x04, 0x43, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x76,
|
||||
0x69, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
|
||||
0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x63, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||
0x63, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x84, 0x01, 0x0a, 0x04, 0x54, 0x6f, 0x77,
|
||||
0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69,
|
||||
0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x69, 0x74, 0x79, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x69, 0x74, 0x79, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
215
pkg/rpc/pb/model_login_session.pb.go
Normal file
215
pkg/rpc/pb/model_login_session.pb.go
Normal file
@@ -0,0 +1,215 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_login_session.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 登录SESSION
|
||||
type LoginSession struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
AdminId int64 `protobuf:"varint,2,opt,name=adminId,proto3" json:"adminId,omitempty"`
|
||||
UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"`
|
||||
Sid string `protobuf:"bytes,4,opt,name=sid,proto3" json:"sid,omitempty"`
|
||||
ValuesJSON []byte `protobuf:"bytes,5,opt,name=valuesJSON,proto3" json:"valuesJSON,omitempty"`
|
||||
Ip string `protobuf:"bytes,6,opt,name=ip,proto3" json:"ip,omitempty"`
|
||||
CreatedAt int64 `protobuf:"varint,7,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
ExpiresAt int64 `protobuf:"varint,8,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"`
|
||||
}
|
||||
|
||||
func (x *LoginSession) Reset() {
|
||||
*x = LoginSession{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_login_session_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *LoginSession) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LoginSession) ProtoMessage() {}
|
||||
|
||||
func (x *LoginSession) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_login_session_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use LoginSession.ProtoReflect.Descriptor instead.
|
||||
func (*LoginSession) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_login_session_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *LoginSession) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *LoginSession) GetAdminId() int64 {
|
||||
if x != nil {
|
||||
return x.AdminId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *LoginSession) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *LoginSession) GetSid() string {
|
||||
if x != nil {
|
||||
return x.Sid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *LoginSession) GetValuesJSON() []byte {
|
||||
if x != nil {
|
||||
return x.ValuesJSON
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *LoginSession) GetIp() string {
|
||||
if x != nil {
|
||||
return x.Ip
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *LoginSession) GetCreatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *LoginSession) GetExpiresAt() int64 {
|
||||
if x != nil {
|
||||
return x.ExpiresAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_models_model_login_session_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_login_session_proto_rawDesc = []byte{
|
||||
0x0a, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6c,
|
||||
0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xce, 0x01, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x6e,
|
||||
0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e,
|
||||
0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49,
|
||||
0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||
0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x63,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
|
||||
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70,
|
||||
0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78,
|
||||
0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_login_session_proto_rawDescOnce sync.Once
|
||||
file_models_model_login_session_proto_rawDescData = file_models_model_login_session_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_login_session_proto_rawDescGZIP() []byte {
|
||||
file_models_model_login_session_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_login_session_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_login_session_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_login_session_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_login_session_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_login_session_proto_goTypes = []interface{}{
|
||||
(*LoginSession)(nil), // 0: pb.LoginSession
|
||||
}
|
||||
var file_models_model_login_session_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_login_session_proto_init() }
|
||||
func file_models_model_login_session_proto_init() {
|
||||
if File_models_model_login_session_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_login_session_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LoginSession); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_login_session_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_login_session_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_login_session_proto_depIdxs,
|
||||
MessageInfos: file_models_model_login_session_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_login_session_proto = out.File
|
||||
file_models_model_login_session_proto_rawDesc = nil
|
||||
file_models_model_login_session_proto_goTypes = nil
|
||||
file_models_model_login_session_proto_depIdxs = nil
|
||||
}
|
||||
@@ -49,8 +49,11 @@ type Node struct {
|
||||
MaxCacheDiskCapacity *SizeCapacity `protobuf:"bytes,17,opt,name=maxCacheDiskCapacity,proto3" json:"maxCacheDiskCapacity,omitempty"`
|
||||
MaxCacheMemoryCapacity *SizeCapacity `protobuf:"bytes,18,opt,name=maxCacheMemoryCapacity,proto3" json:"maxCacheMemoryCapacity,omitempty"`
|
||||
CacheDiskDir string `protobuf:"bytes,19,opt,name=cacheDiskDir,proto3" json:"cacheDiskDir,omitempty"`
|
||||
CacheDiskSubDirsJSON []byte `protobuf:"bytes,23,opt,name=cacheDiskSubDirsJSON,proto3" json:"cacheDiskSubDirsJSON,omitempty"`
|
||||
Level int32 `protobuf:"varint,20,opt,name=level,proto3" json:"level,omitempty"`
|
||||
LnAddrs []string `protobuf:"bytes,21,rep,name=lnAddrs,proto3" json:"lnAddrs,omitempty"` // Ln访问地址
|
||||
LnAddrs []string `protobuf:"bytes,21,rep,name=lnAddrs,proto3" json:"lnAddrs,omitempty"` // Ln访问地址
|
||||
EnableIPLists bool `protobuf:"varint,22,opt,name=enableIPLists,proto3" json:"enableIPLists,omitempty"`
|
||||
ApiNodeAddrsJSON []byte `protobuf:"bytes,24,opt,name=apiNodeAddrsJSON,proto3" json:"apiNodeAddrsJSON,omitempty"`
|
||||
NodeCluster *NodeCluster `protobuf:"bytes,32,opt,name=nodeCluster,proto3" json:"nodeCluster,omitempty"` // 主集群
|
||||
NodeLogin *NodeLogin `protobuf:"bytes,33,opt,name=nodeLogin,proto3" json:"nodeLogin,omitempty"`
|
||||
InstallStatus *NodeInstallStatus `protobuf:"bytes,34,opt,name=installStatus,proto3" json:"installStatus,omitempty"`
|
||||
@@ -225,6 +228,13 @@ func (x *Node) GetCacheDiskDir() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Node) GetCacheDiskSubDirsJSON() []byte {
|
||||
if x != nil {
|
||||
return x.CacheDiskSubDirsJSON
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Node) GetLevel() int32 {
|
||||
if x != nil {
|
||||
return x.Level
|
||||
@@ -239,6 +249,20 @@ func (x *Node) GetLnAddrs() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Node) GetEnableIPLists() bool {
|
||||
if x != nil {
|
||||
return x.EnableIPLists
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Node) GetApiNodeAddrsJSON() []byte {
|
||||
if x != nil {
|
||||
return x.ApiNodeAddrsJSON
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Node) GetNodeCluster() *NodeCluster {
|
||||
if x != nil {
|
||||
return x.NodeCluster
|
||||
@@ -396,7 +420,7 @@ var file_models_model_node_proto_rawDesc = []byte{
|
||||
0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d,
|
||||
0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69,
|
||||
0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x64,
|
||||
0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x09, 0x0a, 0x04, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69,
|
||||
0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a,
|
||||
@@ -436,45 +460,53 @@ var file_models_model_node_proto_rawDesc = []byte{
|
||||
0x79, 0x52, 0x16, 0x6d, 0x61, 0x78, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x72,
|
||||
0x79, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x61, 0x63,
|
||||
0x68, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x44, 0x69, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0c, 0x63, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x44, 0x69, 0x72, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65,
|
||||
0x76, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x73, 0x18, 0x15,
|
||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x73, 0x12, 0x31, 0x0a,
|
||||
0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73,
|
||||
0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
||||
0x12, 0x2b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x21, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67,
|
||||
0x69, 0x6e, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x3b, 0x0a,
|
||||
0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x22,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e,
|
||||
0x73, 0x74, 0x61, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x69, 0x6e, 0x73,
|
||||
0x74, 0x61, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x33, 0x0a, 0x0b, 0x69, 0x70,
|
||||
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x11, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65,
|
||||
0x73, 0x73, 0x52, 0x0b, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12,
|
||||
0x2b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x24, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75,
|
||||
0x70, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2e, 0x0a, 0x0a,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x25, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x15,
|
||||
0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75,
|
||||
0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x26, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x15, 0x73, 0x65,
|
||||
0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74,
|
||||
0x65, 0x72, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69,
|
||||
0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x55,
|
||||
0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x55, 0x70, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65,
|
||||
0x76, 0x65, 0x6c, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74,
|
||||
0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f,
|
||||
0x0c, 0x63, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x44, 0x69, 0x72, 0x12, 0x32, 0x0a,
|
||||
0x14, 0x63, 0x61, 0x63, 0x68, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x44, 0x69, 0x72,
|
||||
0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x63, 0x61, 0x63,
|
||||
0x68, 0x65, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x44, 0x69, 0x72, 0x73, 0x4a, 0x53, 0x4f,
|
||||
0x4e, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x6e, 0x41, 0x64, 0x64,
|
||||
0x72, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6e, 0x41, 0x64, 0x64, 0x72,
|
||||
0x73, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x61, 0x70, 0x69, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x18, 0x20, 0x01, 0x28,
|
||||
0x0c, 0x52, 0x10, 0x61, 0x70, 0x69, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x73, 0x4a,
|
||||
0x53, 0x4f, 0x4e, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74,
|
||||
0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43,
|
||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x6f,
|
||||
0x67, 0x69, 0x6e, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e,
|
||||
0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x6f,
|
||||
0x67, 0x69, 0x6e, 0x12, 0x3b, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x52, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x12, 0x33, 0x0a, 0x0b, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18,
|
||||
0x23, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49,
|
||||
0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0b, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72,
|
||||
0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f,
|
||||
0x75, 0x70, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f,
|
||||
0x75, 0x70, 0x12, 0x2e, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x18, 0x25, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x15, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x4e,
|
||||
0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x26, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74,
|
||||
0x65, 0x72, 0x52, 0x15, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x09, 0x42, 0x61,
|
||||
0x73, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69,
|
||||
0x73, 0x4f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x69, 0x73, 0x55, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69,
|
||||
0x73, 0x55, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f,
|
||||
0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52,
|
||||
0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04,
|
||||
0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -39,6 +39,7 @@ type NodeCluster struct {
|
||||
Secret string `protobuf:"bytes,7,opt,name=secret,proto3" json:"secret,omitempty"`
|
||||
DnsName string `protobuf:"bytes,8,opt,name=dnsName,proto3" json:"dnsName,omitempty"`
|
||||
DnsDomainId int64 `protobuf:"varint,9,opt,name=dnsDomainId,proto3" json:"dnsDomainId,omitempty"`
|
||||
DnsDefaultRoute string `protobuf:"bytes,22,opt,name=dnsDefaultRoute,proto3" json:"dnsDefaultRoute,omitempty"` // DNS默认线路
|
||||
HttpCachePolicyId int64 `protobuf:"varint,10,opt,name=httpCachePolicyId,proto3" json:"httpCachePolicyId,omitempty"`
|
||||
HttpFirewallPolicyId int64 `protobuf:"varint,11,opt,name=httpFirewallPolicyId,proto3" json:"httpFirewallPolicyId,omitempty"`
|
||||
IsOn bool `protobuf:"varint,12,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
@@ -46,6 +47,10 @@ type NodeCluster struct {
|
||||
NodeMaxThreads int32 `protobuf:"varint,14,opt,name=nodeMaxThreads,proto3" json:"nodeMaxThreads,omitempty"`
|
||||
AutoOpenPorts bool `protobuf:"varint,16,opt,name=autoOpenPorts,proto3" json:"autoOpenPorts,omitempty"`
|
||||
IsPinned bool `protobuf:"varint,17,opt,name=isPinned,proto3" json:"isPinned,omitempty"`
|
||||
ClockJSON []byte `protobuf:"bytes,18,opt,name=clockJSON,proto3" json:"clockJSON,omitempty"`
|
||||
AutoRemoteStart bool `protobuf:"varint,19,opt,name=autoRemoteStart,proto3" json:"autoRemoteStart,omitempty"`
|
||||
AutoInstallNftables bool `protobuf:"varint,20,opt,name=autoInstallNftables,proto3" json:"autoInstallNftables,omitempty"`
|
||||
SshParamsJSON []byte `protobuf:"bytes,21,opt,name=sshParamsJSON,proto3" json:"sshParamsJSON,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NodeCluster) Reset() {
|
||||
@@ -143,6 +148,13 @@ func (x *NodeCluster) GetDnsDomainId() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeCluster) GetDnsDefaultRoute() string {
|
||||
if x != nil {
|
||||
return x.DnsDefaultRoute
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NodeCluster) GetHttpCachePolicyId() int64 {
|
||||
if x != nil {
|
||||
return x.HttpCachePolicyId
|
||||
@@ -192,12 +204,40 @@ func (x *NodeCluster) GetIsPinned() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NodeCluster) GetClockJSON() []byte {
|
||||
if x != nil {
|
||||
return x.ClockJSON
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NodeCluster) GetAutoRemoteStart() bool {
|
||||
if x != nil {
|
||||
return x.AutoRemoteStart
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NodeCluster) GetAutoInstallNftables() bool {
|
||||
if x != nil {
|
||||
return x.AutoInstallNftables
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NodeCluster) GetSshParamsJSON() []byte {
|
||||
if x != nil {
|
||||
return x.SshParamsJSON
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_models_model_node_cluster_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_node_cluster_proto_rawDesc = []byte{
|
||||
0x0a, 0x1f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xfd, 0x03, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
|
||||
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xc7, 0x05, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
|
||||
0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65,
|
||||
@@ -213,24 +253,36 @@ var file_models_model_node_cluster_proto_rawDesc = []byte{
|
||||
0x07, 0x64, 0x6e, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
||||
0x64, 0x6e, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6e, 0x73, 0x44, 0x6f,
|
||||
0x6d, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, 0x6e,
|
||||
0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x68, 0x74, 0x74,
|
||||
0x70, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x0a,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x68, 0x74, 0x74, 0x70, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50,
|
||||
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46,
|
||||
0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18,
|
||||
0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77,
|
||||
0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69,
|
||||
0x73, 0x4f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x4d, 0x61, 0x78, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x18, 0x0e, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x78, 0x54, 0x68, 0x72, 0x65,
|
||||
0x61, 0x64, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x6f, 0x4f, 0x70, 0x65, 0x6e, 0x50,
|
||||
0x6f, 0x72, 0x74, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x6f,
|
||||
0x4f, 0x70, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x50,
|
||||
0x69, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x50,
|
||||
0x69, 0x6e, 0x6e, 0x65, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x6e, 0x73,
|
||||
0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x16, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0f, 0x64, 0x6e, 0x73, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x68, 0x74, 0x74, 0x70, 0x43, 0x61, 0x63, 0x68, 0x65,
|
||||
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11,
|
||||
0x68, 0x74, 0x74, 0x70, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49,
|
||||
0x64, 0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
|
||||
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c,
|
||||
0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x0c, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x78,
|
||||
0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x4d, 0x61, 0x78, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x12, 0x24, 0x0a,
|
||||
0x0d, 0x61, 0x75, 0x74, 0x6f, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x10,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x6f, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x6f,
|
||||
0x72, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x50, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x18,
|
||||
0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x50, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x12, 0x20, 0x01,
|
||||
0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x28, 0x0a,
|
||||
0x0f, 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74,
|
||||
0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x6d, 0x6f,
|
||||
0x74, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x30, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x49,
|
||||
0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x4e, 0x66, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x14,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c,
|
||||
0x6c, 0x4e, 0x66, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x73, 0x68,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0c,
|
||||
0x52, 0x0d, 0x73, 0x73, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -31,19 +31,20 @@ type NodeIPAddress struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
NodeId int64 `protobuf:"varint,2,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Ip string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"`
|
||||
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
|
||||
State int64 `protobuf:"varint,6,opt,name=state,proto3" json:"state,omitempty"`
|
||||
Order int64 `protobuf:"varint,7,opt,name=order,proto3" json:"order,omitempty"`
|
||||
CanAccess bool `protobuf:"varint,8,opt,name=canAccess,proto3" json:"canAccess,omitempty"`
|
||||
IsOn bool `protobuf:"varint,9,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
IsUp bool `protobuf:"varint,10,opt,name=isUp,proto3" json:"isUp,omitempty"`
|
||||
Role string `protobuf:"bytes,12,opt,name=role,proto3" json:"role,omitempty"`
|
||||
BackupIP string `protobuf:"bytes,13,opt,name=backupIP,proto3" json:"backupIP,omitempty"`
|
||||
IsHealthy bool `protobuf:"varint,14,opt,name=isHealthy,proto3" json:"isHealthy,omitempty"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
NodeId int64 `protobuf:"varint,2,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Ip string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"`
|
||||
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
|
||||
State int64 `protobuf:"varint,6,opt,name=state,proto3" json:"state,omitempty"`
|
||||
Order int64 `protobuf:"varint,7,opt,name=order,proto3" json:"order,omitempty"`
|
||||
CanAccess bool `protobuf:"varint,8,opt,name=canAccess,proto3" json:"canAccess,omitempty"`
|
||||
IsOn bool `protobuf:"varint,9,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
IsUp bool `protobuf:"varint,10,opt,name=isUp,proto3" json:"isUp,omitempty"`
|
||||
Role string `protobuf:"bytes,12,opt,name=role,proto3" json:"role,omitempty"`
|
||||
BackupIP string `protobuf:"bytes,13,opt,name=backupIP,proto3" json:"backupIP,omitempty"`
|
||||
IsHealthy bool `protobuf:"varint,14,opt,name=isHealthy,proto3" json:"isHealthy,omitempty"`
|
||||
NodeClusters []*NodeCluster `protobuf:"bytes,30,rep,name=nodeClusters,proto3" json:"nodeClusters,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NodeIPAddress) Reset() {
|
||||
@@ -169,33 +170,45 @@ func (x *NodeIPAddress) GetIsHealthy() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NodeIPAddress) GetNodeClusters() []*NodeCluster {
|
||||
if x != nil {
|
||||
return x.NodeClusters
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_models_model_node_ip_address_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_node_ip_address_proto_rawDesc = []byte{
|
||||
0x0a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x5f, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xbd, 0x02, 0x0a, 0x0d, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f,
|
||||
0x64, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65,
|
||||
0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
|
||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
|
||||
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74,
|
||||
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6f,
|
||||
0x72, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73,
|
||||
0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x41, 0x63, 0x63, 0x65,
|
||||
0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x55, 0x70, 0x18, 0x0a,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x55, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f,
|
||||
0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x50, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x50, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73,
|
||||
0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69,
|
||||
0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73,
|
||||
0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73,
|
||||
0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf2, 0x02, 0x0a, 0x0d, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
|
||||
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
|
||||
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61,
|
||||
0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
|
||||
0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x41, 0x63, 0x63, 0x65,
|
||||
0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x41, 0x63, 0x63,
|
||||
0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x55, 0x70, 0x18,
|
||||
0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x55, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x72,
|
||||
0x6f, 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x50, 0x18, 0x0d, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x49, 0x50, 0x12, 0x1c, 0x0a, 0x09, 0x69,
|
||||
0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
|
||||
0x69, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x12, 0x33, 0x0a, 0x0c, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x1e, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
||||
0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x42, 0x06,
|
||||
0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -213,13 +226,15 @@ func file_models_model_node_ip_address_proto_rawDescGZIP() []byte {
|
||||
var file_models_model_node_ip_address_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_node_ip_address_proto_goTypes = []interface{}{
|
||||
(*NodeIPAddress)(nil), // 0: pb.NodeIPAddress
|
||||
(*NodeCluster)(nil), // 1: pb.NodeCluster
|
||||
}
|
||||
var file_models_model_node_ip_address_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
1, // 0: pb.NodeIPAddress.nodeClusters:type_name -> pb.NodeCluster
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_node_ip_address_proto_init() }
|
||||
@@ -227,6 +242,7 @@ func file_models_model_node_ip_address_proto_init() {
|
||||
if File_models_model_node_ip_address_proto != nil {
|
||||
return
|
||||
}
|
||||
file_models_model_node_cluster_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_node_ip_address_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NodeIPAddress); i {
|
||||
|
||||
@@ -40,6 +40,7 @@ type NodeTask struct {
|
||||
Version int64 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"`
|
||||
IsPrimary bool `protobuf:"varint,8,opt,name=isPrimary,proto3" json:"isPrimary,omitempty"` // 是否为主节点,非主节点稍等再同步有利于提升同步速度
|
||||
ServerId int64 `protobuf:"varint,9,opt,name=serverId,proto3" json:"serverId,omitempty"`
|
||||
UserId int64 `protobuf:"varint,10,opt,name=userId,proto3" json:"userId,omitempty"`
|
||||
Node *Node `protobuf:"bytes,30,opt,name=node,proto3" json:"node,omitempty"`
|
||||
NodeCluster *NodeCluster `protobuf:"bytes,31,opt,name=nodeCluster,proto3" json:"nodeCluster,omitempty"`
|
||||
Server *NodeCluster `protobuf:"bytes,32,opt,name=server,proto3" json:"server,omitempty"`
|
||||
@@ -140,6 +141,13 @@ func (x *NodeTask) GetServerId() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeTask) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeTask) GetNode() *Node {
|
||||
if x != nil {
|
||||
return x.Node
|
||||
@@ -169,7 +177,7 @@ var file_models_model_node_task_proto_rawDesc = []byte{
|
||||
0x70, 0x62, 0x1a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
|
||||
0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6d, 0x6f, 0x64,
|
||||
0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63,
|
||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdc, 0x02, 0x0a,
|
||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf4, 0x02, 0x0a,
|
||||
0x08, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a,
|
||||
@@ -184,15 +192,17 @@ var file_models_model_node_task_proto_rawDesc = []byte{
|
||||
0x6d, 0x61, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72,
|
||||
0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49,
|
||||
0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49,
|
||||
0x64, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x1f,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
|
||||
0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74,
|
||||
0x65, 0x72, 0x12, 0x27, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73,
|
||||
0x74, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43,
|
||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x06, 0x73, 0x65,
|
||||
0x72, 0x76, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -31,13 +31,21 @@ type NSCluster struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
InstallDir string `protobuf:"bytes,4,opt,name=installDir,proto3" json:"installDir,omitempty"`
|
||||
TcpJSON []byte `protobuf:"bytes,5,opt,name=tcpJSON,proto3" json:"tcpJSON,omitempty"`
|
||||
TlsJSON []byte `protobuf:"bytes,6,opt,name=tlsJSON,proto3" json:"tlsJSON,omitempty"`
|
||||
UdpJSON []byte `protobuf:"bytes,7,opt,name=udpJSON,proto3" json:"udpJSON,omitempty"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
InstallDir string `protobuf:"bytes,4,opt,name=installDir,proto3" json:"installDir,omitempty"`
|
||||
TcpJSON []byte `protobuf:"bytes,5,opt,name=tcpJSON,proto3" json:"tcpJSON,omitempty"`
|
||||
TlsJSON []byte `protobuf:"bytes,6,opt,name=tlsJSON,proto3" json:"tlsJSON,omitempty"`
|
||||
UdpJSON []byte `protobuf:"bytes,7,opt,name=udpJSON,proto3" json:"udpJSON,omitempty"`
|
||||
Hosts []string `protobuf:"bytes,8,rep,name=hosts,proto3" json:"hosts,omitempty"`
|
||||
SoaJSON []byte `protobuf:"bytes,12,opt,name=soaJSON,proto3" json:"soaJSON,omitempty"`
|
||||
Email string `protobuf:"bytes,13,opt,name=email,proto3" json:"email,omitempty"`
|
||||
AutoRemoteStart bool `protobuf:"varint,9,opt,name=autoRemoteStart,proto3" json:"autoRemoteStart,omitempty"`
|
||||
TimeZone string `protobuf:"bytes,10,opt,name=timeZone,proto3" json:"timeZone,omitempty"`
|
||||
AnswerJSON []byte `protobuf:"bytes,11,opt,name=answerJSON,proto3" json:"answerJSON,omitempty"`
|
||||
DetectAgents bool `protobuf:"varint,14,opt,name=detectAgents,proto3" json:"detectAgents,omitempty"`
|
||||
CheckingPorts bool `protobuf:"varint,15,opt,name=checkingPorts,proto3" json:"checkingPorts,omitempty"` // 检查端口连通性
|
||||
}
|
||||
|
||||
func (x *NSCluster) Reset() {
|
||||
@@ -121,12 +129,68 @@ func (x *NSCluster) GetUdpJSON() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NSCluster) GetHosts() []string {
|
||||
if x != nil {
|
||||
return x.Hosts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NSCluster) GetSoaJSON() []byte {
|
||||
if x != nil {
|
||||
return x.SoaJSON
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NSCluster) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NSCluster) GetAutoRemoteStart() bool {
|
||||
if x != nil {
|
||||
return x.AutoRemoteStart
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NSCluster) GetTimeZone() string {
|
||||
if x != nil {
|
||||
return x.TimeZone
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NSCluster) GetAnswerJSON() []byte {
|
||||
if x != nil {
|
||||
return x.AnswerJSON
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NSCluster) GetDetectAgents() bool {
|
||||
if x != nil {
|
||||
return x.DetectAgents
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NSCluster) GetCheckingPorts() bool {
|
||||
if x != nil {
|
||||
return x.CheckingPorts
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_models_model_ns_cluster_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_ns_cluster_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e,
|
||||
0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x02, 0x70, 0x62, 0x22, 0xb1, 0x01, 0x0a, 0x09, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
|
||||
0x02, 0x70, 0x62, 0x22, 0xa7, 0x03, 0x0a, 0x09, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
|
||||
0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69,
|
||||
0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
|
||||
@@ -137,8 +201,23 @@ var file_models_model_ns_cluster_proto_rawDesc = []byte{
|
||||
0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x6c, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x6c, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
|
||||
0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x14, 0x0a, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73,
|
||||
0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x73, 0x6f, 0x61, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
|
||||
0x73, 0x6f, 0x61, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
|
||||
0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x28, 0x0a,
|
||||
0x0f, 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74,
|
||||
0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x6d, 0x6f,
|
||||
0x74, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x5a,
|
||||
0x6f, 0x6e, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x5a,
|
||||
0x6f, 0x6e, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x4a, 0x53, 0x4f,
|
||||
0x4e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x4a,
|
||||
0x53, 0x4f, 0x4e, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x41, 0x67, 0x65,
|
||||
0x6e, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x65, 0x74, 0x65, 0x63,
|
||||
0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x68, 0x65, 0x63, 0x6b,
|
||||
0x69, 0x6e, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d,
|
||||
0x63, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -39,6 +39,8 @@ type NSDomain struct {
|
||||
Version int64 `protobuf:"varint,6,opt,name=version,proto3" json:"version,omitempty"`
|
||||
TsigJSON []byte `protobuf:"bytes,7,opt,name=tsigJSON,proto3" json:"tsigJSON,omitempty"`
|
||||
NsDomainGroupIds []int64 `protobuf:"varint,8,rep,packed,name=nsDomainGroupIds,proto3" json:"nsDomainGroupIds,omitempty"`
|
||||
Status string `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"`
|
||||
UserId int64 `protobuf:"varint,10,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
|
||||
NsCluster *NSCluster `protobuf:"bytes,30,opt,name=nsCluster,proto3" json:"nsCluster,omitempty"`
|
||||
User *User `protobuf:"bytes,31,opt,name=user,proto3" json:"user,omitempty"`
|
||||
NsDomainGroups []*NSDomainGroup `protobuf:"bytes,32,rep,name=nsDomainGroups,proto3" json:"nsDomainGroups,omitempty"`
|
||||
@@ -132,6 +134,20 @@ func (x *NSDomain) GetNsDomainGroupIds() []int64 {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NSDomain) GetStatus() string {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NSDomain) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NSDomain) GetNsCluster() *NSCluster {
|
||||
if x != nil {
|
||||
return x.NsCluster
|
||||
@@ -163,8 +179,8 @@ var file_models_model_ns_domain_proto_rawDesc = []byte{
|
||||
0x6f, 0x1a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f,
|
||||
0x6e, 0x73, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f,
|
||||
0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6,
|
||||
0x02, 0x0a, 0x08, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96,
|
||||
0x03, 0x0a, 0x08, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69,
|
||||
@@ -178,7 +194,10 @@ var file_models_model_ns_domain_proto_rawDesc = []byte{
|
||||
0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69,
|
||||
0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x03, 0x52,
|
||||
0x10, 0x6e, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64,
|
||||
0x73, 0x12, 0x2b, 0x0a, 0x09, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x1e,
|
||||
0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65,
|
||||
0x72, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
|
||||
0x64, 0x12, 0x2b, 0x0a, 0x09, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x1e,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73,
|
||||
0x74, 0x65, 0x72, 0x52, 0x09, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1c,
|
||||
0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70,
|
||||
|
||||
@@ -42,6 +42,7 @@ type NSNode struct {
|
||||
IsUp bool `protobuf:"varint,8,opt,name=isUp,proto3" json:"isUp,omitempty"`
|
||||
IsActive bool `protobuf:"varint,10,opt,name=isActive,proto3" json:"isActive,omitempty"`
|
||||
ConnectedAPINodeIds []int64 `protobuf:"varint,11,rep,packed,name=connectedAPINodeIds,proto3" json:"connectedAPINodeIds,omitempty"`
|
||||
ApiNodeAddrsJSON []byte `protobuf:"bytes,12,opt,name=apiNodeAddrsJSON,proto3" json:"apiNodeAddrsJSON,omitempty"`
|
||||
NsCluster *NSCluster `protobuf:"bytes,32,opt,name=nsCluster,proto3" json:"nsCluster,omitempty"`
|
||||
NodeLogin *NodeLogin `protobuf:"bytes,33,opt,name=nodeLogin,proto3" json:"nodeLogin,omitempty"`
|
||||
InstallStatus *NodeInstallStatus `protobuf:"bytes,34,opt,name=installStatus,proto3" json:"installStatus,omitempty"`
|
||||
@@ -156,6 +157,13 @@ func (x *NSNode) GetConnectedAPINodeIds() []int64 {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NSNode) GetApiNodeAddrsJSON() []byte {
|
||||
if x != nil {
|
||||
return x.ApiNodeAddrsJSON
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NSNode) GetNsCluster() *NSCluster {
|
||||
if x != nil {
|
||||
return x.NsCluster
|
||||
@@ -188,7 +196,7 @@ var file_models_model_ns_node_proto_rawDesc = []byte{
|
||||
0x64, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f,
|
||||
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x03, 0x0a, 0x06, 0x4e, 0x53, 0x4e, 0x6f, 0x64,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfb, 0x03, 0x0a, 0x06, 0x4e, 0x53, 0x4e, 0x6f, 0x64,
|
||||
0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69,
|
||||
0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x03, 0x20,
|
||||
@@ -208,17 +216,20 @@ var file_models_model_ns_node_proto_rawDesc = []byte{
|
||||
0x30, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e,
|
||||
0x6f, 0x64, 0x65, 0x49, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x03, 0x52, 0x13, 0x63, 0x6f,
|
||||
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64,
|
||||
0x73, 0x12, 0x2b, 0x0a, 0x09, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x20,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73,
|
||||
0x74, 0x65, 0x72, 0x52, 0x09, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2b,
|
||||
0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x21, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e,
|
||||
0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x3b, 0x0a, 0x0d, 0x69,
|
||||
0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x22, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x73, 0x74,
|
||||
0x61, 0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61,
|
||||
0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x73, 0x12, 0x2a, 0x0a, 0x10, 0x61, 0x70, 0x69, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72,
|
||||
0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x61, 0x70, 0x69,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2b, 0x0a,
|
||||
0x09, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52,
|
||||
0x09, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x09, 0x6e, 0x6f,
|
||||
0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x09, 0x6e, 0x6f,
|
||||
0x64, 0x65, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x3b, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61,
|
||||
0x6c, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15,
|
||||
0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
195
pkg/rpc/pb/model_ns_plan.pb.go
Normal file
195
pkg/rpc/pb/model_ns_plan.pb.go
Normal file
@@ -0,0 +1,195 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_ns_plan.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type NSPlan struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
IsOn bool `protobuf:"varint,3,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
MonthlyPrice float32 `protobuf:"fixed32,4,opt,name=monthlyPrice,proto3" json:"monthlyPrice,omitempty"`
|
||||
YearlyPrice float32 `protobuf:"fixed32,5,opt,name=yearlyPrice,proto3" json:"yearlyPrice,omitempty"`
|
||||
ConfigJSON []byte `protobuf:"bytes,6,opt,name=configJSON,proto3" json:"configJSON,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NSPlan) Reset() {
|
||||
*x = NSPlan{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_ns_plan_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *NSPlan) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*NSPlan) ProtoMessage() {}
|
||||
|
||||
func (x *NSPlan) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_ns_plan_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use NSPlan.ProtoReflect.Descriptor instead.
|
||||
func (*NSPlan) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_ns_plan_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *NSPlan) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NSPlan) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NSPlan) GetIsOn() bool {
|
||||
if x != nil {
|
||||
return x.IsOn
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NSPlan) GetMonthlyPrice() float32 {
|
||||
if x != nil {
|
||||
return x.MonthlyPrice
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NSPlan) GetYearlyPrice() float32 {
|
||||
if x != nil {
|
||||
return x.YearlyPrice
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NSPlan) GetConfigJSON() []byte {
|
||||
if x != nil {
|
||||
return x.ConfigJSON
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_models_model_ns_plan_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_ns_plan_proto_rawDesc = []byte{
|
||||
0x0a, 0x1a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e,
|
||||
0x73, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62,
|
||||
0x22, 0xa6, 0x01, 0x0a, 0x06, 0x4e, 0x53, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69,
|
||||
0x73, 0x4f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72,
|
||||
0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68,
|
||||
0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c,
|
||||
0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x79, 0x65,
|
||||
0x61, 0x72, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63,
|
||||
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70,
|
||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_ns_plan_proto_rawDescOnce sync.Once
|
||||
file_models_model_ns_plan_proto_rawDescData = file_models_model_ns_plan_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_ns_plan_proto_rawDescGZIP() []byte {
|
||||
file_models_model_ns_plan_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_ns_plan_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_ns_plan_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_ns_plan_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_ns_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_ns_plan_proto_goTypes = []interface{}{
|
||||
(*NSPlan)(nil), // 0: pb.NSPlan
|
||||
}
|
||||
var file_models_model_ns_plan_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_ns_plan_proto_init() }
|
||||
func file_models_model_ns_plan_proto_init() {
|
||||
if File_models_model_ns_plan_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_ns_plan_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NSPlan); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_ns_plan_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_ns_plan_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_ns_plan_proto_depIdxs,
|
||||
MessageInfos: file_models_model_ns_plan_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_ns_plan_proto = out.File
|
||||
file_models_model_ns_plan_proto_rawDesc = nil
|
||||
file_models_model_ns_plan_proto_goTypes = nil
|
||||
file_models_model_ns_plan_proto_depIdxs = nil
|
||||
}
|
||||
@@ -36,6 +36,12 @@ type NSRecord struct {
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Value string `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"`
|
||||
MxPriority int32 `protobuf:"varint,12,opt,name=mxPriority,proto3" json:"mxPriority,omitempty"` // mx优先级
|
||||
SrvPriority int32 `protobuf:"varint,13,opt,name=srvPriority,proto3" json:"srvPriority,omitempty"` // SRV优先级
|
||||
SrvWeight int32 `protobuf:"varint,14,opt,name=srvWeight,proto3" json:"srvWeight,omitempty"` // SRV权重
|
||||
SrvPort int32 `protobuf:"varint,15,opt,name=srvPort,proto3" json:"srvPort,omitempty"` // SRV端口
|
||||
CaaFlag int32 `protobuf:"varint,16,opt,name=caaFlag,proto3" json:"caaFlag,omitempty"` // CAA Flag
|
||||
CaaTag string `protobuf:"bytes,17,opt,name=caaTag,proto3" json:"caaTag,omitempty"` // CAA TAG
|
||||
Ttl int32 `protobuf:"varint,6,opt,name=ttl,proto3" json:"ttl,omitempty"`
|
||||
Weight int32 `protobuf:"varint,7,opt,name=weight,proto3" json:"weight,omitempty"`
|
||||
CreatedAt int64 `protobuf:"varint,8,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
@@ -113,6 +119,48 @@ func (x *NSRecord) GetValue() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NSRecord) GetMxPriority() int32 {
|
||||
if x != nil {
|
||||
return x.MxPriority
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NSRecord) GetSrvPriority() int32 {
|
||||
if x != nil {
|
||||
return x.SrvPriority
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NSRecord) GetSrvWeight() int32 {
|
||||
if x != nil {
|
||||
return x.SrvWeight
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NSRecord) GetSrvPort() int32 {
|
||||
if x != nil {
|
||||
return x.SrvPort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NSRecord) GetCaaFlag() int32 {
|
||||
if x != nil {
|
||||
return x.CaaFlag
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NSRecord) GetCaaTag() string {
|
||||
if x != nil {
|
||||
return x.CaaTag
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NSRecord) GetTtl() int32 {
|
||||
if x != nil {
|
||||
return x.Ttl
|
||||
@@ -177,7 +225,7 @@ var file_models_model_ns_record_proto_rawDesc = []byte{
|
||||
0x70, 0x62, 0x1a, 0x1c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
|
||||
0x5f, 0x6e, 0x73, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x1a, 0x1b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e,
|
||||
0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe1, 0x02,
|
||||
0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x04,
|
||||
0x0a, 0x08, 0x4e, 0x53, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
|
||||
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
@@ -185,23 +233,33 @@ var file_models_model_ns_record_proto_rawDesc = []byte{
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74,
|
||||
0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x77, 0x65,
|
||||
0x69, 0x67, 0x68, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41,
|
||||
0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
|
||||
0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18,
|
||||
0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73,
|
||||
0x4f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x28,
|
||||
0x0a, 0x08, 0x6e, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x08,
|
||||
0x6e, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x27, 0x0a, 0x08, 0x6e, 0x73, 0x52, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x73, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x08, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65,
|
||||
0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x78,
|
||||
0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
|
||||
0x6d, 0x78, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x72,
|
||||
0x76, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0b, 0x73, 0x72, 0x76, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x73, 0x72, 0x76, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x09, 0x73, 0x72, 0x76, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x72,
|
||||
0x76, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x72, 0x76,
|
||||
0x50, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x61, 0x46, 0x6c, 0x61, 0x67, 0x18,
|
||||
0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x61, 0x61, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x63, 0x61, 0x61, 0x54, 0x61, 0x67, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
||||
0x63, 0x61, 0x61, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67,
|
||||
0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74,
|
||||
0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x08, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c,
|
||||
0x0a, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x0b,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x28, 0x0a, 0x08, 0x6e, 0x73,
|
||||
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x08, 0x6e, 0x73, 0x44, 0x6f,
|
||||
0x6d, 0x61, 0x69, 0x6e, 0x12, 0x27, 0x0a, 0x08, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73,
|
||||
0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x53, 0x52, 0x6f,
|
||||
0x75, 0x74, 0x65, 0x52, 0x08, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -31,16 +31,20 @@ type NSRoute struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
RangesJSON []byte `protobuf:"bytes,4,opt,name=rangesJSON,proto3" json:"rangesJSON,omitempty"`
|
||||
IsDeleted bool `protobuf:"varint,5,opt,name=isDeleted,proto3" json:"isDeleted,omitempty"`
|
||||
Order int64 `protobuf:"varint,6,opt,name=order,proto3" json:"order,omitempty"`
|
||||
Version int64 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"`
|
||||
Code string `protobuf:"bytes,8,opt,name=code,proto3" json:"code,omitempty"`
|
||||
NsCluster *NSCluster `protobuf:"bytes,30,opt,name=nsCluster,proto3" json:"nsCluster,omitempty"`
|
||||
NsDomain *NSDomain `protobuf:"bytes,31,opt,name=nsDomain,proto3" json:"nsDomain,omitempty"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
RangesJSON []byte `protobuf:"bytes,4,opt,name=rangesJSON,proto3" json:"rangesJSON,omitempty"`
|
||||
IsDeleted bool `protobuf:"varint,5,opt,name=isDeleted,proto3" json:"isDeleted,omitempty"`
|
||||
Order int32 `protobuf:"varint,6,opt,name=order,proto3" json:"order,omitempty"`
|
||||
Version int64 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"`
|
||||
Code string `protobuf:"bytes,8,opt,name=code,proto3" json:"code,omitempty"`
|
||||
IsPublic bool `protobuf:"varint,9,opt,name=isPublic,proto3" json:"isPublic,omitempty"`
|
||||
Priority int32 `protobuf:"varint,10,opt,name=priority,proto3" json:"priority,omitempty"` // 优先级
|
||||
UserId int64 `protobuf:"varint,11,opt,name=userId,proto3" json:"userId,omitempty"` // 所属用户ID
|
||||
NsCluster *NSCluster `protobuf:"bytes,30,opt,name=nsCluster,proto3" json:"nsCluster,omitempty"`
|
||||
NsDomain *NSDomain `protobuf:"bytes,31,opt,name=nsDomain,proto3" json:"nsDomain,omitempty"`
|
||||
NsRouteCategory *NSRouteCategory `protobuf:"bytes,32,opt,name=nsRouteCategory,proto3" json:"nsRouteCategory,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NSRoute) Reset() {
|
||||
@@ -110,7 +114,7 @@ func (x *NSRoute) GetIsDeleted() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NSRoute) GetOrder() int64 {
|
||||
func (x *NSRoute) GetOrder() int32 {
|
||||
if x != nil {
|
||||
return x.Order
|
||||
}
|
||||
@@ -131,6 +135,27 @@ func (x *NSRoute) GetCode() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NSRoute) GetIsPublic() bool {
|
||||
if x != nil {
|
||||
return x.IsPublic
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NSRoute) GetPriority() int32 {
|
||||
if x != nil {
|
||||
return x.Priority
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NSRoute) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NSRoute) GetNsCluster() *NSCluster {
|
||||
if x != nil {
|
||||
return x.NsCluster
|
||||
@@ -145,6 +170,13 @@ func (x *NSRoute) GetNsDomain() *NSDomain {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NSRoute) GetNsRouteCategory() *NSRouteCategory {
|
||||
if x != nil {
|
||||
return x.NsRouteCategory
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_models_model_ns_route_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_ns_route_proto_rawDesc = []byte{
|
||||
@@ -153,26 +185,37 @@ var file_models_model_ns_route_proto_rawDesc = []byte{
|
||||
0x62, 0x1a, 0x1d, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f,
|
||||
0x6e, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x1a, 0x1c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e,
|
||||
0x73, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a,
|
||||
0x02, 0x0a, 0x07, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73,
|
||||
0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x4a, 0x53,
|
||||
0x4f, 0x4e, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x63, 0x6f, 0x64, 0x65, 0x12, 0x2b, 0x0a, 0x09, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
|
||||
0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x53, 0x43,
|
||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x09, 0x6e, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
|
||||
0x72, 0x12, 0x28, 0x0a, 0x08, 0x6e, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x1f, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69,
|
||||
0x6e, 0x52, 0x08, 0x6e, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x73, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24,
|
||||
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x73, 0x5f,
|
||||
0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9, 0x03, 0x0a, 0x07, 0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04,
|
||||
0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x61, 0x6e, 0x67,
|
||||
0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x72, 0x61,
|
||||
0x6e, 0x67, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x44,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x08,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73,
|
||||
0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73,
|
||||
0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69,
|
||||
0x74, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69,
|
||||
0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x09, 0x6e, 0x73,
|
||||
0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x4e, 0x53, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x09, 0x6e, 0x73,
|
||||
0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x08, 0x6e, 0x73, 0x44, 0x6f, 0x6d,
|
||||
0x61, 0x69, 0x6e, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x4e,
|
||||
0x53, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x08, 0x6e, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69,
|
||||
0x6e, 0x12, 0x3d, 0x0a, 0x0f, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x61, 0x74, 0x65,
|
||||
0x67, 0x6f, 0x72, 0x79, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x4e, 0x53, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52,
|
||||
0x0f, 0x6e, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -189,18 +232,20 @@ func file_models_model_ns_route_proto_rawDescGZIP() []byte {
|
||||
|
||||
var file_models_model_ns_route_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_ns_route_proto_goTypes = []interface{}{
|
||||
(*NSRoute)(nil), // 0: pb.NSRoute
|
||||
(*NSCluster)(nil), // 1: pb.NSCluster
|
||||
(*NSDomain)(nil), // 2: pb.NSDomain
|
||||
(*NSRoute)(nil), // 0: pb.NSRoute
|
||||
(*NSCluster)(nil), // 1: pb.NSCluster
|
||||
(*NSDomain)(nil), // 2: pb.NSDomain
|
||||
(*NSRouteCategory)(nil), // 3: pb.NSRouteCategory
|
||||
}
|
||||
var file_models_model_ns_route_proto_depIdxs = []int32{
|
||||
1, // 0: pb.NSRoute.nsCluster:type_name -> pb.NSCluster
|
||||
2, // 1: pb.NSRoute.nsDomain:type_name -> pb.NSDomain
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
3, // 2: pb.NSRoute.nsRouteCategory:type_name -> pb.NSRouteCategory
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_ns_route_proto_init() }
|
||||
@@ -210,6 +255,7 @@ func file_models_model_ns_route_proto_init() {
|
||||
}
|
||||
file_models_model_ns_cluster_proto_init()
|
||||
file_models_model_ns_domain_proto_init()
|
||||
file_models_model_ns_route_category_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_ns_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NSRoute); i {
|
||||
|
||||
176
pkg/rpc/pb/model_ns_route_category.pb.go
Normal file
176
pkg/rpc/pb/model_ns_route_category.pb.go
Normal file
@@ -0,0 +1,176 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_ns_route_category.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 线路分类
|
||||
type NSRouteCategory struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
IsOn bool `protobuf:"varint,3,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
Order int32 `protobuf:"varint,4,opt,name=order,proto3" json:"order,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NSRouteCategory) Reset() {
|
||||
*x = NSRouteCategory{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_ns_route_category_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *NSRouteCategory) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*NSRouteCategory) ProtoMessage() {}
|
||||
|
||||
func (x *NSRouteCategory) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_ns_route_category_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use NSRouteCategory.ProtoReflect.Descriptor instead.
|
||||
func (*NSRouteCategory) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_ns_route_category_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *NSRouteCategory) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NSRouteCategory) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NSRouteCategory) GetIsOn() bool {
|
||||
if x != nil {
|
||||
return x.IsOn
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *NSRouteCategory) GetOrder() int32 {
|
||||
if x != nil {
|
||||
return x.Order
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_models_model_ns_route_category_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_ns_route_category_proto_rawDesc = []byte{
|
||||
0x0a, 0x24, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e,
|
||||
0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x5f, 0x0a, 0x0f, 0x4e, 0x53,
|
||||
0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_ns_route_category_proto_rawDescOnce sync.Once
|
||||
file_models_model_ns_route_category_proto_rawDescData = file_models_model_ns_route_category_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_ns_route_category_proto_rawDescGZIP() []byte {
|
||||
file_models_model_ns_route_category_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_ns_route_category_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_ns_route_category_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_ns_route_category_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_ns_route_category_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_ns_route_category_proto_goTypes = []interface{}{
|
||||
(*NSRouteCategory)(nil), // 0: pb.NSRouteCategory
|
||||
}
|
||||
var file_models_model_ns_route_category_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_ns_route_category_proto_init() }
|
||||
func file_models_model_ns_route_category_proto_init() {
|
||||
if File_models_model_ns_route_category_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_ns_route_category_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NSRouteCategory); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_ns_route_category_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_ns_route_category_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_ns_route_category_proto_depIdxs,
|
||||
MessageInfos: file_models_model_ns_route_category_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_ns_route_category_proto = out.File
|
||||
file_models_model_ns_route_category_proto_rawDesc = nil
|
||||
file_models_model_ns_route_category_proto_goTypes = nil
|
||||
file_models_model_ns_route_category_proto_depIdxs = nil
|
||||
}
|
||||
224
pkg/rpc/pb/model_ns_user_plan.pb.go
Normal file
224
pkg/rpc/pb/model_ns_user_plan.pb.go
Normal file
@@ -0,0 +1,224 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_ns_user_plan.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type NSUserPlan struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
NsPlanId int64 `protobuf:"varint,2,opt,name=nsPlanId,proto3" json:"nsPlanId,omitempty"`
|
||||
UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"`
|
||||
DayFrom string `protobuf:"bytes,4,opt,name=dayFrom,proto3" json:"dayFrom,omitempty"`
|
||||
DayTo string `protobuf:"bytes,5,opt,name=dayTo,proto3" json:"dayTo,omitempty"`
|
||||
PeriodUnit string `protobuf:"bytes,6,opt,name=periodUnit,proto3" json:"periodUnit,omitempty"`
|
||||
NsPlan *NSPlan `protobuf:"bytes,30,opt,name=nsPlan,proto3" json:"nsPlan,omitempty"`
|
||||
User *User `protobuf:"bytes,31,opt,name=user,proto3" json:"user,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NSUserPlan) Reset() {
|
||||
*x = NSUserPlan{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_ns_user_plan_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *NSUserPlan) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*NSUserPlan) ProtoMessage() {}
|
||||
|
||||
func (x *NSUserPlan) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_ns_user_plan_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use NSUserPlan.ProtoReflect.Descriptor instead.
|
||||
func (*NSUserPlan) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_ns_user_plan_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *NSUserPlan) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NSUserPlan) GetNsPlanId() int64 {
|
||||
if x != nil {
|
||||
return x.NsPlanId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NSUserPlan) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NSUserPlan) GetDayFrom() string {
|
||||
if x != nil {
|
||||
return x.DayFrom
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NSUserPlan) GetDayTo() string {
|
||||
if x != nil {
|
||||
return x.DayTo
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NSUserPlan) GetPeriodUnit() string {
|
||||
if x != nil {
|
||||
return x.PeriodUnit
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *NSUserPlan) GetNsPlan() *NSPlan {
|
||||
if x != nil {
|
||||
return x.NsPlan
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *NSUserPlan) GetUser() *User {
|
||||
if x != nil {
|
||||
return x.User
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_models_model_ns_user_plan_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_ns_user_plan_proto_rawDesc = []byte{
|
||||
0x0a, 0x1f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e,
|
||||
0x73, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f,
|
||||
0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x73, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x1a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f,
|
||||
0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe2, 0x01, 0x0a, 0x0a, 0x4e,
|
||||
0x53, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x73, 0x50,
|
||||
0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6e, 0x73, 0x50,
|
||||
0x6c, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x64, 0x61, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
||||
0x64, 0x61, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x61, 0x79, 0x54, 0x6f,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x61, 0x79, 0x54, 0x6f, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x22, 0x0a,
|
||||
0x06, 0x6e, 0x73, 0x50, 0x6c, 0x61, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x4e, 0x53, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x06, 0x6e, 0x73, 0x50, 0x6c, 0x61,
|
||||
0x6e, 0x12, 0x1c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x08, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_ns_user_plan_proto_rawDescOnce sync.Once
|
||||
file_models_model_ns_user_plan_proto_rawDescData = file_models_model_ns_user_plan_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_ns_user_plan_proto_rawDescGZIP() []byte {
|
||||
file_models_model_ns_user_plan_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_ns_user_plan_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_ns_user_plan_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_ns_user_plan_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_ns_user_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_ns_user_plan_proto_goTypes = []interface{}{
|
||||
(*NSUserPlan)(nil), // 0: pb.NSUserPlan
|
||||
(*NSPlan)(nil), // 1: pb.NSPlan
|
||||
(*User)(nil), // 2: pb.User
|
||||
}
|
||||
var file_models_model_ns_user_plan_proto_depIdxs = []int32{
|
||||
1, // 0: pb.NSUserPlan.nsPlan:type_name -> pb.NSPlan
|
||||
2, // 1: pb.NSUserPlan.user:type_name -> pb.User
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_ns_user_plan_proto_init() }
|
||||
func file_models_model_ns_user_plan_proto_init() {
|
||||
if File_models_model_ns_user_plan_proto != nil {
|
||||
return
|
||||
}
|
||||
file_models_model_ns_plan_proto_init()
|
||||
file_models_model_user_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_ns_user_plan_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NSUserPlan); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_ns_user_plan_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_ns_user_plan_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_ns_user_plan_proto_depIdxs,
|
||||
MessageInfos: file_models_model_ns_user_plan_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_ns_user_plan_proto = out.File
|
||||
file_models_model_ns_user_plan_proto_rawDesc = nil
|
||||
file_models_model_ns_user_plan_proto_goTypes = nil
|
||||
file_models_model_ns_user_plan_proto_depIdxs = nil
|
||||
}
|
||||
@@ -35,9 +35,13 @@ type OrderMethod struct {
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
|
||||
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
|
||||
Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"`
|
||||
Secret string `protobuf:"bytes,6,opt,name=secret,proto3" json:"secret,omitempty"`
|
||||
IsOn bool `protobuf:"varint,7,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"`
|
||||
ParentCode string `protobuf:"bytes,8,opt,name=parentCode,proto3" json:"parentCode,omitempty"`
|
||||
Params []byte `protobuf:"bytes,9,opt,name=params,proto3" json:"params,omitempty"`
|
||||
ClientType string `protobuf:"bytes,10,opt,name=clientType,proto3" json:"clientType,omitempty"`
|
||||
QrcodeTitle string `protobuf:"bytes,11,opt,name=qrcodeTitle,proto3" json:"qrcodeTitle,omitempty"`
|
||||
}
|
||||
|
||||
func (x *OrderMethod) Reset() {
|
||||
@@ -100,13 +104,6 @@ func (x *OrderMethod) GetDescription() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrderMethod) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrderMethod) GetSecret() string {
|
||||
if x != nil {
|
||||
return x.Secret
|
||||
@@ -121,23 +118,66 @@ func (x *OrderMethod) GetIsOn() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *OrderMethod) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrderMethod) GetParentCode() string {
|
||||
if x != nil {
|
||||
return x.ParentCode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrderMethod) GetParams() []byte {
|
||||
if x != nil {
|
||||
return x.Params
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *OrderMethod) GetClientType() string {
|
||||
if x != nil {
|
||||
return x.ClientType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrderMethod) GetQrcodeTitle() string {
|
||||
if x != nil {
|
||||
return x.QrcodeTitle
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_models_model_order_method_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_order_method_proto_rawDesc = []byte{
|
||||
0x0a, 0x1f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6f,
|
||||
0x72, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xa5, 0x01, 0x0a, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4d,
|
||||
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x9f, 0x02, 0x0a, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4d,
|
||||
0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64,
|
||||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a,
|
||||
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72,
|
||||
0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f,
|
||||
0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75,
|
||||
0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54,
|
||||
0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e,
|
||||
0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x71, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x54,
|
||||
0x69, 0x74, 0x6c, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x71, 0x72, 0x63, 0x6f,
|
||||
0x64, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -39,9 +39,9 @@ type Plan struct {
|
||||
PriceType string `protobuf:"bytes,7,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
||||
TrafficPriceJSON []byte `protobuf:"bytes,8,opt,name=trafficPriceJSON,proto3" json:"trafficPriceJSON,omitempty"`
|
||||
BandwidthPriceJSON []byte `protobuf:"bytes,12,opt,name=bandwidthPriceJSON,proto3" json:"bandwidthPriceJSON,omitempty"`
|
||||
MonthlyPrice float32 `protobuf:"fixed32,9,opt,name=monthlyPrice,proto3" json:"monthlyPrice,omitempty"`
|
||||
SeasonallyPrice float32 `protobuf:"fixed32,10,opt,name=seasonallyPrice,proto3" json:"seasonallyPrice,omitempty"`
|
||||
YearlyPrice float32 `protobuf:"fixed32,11,opt,name=yearlyPrice,proto3" json:"yearlyPrice,omitempty"`
|
||||
MonthlyPrice float64 `protobuf:"fixed64,9,opt,name=monthlyPrice,proto3" json:"monthlyPrice,omitempty"`
|
||||
SeasonallyPrice float64 `protobuf:"fixed64,10,opt,name=seasonallyPrice,proto3" json:"seasonallyPrice,omitempty"`
|
||||
YearlyPrice float64 `protobuf:"fixed64,11,opt,name=yearlyPrice,proto3" json:"yearlyPrice,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Plan) Reset() {
|
||||
@@ -139,21 +139,21 @@ func (x *Plan) GetBandwidthPriceJSON() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Plan) GetMonthlyPrice() float32 {
|
||||
func (x *Plan) GetMonthlyPrice() float64 {
|
||||
if x != nil {
|
||||
return x.MonthlyPrice
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Plan) GetSeasonallyPrice() float32 {
|
||||
func (x *Plan) GetSeasonallyPrice() float64 {
|
||||
if x != nil {
|
||||
return x.SeasonallyPrice
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Plan) GetYearlyPrice() float32 {
|
||||
func (x *Plan) GetYearlyPrice() float64 {
|
||||
if x != nil {
|
||||
return x.YearlyPrice
|
||||
}
|
||||
@@ -184,12 +184,12 @@ var file_models_model_plan_proto_rawDesc = []byte{
|
||||
0x64, 0x74, 0x68, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01,
|
||||
0x28, 0x0c, 0x52, 0x12, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x72, 0x69,
|
||||
0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c,
|
||||
0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x6d, 0x6f,
|
||||
0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x6d, 0x6f,
|
||||
0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x65,
|
||||
0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20,
|
||||
0x01, 0x28, 0x02, 0x52, 0x0f, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50,
|
||||
0x01, 0x28, 0x01, 0x52, 0x0f, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50,
|
||||
0x72, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x50, 0x72,
|
||||
0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c,
|
||||
0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c,
|
||||
0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
@@ -41,9 +41,12 @@ type Server struct {
|
||||
DnsName string `protobuf:"bytes,19,opt,name=dnsName,proto3" json:"dnsName,omitempty"`
|
||||
SupportCNAME bool `protobuf:"varint,23,opt,name=supportCNAME,proto3" json:"supportCNAME,omitempty"`
|
||||
UserPlanId int64 `protobuf:"varint,24,opt,name=userPlanId,proto3" json:"userPlanId,omitempty"`
|
||||
UserId int64 `protobuf:"varint,29,opt,name=userId,proto3" json:"userId,omitempty"` // 所属用户ID
|
||||
// 配置相关
|
||||
Config []byte `protobuf:"bytes,17,opt,name=config,proto3" json:"config,omitempty"`
|
||||
ServerNamesJSON []byte `protobuf:"bytes,8,opt,name=serverNamesJSON,proto3" json:"serverNamesJSON,omitempty"`
|
||||
FirstServerName string `protobuf:"bytes,33,opt,name=firstServerName,proto3" json:"firstServerName,omitempty"`
|
||||
CountServerNames int32 `protobuf:"varint,28,opt,name=countServerNames,proto3" json:"countServerNames,omitempty"`
|
||||
IsAuditing bool `protobuf:"varint,20,opt,name=isAuditing,proto3" json:"isAuditing,omitempty"`
|
||||
AuditingAt int64 `protobuf:"varint,25,opt,name=auditingAt,proto3" json:"auditingAt,omitempty"`
|
||||
AuditingServerNamesJSON []byte `protobuf:"bytes,21,opt,name=auditingServerNamesJSON,proto3" json:"auditingServerNamesJSON,omitempty"`
|
||||
@@ -61,8 +64,6 @@ type Server struct {
|
||||
NodeCluster *NodeCluster `protobuf:"bytes,30,opt,name=nodeCluster,proto3" json:"nodeCluster,omitempty"`
|
||||
ServerGroups []*ServerGroup `protobuf:"bytes,31,rep,name=serverGroups,proto3" json:"serverGroups,omitempty"`
|
||||
User *User `protobuf:"bytes,32,opt,name=user,proto3" json:"user,omitempty"`
|
||||
// Deprecated: Do not use.
|
||||
LatestServerDailyStat *ServerDailyStat `protobuf:"bytes,33,opt,name=latestServerDailyStat,proto3" json:"latestServerDailyStat,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Server) Reset() {
|
||||
@@ -174,6 +175,13 @@ func (x *Server) GetUserPlanId() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Server) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Server) GetConfig() []byte {
|
||||
if x != nil {
|
||||
return x.Config
|
||||
@@ -188,6 +196,20 @@ func (x *Server) GetServerNamesJSON() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Server) GetFirstServerName() string {
|
||||
if x != nil {
|
||||
return x.FirstServerName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Server) GetCountServerNames() int32 {
|
||||
if x != nil {
|
||||
return x.CountServerNames
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Server) GetIsAuditing() bool {
|
||||
if x != nil {
|
||||
return x.IsAuditing
|
||||
@@ -307,14 +329,6 @@ func (x *Server) GetUser() *User {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
func (x *Server) GetLatestServerDailyStat() *ServerDailyStat {
|
||||
if x != nil {
|
||||
return x.LatestServerDailyStat
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_models_model_server_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_server_proto_rawDesc = []byte{
|
||||
@@ -328,79 +342,79 @@ var file_models_model_server_proto_rawDesc = []byte{
|
||||
0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x6d, 0x6f, 0x64, 0x65,
|
||||
0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65,
|
||||
0x73, 0x75, 0x6c, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x6d, 0x6f, 0x64, 0x65,
|
||||
0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f,
|
||||
0x64, 0x61, 0x69, 0x6c, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x22, 0xc5, 0x08, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69,
|
||||
0x73, 0x4f, 0x6e, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74,
|
||||
0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
|
||||
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
|
||||
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x63,
|
||||
0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||
0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x22, 0x0a,
|
||||
0x0c, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x0c, 0x52, 0x0c, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x64, 0x6e, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x07, 0x64, 0x6e, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, 0x70,
|
||||
0x70, 0x6f, 0x72, 0x74, 0x43, 0x4e, 0x41, 0x4d, 0x45, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x0c, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x4e, 0x41, 0x4d, 0x45, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x75, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x18, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63,
|
||||
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f,
|
||||
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12,
|
||||
0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x41, 0x75, 0x64, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x14, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x41, 0x75, 0x64, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x12,
|
||||
0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x74, 0x18, 0x19, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x74, 0x12,
|
||||
0x38, 0x0a, 0x17, 0x61, 0x75, 0x64, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0c,
|
||||
0x52, 0x17, 0x61, 0x75, 0x64, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x44, 0x0a, 0x0e, 0x61, 0x75, 0x64,
|
||||
0x69, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x41, 0x75, 0x64, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52,
|
||||
0x0e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x68, 0x74, 0x74, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x09, 0x20, 0x01, 0x28,
|
||||
0x0c, 0x52, 0x08, 0x68, 0x74, 0x74, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1c, 0x0a, 0x09, 0x68,
|
||||
0x74, 0x74, 0x70, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09,
|
||||
0x68, 0x74, 0x74, 0x70, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x63, 0x70,
|
||||
0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x63, 0x70, 0x4a,
|
||||
0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x6c, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x6c, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x75, 0x6e, 0x69, 0x78, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||
0x08, 0x75, 0x6e, 0x69, 0x78, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x64, 0x70,
|
||||
0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x75, 0x64, 0x70, 0x4a,
|
||||
0x53, 0x4f, 0x4e, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x76,
|
||||
0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x10, 0x20,
|
||||
0x01, 0x28, 0x0c, 0x52, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78,
|
||||
0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64,
|
||||
0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61,
|
||||
0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x62,
|
||||
0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x1b, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x0e, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42, 0x79,
|
||||
0x74, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74,
|
||||
0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43,
|
||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||
0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0c, 0x73,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x1c, 0x0a, 0x04, 0x75,
|
||||
0x73, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x55,
|
||||
0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x15, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x53, 0x74,
|
||||
0x61, 0x74, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65,
|
||||
0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x42, 0x02, 0x18,
|
||||
0x01, 0x52, 0x15, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44,
|
||||
0x61, 0x69, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x73, 0x75, 0x6c, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe4, 0x08, 0x0a, 0x06, 0x53,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x12, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75,
|
||||
0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x78, 0x63, 0x6c, 0x75,
|
||||
0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x65,
|
||||
0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
|
||||
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6e, 0x73,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6e, 0x73, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x4e,
|
||||
0x41, 0x4d, 0x45, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x75, 0x70, 0x70, 0x6f,
|
||||
0x72, 0x74, 0x43, 0x4e, 0x41, 0x4d, 0x45, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x50,
|
||||
0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x18, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x75, 0x73, 0x65,
|
||||
0x72, 0x50, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
|
||||
0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||
0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c,
|
||||
0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x4a, 0x53, 0x4f,
|
||||
0x4e, 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x66, 0x69, 0x72, 0x73,
|
||||
0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18,
|
||||
0x1c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76,
|
||||
0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x41, 0x75, 0x64,
|
||||
0x69, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x41,
|
||||
0x75, 0x64, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x41, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x75, 0x64,
|
||||
0x69, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x74, 0x12, 0x38, 0x0a, 0x17, 0x61, 0x75, 0x64, 0x69, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x4a, 0x53,
|
||||
0x4f, 0x4e, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x17, 0x61, 0x75, 0x64, 0x69, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x4a, 0x53, 0x4f,
|
||||
0x4e, 0x12, 0x44, 0x0a, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73,
|
||||
0x75, 0x6c, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x53,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x41, 0x75, 0x64, 0x69, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x74, 0x74, 0x70, 0x4a,
|
||||
0x53, 0x4f, 0x4e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x68, 0x74, 0x74, 0x70, 0x4a,
|
||||
0x53, 0x4f, 0x4e, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, 0x73, 0x4a, 0x53, 0x4f, 0x4e,
|
||||
0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x68, 0x74, 0x74, 0x70, 0x73, 0x4a, 0x53, 0x4f,
|
||||
0x4e, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x63, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0b, 0x20, 0x01,
|
||||
0x28, 0x0c, 0x52, 0x07, 0x74, 0x63, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x74,
|
||||
0x6c, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x6c,
|
||||
0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x69, 0x78, 0x4a, 0x53, 0x4f,
|
||||
0x4e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x75, 0x6e, 0x69, 0x78, 0x4a, 0x53, 0x4f,
|
||||
0x4e, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0e, 0x20, 0x01,
|
||||
0x28, 0x0c, 0x52, 0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x14, 0x0a, 0x05, 0x77,
|
||||
0x65, 0x62, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x77, 0x65, 0x62, 0x49,
|
||||
0x64, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78,
|
||||
0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x72, 0x65, 0x76,
|
||||
0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x24, 0x0a,
|
||||
0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x1a,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x54,
|
||||
0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68,
|
||||
0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x62, 0x61, 0x6e,
|
||||
0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x0b, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
|
||||
0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x33,
|
||||
0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x1f,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||
0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f,
|
||||
0x75, 0x70, 0x73, 0x12, 0x1c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65,
|
||||
0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -422,19 +436,17 @@ var file_models_model_server_proto_goTypes = []interface{}{
|
||||
(*NodeCluster)(nil), // 2: pb.NodeCluster
|
||||
(*ServerGroup)(nil), // 3: pb.ServerGroup
|
||||
(*User)(nil), // 4: pb.User
|
||||
(*ServerDailyStat)(nil), // 5: pb.ServerDailyStat
|
||||
}
|
||||
var file_models_model_server_proto_depIdxs = []int32{
|
||||
1, // 0: pb.Server.auditingResult:type_name -> pb.ServerNameAuditingResult
|
||||
2, // 1: pb.Server.nodeCluster:type_name -> pb.NodeCluster
|
||||
3, // 2: pb.Server.serverGroups:type_name -> pb.ServerGroup
|
||||
4, // 3: pb.Server.user:type_name -> pb.User
|
||||
5, // 4: pb.Server.latestServerDailyStat:type_name -> pb.ServerDailyStat
|
||||
5, // [5:5] is the sub-list for method output_type
|
||||
5, // [5:5] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
5, // [5:5] is the sub-list for extension extendee
|
||||
0, // [0:5] is the sub-list for field type_name
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_server_proto_init() }
|
||||
@@ -446,7 +458,6 @@ func file_models_model_server_proto_init() {
|
||||
file_models_model_server_group_proto_init()
|
||||
file_models_model_user_proto_init()
|
||||
file_models_model_server_name_auditing_result_proto_init()
|
||||
file_models_model_server_daily_stat_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_server_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Server); i {
|
||||
|
||||
@@ -31,12 +31,20 @@ type ServerBandwidthStat 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"`
|
||||
ServerId int64 `protobuf:"varint,3,opt,name=serverId,proto3" json:"serverId,omitempty"`
|
||||
Day string `protobuf:"bytes,4,opt,name=day,proto3" json:"day,omitempty"`
|
||||
TimeAt string `protobuf:"bytes,5,opt,name=timeAt,proto3" json:"timeAt,omitempty"`
|
||||
Bytes int64 `protobuf:"varint,6,opt,name=bytes,proto3" json:"bytes,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
|
||||
ServerId int64 `protobuf:"varint,3,opt,name=serverId,proto3" json:"serverId,omitempty"` //服务ID
|
||||
Day string `protobuf:"bytes,4,opt,name=day,proto3" json:"day,omitempty"` // 日期,格式YYYYMMDD
|
||||
TimeAt string `protobuf:"bytes,5,opt,name=timeAt,proto3" json:"timeAt,omitempty"` // 时间,格式HHII
|
||||
Bytes int64 `protobuf:"varint,6,opt,name=bytes,proto3" json:"bytes,omitempty"` // 峰值带宽字节
|
||||
TotalBytes int64 `protobuf:"varint,9,opt,name=totalBytes,proto3" json:"totalBytes,omitempty"` // 总流量
|
||||
Bits int64 `protobuf:"varint,7,opt,name=bits,proto3" json:"bits,omitempty"` // 峰值带宽比特
|
||||
NodeRegionId int64 `protobuf:"varint,8,opt,name=nodeRegionId,proto3" json:"nodeRegionId,omitempty"` // 节点所在区域ID
|
||||
CachedBytes int64 `protobuf:"varint,10,opt,name=cachedBytes,proto3" json:"cachedBytes,omitempty"` // 总缓存流量
|
||||
AttackBytes int64 `protobuf:"varint,11,opt,name=attackBytes,proto3" json:"attackBytes,omitempty"` // 总攻击流量
|
||||
CountRequests int64 `protobuf:"varint,12,opt,name=countRequests,proto3" json:"countRequests,omitempty"` // 总请求数
|
||||
CountCachedRequests int64 `protobuf:"varint,13,opt,name=countCachedRequests,proto3" json:"countCachedRequests,omitempty"` // 总缓存请求数
|
||||
CountAttackRequests int64 `protobuf:"varint,14,opt,name=countAttackRequests,proto3" json:"countAttackRequests,omitempty"` // 总攻击请求数
|
||||
}
|
||||
|
||||
func (x *ServerBandwidthStat) Reset() {
|
||||
@@ -113,13 +121,69 @@ func (x *ServerBandwidthStat) GetBytes() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerBandwidthStat) GetTotalBytes() int64 {
|
||||
if x != nil {
|
||||
return x.TotalBytes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerBandwidthStat) GetBits() int64 {
|
||||
if x != nil {
|
||||
return x.Bits
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerBandwidthStat) GetNodeRegionId() int64 {
|
||||
if x != nil {
|
||||
return x.NodeRegionId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerBandwidthStat) GetCachedBytes() int64 {
|
||||
if x != nil {
|
||||
return x.CachedBytes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerBandwidthStat) GetAttackBytes() int64 {
|
||||
if x != nil {
|
||||
return x.AttackBytes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerBandwidthStat) GetCountRequests() int64 {
|
||||
if x != nil {
|
||||
return x.CountRequests
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerBandwidthStat) GetCountCachedRequests() int64 {
|
||||
if x != nil {
|
||||
return x.CountCachedRequests
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerBandwidthStat) GetCountAttackRequests() int64 {
|
||||
if x != nil {
|
||||
return x.CountAttackRequests
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_models_model_server_bandwidth_stat_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_server_bandwidth_stat_proto_rawDesc = []byte{
|
||||
0x0a, 0x28, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f,
|
||||
0x73, 0x74, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x99,
|
||||
0x01, 0x0a, 0x13, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64,
|
||||
0x73, 0x74, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xbf,
|
||||
0x03, 0x0a, 0x13, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64,
|
||||
0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a,
|
||||
@@ -128,8 +192,26 @@ var file_models_model_server_bandwidth_stat_proto_rawDesc = []byte{
|
||||
0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x61, 0x79, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x41, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f,
|
||||
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f,
|
||||
0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
|
||||
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x69,
|
||||
0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x62, 0x69, 0x74, 0x73, 0x12, 0x22,
|
||||
0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x08,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65,
|
||||
0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x42,
|
||||
0x79, 0x74, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x42, 0x79,
|
||||
0x74, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63,
|
||||
0x6b, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x13,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x43, 0x61, 0x63, 0x68, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x30,
|
||||
0x0a, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -32,7 +32,8 @@ type ServerDailyStat struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"`
|
||||
RegionId int64 `protobuf:"varint,2,opt,name=regionId,proto3" json:"regionId,omitempty"`
|
||||
UserId int64 `protobuf:"varint,16,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
|
||||
NodeRegionId int64 `protobuf:"varint,2,opt,name=nodeRegionId,proto3" json:"nodeRegionId,omitempty"`
|
||||
Bytes int64 `protobuf:"varint,3,opt,name=bytes,proto3" json:"bytes,omitempty"`
|
||||
CachedBytes int64 `protobuf:"varint,5,opt,name=cachedBytes,proto3" json:"cachedBytes,omitempty"`
|
||||
CountRequests int64 `protobuf:"varint,6,opt,name=countRequests,proto3" json:"countRequests,omitempty"`
|
||||
@@ -87,9 +88,16 @@ func (x *ServerDailyStat) GetServerId() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerDailyStat) GetRegionId() int64 {
|
||||
func (x *ServerDailyStat) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.RegionId
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerDailyStat) GetNodeRegionId() int64 {
|
||||
if x != nil {
|
||||
return x.NodeRegionId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -190,11 +198,13 @@ var File_models_model_server_daily_stat_proto protoreflect.FileDescriptor
|
||||
var file_models_model_server_daily_stat_proto_rawDesc = []byte{
|
||||
0x0a, 0x24, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xf1, 0x03, 0x0a, 0x0f, 0x53,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x91, 0x04, 0x0a, 0x0f, 0x53,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x72, 0x65,
|
||||
0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73,
|
||||
0x65, 0x72, 0x49, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72,
|
||||
0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b,
|
||||
0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
|
||||
201
pkg/rpc/pb/model_server_domain_hourly_stat.pb.go
Normal file
201
pkg/rpc/pb/model_server_domain_hourly_stat.pb.go
Normal file
@@ -0,0 +1,201 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_server_domain_hourly_stat.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 单个小时统计
|
||||
type ServerDomainHourlyStat struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"`
|
||||
Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
|
||||
CountRequests int64 `protobuf:"varint,3,opt,name=countRequests,proto3" json:"countRequests,omitempty"`
|
||||
Bytes int64 `protobuf:"varint,4,opt,name=bytes,proto3" json:"bytes,omitempty"`
|
||||
CountAttackRequests int64 `protobuf:"varint,6,opt,name=countAttackRequests,proto3" json:"countAttackRequests,omitempty"`
|
||||
AttackBytes int64 `protobuf:"varint,7,opt,name=attackBytes,proto3" json:"attackBytes,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ServerDomainHourlyStat) Reset() {
|
||||
*x = ServerDomainHourlyStat{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_server_domain_hourly_stat_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ServerDomainHourlyStat) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ServerDomainHourlyStat) ProtoMessage() {}
|
||||
|
||||
func (x *ServerDomainHourlyStat) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_server_domain_hourly_stat_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ServerDomainHourlyStat.ProtoReflect.Descriptor instead.
|
||||
func (*ServerDomainHourlyStat) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_server_domain_hourly_stat_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ServerDomainHourlyStat) GetServerId() int64 {
|
||||
if x != nil {
|
||||
return x.ServerId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerDomainHourlyStat) GetDomain() string {
|
||||
if x != nil {
|
||||
return x.Domain
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ServerDomainHourlyStat) GetCountRequests() int64 {
|
||||
if x != nil {
|
||||
return x.CountRequests
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerDomainHourlyStat) GetBytes() int64 {
|
||||
if x != nil {
|
||||
return x.Bytes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerDomainHourlyStat) GetCountAttackRequests() int64 {
|
||||
if x != nil {
|
||||
return x.CountAttackRequests
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerDomainHourlyStat) GetAttackBytes() int64 {
|
||||
if x != nil {
|
||||
return x.AttackBytes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_models_model_server_domain_hourly_stat_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_server_domain_hourly_stat_proto_rawDesc = []byte{
|
||||
0x0a, 0x2c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x68, 0x6f, 0x75,
|
||||
0x72, 0x6c, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02,
|
||||
0x70, 0x62, 0x22, 0xdc, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x6f, 0x6d,
|
||||
0x61, 0x69, 0x6e, 0x48, 0x6f, 0x75, 0x72, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d,
|
||||
0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69,
|
||||
0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x30, 0x0a,
|
||||
0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12,
|
||||
0x20, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x42, 0x79, 0x74, 0x65,
|
||||
0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_server_domain_hourly_stat_proto_rawDescOnce sync.Once
|
||||
file_models_model_server_domain_hourly_stat_proto_rawDescData = file_models_model_server_domain_hourly_stat_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_server_domain_hourly_stat_proto_rawDescGZIP() []byte {
|
||||
file_models_model_server_domain_hourly_stat_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_server_domain_hourly_stat_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_server_domain_hourly_stat_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_server_domain_hourly_stat_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_server_domain_hourly_stat_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_server_domain_hourly_stat_proto_goTypes = []interface{}{
|
||||
(*ServerDomainHourlyStat)(nil), // 0: pb.ServerDomainHourlyStat
|
||||
}
|
||||
var file_models_model_server_domain_hourly_stat_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_server_domain_hourly_stat_proto_init() }
|
||||
func file_models_model_server_domain_hourly_stat_proto_init() {
|
||||
if File_models_model_server_domain_hourly_stat_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_server_domain_hourly_stat_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ServerDomainHourlyStat); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_server_domain_hourly_stat_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_server_domain_hourly_stat_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_server_domain_hourly_stat_proto_depIdxs,
|
||||
MessageInfos: file_models_model_server_domain_hourly_stat_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_server_domain_hourly_stat_proto = out.File
|
||||
file_models_model_server_domain_hourly_stat_proto_rawDesc = nil
|
||||
file_models_model_server_domain_hourly_stat_proto_goTypes = nil
|
||||
file_models_model_server_domain_hourly_stat_proto_depIdxs = nil
|
||||
}
|
||||
@@ -30,9 +30,10 @@ type ServerGroup struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // ID
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 分组名称
|
||||
UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` // 所属用户ID
|
||||
IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"` // 是否启用
|
||||
}
|
||||
|
||||
func (x *ServerGroup) Reset() {
|
||||
@@ -88,17 +89,26 @@ func (x *ServerGroup) GetUserId() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerGroup) GetIsOn() bool {
|
||||
if x != nil {
|
||||
return x.IsOn
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_models_model_server_group_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_server_group_proto_rawDesc = []byte{
|
||||
0x0a, 0x1f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x49, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47,
|
||||
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x5d, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47,
|
||||
0x72, 0x6f, 0x75, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72,
|
||||
0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04,
|
||||
0x69, 0x73, 0x4f, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
185
pkg/rpc/pb/model_traffic_package.pb.go
Normal file
185
pkg/rpc/pb/model_traffic_package.pb.go
Normal file
@@ -0,0 +1,185 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_traffic_package.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 流量包
|
||||
type TrafficPackage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
|
||||
Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"`
|
||||
Bytes int64 `protobuf:"varint,4,opt,name=bytes,proto3" json:"bytes,omitempty"`
|
||||
IsOn bool `protobuf:"varint,5,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TrafficPackage) Reset() {
|
||||
*x = TrafficPackage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_traffic_package_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TrafficPackage) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TrafficPackage) ProtoMessage() {}
|
||||
|
||||
func (x *TrafficPackage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_traffic_package_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TrafficPackage.ProtoReflect.Descriptor instead.
|
||||
func (*TrafficPackage) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_traffic_package_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *TrafficPackage) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrafficPackage) GetSize() int32 {
|
||||
if x != nil {
|
||||
return x.Size
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrafficPackage) GetUnit() string {
|
||||
if x != nil {
|
||||
return x.Unit
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TrafficPackage) GetBytes() int64 {
|
||||
if x != nil {
|
||||
return x.Bytes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrafficPackage) GetIsOn() bool {
|
||||
if x != nil {
|
||||
return x.IsOn
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_models_model_traffic_package_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_traffic_package_proto_rawDesc = []byte{
|
||||
0x0a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74,
|
||||
0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x72, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x66,
|
||||
0x66, 0x69, 0x63, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69,
|
||||
0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e,
|
||||
0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x42, 0x06, 0x5a, 0x04,
|
||||
0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_traffic_package_proto_rawDescOnce sync.Once
|
||||
file_models_model_traffic_package_proto_rawDescData = file_models_model_traffic_package_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_traffic_package_proto_rawDescGZIP() []byte {
|
||||
file_models_model_traffic_package_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_traffic_package_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_traffic_package_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_traffic_package_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_traffic_package_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_traffic_package_proto_goTypes = []interface{}{
|
||||
(*TrafficPackage)(nil), // 0: pb.TrafficPackage
|
||||
}
|
||||
var file_models_model_traffic_package_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_traffic_package_proto_init() }
|
||||
func file_models_model_traffic_package_proto_init() {
|
||||
if File_models_model_traffic_package_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_traffic_package_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TrafficPackage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_traffic_package_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_traffic_package_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_traffic_package_proto_depIdxs,
|
||||
MessageInfos: file_models_model_traffic_package_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_traffic_package_proto = out.File
|
||||
file_models_model_traffic_package_proto_rawDesc = nil
|
||||
file_models_model_traffic_package_proto_goTypes = nil
|
||||
file_models_model_traffic_package_proto_depIdxs = nil
|
||||
}
|
||||
186
pkg/rpc/pb/model_traffic_package_period.pb.go
Normal file
186
pkg/rpc/pb/model_traffic_package_period.pb.go
Normal file
@@ -0,0 +1,186 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_traffic_package_period.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 流量包有效期
|
||||
type TrafficPackagePeriod struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
|
||||
Unit string `protobuf:"bytes,4,opt,name=unit,proto3" json:"unit,omitempty"`
|
||||
Months int32 `protobuf:"varint,5,opt,name=months,proto3" json:"months,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TrafficPackagePeriod) Reset() {
|
||||
*x = TrafficPackagePeriod{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_traffic_package_period_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TrafficPackagePeriod) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TrafficPackagePeriod) ProtoMessage() {}
|
||||
|
||||
func (x *TrafficPackagePeriod) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_traffic_package_period_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TrafficPackagePeriod.ProtoReflect.Descriptor instead.
|
||||
func (*TrafficPackagePeriod) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_traffic_package_period_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *TrafficPackagePeriod) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrafficPackagePeriod) GetIsOn() bool {
|
||||
if x != nil {
|
||||
return x.IsOn
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *TrafficPackagePeriod) GetCount() int32 {
|
||||
if x != nil {
|
||||
return x.Count
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrafficPackagePeriod) GetUnit() string {
|
||||
if x != nil {
|
||||
return x.Unit
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *TrafficPackagePeriod) GetMonths() int32 {
|
||||
if x != nil {
|
||||
return x.Months
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_models_model_traffic_package_period_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_traffic_package_period_proto_rawDesc = []byte{
|
||||
0x0a, 0x29, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74,
|
||||
0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x70,
|
||||
0x65, 0x72, 0x69, 0x6f, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22,
|
||||
0x7c, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67,
|
||||
0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_traffic_package_period_proto_rawDescOnce sync.Once
|
||||
file_models_model_traffic_package_period_proto_rawDescData = file_models_model_traffic_package_period_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_traffic_package_period_proto_rawDescGZIP() []byte {
|
||||
file_models_model_traffic_package_period_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_traffic_package_period_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_traffic_package_period_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_traffic_package_period_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_traffic_package_period_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_traffic_package_period_proto_goTypes = []interface{}{
|
||||
(*TrafficPackagePeriod)(nil), // 0: pb.TrafficPackagePeriod
|
||||
}
|
||||
var file_models_model_traffic_package_period_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_traffic_package_period_proto_init() }
|
||||
func file_models_model_traffic_package_period_proto_init() {
|
||||
if File_models_model_traffic_package_period_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_traffic_package_period_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TrafficPackagePeriod); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_traffic_package_period_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_traffic_package_period_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_traffic_package_period_proto_depIdxs,
|
||||
MessageInfos: file_models_model_traffic_package_period_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_traffic_package_period_proto = out.File
|
||||
file_models_model_traffic_package_period_proto_rawDesc = nil
|
||||
file_models_model_traffic_package_period_proto_goTypes = nil
|
||||
file_models_model_traffic_package_period_proto_depIdxs = nil
|
||||
}
|
||||
182
pkg/rpc/pb/model_traffic_package_price.pb.go
Normal file
182
pkg/rpc/pb/model_traffic_package_price.pb.go
Normal file
@@ -0,0 +1,182 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_traffic_package_price.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 流量包价格定义
|
||||
type TrafficPackagePrice struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
TrafficPackageId int64 `protobuf:"varint,1,opt,name=trafficPackageId,proto3" json:"trafficPackageId,omitempty"`
|
||||
NodeRegionId int64 `protobuf:"varint,2,opt,name=nodeRegionId,proto3" json:"nodeRegionId,omitempty"`
|
||||
TrafficPackagePeriodId int64 `protobuf:"varint,3,opt,name=trafficPackagePeriodId,proto3" json:"trafficPackagePeriodId,omitempty"`
|
||||
Price float64 `protobuf:"fixed64,4,opt,name=price,proto3" json:"price,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TrafficPackagePrice) Reset() {
|
||||
*x = TrafficPackagePrice{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_traffic_package_price_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TrafficPackagePrice) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TrafficPackagePrice) ProtoMessage() {}
|
||||
|
||||
func (x *TrafficPackagePrice) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_traffic_package_price_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TrafficPackagePrice.ProtoReflect.Descriptor instead.
|
||||
func (*TrafficPackagePrice) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_traffic_package_price_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *TrafficPackagePrice) GetTrafficPackageId() int64 {
|
||||
if x != nil {
|
||||
return x.TrafficPackageId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrafficPackagePrice) GetNodeRegionId() int64 {
|
||||
if x != nil {
|
||||
return x.NodeRegionId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrafficPackagePrice) GetTrafficPackagePeriodId() int64 {
|
||||
if x != nil {
|
||||
return x.TrafficPackagePeriodId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrafficPackagePrice) GetPrice() float64 {
|
||||
if x != nil {
|
||||
return x.Price
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_models_model_traffic_package_price_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_traffic_package_price_proto_rawDesc = []byte{
|
||||
0x0a, 0x28, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74,
|
||||
0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x70,
|
||||
0x72, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xb3,
|
||||
0x01, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67,
|
||||
0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69,
|
||||
0x63, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65,
|
||||
0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x16, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69,
|
||||
0x63, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x49, 0x64,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50,
|
||||
0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x70,
|
||||
0x72, 0x69, 0x63, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_traffic_package_price_proto_rawDescOnce sync.Once
|
||||
file_models_model_traffic_package_price_proto_rawDescData = file_models_model_traffic_package_price_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_traffic_package_price_proto_rawDescGZIP() []byte {
|
||||
file_models_model_traffic_package_price_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_traffic_package_price_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_traffic_package_price_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_traffic_package_price_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_traffic_package_price_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_traffic_package_price_proto_goTypes = []interface{}{
|
||||
(*TrafficPackagePrice)(nil), // 0: pb.TrafficPackagePrice
|
||||
}
|
||||
var file_models_model_traffic_package_price_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_traffic_package_price_proto_init() }
|
||||
func file_models_model_traffic_package_price_proto_init() {
|
||||
if File_models_model_traffic_package_price_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_traffic_package_price_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TrafficPackagePrice); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_traffic_package_price_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_traffic_package_price_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_traffic_package_price_proto_depIdxs,
|
||||
MessageInfos: file_models_model_traffic_package_price_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_traffic_package_price_proto = out.File
|
||||
file_models_model_traffic_package_price_proto_rawDesc = nil
|
||||
file_models_model_traffic_package_price_proto_goTypes = nil
|
||||
file_models_model_traffic_package_price_proto_depIdxs = nil
|
||||
}
|
||||
@@ -36,6 +36,7 @@ type User struct {
|
||||
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"`
|
||||
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"`
|
||||
@@ -46,7 +47,8 @@ type User struct {
|
||||
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"`
|
||||
OtpLogin *Login `protobuf:"bytes,19,opt,name=otpLogin,proto3" json:"otpLogin,omitempty"` // OTP认证
|
||||
BandwidthAlgo string `protobuf:"bytes,21,opt,name=bandwidthAlgo,proto3" json:"bandwidthAlgo,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"`
|
||||
}
|
||||
@@ -125,6 +127,13 @@ func (x *User) GetEmail() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *User) GetVerifiedEmail() string {
|
||||
if x != nil {
|
||||
return x.VerifiedEmail
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *User) GetRemark() string {
|
||||
if x != nil {
|
||||
return x.Remark
|
||||
@@ -195,6 +204,13 @@ func (x *User) GetIsEnterpriseIdentified() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *User) GetBandwidthAlgo() string {
|
||||
if x != nil {
|
||||
return x.BandwidthAlgo
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *User) GetOtpLogin() *Login {
|
||||
if x != nil {
|
||||
return x.OtpLogin
|
||||
@@ -226,7 +242,7 @@ var file_models_model_user_proto_rawDesc = []byte{
|
||||
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65,
|
||||
0x72, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
||||
0x18, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6c, 0x6f,
|
||||
0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf5, 0x04, 0x0a, 0x04, 0x55, 0x73,
|
||||
0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x05, 0x0a, 0x04, 0x55, 0x73,
|
||||
0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02,
|
||||
0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a,
|
||||
@@ -235,39 +251,43 @@ var file_models_model_user_proto_rawDesc = []byte{
|
||||
0x62, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69,
|
||||
0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x74, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65,
|
||||
0x6d, 0x61, 0x72, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x61,
|
||||
0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x64, 0x41, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x64, 0x41, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
|
||||
0x65, 0x64, 0x49, 0x50, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69,
|
||||
0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x49, 0x50, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x56, 0x65,
|
||||
0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73,
|
||||
0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x52, 0x65,
|
||||
0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73,
|
||||
0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x6a, 0x65,
|
||||
0x63, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
|
||||
0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x16, 0x69, 0x73,
|
||||
0x49, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69,
|
||||
0x66, 0x69, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, 0x73, 0x49, 0x6e,
|
||||
0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69,
|
||||
0x65, 0x64, 0x12, 0x36, 0x0a, 0x16, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69,
|
||||
0x73, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x12, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x16, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65,
|
||||
0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x08, 0x6f, 0x74,
|
||||
0x70, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x08, 0x6f, 0x74, 0x70, 0x4c, 0x6f, 0x67, 0x69,
|
||||
0x6e, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
||||
0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75,
|
||||
0x73, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73,
|
||||
0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72,
|
||||
0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65,
|
||||
0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x24, 0x0a, 0x0d, 0x76, 0x65,
|
||||
0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x14, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e,
|
||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65,
|
||||
0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x49, 0x50, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x49, 0x50, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x69, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x22,
|
||||
0x0a, 0x0c, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x0f,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x61, 0x73,
|
||||
0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18,
|
||||
0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64,
|
||||
0x12, 0x36, 0x0a, 0x16, 0x69, 0x73, 0x49, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c,
|
||||
0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x16, 0x69, 0x73, 0x49, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x49, 0x64,
|
||||
0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x16, 0x69, 0x73, 0x45, 0x6e,
|
||||
0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69,
|
||||
0x65, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, 0x73, 0x45, 0x6e, 0x74, 0x65,
|
||||
0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64,
|
||||
0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x41, 0x6c, 0x67,
|
||||
0x6f, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64,
|
||||
0x74, 0x68, 0x41, 0x6c, 0x67, 0x6f, 0x12, 0x25, 0x0a, 0x08, 0x6f, 0x74, 0x70, 0x4c, 0x6f, 0x67,
|
||||
0x69, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f,
|
||||
0x67, 0x69, 0x6e, 0x52, 0x08, 0x6f, 0x74, 0x70, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x31, 0x0a,
|
||||
0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73,
|
||||
0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
||||
0x12, 0x2b, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61, 0x74,
|
||||
0x75, 0x72, 0x65, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -32,8 +32,8 @@ type UserAccount struct {
|
||||
|
||||
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 float32 `protobuf:"fixed32,3,opt,name=total,proto3" json:"total,omitempty"`
|
||||
TotalFrozen float32 `protobuf:"fixed32,4,opt,name=totalFrozen,proto3" json:"totalFrozen,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"`
|
||||
}
|
||||
|
||||
@@ -83,14 +83,14 @@ func (x *UserAccount) GetUserId() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserAccount) GetTotal() float32 {
|
||||
func (x *UserAccount) GetTotal() float64 {
|
||||
if x != nil {
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserAccount) GetTotalFrozen() float32 {
|
||||
func (x *UserAccount) GetTotalFrozen() float64 {
|
||||
if x != nil {
|
||||
return x.TotalFrozen
|
||||
}
|
||||
@@ -115,9 +115,9 @@ var file_models_model_user_account_proto_rawDesc = []byte{
|
||||
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
|
||||
0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0b,
|
||||
0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0b,
|
||||
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x02, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x12, 0x1c,
|
||||
0x01, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x12, 0x1c,
|
||||
0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04,
|
||||
0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
|
||||
@@ -33,10 +33,10 @@ type UserAccountLog struct {
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"`
|
||||
UserAccountId int64 `protobuf:"varint,3,opt,name=userAccountId,proto3" json:"userAccountId,omitempty"`
|
||||
Delta float32 `protobuf:"fixed32,4,opt,name=delta,proto3" json:"delta,omitempty"`
|
||||
DeltaFrozen float32 `protobuf:"fixed32,5,opt,name=deltaFrozen,proto3" json:"deltaFrozen,omitempty"`
|
||||
Total float32 `protobuf:"fixed32,6,opt,name=total,proto3" json:"total,omitempty"`
|
||||
TotalFrozen float32 `protobuf:"fixed32,7,opt,name=totalFrozen,proto3" json:"totalFrozen,omitempty"`
|
||||
Delta float64 `protobuf:"fixed64,4,opt,name=delta,proto3" json:"delta,omitempty"`
|
||||
DeltaFrozen float64 `protobuf:"fixed64,5,opt,name=deltaFrozen,proto3" json:"deltaFrozen,omitempty"`
|
||||
Total float64 `protobuf:"fixed64,6,opt,name=total,proto3" json:"total,omitempty"`
|
||||
TotalFrozen float64 `protobuf:"fixed64,7,opt,name=totalFrozen,proto3" json:"totalFrozen,omitempty"`
|
||||
EventType string `protobuf:"bytes,8,opt,name=eventType,proto3" json:"eventType,omitempty"`
|
||||
Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"`
|
||||
CreatedAt int64 `protobuf:"varint,10,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
@@ -98,28 +98,28 @@ func (x *UserAccountLog) GetUserAccountId() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserAccountLog) GetDelta() float32 {
|
||||
func (x *UserAccountLog) GetDelta() float64 {
|
||||
if x != nil {
|
||||
return x.Delta
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserAccountLog) GetDeltaFrozen() float32 {
|
||||
func (x *UserAccountLog) GetDeltaFrozen() float64 {
|
||||
if x != nil {
|
||||
return x.DeltaFrozen
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserAccountLog) GetTotal() float32 {
|
||||
func (x *UserAccountLog) GetTotal() float64 {
|
||||
if x != nil {
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserAccountLog) GetTotalFrozen() float32 {
|
||||
func (x *UserAccountLog) GetTotalFrozen() float64 {
|
||||
if x != nil {
|
||||
return x.TotalFrozen
|
||||
}
|
||||
@@ -184,12 +184,12 @@ var file_models_model_user_account_log_proto_rawDesc = []byte{
|
||||
0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x02, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
|
||||
0x6c, 0x74, 0x61, 0x46, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52,
|
||||
0x01, 0x28, 0x01, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
|
||||
0x6c, 0x74, 0x61, 0x46, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52,
|
||||
0x0b, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x46, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x74, 0x6f, 0x74,
|
||||
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x74, 0x6f, 0x74,
|
||||
0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x72, 0x6f, 0x7a, 0x65,
|
||||
0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x72,
|
||||
0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x46, 0x72,
|
||||
0x6f, 0x7a, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70,
|
||||
0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79,
|
||||
0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
|
||||
|
||||
324
pkg/rpc/pb/model_user_ad_instance.pb.go
Normal file
324
pkg/rpc/pb/model_user_ad_instance.pb.go
Normal file
@@ -0,0 +1,324 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_user_ad_instance.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 高防实例
|
||||
type UserADInstance struct {
|
||||
state protoimpl.MessageState
|
||||
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"`
|
||||
AdPackageInstanceId int64 `protobuf:"varint,3,opt,name=adPackageInstanceId,proto3" json:"adPackageInstanceId,omitempty"`
|
||||
AdPackagePeriodId int64 `protobuf:"varint,4,opt,name=adPackagePeriodId,proto3" json:"adPackagePeriodId,omitempty"`
|
||||
AdPackagePeriodCount int32 `protobuf:"varint,5,opt,name=adPackagePeriodCount,proto3" json:"adPackagePeriodCount,omitempty"`
|
||||
AdPackagePeriodUnit string `protobuf:"bytes,6,opt,name=adPackagePeriodUnit,proto3" json:"adPackagePeriodUnit,omitempty"`
|
||||
DayFrom string `protobuf:"bytes,7,opt,name=dayFrom,proto3" json:"dayFrom,omitempty"` // 开始日期,格式:YYYYMMDD
|
||||
DayTo string `protobuf:"bytes,8,opt,name=dayTo,proto3" json:"dayTo,omitempty"` // 结束日期,格式:YYYYMMDD
|
||||
CreatedAt int64 `protobuf:"varint,9,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
MaxObjects int32 `protobuf:"varint,10,opt,name=maxObjects,proto3" json:"maxObjects,omitempty"`
|
||||
ObjectCodes []string `protobuf:"bytes,11,rep,name=objectCodes,proto3" json:"objectCodes,omitempty"`
|
||||
AdPackageInstance *ADPackageInstance `protobuf:"bytes,30,opt,name=adPackageInstance,proto3" json:"adPackageInstance,omitempty"`
|
||||
User *User `protobuf:"bytes,31,opt,name=user,proto3" json:"user,omitempty"`
|
||||
CanDelete bool `protobuf:"varint,32,opt,name=canDelete,proto3" json:"canDelete,omitempty"`
|
||||
IsAvailable bool `protobuf:"varint,33,opt,name=isAvailable,proto3" json:"isAvailable,omitempty"` // 当前是否在生效中
|
||||
CountObjects int32 `protobuf:"varint,34,opt,name=countObjects,proto3" json:"countObjects,omitempty"` // 防护对象数量
|
||||
ObjectsJSON []byte `protobuf:"bytes,35,opt,name=objectsJSON,proto3" json:"objectsJSON,omitempty"` // 对象JSON
|
||||
}
|
||||
|
||||
func (x *UserADInstance) Reset() {
|
||||
*x = UserADInstance{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_user_ad_instance_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UserADInstance) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UserADInstance) ProtoMessage() {}
|
||||
|
||||
func (x *UserADInstance) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_user_ad_instance_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UserADInstance.ProtoReflect.Descriptor instead.
|
||||
func (*UserADInstance) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_user_ad_instance_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetAdPackageInstanceId() int64 {
|
||||
if x != nil {
|
||||
return x.AdPackageInstanceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetAdPackagePeriodId() int64 {
|
||||
if x != nil {
|
||||
return x.AdPackagePeriodId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetAdPackagePeriodCount() int32 {
|
||||
if x != nil {
|
||||
return x.AdPackagePeriodCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetAdPackagePeriodUnit() string {
|
||||
if x != nil {
|
||||
return x.AdPackagePeriodUnit
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetDayFrom() string {
|
||||
if x != nil {
|
||||
return x.DayFrom
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetDayTo() string {
|
||||
if x != nil {
|
||||
return x.DayTo
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetCreatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetMaxObjects() int32 {
|
||||
if x != nil {
|
||||
return x.MaxObjects
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetObjectCodes() []string {
|
||||
if x != nil {
|
||||
return x.ObjectCodes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetAdPackageInstance() *ADPackageInstance {
|
||||
if x != nil {
|
||||
return x.AdPackageInstance
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetUser() *User {
|
||||
if x != nil {
|
||||
return x.User
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetCanDelete() bool {
|
||||
if x != nil {
|
||||
return x.CanDelete
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetIsAvailable() bool {
|
||||
if x != nil {
|
||||
return x.IsAvailable
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetCountObjects() int32 {
|
||||
if x != nil {
|
||||
return x.CountObjects
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserADInstance) GetObjectsJSON() []byte {
|
||||
if x != nil {
|
||||
return x.ObjectsJSON
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_models_model_user_ad_instance_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_user_ad_instance_proto_rawDesc = []byte{
|
||||
0x0a, 0x23, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75,
|
||||
0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x26, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
|
||||
0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61,
|
||||
0x67, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x1a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f,
|
||||
0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x04, 0x0a, 0x0e, 0x55,
|
||||
0x73, 0x65, 0x72, 0x41, 0x44, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75,
|
||||
0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x13, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61,
|
||||
0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x13, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x73,
|
||||
0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x61, 0x64, 0x50, 0x61, 0x63,
|
||||
0x6b, 0x61, 0x67, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x11, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x50, 0x65, 0x72,
|
||||
0x69, 0x6f, 0x64, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x14, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61,
|
||||
0x67, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x14, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x50, 0x65,
|
||||
0x72, 0x69, 0x6f, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x13, 0x61, 0x64, 0x50,
|
||||
0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x55, 0x6e, 0x69, 0x74,
|
||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67,
|
||||
0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64,
|
||||
0x61, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x61,
|
||||
0x79, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x61, 0x79, 0x54, 0x6f, 0x18, 0x08,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x61, 0x79, 0x54, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x63,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
|
||||
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x78,
|
||||
0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d,
|
||||
0x61, 0x78, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x62, 0x6a,
|
||||
0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b,
|
||||
0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x11, 0x61,
|
||||
0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
|
||||
0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x44, 0x50, 0x61,
|
||||
0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x11, 0x61,
|
||||
0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
|
||||
0x12, 0x1c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08,
|
||||
0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1c,
|
||||
0x0a, 0x09, 0x63, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x20, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b,
|
||||
0x69, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x21, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x0b, 0x69, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x22,
|
||||
0x0a, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x22,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63,
|
||||
0x74, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x4a, 0x53, 0x4f,
|
||||
0x4e, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73,
|
||||
0x4a, 0x53, 0x4f, 0x4e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_user_ad_instance_proto_rawDescOnce sync.Once
|
||||
file_models_model_user_ad_instance_proto_rawDescData = file_models_model_user_ad_instance_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_user_ad_instance_proto_rawDescGZIP() []byte {
|
||||
file_models_model_user_ad_instance_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_user_ad_instance_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_user_ad_instance_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_user_ad_instance_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_user_ad_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_user_ad_instance_proto_goTypes = []interface{}{
|
||||
(*UserADInstance)(nil), // 0: pb.UserADInstance
|
||||
(*ADPackageInstance)(nil), // 1: pb.ADPackageInstance
|
||||
(*User)(nil), // 2: pb.User
|
||||
}
|
||||
var file_models_model_user_ad_instance_proto_depIdxs = []int32{
|
||||
1, // 0: pb.UserADInstance.adPackageInstance:type_name -> pb.ADPackageInstance
|
||||
2, // 1: pb.UserADInstance.user:type_name -> pb.User
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_user_ad_instance_proto_init() }
|
||||
func file_models_model_user_ad_instance_proto_init() {
|
||||
if File_models_model_user_ad_instance_proto != nil {
|
||||
return
|
||||
}
|
||||
file_models_model_ad_package_instance_proto_init()
|
||||
file_models_model_user_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_user_ad_instance_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UserADInstance); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_user_ad_instance_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_user_ad_instance_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_user_ad_instance_proto_depIdxs,
|
||||
MessageInfos: file_models_model_user_ad_instance_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_user_ad_instance_proto = out.File
|
||||
file_models_model_user_ad_instance_proto_rawDesc = nil
|
||||
file_models_model_user_ad_instance_proto_goTypes = nil
|
||||
file_models_model_user_ad_instance_proto_depIdxs = nil
|
||||
}
|
||||
@@ -35,7 +35,7 @@ type UserBandwidthStat struct {
|
||||
UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"`
|
||||
Day string `protobuf:"bytes,3,opt,name=day,proto3" json:"day,omitempty"`
|
||||
TimeAt string `protobuf:"bytes,4,opt,name=timeAt,proto3" json:"timeAt,omitempty"`
|
||||
Bytes int64 `protobuf:"varint,5,opt,name=bytes,proto3" json:"bytes,omitempty"`
|
||||
Bytes int64 `protobuf:"varint,5,opt,name=bytes,proto3" json:"bytes,omitempty"` // 峰值带宽字节
|
||||
}
|
||||
|
||||
func (x *UserBandwidthStat) Reset() {
|
||||
|
||||
@@ -35,12 +35,16 @@ type UserBill struct {
|
||||
Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
|
||||
TypeName string `protobuf:"bytes,4,opt,name=typeName,proto3" json:"typeName,omitempty"`
|
||||
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
|
||||
Amount float32 `protobuf:"fixed32,6,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||
Amount float64 `protobuf:"fixed64,6,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||
Month string `protobuf:"bytes,7,opt,name=month,proto3" json:"month,omitempty"`
|
||||
IsPaid bool `protobuf:"varint,8,opt,name=isPaid,proto3" json:"isPaid,omitempty"`
|
||||
PaidAt int64 `protobuf:"varint,9,opt,name=paidAt,proto3" json:"paidAt,omitempty"`
|
||||
Code string `protobuf:"bytes,10,opt,name=code,proto3" json:"code,omitempty"`
|
||||
CanPay bool `protobuf:"varint,11,opt,name=canPay,proto3" json:"canPay,omitempty"`
|
||||
DayFrom string `protobuf:"bytes,12,opt,name=dayFrom,proto3" json:"dayFrom,omitempty"`
|
||||
DayTo string `protobuf:"bytes,13,opt,name=dayTo,proto3" json:"dayTo,omitempty"`
|
||||
PricePeriod string `protobuf:"bytes,14,opt,name=pricePeriod,proto3" json:"pricePeriod,omitempty"`
|
||||
IsOverdue bool `protobuf:"varint,15,opt,name=isOverdue,proto3" json:"isOverdue,omitempty"` // 是否已逾期
|
||||
}
|
||||
|
||||
func (x *UserBill) Reset() {
|
||||
@@ -110,7 +114,7 @@ func (x *UserBill) GetDescription() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserBill) GetAmount() float32 {
|
||||
func (x *UserBill) GetAmount() float64 {
|
||||
if x != nil {
|
||||
return x.Amount
|
||||
}
|
||||
@@ -152,13 +156,41 @@ func (x *UserBill) GetCanPay() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *UserBill) GetDayFrom() string {
|
||||
if x != nil {
|
||||
return x.DayFrom
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserBill) GetDayTo() string {
|
||||
if x != nil {
|
||||
return x.DayTo
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserBill) GetPricePeriod() string {
|
||||
if x != nil {
|
||||
return x.PricePeriod
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserBill) GetIsOverdue() bool {
|
||||
if x != nil {
|
||||
return x.IsOverdue
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_models_model_user_bill_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_user_bill_proto_rawDesc = []byte{
|
||||
0x0a, 0x1c, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75,
|
||||
0x73, 0x65, 0x72, 0x5f, 0x62, 0x69, 0x6c, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02,
|
||||
0x70, 0x62, 0x1a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
|
||||
0x5f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x02, 0x0a, 0x08,
|
||||
0x5f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x84, 0x03, 0x0a, 0x08,
|
||||
0x55, 0x73, 0x65, 0x72, 0x42, 0x69, 0x6c, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72,
|
||||
@@ -168,7 +200,7 @@ var file_models_model_user_bill_proto_rawDesc = []byte{
|
||||
0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
|
||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
|
||||
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x05, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64,
|
||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x12, 0x16,
|
||||
@@ -176,7 +208,14 @@ var file_models_model_user_bill_proto_rawDesc = []byte{
|
||||
0x70, 0x61, 0x69, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0a,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61,
|
||||
0x6e, 0x50, 0x61, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x61, 0x6e, 0x50,
|
||||
0x61, 0x79, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x61, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x61, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x0c, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x61, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x64, 0x61, 0x79, 0x54, 0x6f, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x61, 0x79,
|
||||
0x54, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f,
|
||||
0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x63, 0x65, 0x50, 0x65,
|
||||
0x72, 0x69, 0x6f, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x64, 0x75,
|
||||
0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x64,
|
||||
0x75, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
|
||||
216
pkg/rpc/pb/model_user_email_verification.pb.go
Normal file
216
pkg/rpc/pb/model_user_email_verification.pb.go
Normal file
@@ -0,0 +1,216 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_user_email_verification.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 电子邮箱认证
|
||||
type UserEmailVerification struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // Email
|
||||
UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
|
||||
Code string `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"` // 代号
|
||||
CreatedAt int64 `protobuf:"varint,5,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // 创建时间
|
||||
IsSent bool `protobuf:"varint,6,opt,name=isSent,proto3" json:"isSent,omitempty"` // 已发送
|
||||
IsVerified bool `protobuf:"varint,7,opt,name=isVerified,proto3" json:"isVerified,omitempty"` // 已激活
|
||||
ExpiresAt int64 `protobuf:"varint,8,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"` // 过期时间,动态计算而来
|
||||
}
|
||||
|
||||
func (x *UserEmailVerification) Reset() {
|
||||
*x = UserEmailVerification{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_user_email_verification_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UserEmailVerification) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UserEmailVerification) ProtoMessage() {}
|
||||
|
||||
func (x *UserEmailVerification) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_user_email_verification_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UserEmailVerification.ProtoReflect.Descriptor instead.
|
||||
func (*UserEmailVerification) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_user_email_verification_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *UserEmailVerification) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserEmailVerification) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserEmailVerification) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserEmailVerification) GetCode() string {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserEmailVerification) GetCreatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserEmailVerification) GetIsSent() bool {
|
||||
if x != nil {
|
||||
return x.IsSent
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *UserEmailVerification) GetIsVerified() bool {
|
||||
if x != nil {
|
||||
return x.IsVerified
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *UserEmailVerification) GetExpiresAt() int64 {
|
||||
if x != nil {
|
||||
return x.ExpiresAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_models_model_user_email_verification_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_user_email_verification_proto_rawDesc = []byte{
|
||||
0x0a, 0x2a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75,
|
||||
0x73, 0x65, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69,
|
||||
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62,
|
||||
0x22, 0xdd, 0x01, 0x0a, 0x15, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65,
|
||||
0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d,
|
||||
0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73,
|
||||
0x53, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53, 0x65,
|
||||
0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64,
|
||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69,
|
||||
0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x18,
|
||||
0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_user_email_verification_proto_rawDescOnce sync.Once
|
||||
file_models_model_user_email_verification_proto_rawDescData = file_models_model_user_email_verification_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_user_email_verification_proto_rawDescGZIP() []byte {
|
||||
file_models_model_user_email_verification_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_user_email_verification_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_user_email_verification_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_user_email_verification_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_user_email_verification_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_user_email_verification_proto_goTypes = []interface{}{
|
||||
(*UserEmailVerification)(nil), // 0: pb.UserEmailVerification
|
||||
}
|
||||
var file_models_model_user_email_verification_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_user_email_verification_proto_init() }
|
||||
func file_models_model_user_email_verification_proto_init() {
|
||||
if File_models_model_user_email_verification_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_user_email_verification_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UserEmailVerification); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_user_email_verification_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_user_email_verification_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_user_email_verification_proto_depIdxs,
|
||||
MessageInfos: file_models_model_user_email_verification_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_user_email_verification_proto = out.File
|
||||
file_models_model_user_email_verification_proto_rawDesc = nil
|
||||
file_models_model_user_email_verification_proto_goTypes = nil
|
||||
file_models_model_user_email_verification_proto_depIdxs = nil
|
||||
}
|
||||
267
pkg/rpc/pb/model_user_traffic_bill.pb.go
Normal file
267
pkg/rpc/pb/model_user_traffic_bill.pb.go
Normal file
@@ -0,0 +1,267 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.19.4
|
||||
// source: models/model_user_traffic_bill.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
// 用户流量带宽子账单
|
||||
type UserTrafficBill struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
BillId int64 `protobuf:"varint,2,opt,name=billId,proto3" json:"billId,omitempty"`
|
||||
NodeRegionId int64 `protobuf:"varint,3,opt,name=nodeRegionId,proto3" json:"nodeRegionId,omitempty"`
|
||||
Amount float64 `protobuf:"fixed64,4,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||
BandwidthMB float64 `protobuf:"fixed64,5,opt,name=bandwidthMB,proto3" json:"bandwidthMB,omitempty"`
|
||||
BandwidthPercentile int32 `protobuf:"varint,6,opt,name=bandwidthPercentile,proto3" json:"bandwidthPercentile,omitempty"`
|
||||
TrafficGB float64 `protobuf:"fixed64,7,opt,name=trafficGB,proto3" json:"trafficGB,omitempty"`
|
||||
TrafficPackageGB float64 `protobuf:"fixed64,8,opt,name=trafficPackageGB,proto3" json:"trafficPackageGB,omitempty"`
|
||||
UserTrafficPackageIds []int64 `protobuf:"varint,9,rep,packed,name=userTrafficPackageIds,proto3" json:"userTrafficPackageIds,omitempty"`
|
||||
PricePerUnit float64 `protobuf:"fixed64,10,opt,name=pricePerUnit,proto3" json:"pricePerUnit,omitempty"`
|
||||
PriceType string `protobuf:"bytes,11,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
||||
NodeRegion *NodeRegion `protobuf:"bytes,30,opt,name=nodeRegion,proto3" json:"nodeRegion,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UserTrafficBill) Reset() {
|
||||
*x = UserTrafficBill{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_models_model_user_traffic_bill_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UserTrafficBill) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UserTrafficBill) ProtoMessage() {}
|
||||
|
||||
func (x *UserTrafficBill) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_models_model_user_traffic_bill_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UserTrafficBill.ProtoReflect.Descriptor instead.
|
||||
func (*UserTrafficBill) Descriptor() ([]byte, []int) {
|
||||
return file_models_model_user_traffic_bill_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *UserTrafficBill) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserTrafficBill) GetBillId() int64 {
|
||||
if x != nil {
|
||||
return x.BillId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserTrafficBill) GetNodeRegionId() int64 {
|
||||
if x != nil {
|
||||
return x.NodeRegionId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserTrafficBill) GetAmount() float64 {
|
||||
if x != nil {
|
||||
return x.Amount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserTrafficBill) GetBandwidthMB() float64 {
|
||||
if x != nil {
|
||||
return x.BandwidthMB
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserTrafficBill) GetBandwidthPercentile() int32 {
|
||||
if x != nil {
|
||||
return x.BandwidthPercentile
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserTrafficBill) GetTrafficGB() float64 {
|
||||
if x != nil {
|
||||
return x.TrafficGB
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserTrafficBill) GetTrafficPackageGB() float64 {
|
||||
if x != nil {
|
||||
return x.TrafficPackageGB
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserTrafficBill) GetUserTrafficPackageIds() []int64 {
|
||||
if x != nil {
|
||||
return x.UserTrafficPackageIds
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UserTrafficBill) GetPricePerUnit() float64 {
|
||||
if x != nil {
|
||||
return x.PricePerUnit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UserTrafficBill) GetPriceType() string {
|
||||
if x != nil {
|
||||
return x.PriceType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UserTrafficBill) GetNodeRegion() *NodeRegion {
|
||||
if x != nil {
|
||||
return x.NodeRegion
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_models_model_user_traffic_bill_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_user_traffic_bill_proto_rawDesc = []byte{
|
||||
0x0a, 0x24, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75,
|
||||
0x73, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x62, 0x69, 0x6c, 0x6c,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1e, 0x6d, 0x6f, 0x64, 0x65,
|
||||
0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x03, 0x0a, 0x0f, 0x55,
|
||||
0x73, 0x65, 0x72, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x42, 0x69, 0x6c, 0x6c, 0x12, 0x0e,
|
||||
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x62, 0x69, 0x6c, 0x6c, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
|
||||
0x62, 0x69, 0x6c, 0x6c, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6e, 0x6f,
|
||||
0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x4d,
|
||||
0x42, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64,
|
||||
0x74, 0x68, 0x4d, 0x42, 0x12, 0x30, 0x0a, 0x13, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74,
|
||||
0x68, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x13, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x65, 0x72, 0x63,
|
||||
0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69,
|
||||
0x63, 0x47, 0x42, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x74, 0x72, 0x61, 0x66, 0x66,
|
||||
0x69, 0x63, 0x47, 0x42, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50,
|
||||
0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x47, 0x42, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10,
|
||||
0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x47, 0x42,
|
||||
0x12, 0x34, 0x0a, 0x15, 0x75, 0x73, 0x65, 0x72, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50,
|
||||
0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x64, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x03, 0x52,
|
||||
0x15, 0x75, 0x73, 0x65, 0x72, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x61, 0x63, 0x6b,
|
||||
0x61, 0x67, 0x65, 0x49, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x63, 0x65, 0x50,
|
||||
0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x70, 0x72,
|
||||
0x69, 0x63, 0x65, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72,
|
||||
0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70,
|
||||
0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65,
|
||||
0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6e, 0x6f,
|
||||
0x64, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_models_model_user_traffic_bill_proto_rawDescOnce sync.Once
|
||||
file_models_model_user_traffic_bill_proto_rawDescData = file_models_model_user_traffic_bill_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_models_model_user_traffic_bill_proto_rawDescGZIP() []byte {
|
||||
file_models_model_user_traffic_bill_proto_rawDescOnce.Do(func() {
|
||||
file_models_model_user_traffic_bill_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_user_traffic_bill_proto_rawDescData)
|
||||
})
|
||||
return file_models_model_user_traffic_bill_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_models_model_user_traffic_bill_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_models_model_user_traffic_bill_proto_goTypes = []interface{}{
|
||||
(*UserTrafficBill)(nil), // 0: pb.UserTrafficBill
|
||||
(*NodeRegion)(nil), // 1: pb.NodeRegion
|
||||
}
|
||||
var file_models_model_user_traffic_bill_proto_depIdxs = []int32{
|
||||
1, // 0: pb.UserTrafficBill.nodeRegion:type_name -> pb.NodeRegion
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_models_model_user_traffic_bill_proto_init() }
|
||||
func file_models_model_user_traffic_bill_proto_init() {
|
||||
if File_models_model_user_traffic_bill_proto != nil {
|
||||
return
|
||||
}
|
||||
file_models_model_node_region_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_models_model_user_traffic_bill_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UserTrafficBill); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_models_model_user_traffic_bill_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_models_model_user_traffic_bill_proto_goTypes,
|
||||
DependencyIndexes: file_models_model_user_traffic_bill_proto_depIdxs,
|
||||
MessageInfos: file_models_model_user_traffic_bill_proto_msgTypes,
|
||||
}.Build()
|
||||
File_models_model_user_traffic_bill_proto = out.File
|
||||
file_models_model_user_traffic_bill_proto_rawDesc = nil
|
||||
file_models_model_user_traffic_bill_proto_goTypes = nil
|
||||
file_models_model_user_traffic_bill_proto_depIdxs = nil
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user