Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08b9db2f96 | ||
|
|
5a781d8d17 | ||
|
|
690ddb99b8 | ||
|
|
9ef1882a79 | ||
|
|
dc001cc06c |
@@ -2,6 +2,7 @@ package nodeconfigs
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
|
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
|
||||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/firewallconfigs"
|
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/firewallconfigs"
|
||||||
@@ -9,6 +10,7 @@ import (
|
|||||||
"github.com/iwind/TeaGo/Tea"
|
"github.com/iwind/TeaGo/Tea"
|
||||||
"github.com/iwind/TeaGo/maps"
|
"github.com/iwind/TeaGo/maps"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"reflect"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -106,12 +108,40 @@ func ResetNodeConfig(nodeConfig *NodeConfig) {
|
|||||||
shared.Locker.Unlock()
|
shared.Locker.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CloneNodeConfig 复制节点配置
|
||||||
|
func CloneNodeConfig(nodeConfig *NodeConfig) (*NodeConfig, error) {
|
||||||
|
if nodeConfig == nil {
|
||||||
|
return nil, errors.New("node config should not be nil")
|
||||||
|
}
|
||||||
|
|
||||||
|
var newConfigValue = reflect.Indirect(reflect.ValueOf(&NodeConfig{}))
|
||||||
|
var oldValue = reflect.Indirect(reflect.ValueOf(nodeConfig))
|
||||||
|
var valueType = oldValue.Type()
|
||||||
|
for i := 0; i < valueType.NumField(); i++ {
|
||||||
|
var field = valueType.Field(i)
|
||||||
|
var fieldName = field.Name
|
||||||
|
if !field.IsExported() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if fieldName == "Servers" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
newConfigValue.FieldByName(fieldName).Set(oldValue.FieldByName(fieldName))
|
||||||
|
}
|
||||||
|
|
||||||
|
var newConfig = newConfigValue.Interface().(NodeConfig)
|
||||||
|
newConfig.Servers = append([]*serverconfigs.ServerConfig{}, nodeConfig.Servers...)
|
||||||
|
return &newConfig, nil
|
||||||
|
}
|
||||||
|
|
||||||
// Init 初始化
|
// Init 初始化
|
||||||
func (this *NodeConfig) Init() (err error, serverErrors []*ServerError) {
|
func (this *NodeConfig) Init() (err error, serverErrors []*ServerError) {
|
||||||
this.paddedId = fmt.Sprintf("%08d", this.Id)
|
this.paddedId = fmt.Sprintf("%08d", this.Id)
|
||||||
|
|
||||||
// servers
|
// servers
|
||||||
for _, server := range this.Servers {
|
for _, server := range this.Servers {
|
||||||
|
// 初始化
|
||||||
errs := server.Init()
|
errs := server.Init()
|
||||||
if len(errs) > 0 {
|
if len(errs) > 0 {
|
||||||
// 这里不返回错误,而是继续往下,防止单个服务错误而影响其他服务
|
// 这里不返回错误,而是继续往下,防止单个服务错误而影响其他服务
|
||||||
@@ -119,6 +149,11 @@ func (this *NodeConfig) Init() (err error, serverErrors []*ServerError) {
|
|||||||
serverErrors = append(serverErrors, NewServerError(server.Id, "server '"+strconv.FormatInt(server.Id, 10)+"' init failed: "+serverErr.Error()))
|
serverErrors = append(serverErrors, NewServerError(server.Id, "server '"+strconv.FormatInt(server.Id, 10)+"' init failed: "+serverErr.Error()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 检查ACME支持
|
||||||
|
if server.IsOn && server.SupportCNAME {
|
||||||
|
this.SupportCNAME = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// global config
|
// global config
|
||||||
@@ -161,6 +196,7 @@ func (this *NodeConfig) Init() (err error, serverErrors []*ServerError) {
|
|||||||
this.originMap = map[int64]*serverconfigs.OriginConfig{}
|
this.originMap = map[int64]*serverconfigs.OriginConfig{}
|
||||||
|
|
||||||
// 查找FirewallPolicy
|
// 查找FirewallPolicy
|
||||||
|
this.synFlood = nil
|
||||||
this.firewallPolicies = []*firewallconfigs.HTTPFirewallPolicy{}
|
this.firewallPolicies = []*firewallconfigs.HTTPFirewallPolicy{}
|
||||||
for _, policy := range this.HTTPFirewallPolicies {
|
for _, policy := range this.HTTPFirewallPolicies {
|
||||||
if policy.IsOn {
|
if policy.IsOn {
|
||||||
@@ -242,6 +278,35 @@ func (this *NodeConfig) Init() (err error, serverErrors []*ServerError) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AddServer 添加服务
|
||||||
|
func (this *NodeConfig) AddServer(server *serverconfigs.ServerConfig) {
|
||||||
|
if server == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var found = false
|
||||||
|
for index, oldServer := range this.Servers {
|
||||||
|
if oldServer.Id == server.Id {
|
||||||
|
this.Servers[index] = server
|
||||||
|
found = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
this.Servers = append(this.Servers, server)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RemoveServer 删除服务
|
||||||
|
func (this *NodeConfig) RemoveServer(serverId int64) {
|
||||||
|
for index, oldServer := range this.Servers {
|
||||||
|
if oldServer.Id == serverId {
|
||||||
|
this.Servers = append(this.Servers[:index], this.Servers[index+1:]...)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// AvailableGroups 根据网络地址和协议分组
|
// AvailableGroups 根据网络地址和协议分组
|
||||||
func (this *NodeConfig) AvailableGroups() []*serverconfigs.ServerAddressGroup {
|
func (this *NodeConfig) AvailableGroups() []*serverconfigs.ServerAddressGroup {
|
||||||
groupMapping := map[string]*serverconfigs.ServerAddressGroup{} // protocol://addr => Server Group
|
groupMapping := map[string]*serverconfigs.ServerAddressGroup{} // protocol://addr => Server Group
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import (
|
|||||||
_ "github.com/iwind/TeaGo/bootstrap"
|
_ "github.com/iwind/TeaGo/bootstrap"
|
||||||
"github.com/iwind/TeaGo/logs"
|
"github.com/iwind/TeaGo/logs"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSharedNodeConfig(t *testing.T) {
|
func TestSharedNodeConfig(t *testing.T) {
|
||||||
@@ -64,3 +65,37 @@ func TestNodeConfig_Groups(t *testing.T) {
|
|||||||
}
|
}
|
||||||
logs.PrintAsJSON(config.AvailableGroups(), t)
|
logs.PrintAsJSON(config.AvailableGroups(), t)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestCloneNodeConfig(t *testing.T) {
|
||||||
|
var config = &NodeConfig{Id: 1, NodeId: "1", IsOn: true}
|
||||||
|
for i := 0; i < 100_000; i++ {
|
||||||
|
config.Servers = append(config.Servers, &serverconfigs.ServerConfig{})
|
||||||
|
}
|
||||||
|
var before = time.Now()
|
||||||
|
newConfig, err := CloneNodeConfig(config)
|
||||||
|
t.Log(time.Since(before))
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
newConfig.Servers = []*serverconfigs.ServerConfig{}
|
||||||
|
logs.PrintAsJSON(newConfig, t)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestNodeConfig_AddServer(t *testing.T) {
|
||||||
|
var config = &NodeConfig{Id: 1, NodeId: "1", IsOn: true}
|
||||||
|
config.AddServer(&serverconfigs.ServerConfig{Id: 1})
|
||||||
|
config.AddServer(&serverconfigs.ServerConfig{Id: 2})
|
||||||
|
|
||||||
|
t.Log("===before===")
|
||||||
|
for _, s := range config.Servers {
|
||||||
|
t.Log(s.Id)
|
||||||
|
}
|
||||||
|
|
||||||
|
t.Log("===after===")
|
||||||
|
config.AddServer(&serverconfigs.ServerConfig{Id: 3})
|
||||||
|
config.RemoveServer(2)
|
||||||
|
for _, s := range config.Servers {
|
||||||
|
t.Log(s.Id)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
430
pkg/rpc/pb/api_method_stat_service.pb.go
Normal file
430
pkg/rpc/pb/api_method_stat_service.pb.go
Normal file
@@ -0,0 +1,430 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.25.0
|
||||||
|
// protoc v3.12.3
|
||||||
|
// source: api_method_stat_service.proto
|
||||||
|
|
||||||
|
package pb
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
proto "github.com/golang/protobuf/proto"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
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 FindAPIMethodStatsWithDayRequest struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Day string `protobuf:"bytes,1,opt,name=day,proto3" json:"day,omitempty"` // YYYYMMDD
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *FindAPIMethodStatsWithDayRequest) Reset() {
|
||||||
|
*x = FindAPIMethodStatsWithDayRequest{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_api_method_stat_service_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *FindAPIMethodStatsWithDayRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*FindAPIMethodStatsWithDayRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *FindAPIMethodStatsWithDayRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_api_method_stat_service_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 FindAPIMethodStatsWithDayRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*FindAPIMethodStatsWithDayRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_api_method_stat_service_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *FindAPIMethodStatsWithDayRequest) GetDay() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Day
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type FindAPIMethodStatsWithDayResponse struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
ApiMethodStats []*APIMethodStat `protobuf:"bytes,1,rep,name=apiMethodStats,proto3" json:"apiMethodStats,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *FindAPIMethodStatsWithDayResponse) Reset() {
|
||||||
|
*x = FindAPIMethodStatsWithDayResponse{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_api_method_stat_service_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *FindAPIMethodStatsWithDayResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*FindAPIMethodStatsWithDayResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *FindAPIMethodStatsWithDayResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_api_method_stat_service_proto_msgTypes[1]
|
||||||
|
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 FindAPIMethodStatsWithDayResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*FindAPIMethodStatsWithDayResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_api_method_stat_service_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *FindAPIMethodStatsWithDayResponse) GetApiMethodStats() []*APIMethodStat {
|
||||||
|
if x != nil {
|
||||||
|
return x.ApiMethodStats
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否有统计数据
|
||||||
|
type CountAPIMethodStatsWithDayRequest struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Day string `protobuf:"bytes,1,opt,name=day,proto3" json:"day,omitempty"` // YYYYMMDD
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CountAPIMethodStatsWithDayRequest) Reset() {
|
||||||
|
*x = CountAPIMethodStatsWithDayRequest{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_api_method_stat_service_proto_msgTypes[2]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CountAPIMethodStatsWithDayRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*CountAPIMethodStatsWithDayRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *CountAPIMethodStatsWithDayRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_api_method_stat_service_proto_msgTypes[2]
|
||||||
|
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 CountAPIMethodStatsWithDayRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*CountAPIMethodStatsWithDayRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_api_method_stat_service_proto_rawDescGZIP(), []int{2}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CountAPIMethodStatsWithDayRequest) GetDay() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Day
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_api_method_stat_service_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_api_method_stat_service_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x1d, 0x61, 0x70, 0x69, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61,
|
||||||
|
0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||||
|
0x02, 0x70, 0x62, 0x1a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65,
|
||||||
|
0x6c, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61,
|
||||||
|
0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f,
|
||||||
|
0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x22, 0x34, 0x0a, 0x20, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74,
|
||||||
|
0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x44, 0x61, 0x79, 0x52,
|
||||||
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, 0x79, 0x18, 0x01, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x61, 0x79, 0x22, 0x5e, 0x0a, 0x21, 0x46, 0x69, 0x6e, 0x64,
|
||||||
|
0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x57, 0x69,
|
||||||
|
0x74, 0x68, 0x44, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a,
|
||||||
|
0x0e, 0x61, 0x70, 0x69, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18,
|
||||||
|
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x50, 0x49, 0x4d, 0x65,
|
||||||
|
0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x52, 0x0e, 0x61, 0x70, 0x69, 0x4d, 0x65, 0x74,
|
||||||
|
0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0x35, 0x0a, 0x21, 0x43, 0x6f, 0x75, 0x6e,
|
||||||
|
0x74, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x57,
|
||||||
|
0x69, 0x74, 0x68, 0x44, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a,
|
||||||
|
0x03, 0x64, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x61, 0x79, 0x32,
|
||||||
|
0xdb, 0x01, 0x0a, 0x14, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61,
|
||||||
|
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x66, 0x69, 0x6e, 0x64,
|
||||||
|
0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x57, 0x69,
|
||||||
|
0x74, 0x68, 0x44, 0x61, 0x79, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41,
|
||||||
|
0x50, 0x49, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x57, 0x69, 0x74,
|
||||||
|
0x68, 0x44, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62,
|
||||||
|
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74,
|
||||||
|
0x61, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x44, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
|
0x73, 0x65, 0x12, 0x59, 0x0a, 0x1a, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4d, 0x65,
|
||||||
|
0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x44, 0x61, 0x79,
|
||||||
|
0x12, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4d, 0x65,
|
||||||
|
0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x44, 0x61, 0x79,
|
||||||
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43,
|
||||||
|
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a,
|
||||||
|
0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_api_method_stat_service_proto_rawDescOnce sync.Once
|
||||||
|
file_api_method_stat_service_proto_rawDescData = file_api_method_stat_service_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_api_method_stat_service_proto_rawDescGZIP() []byte {
|
||||||
|
file_api_method_stat_service_proto_rawDescOnce.Do(func() {
|
||||||
|
file_api_method_stat_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_method_stat_service_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_api_method_stat_service_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_api_method_stat_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||||
|
var file_api_method_stat_service_proto_goTypes = []interface{}{
|
||||||
|
(*FindAPIMethodStatsWithDayRequest)(nil), // 0: pb.FindAPIMethodStatsWithDayRequest
|
||||||
|
(*FindAPIMethodStatsWithDayResponse)(nil), // 1: pb.FindAPIMethodStatsWithDayResponse
|
||||||
|
(*CountAPIMethodStatsWithDayRequest)(nil), // 2: pb.CountAPIMethodStatsWithDayRequest
|
||||||
|
(*APIMethodStat)(nil), // 3: pb.APIMethodStat
|
||||||
|
(*RPCCountResponse)(nil), // 4: pb.RPCCountResponse
|
||||||
|
}
|
||||||
|
var file_api_method_stat_service_proto_depIdxs = []int32{
|
||||||
|
3, // 0: pb.FindAPIMethodStatsWithDayResponse.apiMethodStats:type_name -> pb.APIMethodStat
|
||||||
|
0, // 1: pb.APIMethodStatService.findAPIMethodStatsWithDay:input_type -> pb.FindAPIMethodStatsWithDayRequest
|
||||||
|
2, // 2: pb.APIMethodStatService.countAPIMethodStatsWithDay:input_type -> pb.CountAPIMethodStatsWithDayRequest
|
||||||
|
1, // 3: pb.APIMethodStatService.findAPIMethodStatsWithDay:output_type -> pb.FindAPIMethodStatsWithDayResponse
|
||||||
|
4, // 4: pb.APIMethodStatService.countAPIMethodStatsWithDay:output_type -> pb.RPCCountResponse
|
||||||
|
3, // [3:5] is the sub-list for method output_type
|
||||||
|
1, // [1:3] 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_api_method_stat_service_proto_init() }
|
||||||
|
func file_api_method_stat_service_proto_init() {
|
||||||
|
if File_api_method_stat_service_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file_models_model_api_method_stat_proto_init()
|
||||||
|
file_models_rpc_messages_proto_init()
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_api_method_stat_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*FindAPIMethodStatsWithDayRequest); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_api_method_stat_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*FindAPIMethodStatsWithDayResponse); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_api_method_stat_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*CountAPIMethodStatsWithDayRequest); 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_api_method_stat_service_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 3,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 1,
|
||||||
|
},
|
||||||
|
GoTypes: file_api_method_stat_service_proto_goTypes,
|
||||||
|
DependencyIndexes: file_api_method_stat_service_proto_depIdxs,
|
||||||
|
MessageInfos: file_api_method_stat_service_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_api_method_stat_service_proto = out.File
|
||||||
|
file_api_method_stat_service_proto_rawDesc = nil
|
||||||
|
file_api_method_stat_service_proto_goTypes = nil
|
||||||
|
file_api_method_stat_service_proto_depIdxs = nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
var _ context.Context
|
||||||
|
var _ grpc.ClientConnInterface
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
const _ = grpc.SupportPackageIsVersion6
|
||||||
|
|
||||||
|
// APIMethodStatServiceClient is the client API for APIMethodStatService service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||||
|
type APIMethodStatServiceClient interface {
|
||||||
|
// 查找某天的统计
|
||||||
|
FindAPIMethodStatsWithDay(ctx context.Context, in *FindAPIMethodStatsWithDayRequest, opts ...grpc.CallOption) (*FindAPIMethodStatsWithDayResponse, error)
|
||||||
|
// 检查是否有统计数据
|
||||||
|
CountAPIMethodStatsWithDay(ctx context.Context, in *CountAPIMethodStatsWithDayRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type aPIMethodStatServiceClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewAPIMethodStatServiceClient(cc grpc.ClientConnInterface) APIMethodStatServiceClient {
|
||||||
|
return &aPIMethodStatServiceClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *aPIMethodStatServiceClient) FindAPIMethodStatsWithDay(ctx context.Context, in *FindAPIMethodStatsWithDayRequest, opts ...grpc.CallOption) (*FindAPIMethodStatsWithDayResponse, error) {
|
||||||
|
out := new(FindAPIMethodStatsWithDayResponse)
|
||||||
|
err := c.cc.Invoke(ctx, "/pb.APIMethodStatService/findAPIMethodStatsWithDay", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *aPIMethodStatServiceClient) CountAPIMethodStatsWithDay(ctx context.Context, in *CountAPIMethodStatsWithDayRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
|
||||||
|
out := new(RPCCountResponse)
|
||||||
|
err := c.cc.Invoke(ctx, "/pb.APIMethodStatService/countAPIMethodStatsWithDay", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// APIMethodStatServiceServer is the server API for APIMethodStatService service.
|
||||||
|
type APIMethodStatServiceServer interface {
|
||||||
|
// 查找某天的统计
|
||||||
|
FindAPIMethodStatsWithDay(context.Context, *FindAPIMethodStatsWithDayRequest) (*FindAPIMethodStatsWithDayResponse, error)
|
||||||
|
// 检查是否有统计数据
|
||||||
|
CountAPIMethodStatsWithDay(context.Context, *CountAPIMethodStatsWithDayRequest) (*RPCCountResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedAPIMethodStatServiceServer can be embedded to have forward compatible implementations.
|
||||||
|
type UnimplementedAPIMethodStatServiceServer struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UnimplementedAPIMethodStatServiceServer) FindAPIMethodStatsWithDay(context.Context, *FindAPIMethodStatsWithDayRequest) (*FindAPIMethodStatsWithDayResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method FindAPIMethodStatsWithDay not implemented")
|
||||||
|
}
|
||||||
|
func (*UnimplementedAPIMethodStatServiceServer) CountAPIMethodStatsWithDay(context.Context, *CountAPIMethodStatsWithDayRequest) (*RPCCountResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method CountAPIMethodStatsWithDay not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterAPIMethodStatServiceServer(s *grpc.Server, srv APIMethodStatServiceServer) {
|
||||||
|
s.RegisterService(&_APIMethodStatService_serviceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _APIMethodStatService_FindAPIMethodStatsWithDay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(FindAPIMethodStatsWithDayRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(APIMethodStatServiceServer).FindAPIMethodStatsWithDay(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/pb.APIMethodStatService/FindAPIMethodStatsWithDay",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(APIMethodStatServiceServer).FindAPIMethodStatsWithDay(ctx, req.(*FindAPIMethodStatsWithDayRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _APIMethodStatService_CountAPIMethodStatsWithDay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(CountAPIMethodStatsWithDayRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(APIMethodStatServiceServer).CountAPIMethodStatsWithDay(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/pb.APIMethodStatService/CountAPIMethodStatsWithDay",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(APIMethodStatServiceServer).CountAPIMethodStatsWithDay(ctx, req.(*CountAPIMethodStatsWithDayRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
var _APIMethodStatService_serviceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "pb.APIMethodStatService",
|
||||||
|
HandlerType: (*APIMethodStatServiceServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "findAPIMethodStatsWithDay",
|
||||||
|
Handler: _APIMethodStatService_FindAPIMethodStatsWithDay_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "countAPIMethodStatsWithDay",
|
||||||
|
Handler: _APIMethodStatService_CountAPIMethodStatsWithDay_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "api_method_stat_service.proto",
|
||||||
|
}
|
||||||
220
pkg/rpc/pb/model_api_method_stat.pb.go
Normal file
220
pkg/rpc/pb/model_api_method_stat.pb.go
Normal file
@@ -0,0 +1,220 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.25.0
|
||||||
|
// protoc v3.12.3
|
||||||
|
// source: models/model_api_method_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 APIMethodStat struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
|
ApiNodeId int64 `protobuf:"varint,2,opt,name=apiNodeId,proto3" json:"apiNodeId,omitempty"`
|
||||||
|
Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"`
|
||||||
|
Tag string `protobuf:"bytes,4,opt,name=tag,proto3" json:"tag,omitempty"`
|
||||||
|
CostMs float32 `protobuf:"fixed32,5,opt,name=costMs,proto3" json:"costMs,omitempty"`
|
||||||
|
PeekMs float32 `protobuf:"fixed32,6,opt,name=peekMs,proto3" json:"peekMs,omitempty"`
|
||||||
|
CountCalls int64 `protobuf:"varint,7,opt,name=countCalls,proto3" json:"countCalls,omitempty"`
|
||||||
|
ApiNode *APINode `protobuf:"bytes,30,opt,name=apiNode,proto3" json:"apiNode,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *APIMethodStat) Reset() {
|
||||||
|
*x = APIMethodStat{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_models_model_api_method_stat_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *APIMethodStat) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*APIMethodStat) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *APIMethodStat) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_models_model_api_method_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 APIMethodStat.ProtoReflect.Descriptor instead.
|
||||||
|
func (*APIMethodStat) Descriptor() ([]byte, []int) {
|
||||||
|
return file_models_model_api_method_stat_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *APIMethodStat) GetId() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Id
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *APIMethodStat) GetApiNodeId() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.ApiNodeId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *APIMethodStat) GetMethod() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Method
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *APIMethodStat) GetTag() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Tag
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *APIMethodStat) GetCostMs() float32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.CostMs
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *APIMethodStat) GetPeekMs() float32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.PeekMs
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *APIMethodStat) GetCountCalls() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.CountCalls
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *APIMethodStat) GetApiNode() *APINode {
|
||||||
|
if x != nil {
|
||||||
|
return x.ApiNode
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_models_model_api_method_stat_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_models_model_api_method_stat_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61,
|
||||||
|
0x70, 0x69, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x2e, 0x70,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73,
|
||||||
|
0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, 0x01, 0x0a, 0x0d, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74,
|
||||||
|
0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||||
|
0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x70, 0x69, 0x4e, 0x6f,
|
||||||
|
0x64, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x70, 0x69, 0x4e,
|
||||||
|
0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18,
|
||||||
|
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a,
|
||||||
|
0x03, 0x74, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12,
|
||||||
|
0x16, 0x0a, 0x06, 0x63, 0x6f, 0x73, 0x74, 0x4d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52,
|
||||||
|
0x06, 0x63, 0x6f, 0x73, 0x74, 0x4d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x65, 0x6b, 0x4d,
|
||||||
|
0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x70, 0x65, 0x65, 0x6b, 0x4d, 0x73, 0x12,
|
||||||
|
0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x07, 0x20,
|
||||||
|
0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x12,
|
||||||
|
0x25, 0x0a, 0x07, 0x61, 0x70, 0x69, 0x4e, 0x6f, 0x64, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b,
|
||||||
|
0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x61,
|
||||||
|
0x70, 0x69, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_models_model_api_method_stat_proto_rawDescOnce sync.Once
|
||||||
|
file_models_model_api_method_stat_proto_rawDescData = file_models_model_api_method_stat_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_models_model_api_method_stat_proto_rawDescGZIP() []byte {
|
||||||
|
file_models_model_api_method_stat_proto_rawDescOnce.Do(func() {
|
||||||
|
file_models_model_api_method_stat_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_api_method_stat_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_models_model_api_method_stat_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_models_model_api_method_stat_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
|
var file_models_model_api_method_stat_proto_goTypes = []interface{}{
|
||||||
|
(*APIMethodStat)(nil), // 0: pb.APIMethodStat
|
||||||
|
(*APINode)(nil), // 1: pb.APINode
|
||||||
|
}
|
||||||
|
var file_models_model_api_method_stat_proto_depIdxs = []int32{
|
||||||
|
1, // 0: pb.APIMethodStat.apiNode:type_name -> pb.APINode
|
||||||
|
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_api_method_stat_proto_init() }
|
||||||
|
func file_models_model_api_method_stat_proto_init() {
|
||||||
|
if File_models_model_api_method_stat_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file_models_model_api_node_proto_init()
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_models_model_api_method_stat_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*APIMethodStat); 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_api_method_stat_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 1,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_models_model_api_method_stat_proto_goTypes,
|
||||||
|
DependencyIndexes: file_models_model_api_method_stat_proto_depIdxs,
|
||||||
|
MessageInfos: file_models_model_api_method_stat_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_models_model_api_method_stat_proto = out.File
|
||||||
|
file_models_model_api_method_stat_proto_rawDesc = nil
|
||||||
|
file_models_model_api_method_stat_proto_goTypes = nil
|
||||||
|
file_models_model_api_method_stat_proto_depIdxs = nil
|
||||||
|
}
|
||||||
@@ -45,6 +45,7 @@ type APINode struct {
|
|||||||
AccessAddrsJSON []byte `protobuf:"bytes,10,opt,name=accessAddrsJSON,proto3" json:"accessAddrsJSON,omitempty"`
|
AccessAddrsJSON []byte `protobuf:"bytes,10,opt,name=accessAddrsJSON,proto3" json:"accessAddrsJSON,omitempty"`
|
||||||
AccessAddrs []string `protobuf:"bytes,11,rep,name=accessAddrs,proto3" json:"accessAddrs,omitempty"`
|
AccessAddrs []string `protobuf:"bytes,11,rep,name=accessAddrs,proto3" json:"accessAddrs,omitempty"`
|
||||||
StatusJSON []byte `protobuf:"bytes,12,opt,name=statusJSON,proto3" json:"statusJSON,omitempty"`
|
StatusJSON []byte `protobuf:"bytes,12,opt,name=statusJSON,proto3" json:"statusJSON,omitempty"`
|
||||||
|
Debug bool `protobuf:"varint,30,opt,name=debug,proto3" json:"debug,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *APINode) Reset() {
|
func (x *APINode) Reset() {
|
||||||
@@ -184,12 +185,19 @@ func (x *APINode) GetStatusJSON() []byte {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *APINode) GetDebug() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Debug
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
var File_models_model_api_node_proto protoreflect.FileDescriptor
|
var File_models_model_api_node_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_models_model_api_node_proto_rawDesc = []byte{
|
var file_models_model_api_node_proto_rawDesc = []byte{
|
||||||
0x0a, 0x1b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61,
|
0x0a, 0x1b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x61,
|
||||||
0x70, 0x69, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70,
|
0x70, 0x69, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70,
|
||||||
0x62, 0x22, 0xc9, 0x03, 0x0a, 0x07, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a,
|
0x62, 0x22, 0xdf, 0x03, 0x0a, 0x07, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a,
|
||||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 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,
|
0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f,
|
||||||
0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
|
||||||
@@ -217,8 +225,10 @@ var file_models_model_api_node_proto_rawDesc = []byte{
|
|||||||
0x63, 0x63, 0x65, 0x73, 0x73, 0x41, 0x64, 0x64, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09,
|
0x63, 0x63, 0x65, 0x73, 0x73, 0x41, 0x64, 0x64, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09,
|
||||||
0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x41, 0x64, 0x64, 0x72, 0x73, 0x12, 0x1e, 0x0a,
|
0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x41, 0x64, 0x64, 0x72, 0x73, 0x12, 0x1e, 0x0a,
|
||||||
0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28,
|
0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28,
|
||||||
0x0c, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x42, 0x06, 0x5a,
|
0x0c, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x14, 0x0a,
|
||||||
0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x64, 0x65,
|
||||||
|
0x62, 0x75, 0x67, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -39,8 +39,10 @@ type NodeTask struct {
|
|||||||
UpdatedAt int64 `protobuf:"varint,6,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
|
UpdatedAt int64 `protobuf:"varint,6,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
|
||||||
Version int64 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"`
|
Version int64 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"`
|
||||||
IsPrimary bool `protobuf:"varint,8,opt,name=isPrimary,proto3" json:"isPrimary,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"`
|
||||||
Node *Node `protobuf:"bytes,30,opt,name=node,proto3" json:"node,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"`
|
NodeCluster *NodeCluster `protobuf:"bytes,31,opt,name=nodeCluster,proto3" json:"nodeCluster,omitempty"`
|
||||||
|
Server *NodeCluster `protobuf:"bytes,32,opt,name=server,proto3" json:"server,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *NodeTask) Reset() {
|
func (x *NodeTask) Reset() {
|
||||||
@@ -131,6 +133,13 @@ func (x *NodeTask) GetIsPrimary() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *NodeTask) GetServerId() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.ServerId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
func (x *NodeTask) GetNode() *Node {
|
func (x *NodeTask) GetNode() *Node {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Node
|
return x.Node
|
||||||
@@ -145,6 +154,13 @@ func (x *NodeTask) GetNodeCluster() *NodeCluster {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *NodeTask) GetServer() *NodeCluster {
|
||||||
|
if x != nil {
|
||||||
|
return x.Server
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
var File_models_model_node_task_proto protoreflect.FileDescriptor
|
var File_models_model_node_task_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_models_model_node_task_proto_rawDesc = []byte{
|
var file_models_model_node_task_proto_rawDesc = []byte{
|
||||||
@@ -153,7 +169,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,
|
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,
|
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,
|
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, 0x97, 0x02, 0x0a,
|
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdc, 0x02, 0x0a,
|
||||||
0x08, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
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,
|
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,
|
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a,
|
||||||
@@ -166,13 +182,17 @@ var file_models_model_node_task_proto_rawDesc = []byte{
|
|||||||
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07,
|
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07,
|
||||||
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69,
|
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69,
|
||||||
0x6d, 0x61, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72,
|
0x6d, 0x61, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72,
|
||||||
0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x1e, 0x20,
|
0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49,
|
||||||
0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e,
|
0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49,
|
||||||
0x6f, 0x64, 0x65, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74,
|
0x64, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
0x65, 0x72, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f,
|
0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12,
|
||||||
0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43,
|
0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x1f,
|
||||||
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06,
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
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 (
|
var (
|
||||||
@@ -196,11 +216,12 @@ var file_models_model_node_task_proto_goTypes = []interface{}{
|
|||||||
var file_models_model_node_task_proto_depIdxs = []int32{
|
var file_models_model_node_task_proto_depIdxs = []int32{
|
||||||
1, // 0: pb.NodeTask.node:type_name -> pb.Node
|
1, // 0: pb.NodeTask.node:type_name -> pb.Node
|
||||||
2, // 1: pb.NodeTask.nodeCluster:type_name -> pb.NodeCluster
|
2, // 1: pb.NodeTask.nodeCluster:type_name -> pb.NodeCluster
|
||||||
2, // [2:2] is the sub-list for method output_type
|
2, // 2: pb.NodeTask.server:type_name -> pb.NodeCluster
|
||||||
2, // [2:2] is the sub-list for method input_type
|
3, // [3:3] is the sub-list for method output_type
|
||||||
2, // [2:2] is the sub-list for extension type_name
|
3, // [3:3] is the sub-list for method input_type
|
||||||
2, // [2:2] is the sub-list for extension extendee
|
3, // [3:3] is the sub-list for extension type_name
|
||||||
0, // [0:2] is the sub-list for field 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_node_task_proto_init() }
|
func init() { file_models_model_node_task_proto_init() }
|
||||||
|
|||||||
@@ -30,17 +30,18 @@ type Plan struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,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"`
|
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||||
ClusterId int64 `protobuf:"varint,4,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
|
ClusterId int64 `protobuf:"varint,4,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
|
||||||
TrafficLimitJSON []byte `protobuf:"bytes,5,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"`
|
TrafficLimitJSON []byte `protobuf:"bytes,5,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"`
|
||||||
FeaturesJSON []byte `protobuf:"bytes,6,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"`
|
FeaturesJSON []byte `protobuf:"bytes,6,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"`
|
||||||
PriceType string `protobuf:"bytes,7,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
PriceType string `protobuf:"bytes,7,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
||||||
TrafficPriceJSON []byte `protobuf:"bytes,8,opt,name=trafficPriceJSON,proto3" json:"trafficPriceJSON,omitempty"`
|
TrafficPriceJSON []byte `protobuf:"bytes,8,opt,name=trafficPriceJSON,proto3" json:"trafficPriceJSON,omitempty"`
|
||||||
MonthlyPrice float32 `protobuf:"fixed32,9,opt,name=monthlyPrice,proto3" json:"monthlyPrice,omitempty"`
|
BandwidthPriceJSON []byte `protobuf:"bytes,12,opt,name=bandwidthPriceJSON,proto3" json:"bandwidthPriceJSON,omitempty"`
|
||||||
SeasonallyPrice float32 `protobuf:"fixed32,10,opt,name=seasonallyPrice,proto3" json:"seasonallyPrice,omitempty"`
|
MonthlyPrice float32 `protobuf:"fixed32,9,opt,name=monthlyPrice,proto3" json:"monthlyPrice,omitempty"`
|
||||||
YearlyPrice float32 `protobuf:"fixed32,11,opt,name=yearlyPrice,proto3" json:"yearlyPrice,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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Plan) Reset() {
|
func (x *Plan) Reset() {
|
||||||
@@ -131,6 +132,13 @@ func (x *Plan) GetTrafficPriceJSON() []byte {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *Plan) GetBandwidthPriceJSON() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.BandwidthPriceJSON
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (x *Plan) GetMonthlyPrice() float32 {
|
func (x *Plan) GetMonthlyPrice() float32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.MonthlyPrice
|
return x.MonthlyPrice
|
||||||
@@ -156,7 +164,7 @@ var File_models_model_plan_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
var file_models_model_plan_proto_rawDesc = []byte{
|
var file_models_model_plan_proto_rawDesc = []byte{
|
||||||
0x0a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x70,
|
0x0a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x70,
|
||||||
0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xe6, 0x02,
|
0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x96, 0x03,
|
||||||
0x0a, 0x04, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
0x0a, 0x04, 0x50, 0x6c, 0x61, 0x6e, 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,
|
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,
|
0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
|
||||||
@@ -172,6 +180,9 @@ var file_models_model_plan_proto_rawDesc = []byte{
|
|||||||
0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72,
|
0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72,
|
||||||
0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x08,
|
0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x08,
|
||||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69,
|
0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69,
|
||||||
|
0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2e, 0x0a, 0x12, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69,
|
||||||
|
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,
|
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, 0x02, 0x52, 0x0c, 0x6d, 0x6f,
|
||||||
0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x65,
|
0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x65,
|
||||||
|
|||||||
308
pkg/rpc/pb/model_server_bill.pb.go
Normal file
308
pkg/rpc/pb/model_server_bill.pb.go
Normal file
@@ -0,0 +1,308 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.25.0
|
||||||
|
// protoc v3.12.3
|
||||||
|
// source: models/model_server_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 ServerBill 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"`
|
||||||
|
ServerId int64 `protobuf:"varint,3,opt,name=serverId,proto3" json:"serverId,omitempty"`
|
||||||
|
Amount float32 `protobuf:"fixed32,4,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||||
|
CreatedAt int64 `protobuf:"varint,5,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||||
|
UserPlanId int64 `protobuf:"varint,6,opt,name=userPlanId,proto3" json:"userPlanId,omitempty"`
|
||||||
|
PlanId int64 `protobuf:"varint,7,opt,name=planId,proto3" json:"planId,omitempty"`
|
||||||
|
TotalTrafficBytes int64 `protobuf:"varint,8,opt,name=totalTrafficBytes,proto3" json:"totalTrafficBytes,omitempty"`
|
||||||
|
BandwidthPercentileBytes int64 `protobuf:"varint,9,opt,name=bandwidthPercentileBytes,proto3" json:"bandwidthPercentileBytes,omitempty"`
|
||||||
|
BandwidthPercentile int32 `protobuf:"varint,10,opt,name=bandwidthPercentile,proto3" json:"bandwidthPercentile,omitempty"`
|
||||||
|
PriceType string `protobuf:"bytes,11,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
||||||
|
UserPlan *UserPlan `protobuf:"bytes,30,opt,name=userPlan,proto3" json:"userPlan,omitempty"`
|
||||||
|
Plan *Plan `protobuf:"bytes,31,opt,name=plan,proto3" json:"plan,omitempty"`
|
||||||
|
User *User `protobuf:"bytes,32,opt,name=user,proto3" json:"user,omitempty"`
|
||||||
|
Server *Server `protobuf:"bytes,33,opt,name=server,proto3" json:"server,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) Reset() {
|
||||||
|
*x = ServerBill{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_models_model_server_bill_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ServerBill) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ServerBill) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_models_model_server_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 ServerBill.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ServerBill) Descriptor() ([]byte, []int) {
|
||||||
|
return file_models_model_server_bill_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) GetId() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Id
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) GetUserId() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.UserId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) GetServerId() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.ServerId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) GetAmount() float32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Amount
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) GetCreatedAt() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.CreatedAt
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) GetUserPlanId() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.UserPlanId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) GetPlanId() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.PlanId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) GetTotalTrafficBytes() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.TotalTrafficBytes
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) GetBandwidthPercentileBytes() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.BandwidthPercentileBytes
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) GetBandwidthPercentile() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.BandwidthPercentile
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) GetPriceType() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.PriceType
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) GetUserPlan() *UserPlan {
|
||||||
|
if x != nil {
|
||||||
|
return x.UserPlan
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) GetPlan() *Plan {
|
||||||
|
if x != nil {
|
||||||
|
return x.Plan
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) GetUser() *User {
|
||||||
|
if x != nil {
|
||||||
|
return x.User
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServerBill) GetServer() *Server {
|
||||||
|
if x != nil {
|
||||||
|
return x.Server
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_models_model_server_bill_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_models_model_server_bill_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x1e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73,
|
||||||
|
0x65, 0x72, 0x76, 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, 0x70, 0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d,
|
||||||
|
0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72,
|
||||||
|
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, 0x1a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64,
|
||||||
|
0x65, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
|
||||||
|
0x82, 0x04, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x69, 0x6c, 0x6c, 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, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||||
|
0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||||
|
0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01,
|
||||||
|
0x28, 0x02, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 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, 0x1e, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72,
|
||||||
|
0x50, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x75, 0x73,
|
||||||
|
0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x61, 0x6e,
|
||||||
|
0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64,
|
||||||
|
0x12, 0x2c, 0x0a, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63,
|
||||||
|
0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x74, 0x6f, 0x74,
|
||||||
|
0x61, 0x6c, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3a,
|
||||||
|
0x0a, 0x18, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x65, 0x72, 0x63, 0x65,
|
||||||
|
0x6e, 0x74, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03,
|
||||||
|
0x52, 0x18, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x65, 0x72, 0x63, 0x65,
|
||||||
|
0x6e, 0x74, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x62, 0x61,
|
||||||
|
0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c,
|
||||||
|
0x65, 0x18, 0x0a, 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,
|
||||||
|
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, 0x28, 0x0a, 0x08, 0x75, 0x73,
|
||||||
|
0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70,
|
||||||
|
0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,
|
||||||
|
0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1c, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x1f, 0x20, 0x01,
|
||||||
|
0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x04, 0x70, 0x6c,
|
||||||
|
0x61, 0x6e, 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, 0x22, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b,
|
||||||
|
0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 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 (
|
||||||
|
file_models_model_server_bill_proto_rawDescOnce sync.Once
|
||||||
|
file_models_model_server_bill_proto_rawDescData = file_models_model_server_bill_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_models_model_server_bill_proto_rawDescGZIP() []byte {
|
||||||
|
file_models_model_server_bill_proto_rawDescOnce.Do(func() {
|
||||||
|
file_models_model_server_bill_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_server_bill_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_models_model_server_bill_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_models_model_server_bill_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
|
var file_models_model_server_bill_proto_goTypes = []interface{}{
|
||||||
|
(*ServerBill)(nil), // 0: pb.ServerBill
|
||||||
|
(*UserPlan)(nil), // 1: pb.UserPlan
|
||||||
|
(*Plan)(nil), // 2: pb.Plan
|
||||||
|
(*User)(nil), // 3: pb.User
|
||||||
|
(*Server)(nil), // 4: pb.Server
|
||||||
|
}
|
||||||
|
var file_models_model_server_bill_proto_depIdxs = []int32{
|
||||||
|
1, // 0: pb.ServerBill.userPlan:type_name -> pb.UserPlan
|
||||||
|
2, // 1: pb.ServerBill.plan:type_name -> pb.Plan
|
||||||
|
3, // 2: pb.ServerBill.user:type_name -> pb.User
|
||||||
|
4, // 3: pb.ServerBill.server:type_name -> pb.Server
|
||||||
|
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_bill_proto_init() }
|
||||||
|
func file_models_model_server_bill_proto_init() {
|
||||||
|
if File_models_model_server_bill_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file_models_model_plan_proto_init()
|
||||||
|
file_models_model_user_plan_proto_init()
|
||||||
|
file_models_model_user_proto_init()
|
||||||
|
file_models_model_server_proto_init()
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_models_model_server_bill_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*ServerBill); 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_bill_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 1,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_models_model_server_bill_proto_goTypes,
|
||||||
|
DependencyIndexes: file_models_model_server_bill_proto_depIdxs,
|
||||||
|
MessageInfos: file_models_model_server_bill_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_models_model_server_bill_proto = out.File
|
||||||
|
file_models_model_server_bill_proto_rawDesc = nil
|
||||||
|
file_models_model_server_bill_proto_goTypes = nil
|
||||||
|
file_models_model_server_bill_proto_depIdxs = nil
|
||||||
|
}
|
||||||
@@ -43,6 +43,7 @@ type User struct {
|
|||||||
IsVerified bool `protobuf:"varint,13,opt,name=isVerified,proto3" json:"isVerified,omitempty"`
|
IsVerified bool `protobuf:"varint,13,opt,name=isVerified,proto3" json:"isVerified,omitempty"`
|
||||||
IsRejected bool `protobuf:"varint,14,opt,name=isRejected,proto3" json:"isRejected,omitempty"`
|
IsRejected bool `protobuf:"varint,14,opt,name=isRejected,proto3" json:"isRejected,omitempty"`
|
||||||
RejectReason string `protobuf:"bytes,15,opt,name=rejectReason,proto3" json:"rejectReason,omitempty"`
|
RejectReason string `protobuf:"bytes,15,opt,name=rejectReason,proto3" json:"rejectReason,omitempty"`
|
||||||
|
IsDeleted bool `protobuf:"varint,16,opt,name=isDeleted,proto3" json:"isDeleted,omitempty"`
|
||||||
NodeCluster *NodeCluster `protobuf:"bytes,10,opt,name=nodeCluster,proto3" json:"nodeCluster,omitempty"`
|
NodeCluster *NodeCluster `protobuf:"bytes,10,opt,name=nodeCluster,proto3" json:"nodeCluster,omitempty"`
|
||||||
Features []*UserFeature `protobuf:"bytes,11,rep,name=features,proto3" json:"features,omitempty"`
|
Features []*UserFeature `protobuf:"bytes,11,rep,name=features,proto3" json:"features,omitempty"`
|
||||||
}
|
}
|
||||||
@@ -170,6 +171,13 @@ func (x *User) GetRejectReason() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *User) GetIsDeleted() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.IsDeleted
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
func (x *User) GetNodeCluster() *NodeCluster {
|
func (x *User) GetNodeCluster() *NodeCluster {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.NodeCluster
|
return x.NodeCluster
|
||||||
@@ -193,7 +201,7 @@ var file_models_model_user_proto_rawDesc = []byte{
|
|||||||
0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f,
|
0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f,
|
||||||
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65,
|
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, 0x22,
|
0x72, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
|
||||||
0xc0, 0x03, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
|
0xde, 0x03, 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,
|
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, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,
|
||||||
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65,
|
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65,
|
||||||
@@ -215,14 +223,15 @@ var file_models_model_user_proto_rawDesc = []byte{
|
|||||||
0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x22,
|
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,
|
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,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x61, 0x73,
|
||||||
0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
|
0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18,
|
||||||
0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64,
|
0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64,
|
||||||
0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
|
0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18,
|
||||||
0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65,
|
0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43,
|
||||||
0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65,
|
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73,
|
||||||
0x72, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72,
|
0x74, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18,
|
||||||
0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46,
|
||||||
0x6f, 0x33,
|
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 (
|
var (
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ type UserBill struct {
|
|||||||
IsPaid bool `protobuf:"varint,8,opt,name=isPaid,proto3" json:"isPaid,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"`
|
PaidAt int64 `protobuf:"varint,9,opt,name=paidAt,proto3" json:"paidAt,omitempty"`
|
||||||
Code string `protobuf:"bytes,10,opt,name=code,proto3" json:"code,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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UserBill) Reset() {
|
func (x *UserBill) Reset() {
|
||||||
@@ -144,13 +145,20 @@ func (x *UserBill) GetCode() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *UserBill) GetCanPay() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.CanPay
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
var File_models_model_user_bill_proto protoreflect.FileDescriptor
|
var File_models_model_user_bill_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_models_model_user_bill_proto_rawDesc = []byte{
|
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,
|
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,
|
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,
|
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, 0xfc, 0x01, 0x0a, 0x08,
|
0x5f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x02, 0x0a, 0x08,
|
||||||
0x55, 0x73, 0x65, 0x72, 0x42, 0x69, 0x6c, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
|
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,
|
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,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72,
|
||||||
@@ -166,8 +174,10 @@ var file_models_model_user_bill_proto_rawDesc = []byte{
|
|||||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x12, 0x16,
|
0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x12, 0x16,
|
||||||
0x0a, 0x06, 0x70, 0x61, 0x69, 0x64, 0x41, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
|
0x0a, 0x06, 0x70, 0x61, 0x69, 0x64, 0x41, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
|
||||||
0x70, 0x61, 0x69, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0a,
|
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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61,
|
||||||
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
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,
|
||||||
|
0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -938,6 +938,54 @@ func (x *CountAllEnabledAPINodesWithSSLCertIdRequest) GetSslCertId() int64 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 修改调试模式状态
|
||||||
|
type DebugAPINodeRequest struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Debug bool `protobuf:"varint,1,opt,name=debug,proto3" json:"debug,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DebugAPINodeRequest) Reset() {
|
||||||
|
*x = DebugAPINodeRequest{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_service_api_node_proto_msgTypes[17]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DebugAPINodeRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*DebugAPINodeRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *DebugAPINodeRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_service_api_node_proto_msgTypes[17]
|
||||||
|
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 DebugAPINodeRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*DebugAPINodeRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_service_api_node_proto_rawDescGZIP(), []int{17}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *DebugAPINodeRequest) GetDebug() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Debug
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
var File_service_api_node_proto protoreflect.FileDescriptor
|
var File_service_api_node_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_service_api_node_proto_rawDesc = []byte{
|
var file_service_api_node_proto_rawDesc = []byte{
|
||||||
@@ -1038,68 +1086,74 @@ var file_service_api_node_proto_rawDesc = []byte{
|
|||||||
0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71,
|
0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71,
|
||||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x73, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x49,
|
0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x73, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x49,
|
||||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x73, 0x6c, 0x43, 0x65, 0x72, 0x74,
|
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x73, 0x6c, 0x43, 0x65, 0x72, 0x74,
|
||||||
0x49, 0x64, 0x32, 0xbc, 0x07, 0x0a, 0x0e, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65,
|
0x49, 0x64, 0x22, 0x2b, 0x0a, 0x13, 0x44, 0x65, 0x62, 0x75, 0x67, 0x41, 0x50, 0x49, 0x4e, 0x6f,
|
||||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
|
0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62,
|
||||||
0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61,
|
0x75, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x32,
|
||||||
0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
0xf5, 0x07, 0x0a, 0x0e, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||||
0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e,
|
0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e,
|
||||||
0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x75,
|
0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
|
||||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70,
|
0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e,
|
||||||
0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52,
|
0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65,
|
||||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53,
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61,
|
||||||
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55,
|
||||||
0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c,
|
0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||||
0x65, 0x74, 0x65, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63,
|
||||||
0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73,
|
0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x50, 0x49,
|
||||||
0x73, 0x12, 0x5f, 0x0a, 0x16, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62,
|
0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||||
0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62,
|
0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e,
|
||||||
|
0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x5f,
|
||||||
|
0x0a, 0x16, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||||
|
0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
|
||||||
|
0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e,
|
||||||
|
0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62,
|
||||||
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41,
|
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41,
|
||||||
0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22,
|
0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||||
0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c,
|
0x53, 0x0a, 0x17, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c,
|
||||||
0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e,
|
||||||
0x73, 0x65, 0x12, 0x53, 0x0a, 0x17, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e,
|
|
||||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x22, 0x2e,
|
|
||||||
0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c,
|
|
||||||
0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
|
||||||
0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52,
|
|
||||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x1c, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
|
||||||
0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x41,
|
|
||||||
0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75,
|
|
||||||
0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f,
|
|
||||||
0x6e, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
|
||||||
0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65,
|
|
||||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e,
|
|
||||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1e, 0x2e,
|
|
||||||
0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50,
|
|
||||||
0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e,
|
|
||||||
0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50,
|
|
||||||
0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53,
|
|
||||||
0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49,
|
|
||||||
0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
|
|
||||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75,
|
|
||||||
0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
|
|
||||||
0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
|
||||||
0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65,
|
|
||||||
0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
|
||||||
0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e,
|
|
||||||
0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52,
|
|
||||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
|
|
||||||
0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65,
|
|
||||||
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a,
|
|
||||||
0x12, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e,
|
|
||||||
0x6f, 0x64, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72,
|
|
||||||
0x72, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
|
||||||
0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72,
|
|
||||||
0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
|
||||||
0x73, 0x65, 0x12, 0x6d, 0x0a, 0x24, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e,
|
|
||||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x57, 0x69, 0x74,
|
|
||||||
0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x2e, 0x70, 0x62, 0x2e,
|
|
||||||
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41,
|
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41,
|
||||||
0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65,
|
0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14,
|
||||||
0x72, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62,
|
0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x1c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c,
|
||||||
0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x41, 0x50, 0x49, 0x4e,
|
||||||
0x33,
|
0x6f, 0x64, 0x65, 0x73, 0x12, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41,
|
||||||
|
0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x6e, 0x64, 0x4f, 0x6e, 0x41, 0x50,
|
||||||
|
0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e,
|
||||||
|
0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
|
0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c,
|
||||||
|
0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e,
|
||||||
|
0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f,
|
||||||
|
0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x62, 0x2e,
|
||||||
|
0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f,
|
||||||
|
0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x66,
|
||||||
|
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64,
|
||||||
|
0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
|
||||||
|
0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
|
0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||||
|
0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
|
0x12, 0x68, 0x0a, 0x19, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41,
|
||||||
|
0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e,
|
||||||
|
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x50,
|
||||||
|
0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
|
||||||
|
0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72,
|
||||||
|
0x72, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69,
|
||||||
|
0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x66, 0x69,
|
||||||
|
0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65,
|
||||||
|
0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e,
|
||||||
|
0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||||
|
0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74,
|
||||||
|
0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||||
|
0x6d, 0x0a, 0x24, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c,
|
||||||
|
0x65, 0x64, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53,
|
||||||
|
0x4c, 0x43, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75,
|
||||||
|
0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x41, 0x50, 0x49, 0x4e,
|
||||||
|
0x6f, 0x64, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4c, 0x43, 0x65, 0x72, 0x74, 0x49,
|
||||||
|
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50,
|
||||||
|
0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37,
|
||||||
|
0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x17,
|
||||||
|
0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65,
|
||||||
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43,
|
||||||
|
0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
|
||||||
|
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -1114,7 +1168,7 @@ func file_service_api_node_proto_rawDescGZIP() []byte {
|
|||||||
return file_service_api_node_proto_rawDescData
|
return file_service_api_node_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_service_api_node_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
|
var file_service_api_node_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
|
||||||
var file_service_api_node_proto_goTypes = []interface{}{
|
var file_service_api_node_proto_goTypes = []interface{}{
|
||||||
(*CreateAPINodeRequest)(nil), // 0: pb.CreateAPINodeRequest
|
(*CreateAPINodeRequest)(nil), // 0: pb.CreateAPINodeRequest
|
||||||
(*CreateAPINodeResponse)(nil), // 1: pb.CreateAPINodeResponse
|
(*CreateAPINodeResponse)(nil), // 1: pb.CreateAPINodeResponse
|
||||||
@@ -1133,15 +1187,16 @@ var file_service_api_node_proto_goTypes = []interface{}{
|
|||||||
(*FindCurrentAPINodeRequest)(nil), // 14: pb.FindCurrentAPINodeRequest
|
(*FindCurrentAPINodeRequest)(nil), // 14: pb.FindCurrentAPINodeRequest
|
||||||
(*FindCurrentAPINodeResponse)(nil), // 15: pb.FindCurrentAPINodeResponse
|
(*FindCurrentAPINodeResponse)(nil), // 15: pb.FindCurrentAPINodeResponse
|
||||||
(*CountAllEnabledAPINodesWithSSLCertIdRequest)(nil), // 16: pb.CountAllEnabledAPINodesWithSSLCertIdRequest
|
(*CountAllEnabledAPINodesWithSSLCertIdRequest)(nil), // 16: pb.CountAllEnabledAPINodesWithSSLCertIdRequest
|
||||||
(*APINode)(nil), // 17: pb.APINode
|
(*DebugAPINodeRequest)(nil), // 17: pb.DebugAPINodeRequest
|
||||||
(*RPCSuccess)(nil), // 18: pb.RPCSuccess
|
(*APINode)(nil), // 18: pb.APINode
|
||||||
(*RPCCountResponse)(nil), // 19: pb.RPCCountResponse
|
(*RPCSuccess)(nil), // 19: pb.RPCSuccess
|
||||||
|
(*RPCCountResponse)(nil), // 20: pb.RPCCountResponse
|
||||||
}
|
}
|
||||||
var file_service_api_node_proto_depIdxs = []int32{
|
var file_service_api_node_proto_depIdxs = []int32{
|
||||||
17, // 0: pb.FindAllEnabledAPINodesResponse.apiNodes:type_name -> pb.APINode
|
18, // 0: pb.FindAllEnabledAPINodesResponse.apiNodes:type_name -> pb.APINode
|
||||||
17, // 1: pb.ListEnabledAPINodesResponse.apiNodes:type_name -> pb.APINode
|
18, // 1: pb.ListEnabledAPINodesResponse.apiNodes:type_name -> pb.APINode
|
||||||
17, // 2: pb.FindEnabledAPINodeResponse.apiNode:type_name -> pb.APINode
|
18, // 2: pb.FindEnabledAPINodeResponse.apiNode:type_name -> pb.APINode
|
||||||
17, // 3: pb.FindCurrentAPINodeResponse.apiNode:type_name -> pb.APINode
|
18, // 3: pb.FindCurrentAPINodeResponse.apiNode:type_name -> pb.APINode
|
||||||
0, // 4: pb.APINodeService.createAPINode:input_type -> pb.CreateAPINodeRequest
|
0, // 4: pb.APINodeService.createAPINode:input_type -> pb.CreateAPINodeRequest
|
||||||
2, // 5: pb.APINodeService.updateAPINode:input_type -> pb.UpdateAPINodeRequest
|
2, // 5: pb.APINodeService.updateAPINode:input_type -> pb.UpdateAPINodeRequest
|
||||||
3, // 6: pb.APINodeService.deleteAPINode:input_type -> pb.DeleteAPINodeRequest
|
3, // 6: pb.APINodeService.deleteAPINode:input_type -> pb.DeleteAPINodeRequest
|
||||||
@@ -1153,19 +1208,21 @@ var file_service_api_node_proto_depIdxs = []int32{
|
|||||||
12, // 12: pb.APINodeService.findCurrentAPINodeVersion:input_type -> pb.FindCurrentAPINodeVersionRequest
|
12, // 12: pb.APINodeService.findCurrentAPINodeVersion:input_type -> pb.FindCurrentAPINodeVersionRequest
|
||||||
14, // 13: pb.APINodeService.findCurrentAPINode:input_type -> pb.FindCurrentAPINodeRequest
|
14, // 13: pb.APINodeService.findCurrentAPINode:input_type -> pb.FindCurrentAPINodeRequest
|
||||||
16, // 14: pb.APINodeService.countAllEnabledAPINodesWithSSLCertId:input_type -> pb.CountAllEnabledAPINodesWithSSLCertIdRequest
|
16, // 14: pb.APINodeService.countAllEnabledAPINodesWithSSLCertId:input_type -> pb.CountAllEnabledAPINodesWithSSLCertIdRequest
|
||||||
1, // 15: pb.APINodeService.createAPINode:output_type -> pb.CreateAPINodeResponse
|
17, // 15: pb.APINodeService.debugAPINode:input_type -> pb.DebugAPINodeRequest
|
||||||
18, // 16: pb.APINodeService.updateAPINode:output_type -> pb.RPCSuccess
|
1, // 16: pb.APINodeService.createAPINode:output_type -> pb.CreateAPINodeResponse
|
||||||
18, // 17: pb.APINodeService.deleteAPINode:output_type -> pb.RPCSuccess
|
19, // 17: pb.APINodeService.updateAPINode:output_type -> pb.RPCSuccess
|
||||||
5, // 18: pb.APINodeService.findAllEnabledAPINodes:output_type -> pb.FindAllEnabledAPINodesResponse
|
19, // 18: pb.APINodeService.deleteAPINode:output_type -> pb.RPCSuccess
|
||||||
19, // 19: pb.APINodeService.countAllEnabledAPINodes:output_type -> pb.RPCCountResponse
|
5, // 19: pb.APINodeService.findAllEnabledAPINodes:output_type -> pb.FindAllEnabledAPINodesResponse
|
||||||
19, // 20: pb.APINodeService.countAllEnabledAndOnAPINodes:output_type -> pb.RPCCountResponse
|
20, // 20: pb.APINodeService.countAllEnabledAPINodes:output_type -> pb.RPCCountResponse
|
||||||
9, // 21: pb.APINodeService.listEnabledAPINodes:output_type -> pb.ListEnabledAPINodesResponse
|
20, // 21: pb.APINodeService.countAllEnabledAndOnAPINodes:output_type -> pb.RPCCountResponse
|
||||||
11, // 22: pb.APINodeService.findEnabledAPINode:output_type -> pb.FindEnabledAPINodeResponse
|
9, // 22: pb.APINodeService.listEnabledAPINodes:output_type -> pb.ListEnabledAPINodesResponse
|
||||||
13, // 23: pb.APINodeService.findCurrentAPINodeVersion:output_type -> pb.FindCurrentAPINodeVersionResponse
|
11, // 23: pb.APINodeService.findEnabledAPINode:output_type -> pb.FindEnabledAPINodeResponse
|
||||||
15, // 24: pb.APINodeService.findCurrentAPINode:output_type -> pb.FindCurrentAPINodeResponse
|
13, // 24: pb.APINodeService.findCurrentAPINodeVersion:output_type -> pb.FindCurrentAPINodeVersionResponse
|
||||||
19, // 25: pb.APINodeService.countAllEnabledAPINodesWithSSLCertId:output_type -> pb.RPCCountResponse
|
15, // 25: pb.APINodeService.findCurrentAPINode:output_type -> pb.FindCurrentAPINodeResponse
|
||||||
15, // [15:26] is the sub-list for method output_type
|
20, // 26: pb.APINodeService.countAllEnabledAPINodesWithSSLCertId:output_type -> pb.RPCCountResponse
|
||||||
4, // [4:15] is the sub-list for method input_type
|
19, // 27: pb.APINodeService.debugAPINode:output_type -> pb.RPCSuccess
|
||||||
|
16, // [16:28] is the sub-list for method output_type
|
||||||
|
4, // [4:16] 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 type_name
|
||||||
4, // [4:4] is the sub-list for extension extendee
|
4, // [4:4] is the sub-list for extension extendee
|
||||||
0, // [0:4] is the sub-list for field type_name
|
0, // [0:4] is the sub-list for field type_name
|
||||||
@@ -1383,6 +1440,18 @@ func file_service_api_node_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_service_api_node_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*DebugAPINodeRequest); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
@@ -1390,7 +1459,7 @@ func file_service_api_node_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_service_api_node_proto_rawDesc,
|
RawDescriptor: file_service_api_node_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 17,
|
NumMessages: 18,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
@@ -1438,6 +1507,8 @@ type APINodeServiceClient interface {
|
|||||||
FindCurrentAPINode(ctx context.Context, in *FindCurrentAPINodeRequest, opts ...grpc.CallOption) (*FindCurrentAPINodeResponse, error)
|
FindCurrentAPINode(ctx context.Context, in *FindCurrentAPINodeRequest, opts ...grpc.CallOption) (*FindCurrentAPINodeResponse, error)
|
||||||
// 计算使用某个SSL证书的API节点数量
|
// 计算使用某个SSL证书的API节点数量
|
||||||
CountAllEnabledAPINodesWithSSLCertId(ctx context.Context, in *CountAllEnabledAPINodesWithSSLCertIdRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
|
CountAllEnabledAPINodesWithSSLCertId(ctx context.Context, in *CountAllEnabledAPINodesWithSSLCertIdRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
|
||||||
|
// 修改调试模式状态
|
||||||
|
DebugAPINode(ctx context.Context, in *DebugAPINodeRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type aPINodeServiceClient struct {
|
type aPINodeServiceClient struct {
|
||||||
@@ -1547,6 +1618,15 @@ func (c *aPINodeServiceClient) CountAllEnabledAPINodesWithSSLCertId(ctx context.
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *aPINodeServiceClient) DebugAPINode(ctx context.Context, in *DebugAPINodeRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||||
|
out := new(RPCSuccess)
|
||||||
|
err := c.cc.Invoke(ctx, "/pb.APINodeService/debugAPINode", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// APINodeServiceServer is the server API for APINodeService service.
|
// APINodeServiceServer is the server API for APINodeService service.
|
||||||
type APINodeServiceServer interface {
|
type APINodeServiceServer interface {
|
||||||
// 创建API节点
|
// 创建API节点
|
||||||
@@ -1571,6 +1651,8 @@ type APINodeServiceServer interface {
|
|||||||
FindCurrentAPINode(context.Context, *FindCurrentAPINodeRequest) (*FindCurrentAPINodeResponse, error)
|
FindCurrentAPINode(context.Context, *FindCurrentAPINodeRequest) (*FindCurrentAPINodeResponse, error)
|
||||||
// 计算使用某个SSL证书的API节点数量
|
// 计算使用某个SSL证书的API节点数量
|
||||||
CountAllEnabledAPINodesWithSSLCertId(context.Context, *CountAllEnabledAPINodesWithSSLCertIdRequest) (*RPCCountResponse, error)
|
CountAllEnabledAPINodesWithSSLCertId(context.Context, *CountAllEnabledAPINodesWithSSLCertIdRequest) (*RPCCountResponse, error)
|
||||||
|
// 修改调试模式状态
|
||||||
|
DebugAPINode(context.Context, *DebugAPINodeRequest) (*RPCSuccess, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnimplementedAPINodeServiceServer can be embedded to have forward compatible implementations.
|
// UnimplementedAPINodeServiceServer can be embedded to have forward compatible implementations.
|
||||||
@@ -1610,6 +1692,9 @@ func (*UnimplementedAPINodeServiceServer) FindCurrentAPINode(context.Context, *F
|
|||||||
func (*UnimplementedAPINodeServiceServer) CountAllEnabledAPINodesWithSSLCertId(context.Context, *CountAllEnabledAPINodesWithSSLCertIdRequest) (*RPCCountResponse, error) {
|
func (*UnimplementedAPINodeServiceServer) CountAllEnabledAPINodesWithSSLCertId(context.Context, *CountAllEnabledAPINodesWithSSLCertIdRequest) (*RPCCountResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledAPINodesWithSSLCertId not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledAPINodesWithSSLCertId not implemented")
|
||||||
}
|
}
|
||||||
|
func (*UnimplementedAPINodeServiceServer) DebugAPINode(context.Context, *DebugAPINodeRequest) (*RPCSuccess, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method DebugAPINode not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
func RegisterAPINodeServiceServer(s *grpc.Server, srv APINodeServiceServer) {
|
func RegisterAPINodeServiceServer(s *grpc.Server, srv APINodeServiceServer) {
|
||||||
s.RegisterService(&_APINodeService_serviceDesc, srv)
|
s.RegisterService(&_APINodeService_serviceDesc, srv)
|
||||||
@@ -1813,6 +1898,24 @@ func _APINodeService_CountAllEnabledAPINodesWithSSLCertId_Handler(srv interface{
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _APINodeService_DebugAPINode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DebugAPINodeRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(APINodeServiceServer).DebugAPINode(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/pb.APINodeService/DebugAPINode",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(APINodeServiceServer).DebugAPINode(ctx, req.(*DebugAPINodeRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
var _APINodeService_serviceDesc = grpc.ServiceDesc{
|
var _APINodeService_serviceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "pb.APINodeService",
|
ServiceName: "pb.APINodeService",
|
||||||
HandlerType: (*APINodeServiceServer)(nil),
|
HandlerType: (*APINodeServiceServer)(nil),
|
||||||
@@ -1861,6 +1964,10 @@ var _APINodeService_serviceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "countAllEnabledAPINodesWithSSLCertId",
|
MethodName: "countAllEnabledAPINodesWithSSLCertId",
|
||||||
Handler: _APINodeService_CountAllEnabledAPINodesWithSSLCertId_Handler,
|
Handler: _APINodeService_CountAllEnabledAPINodesWithSSLCertId_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "debugAPINode",
|
||||||
|
Handler: _APINodeService_DebugAPINode_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "service_api_node.proto",
|
Metadata: "service_api_node.proto",
|
||||||
|
|||||||
@@ -35,15 +35,16 @@ type CreatePlanRequest struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||||
ClusterId int64 `protobuf:"varint,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
|
ClusterId int64 `protobuf:"varint,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
|
||||||
TrafficLimitJSON []byte `protobuf:"bytes,3,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"`
|
TrafficLimitJSON []byte `protobuf:"bytes,3,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"`
|
||||||
FeaturesJSON []byte `protobuf:"bytes,4,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"`
|
FeaturesJSON []byte `protobuf:"bytes,4,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"`
|
||||||
PriceType string `protobuf:"bytes,5,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
PriceType string `protobuf:"bytes,5,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
||||||
TrafficPriceJSON []byte `protobuf:"bytes,6,opt,name=trafficPriceJSON,proto3" json:"trafficPriceJSON,omitempty"`
|
TrafficPriceJSON []byte `protobuf:"bytes,6,opt,name=trafficPriceJSON,proto3" json:"trafficPriceJSON,omitempty"`
|
||||||
MonthlyPrice float32 `protobuf:"fixed32,7,opt,name=monthlyPrice,proto3" json:"monthlyPrice,omitempty"`
|
BandwidthPriceJSON []byte `protobuf:"bytes,10,opt,name=bandwidthPriceJSON,proto3" json:"bandwidthPriceJSON,omitempty"`
|
||||||
SeasonallyPrice float32 `protobuf:"fixed32,8,opt,name=seasonallyPrice,proto3" json:"seasonallyPrice,omitempty"`
|
MonthlyPrice float32 `protobuf:"fixed32,7,opt,name=monthlyPrice,proto3" json:"monthlyPrice,omitempty"`
|
||||||
YearlyPrice float32 `protobuf:"fixed32,9,opt,name=yearlyPrice,proto3" json:"yearlyPrice,omitempty"`
|
SeasonallyPrice float32 `protobuf:"fixed32,8,opt,name=seasonallyPrice,proto3" json:"seasonallyPrice,omitempty"`
|
||||||
|
YearlyPrice float32 `protobuf:"fixed32,9,opt,name=yearlyPrice,proto3" json:"yearlyPrice,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CreatePlanRequest) Reset() {
|
func (x *CreatePlanRequest) Reset() {
|
||||||
@@ -120,6 +121,13 @@ func (x *CreatePlanRequest) GetTrafficPriceJSON() []byte {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *CreatePlanRequest) GetBandwidthPriceJSON() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.BandwidthPriceJSON
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (x *CreatePlanRequest) GetMonthlyPrice() float32 {
|
func (x *CreatePlanRequest) GetMonthlyPrice() float32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.MonthlyPrice
|
return x.MonthlyPrice
|
||||||
@@ -194,17 +202,18 @@ type UpdatePlanRequest struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
PlanId int64 `protobuf:"varint,1,opt,name=planId,proto3" json:"planId,omitempty"`
|
PlanId int64 `protobuf:"varint,1,opt,name=planId,proto3" json:"planId,omitempty"`
|
||||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,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"`
|
IsOn bool `protobuf:"varint,3,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||||
ClusterId int64 `protobuf:"varint,4,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
|
ClusterId int64 `protobuf:"varint,4,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
|
||||||
TrafficLimitJSON []byte `protobuf:"bytes,5,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"`
|
TrafficLimitJSON []byte `protobuf:"bytes,5,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"`
|
||||||
FeaturesJSON []byte `protobuf:"bytes,6,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"`
|
FeaturesJSON []byte `protobuf:"bytes,6,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"`
|
||||||
PriceType string `protobuf:"bytes,7,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
PriceType string `protobuf:"bytes,7,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
||||||
TrafficPriceJSON []byte `protobuf:"bytes,8,opt,name=trafficPriceJSON,proto3" json:"trafficPriceJSON,omitempty"`
|
TrafficPriceJSON []byte `protobuf:"bytes,8,opt,name=trafficPriceJSON,proto3" json:"trafficPriceJSON,omitempty"`
|
||||||
MonthlyPrice float32 `protobuf:"fixed32,9,opt,name=monthlyPrice,proto3" json:"monthlyPrice,omitempty"`
|
BandwidthPriceJSON []byte `protobuf:"bytes,12,opt,name=bandwidthPriceJSON,proto3" json:"bandwidthPriceJSON,omitempty"`
|
||||||
SeasonallyPrice float32 `protobuf:"fixed32,10,opt,name=seasonallyPrice,proto3" json:"seasonallyPrice,omitempty"`
|
MonthlyPrice float32 `protobuf:"fixed32,9,opt,name=monthlyPrice,proto3" json:"monthlyPrice,omitempty"`
|
||||||
YearlyPrice float32 `protobuf:"fixed32,11,opt,name=yearlyPrice,proto3" json:"yearlyPrice,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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UpdatePlanRequest) Reset() {
|
func (x *UpdatePlanRequest) Reset() {
|
||||||
@@ -295,6 +304,13 @@ func (x *UpdatePlanRequest) GetTrafficPriceJSON() []byte {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *UpdatePlanRequest) GetBandwidthPriceJSON() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.BandwidthPriceJSON
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (x *UpdatePlanRequest) GetMonthlyPrice() float32 {
|
func (x *UpdatePlanRequest) GetMonthlyPrice() float32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.MonthlyPrice
|
return x.MonthlyPrice
|
||||||
@@ -656,7 +672,7 @@ var file_service_plan_proto_rawDesc = []byte{
|
|||||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73,
|
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73,
|
||||||
0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x6f, 0x1a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65,
|
0x6f, 0x1a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65,
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x02, 0x0a,
|
0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x02, 0x0a,
|
||||||
0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||||
0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65,
|
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65,
|
||||||
@@ -670,7 +686,10 @@ var file_service_plan_proto_rawDesc = []byte{
|
|||||||
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79,
|
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79,
|
||||||
0x70, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69,
|
0x70, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69,
|
||||||
0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, 0x72,
|
0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, 0x72,
|
||||||
0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x22,
|
0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2e,
|
||||||
|
0x0a, 0x12, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x72, 0x69, 0x63, 0x65,
|
||||||
|
0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0a, 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, 0x07,
|
0x0a, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07,
|
||||||
0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69,
|
0x20, 0x01, 0x28, 0x02, 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,
|
0x63, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79,
|
||||||
@@ -680,7 +699,7 @@ var file_service_plan_proto_rawDesc = []byte{
|
|||||||
0x02, 0x52, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x2c,
|
0x02, 0x52, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x2c,
|
||||||
0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x01,
|
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x01,
|
||||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x22, 0xfb, 0x02, 0x0a,
|
0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x22, 0xab, 0x03, 0x0a,
|
||||||
0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||||
0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||||
0x28, 0x03, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
|
0x28, 0x03, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
|
||||||
@@ -697,7 +716,10 @@ var file_service_plan_proto_rawDesc = []byte{
|
|||||||
0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a,
|
0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a,
|
||||||
0x0a, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53,
|
0x0a, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53,
|
||||||
0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69,
|
0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69,
|
||||||
0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x6f,
|
0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2e, 0x0a, 0x12, 0x62, 0x61,
|
||||||
|
0x6e, 0x64, 0x77, 0x69, 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,
|
0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02,
|
||||||
0x52, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28,
|
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,
|
0x0a, 0x0f, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
463
pkg/rpc/pb/service_server_bill.pb.go
Normal file
463
pkg/rpc/pb/service_server_bill.pb.go
Normal file
@@ -0,0 +1,463 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.25.0
|
||||||
|
// protoc v3.12.3
|
||||||
|
// source: service_server_bill.proto
|
||||||
|
|
||||||
|
package pb
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
proto "github.com/golang/protobuf/proto"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
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 CountAllServerBillsRequest struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
|
||||||
|
Month string `protobuf:"bytes,2,opt,name=month,proto3" json:"month,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CountAllServerBillsRequest) Reset() {
|
||||||
|
*x = CountAllServerBillsRequest{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_service_server_bill_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CountAllServerBillsRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*CountAllServerBillsRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *CountAllServerBillsRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_service_server_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 CountAllServerBillsRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*CountAllServerBillsRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_service_server_bill_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CountAllServerBillsRequest) GetUserId() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.UserId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *CountAllServerBillsRequest) GetMonth() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Month
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询服务账单列表
|
||||||
|
type ListServerBillsRequest struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
|
||||||
|
Month string `protobuf:"bytes,2,opt,name=month,proto3" json:"month,omitempty"`
|
||||||
|
Offset int64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||||
|
Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListServerBillsRequest) Reset() {
|
||||||
|
*x = ListServerBillsRequest{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_service_server_bill_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListServerBillsRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ListServerBillsRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ListServerBillsRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_service_server_bill_proto_msgTypes[1]
|
||||||
|
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 ListServerBillsRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ListServerBillsRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_service_server_bill_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListServerBillsRequest) GetUserId() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.UserId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListServerBillsRequest) GetMonth() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Month
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListServerBillsRequest) GetOffset() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Offset
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListServerBillsRequest) GetSize() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Size
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListServerBillsResponse struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
ServerBills []*ServerBill `protobuf:"bytes,1,rep,name=serverBills,proto3" json:"serverBills,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListServerBillsResponse) Reset() {
|
||||||
|
*x = ListServerBillsResponse{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_service_server_bill_proto_msgTypes[2]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListServerBillsResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ListServerBillsResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ListServerBillsResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_service_server_bill_proto_msgTypes[2]
|
||||||
|
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 ListServerBillsResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ListServerBillsResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_service_server_bill_proto_rawDescGZIP(), []int{2}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListServerBillsResponse) GetServerBills() []*ServerBill {
|
||||||
|
if x != nil {
|
||||||
|
return x.ServerBills
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_service_server_bill_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_service_server_bill_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x19, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||||
|
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, 0x73, 0x65,
|
||||||
|
0x72, 0x76, 0x65, 0x72, 0x5f, 0x62, 0x69, 0x6c, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
||||||
|
0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x73, 0x73,
|
||||||
|
0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x1a, 0x43, 0x6f,
|
||||||
|
0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x69, 0x6c, 0x6c,
|
||||||
|
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72,
|
||||||
|
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
|
||||||
|
0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
|
0x05, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x22, 0x72, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65,
|
||||||
|
0x72, 0x76, 0x65, 0x72, 0x42, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
|
0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
|
||||||
|
0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x6e, 0x74,
|
||||||
|
0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x12, 0x16,
|
||||||
|
0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
|
||||||
|
0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04,
|
||||||
|
0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x4b, 0x0a, 0x17, 0x4c, 0x69,
|
||||||
|
0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x73,
|
||||||
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42,
|
||||||
|
0x69, 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e,
|
||||||
|
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x69, 0x6c, 0x6c, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76,
|
||||||
|
0x65, 0x72, 0x42, 0x69, 0x6c, 0x6c, 0x73, 0x32, 0xac, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76,
|
||||||
|
0x65, 0x72, 0x42, 0x69, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a,
|
||||||
|
0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42,
|
||||||
|
0x69, 0x6c, 0x6c, 0x73, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41,
|
||||||
|
0x6c, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x71,
|
||||||
|
0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75,
|
||||||
|
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x6c, 0x69,
|
||||||
|
0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x69, 0x6c, 0x6c, 0x73, 0x12, 0x1a, 0x2e,
|
||||||
|
0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x69, 0x6c,
|
||||||
|
0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x4c,
|
||||||
|
0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65,
|
||||||
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_service_server_bill_proto_rawDescOnce sync.Once
|
||||||
|
file_service_server_bill_proto_rawDescData = file_service_server_bill_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_service_server_bill_proto_rawDescGZIP() []byte {
|
||||||
|
file_service_server_bill_proto_rawDescOnce.Do(func() {
|
||||||
|
file_service_server_bill_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_server_bill_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_service_server_bill_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_service_server_bill_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||||
|
var file_service_server_bill_proto_goTypes = []interface{}{
|
||||||
|
(*CountAllServerBillsRequest)(nil), // 0: pb.CountAllServerBillsRequest
|
||||||
|
(*ListServerBillsRequest)(nil), // 1: pb.ListServerBillsRequest
|
||||||
|
(*ListServerBillsResponse)(nil), // 2: pb.ListServerBillsResponse
|
||||||
|
(*ServerBill)(nil), // 3: pb.ServerBill
|
||||||
|
(*RPCCountResponse)(nil), // 4: pb.RPCCountResponse
|
||||||
|
}
|
||||||
|
var file_service_server_bill_proto_depIdxs = []int32{
|
||||||
|
3, // 0: pb.ListServerBillsResponse.serverBills:type_name -> pb.ServerBill
|
||||||
|
0, // 1: pb.ServerBillService.countAllServerBills:input_type -> pb.CountAllServerBillsRequest
|
||||||
|
1, // 2: pb.ServerBillService.listServerBills:input_type -> pb.ListServerBillsRequest
|
||||||
|
4, // 3: pb.ServerBillService.countAllServerBills:output_type -> pb.RPCCountResponse
|
||||||
|
2, // 4: pb.ServerBillService.listServerBills:output_type -> pb.ListServerBillsResponse
|
||||||
|
3, // [3:5] is the sub-list for method output_type
|
||||||
|
1, // [1:3] 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_service_server_bill_proto_init() }
|
||||||
|
func file_service_server_bill_proto_init() {
|
||||||
|
if File_service_server_bill_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file_models_model_server_bill_proto_init()
|
||||||
|
file_models_rpc_messages_proto_init()
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_service_server_bill_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*CountAllServerBillsRequest); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_service_server_bill_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*ListServerBillsRequest); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_service_server_bill_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*ListServerBillsResponse); 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_service_server_bill_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 3,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 1,
|
||||||
|
},
|
||||||
|
GoTypes: file_service_server_bill_proto_goTypes,
|
||||||
|
DependencyIndexes: file_service_server_bill_proto_depIdxs,
|
||||||
|
MessageInfos: file_service_server_bill_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_service_server_bill_proto = out.File
|
||||||
|
file_service_server_bill_proto_rawDesc = nil
|
||||||
|
file_service_server_bill_proto_goTypes = nil
|
||||||
|
file_service_server_bill_proto_depIdxs = nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
var _ context.Context
|
||||||
|
var _ grpc.ClientConnInterface
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
const _ = grpc.SupportPackageIsVersion6
|
||||||
|
|
||||||
|
// ServerBillServiceClient is the client API for ServerBillService service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||||
|
type ServerBillServiceClient interface {
|
||||||
|
// 查询服务账单数量
|
||||||
|
CountAllServerBills(ctx context.Context, in *CountAllServerBillsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
|
||||||
|
// 查询服务账单列表
|
||||||
|
ListServerBills(ctx context.Context, in *ListServerBillsRequest, opts ...grpc.CallOption) (*ListServerBillsResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type serverBillServiceClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewServerBillServiceClient(cc grpc.ClientConnInterface) ServerBillServiceClient {
|
||||||
|
return &serverBillServiceClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *serverBillServiceClient) CountAllServerBills(ctx context.Context, in *CountAllServerBillsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
|
||||||
|
out := new(RPCCountResponse)
|
||||||
|
err := c.cc.Invoke(ctx, "/pb.ServerBillService/countAllServerBills", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *serverBillServiceClient) ListServerBills(ctx context.Context, in *ListServerBillsRequest, opts ...grpc.CallOption) (*ListServerBillsResponse, error) {
|
||||||
|
out := new(ListServerBillsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, "/pb.ServerBillService/listServerBills", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ServerBillServiceServer is the server API for ServerBillService service.
|
||||||
|
type ServerBillServiceServer interface {
|
||||||
|
// 查询服务账单数量
|
||||||
|
CountAllServerBills(context.Context, *CountAllServerBillsRequest) (*RPCCountResponse, error)
|
||||||
|
// 查询服务账单列表
|
||||||
|
ListServerBills(context.Context, *ListServerBillsRequest) (*ListServerBillsResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedServerBillServiceServer can be embedded to have forward compatible implementations.
|
||||||
|
type UnimplementedServerBillServiceServer struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UnimplementedServerBillServiceServer) CountAllServerBills(context.Context, *CountAllServerBillsRequest) (*RPCCountResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method CountAllServerBills not implemented")
|
||||||
|
}
|
||||||
|
func (*UnimplementedServerBillServiceServer) ListServerBills(context.Context, *ListServerBillsRequest) (*ListServerBillsResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ListServerBills not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterServerBillServiceServer(s *grpc.Server, srv ServerBillServiceServer) {
|
||||||
|
s.RegisterService(&_ServerBillService_serviceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ServerBillService_CountAllServerBills_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(CountAllServerBillsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ServerBillServiceServer).CountAllServerBills(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/pb.ServerBillService/CountAllServerBills",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ServerBillServiceServer).CountAllServerBills(ctx, req.(*CountAllServerBillsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ServerBillService_ListServerBills_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ListServerBillsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ServerBillServiceServer).ListServerBills(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/pb.ServerBillService/ListServerBills",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ServerBillServiceServer).ListServerBills(ctx, req.(*ListServerBillsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
var _ServerBillService_serviceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "pb.ServerBillService",
|
||||||
|
HandlerType: (*ServerBillServiceServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "countAllServerBills",
|
||||||
|
Handler: _ServerBillService_CountAllServerBills_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "listServerBills",
|
||||||
|
Handler: _ServerBillService_ListServerBills_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "service_server_bill.proto",
|
||||||
|
}
|
||||||
30
pkg/rpc/protos/api_method_stat_service.proto
Normal file
30
pkg/rpc/protos/api_method_stat_service.proto
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
option go_package = "./pb";
|
||||||
|
|
||||||
|
package pb;
|
||||||
|
|
||||||
|
import "models/model_api_method_stat.proto";
|
||||||
|
import "models/rpc_messages.proto";
|
||||||
|
|
||||||
|
// API方法统计服务
|
||||||
|
service APIMethodStatService {
|
||||||
|
// 查找某天的统计
|
||||||
|
rpc findAPIMethodStatsWithDay(FindAPIMethodStatsWithDayRequest) returns (FindAPIMethodStatsWithDayResponse);
|
||||||
|
|
||||||
|
// 检查是否有统计数据
|
||||||
|
rpc countAPIMethodStatsWithDay(CountAPIMethodStatsWithDayRequest) returns (RPCCountResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查找某天的统计
|
||||||
|
message FindAPIMethodStatsWithDayRequest {
|
||||||
|
string day = 1; // YYYYMMDD
|
||||||
|
}
|
||||||
|
|
||||||
|
message FindAPIMethodStatsWithDayResponse {
|
||||||
|
repeated APIMethodStat apiMethodStats = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否有统计数据
|
||||||
|
message CountAPIMethodStatsWithDayRequest {
|
||||||
|
string day = 1; // YYYYMMDD
|
||||||
|
}
|
||||||
18
pkg/rpc/protos/models/model_api_method_stat.proto
Normal file
18
pkg/rpc/protos/models/model_api_method_stat.proto
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
option go_package = "./pb";
|
||||||
|
|
||||||
|
package pb;
|
||||||
|
|
||||||
|
import "models/model_api_node.proto";
|
||||||
|
|
||||||
|
message APIMethodStat {
|
||||||
|
int64 id = 1;
|
||||||
|
int64 apiNodeId = 2;
|
||||||
|
string method = 3;
|
||||||
|
string tag = 4;
|
||||||
|
float costMs = 5;
|
||||||
|
float peekMs = 6;
|
||||||
|
int64 countCalls = 7;
|
||||||
|
|
||||||
|
APINode apiNode = 30;
|
||||||
|
}
|
||||||
@@ -19,4 +19,6 @@ message APINode {
|
|||||||
bytes accessAddrsJSON = 10;
|
bytes accessAddrsJSON = 10;
|
||||||
repeated string accessAddrs = 11;
|
repeated string accessAddrs = 11;
|
||||||
bytes statusJSON = 12;
|
bytes statusJSON = 12;
|
||||||
|
|
||||||
|
bool debug = 30;
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,9 @@ message NodeTask {
|
|||||||
int64 updatedAt = 6;
|
int64 updatedAt = 6;
|
||||||
int64 version = 7;
|
int64 version = 7;
|
||||||
bool isPrimary = 8; // 是否为主节点,非主节点稍等再同步有利于提升同步速度
|
bool isPrimary = 8; // 是否为主节点,非主节点稍等再同步有利于提升同步速度
|
||||||
|
int64 serverId = 9;
|
||||||
|
|
||||||
Node node = 30;
|
Node node = 30;
|
||||||
NodeCluster nodeCluster = 31;
|
NodeCluster nodeCluster = 31;
|
||||||
|
NodeCluster server = 32;
|
||||||
}
|
}
|
||||||
@@ -12,6 +12,7 @@ message Plan {
|
|||||||
bytes featuresJSON = 6;
|
bytes featuresJSON = 6;
|
||||||
string priceType = 7;
|
string priceType = 7;
|
||||||
bytes trafficPriceJSON = 8;
|
bytes trafficPriceJSON = 8;
|
||||||
|
bytes bandwidthPriceJSON = 12;
|
||||||
float monthlyPrice = 9;
|
float monthlyPrice = 9;
|
||||||
float seasonallyPrice = 10;
|
float seasonallyPrice = 10;
|
||||||
float yearlyPrice = 11;
|
float yearlyPrice = 11;
|
||||||
|
|||||||
28
pkg/rpc/protos/models/model_server_bill.proto
Normal file
28
pkg/rpc/protos/models/model_server_bill.proto
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
option go_package = "./pb";
|
||||||
|
|
||||||
|
package pb;
|
||||||
|
|
||||||
|
import "models/model_plan.proto";
|
||||||
|
import "models/model_user_plan.proto";
|
||||||
|
import "models/model_user.proto";
|
||||||
|
import "models/model_server.proto";
|
||||||
|
|
||||||
|
message ServerBill {
|
||||||
|
int64 id = 1;
|
||||||
|
int64 userId = 2;
|
||||||
|
int64 serverId = 3;
|
||||||
|
float amount = 4;
|
||||||
|
int64 createdAt = 5;
|
||||||
|
int64 userPlanId = 6;
|
||||||
|
int64 planId = 7;
|
||||||
|
int64 totalTrafficBytes = 8;
|
||||||
|
int64 bandwidthPercentileBytes = 9;
|
||||||
|
int32 bandwidthPercentile = 10;
|
||||||
|
string priceType = 11;
|
||||||
|
|
||||||
|
UserPlan userPlan = 30;
|
||||||
|
Plan plan = 31;
|
||||||
|
User user = 32;
|
||||||
|
Server server = 33;
|
||||||
|
}
|
||||||
@@ -20,6 +20,7 @@ message User {
|
|||||||
bool isVerified = 13;
|
bool isVerified = 13;
|
||||||
bool isRejected = 14;
|
bool isRejected = 14;
|
||||||
string rejectReason = 15;
|
string rejectReason = 15;
|
||||||
|
bool isDeleted = 16;
|
||||||
|
|
||||||
NodeCluster nodeCluster = 10;
|
NodeCluster nodeCluster = 10;
|
||||||
repeated UserFeature features = 11;
|
repeated UserFeature features = 11;
|
||||||
|
|||||||
@@ -16,4 +16,5 @@ message UserBill {
|
|||||||
bool isPaid = 8;
|
bool isPaid = 8;
|
||||||
int64 paidAt = 9;
|
int64 paidAt = 9;
|
||||||
string code = 10;
|
string code = 10;
|
||||||
|
bool canPay = 11;
|
||||||
}
|
}
|
||||||
@@ -38,6 +38,9 @@ service APINodeService {
|
|||||||
|
|
||||||
// 计算使用某个SSL证书的API节点数量
|
// 计算使用某个SSL证书的API节点数量
|
||||||
rpc countAllEnabledAPINodesWithSSLCertId (CountAllEnabledAPINodesWithSSLCertIdRequest) returns (RPCCountResponse);
|
rpc countAllEnabledAPINodesWithSSLCertId (CountAllEnabledAPINodesWithSSLCertIdRequest) returns (RPCCountResponse);
|
||||||
|
|
||||||
|
// 修改调试模式状态
|
||||||
|
rpc debugAPINode(DebugAPINodeRequest) returns (RPCSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建API节点
|
// 创建API节点
|
||||||
@@ -135,3 +138,8 @@ message FindCurrentAPINodeResponse {
|
|||||||
message CountAllEnabledAPINodesWithSSLCertIdRequest {
|
message CountAllEnabledAPINodesWithSSLCertIdRequest {
|
||||||
int64 sslCertId = 1;
|
int64 sslCertId = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 修改调试模式状态
|
||||||
|
message DebugAPINodeRequest {
|
||||||
|
bool debug = 1;
|
||||||
|
}
|
||||||
@@ -38,6 +38,7 @@ message CreatePlanRequest {
|
|||||||
bytes featuresJSON = 4;
|
bytes featuresJSON = 4;
|
||||||
string priceType = 5;
|
string priceType = 5;
|
||||||
bytes trafficPriceJSON = 6;
|
bytes trafficPriceJSON = 6;
|
||||||
|
bytes bandwidthPriceJSON = 10;
|
||||||
float monthlyPrice = 7;
|
float monthlyPrice = 7;
|
||||||
float seasonallyPrice = 8;
|
float seasonallyPrice = 8;
|
||||||
float yearlyPrice = 9;
|
float yearlyPrice = 9;
|
||||||
@@ -57,6 +58,7 @@ message UpdatePlanRequest {
|
|||||||
bytes featuresJSON = 6;
|
bytes featuresJSON = 6;
|
||||||
string priceType = 7;
|
string priceType = 7;
|
||||||
bytes trafficPriceJSON = 8;
|
bytes trafficPriceJSON = 8;
|
||||||
|
bytes bandwidthPriceJSON = 12;
|
||||||
float monthlyPrice = 9;
|
float monthlyPrice = 9;
|
||||||
float seasonallyPrice = 10;
|
float seasonallyPrice = 10;
|
||||||
float yearlyPrice = 11;
|
float yearlyPrice = 11;
|
||||||
|
|||||||
@@ -141,6 +141,9 @@ service ServerService {
|
|||||||
|
|
||||||
// 获取服务套餐信息
|
// 获取服务套餐信息
|
||||||
rpc findServerUserPlan(FindServerUserPlanRequest) returns (FindServerUserPlanResponse);
|
rpc findServerUserPlan(FindServerUserPlanRequest) returns (FindServerUserPlanResponse);
|
||||||
|
|
||||||
|
// 获取服务配置
|
||||||
|
rpc composeServerConfig(ComposeServerConfigRequest) returns (ComposeServerConfigResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建服务
|
// 创建服务
|
||||||
@@ -556,4 +559,13 @@ message FindServerUserPlanRequest {
|
|||||||
|
|
||||||
message FindServerUserPlanResponse {
|
message FindServerUserPlanResponse {
|
||||||
UserPlan userPlan = 1;
|
UserPlan userPlan = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取服务配置
|
||||||
|
message ComposeServerConfigRequest {
|
||||||
|
int64 serverId = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ComposeServerConfigResponse {
|
||||||
|
bytes serverConfigJSON = 1;
|
||||||
}
|
}
|
||||||
34
pkg/rpc/protos/service_server_bill.proto
Normal file
34
pkg/rpc/protos/service_server_bill.proto
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
option go_package = "./pb";
|
||||||
|
|
||||||
|
package pb;
|
||||||
|
|
||||||
|
import "models/model_server_bill.proto";
|
||||||
|
import "models/rpc_messages.proto";
|
||||||
|
|
||||||
|
// 服务账单相关服务
|
||||||
|
service ServerBillService {
|
||||||
|
// 查询服务账单数量
|
||||||
|
rpc countAllServerBills(CountAllServerBillsRequest) returns (RPCCountResponse);
|
||||||
|
|
||||||
|
// 查询服务账单列表
|
||||||
|
rpc listServerBills(ListServerBillsRequest) returns (ListServerBillsResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询服务账单数量
|
||||||
|
message CountAllServerBillsRequest {
|
||||||
|
int64 userId = 1;
|
||||||
|
string month = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询服务账单列表
|
||||||
|
message ListServerBillsRequest {
|
||||||
|
int64 userId = 1;
|
||||||
|
string month = 2;
|
||||||
|
int64 offset = 3;
|
||||||
|
int64 size = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListServerBillsResponse {
|
||||||
|
repeated ServerBill serverBills = 1;
|
||||||
|
}
|
||||||
@@ -11,12 +11,15 @@ type HTTPHostRedirectConfig struct {
|
|||||||
IsOn bool `yaml:"isOn" json:"isOn"` // 是否开启
|
IsOn bool `yaml:"isOn" json:"isOn"` // 是否开启
|
||||||
Status int `yaml:"status" json:"status"` // 跳转用的状态码
|
Status int `yaml:"status" json:"status"` // 跳转用的状态码
|
||||||
|
|
||||||
|
Mode string `yaml:"mode" json:"mode"` // 模式
|
||||||
|
|
||||||
BeforeURL string `yaml:"beforeURL" json:"beforeURL"` // 跳转前的地址
|
BeforeURL string `yaml:"beforeURL" json:"beforeURL"` // 跳转前的地址
|
||||||
AfterURL string `yaml:"afterURL" json:"afterURL"` // 跳转后的地址
|
AfterURL string `yaml:"afterURL" json:"afterURL"` // 跳转后的地址
|
||||||
|
|
||||||
MatchPrefix bool `yaml:"matchPrefix" json:"matchPrefix"` // 只匹配前缀部分
|
MatchPrefix bool `yaml:"matchPrefix" json:"matchPrefix"` // 只匹配前缀部分
|
||||||
MatchRegexp bool `yaml:"matchRegexp" json:"matchRegexp"` // 匹配正则表达式
|
MatchRegexp bool `yaml:"matchRegexp" json:"matchRegexp"` // 匹配正则表达式
|
||||||
KeepRequestURI bool `yaml:"keepRequestURI" json:"keepRequestURI"` // 保留请求URI
|
KeepRequestURI bool `yaml:"keepRequestURI" json:"keepRequestURI"` // 保留请求URI
|
||||||
|
KeepArgs bool `yaml:"keepArgs" json:"keepArgs"` // 保留参数
|
||||||
Conds *shared.HTTPRequestCondsConfig `yaml:"conds" json:"conds"` // 匹配条件
|
Conds *shared.HTTPRequestCondsConfig `yaml:"conds" json:"conds"` // 匹配条件
|
||||||
|
|
||||||
realBeforeURL string
|
realBeforeURL string
|
||||||
|
|||||||
@@ -2,23 +2,83 @@
|
|||||||
|
|
||||||
package serverconfigs
|
package serverconfigs
|
||||||
|
|
||||||
|
// PlanPriceType 套餐类型
|
||||||
type PlanPriceType = string
|
type PlanPriceType = string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
PlanPriceTypeTraffic PlanPriceType = "traffic"
|
PlanPriceTypeTraffic PlanPriceType = "traffic" // 流量
|
||||||
PlanPriceTypePeriod PlanPriceType = "period"
|
PlanPriceTypePeriod PlanPriceType = "period" // 周期
|
||||||
|
PlanPriceTypeBandwidth PlanPriceType = "bandwidth" // 百分位
|
||||||
)
|
)
|
||||||
|
|
||||||
func FindPlanPriceTypeName(priceType PlanPriceType) string {
|
func FindPlanPriceTypeName(priceType PlanPriceType) string {
|
||||||
switch priceType {
|
switch priceType {
|
||||||
case PlanPriceTypeTraffic:
|
case PlanPriceTypeTraffic:
|
||||||
return "带宽用量"
|
return "流量"
|
||||||
case PlanPriceTypePeriod:
|
case PlanPriceTypePeriod:
|
||||||
return "时间周期"
|
return "时间周期"
|
||||||
|
case PlanPriceTypeBandwidth:
|
||||||
|
return "带宽"
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
type PlanTrafficPrice struct {
|
// PlanTrafficPriceConfig 按流量计费价格配置
|
||||||
|
type PlanTrafficPriceConfig struct {
|
||||||
Base float32 `yaml:"base" json:"base"` // 基础价格,单位是 元/GB
|
Base float32 `yaml:"base" json:"base"` // 基础价格,单位是 元/GB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PlanBandwidthPriceConfig 按百分位带宽计费配置
|
||||||
|
type PlanBandwidthPriceConfig struct {
|
||||||
|
Percentile int `yaml:"percentile" json:"percentile"` // 百分位
|
||||||
|
Ranges []*PlanBandwidthPriceRangeConfig `yaml:"ranges" json:"ranges"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *PlanBandwidthPriceConfig) LookupRange(sizeMB float32) *PlanBandwidthPriceRangeConfig {
|
||||||
|
if len(this.Ranges) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
for _, r := range this.Ranges {
|
||||||
|
if sizeMB >= r.MinMB && (r.MaxMB <= 0 || r.MaxMB >= sizeMB) {
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 寻找最接近的
|
||||||
|
for index, r := range this.Ranges {
|
||||||
|
if r.MinMB >= sizeMB {
|
||||||
|
if index > 0 {
|
||||||
|
return this.Ranges[index-1]
|
||||||
|
}
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, r := range this.Ranges {
|
||||||
|
if r.MaxMB <= 0 || r.MaxMB >= sizeMB {
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取最大值
|
||||||
|
return this.Ranges[len(this.Ranges)-1]
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *PlanBandwidthPriceConfig) LookupPrice(sizeMB float32) float32 {
|
||||||
|
var r = this.LookupRange(sizeMB)
|
||||||
|
if r == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
if r.TotalPrice > 0 {
|
||||||
|
return r.TotalPrice
|
||||||
|
}
|
||||||
|
return r.PricePerMB * sizeMB
|
||||||
|
}
|
||||||
|
|
||||||
|
type PlanBandwidthPriceRangeConfig struct {
|
||||||
|
MinMB float32 `yaml:"minMB" json:"minMB"`
|
||||||
|
MaxMB float32 `yaml:"maxMB" json:"maxMB"`
|
||||||
|
PricePerMB float32 `yaml:"pricePerMB" json:"pricePerMB"` // 单位价格,元/MB
|
||||||
|
TotalPrice float32 `yaml:"totalPrice" json:"totalPrice"` // 总价格
|
||||||
|
}
|
||||||
|
|||||||
41
pkg/serverconfigs/plan_price_types_test.go
Normal file
41
pkg/serverconfigs/plan_price_types_test.go
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||||
|
|
||||||
|
package serverconfigs_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestPlanBandwidthPriceConfig_Lookup(t *testing.T) {
|
||||||
|
{
|
||||||
|
var config = &serverconfigs.PlanBandwidthPriceConfig{}
|
||||||
|
t.Log(config.LookupRange(1))
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
var config = &serverconfigs.PlanBandwidthPriceConfig{
|
||||||
|
Ranges: []*serverconfigs.PlanBandwidthPriceRangeConfig{
|
||||||
|
{
|
||||||
|
MinMB: 1,
|
||||||
|
MaxMB: 1.5,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MinMB: 1.5,
|
||||||
|
MaxMB: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MinMB: 5,
|
||||||
|
MaxMB: 10,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MinMB: 20,
|
||||||
|
MaxMB: 100,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
for _, mb := range []float32{0.5, 1, 3, 5, 7, 20, 50, 1000} {
|
||||||
|
t.Log(mb, config.LookupRange(mb))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,6 +16,7 @@ const (
|
|||||||
SettingCodeUserUIConfig SettingCode = "userUIConfig" // 用户界面配置
|
SettingCodeUserUIConfig SettingCode = "userUIConfig" // 用户界面配置
|
||||||
SettingCodeUserRegisterConfig SettingCode = "userRegisterConfig" // 用户注册配置
|
SettingCodeUserRegisterConfig SettingCode = "userRegisterConfig" // 用户注册配置
|
||||||
SettingCodeUserServerConfig SettingCode = "userServerConfig" // 用户服务设置
|
SettingCodeUserServerConfig SettingCode = "userServerConfig" // 用户服务设置
|
||||||
|
SettingCodeUserFinanceConfig SettingCode = "userFinanceConfig" // 用户财务设置
|
||||||
|
|
||||||
SettingCodeNSAccessLogSetting SettingCode = "nsAccessLogSetting" // NS相关全局配置
|
SettingCodeNSAccessLogSetting SettingCode = "nsAccessLogSetting" // NS相关全局配置
|
||||||
SettingCodeNSNodeMonitor SettingCode = "nsNodeMonitor" // 监控NS节点状态
|
SettingCodeNSNodeMonitor SettingCode = "nsNodeMonitor" // 监控NS节点状态
|
||||||
|
|||||||
19
pkg/userconfigs/user_finance_config.go
Normal file
19
pkg/userconfigs/user_finance_config.go
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||||
|
|
||||||
|
package userconfigs
|
||||||
|
|
||||||
|
import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
|
||||||
|
|
||||||
|
// UserFinanceConfig 财务相关设置
|
||||||
|
type UserFinanceConfig struct {
|
||||||
|
IsOn bool `yaml:"isOn" json:"isOn"`
|
||||||
|
PriceType serverconfigs.PlanPriceType `yaml:"priceType" json:"priceType"`
|
||||||
|
TrafficPriceConfig *serverconfigs.PlanTrafficPriceConfig `yaml:"trafficPrice" json:"trafficPrice"`
|
||||||
|
BandwidthPriceConfig *serverconfigs.PlanBandwidthPriceConfig `yaml:"bandwidthPrice" json:"bandwidthPrice"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func DefaultUserFinanceConfig() *UserFinanceConfig {
|
||||||
|
return &UserFinanceConfig{
|
||||||
|
PriceType: serverconfigs.PlanPriceTypeBandwidth,
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user