This commit is contained in:
robin
2026-03-13 14:25:13 +08:00
parent a25a474d6a
commit afbaaa869c
95 changed files with 4591 additions and 2578 deletions

View File

@@ -0,0 +1 @@
build/temp_build.sh

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,650 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v3.12.4
// source: service_httpdns_board.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
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)
)
// 组合看板数据请求
type ComposeHTTPDNSBoardRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ComposeHTTPDNSBoardRequest) Reset() {
*x = ComposeHTTPDNSBoardRequest{}
mi := &file_service_httpdns_board_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ComposeHTTPDNSBoardRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComposeHTTPDNSBoardRequest) ProtoMessage() {}
func (x *ComposeHTTPDNSBoardRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_httpdns_board_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ComposeHTTPDNSBoardRequest.ProtoReflect.Descriptor instead.
func (*ComposeHTTPDNSBoardRequest) Descriptor() ([]byte, []int) {
return file_service_httpdns_board_proto_rawDescGZIP(), []int{0}
}
// 组合看板数据响应
type ComposeHTTPDNSBoardResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
CountApps int64 `protobuf:"varint,1,opt,name=countApps,proto3" json:"countApps,omitempty"`
CountDomains int64 `protobuf:"varint,2,opt,name=countDomains,proto3" json:"countDomains,omitempty"`
CountClusters int64 `protobuf:"varint,3,opt,name=countClusters,proto3" json:"countClusters,omitempty"`
CountNodes int64 `protobuf:"varint,4,opt,name=countNodes,proto3" json:"countNodes,omitempty"`
CountOfflineNodes int64 `protobuf:"varint,5,opt,name=countOfflineNodes,proto3" json:"countOfflineNodes,omitempty"`
DailyTrafficStats []*ComposeHTTPDNSBoardResponse_DailyTrafficStat `protobuf:"bytes,30,rep,name=dailyTrafficStats,proto3" json:"dailyTrafficStats,omitempty"`
HourlyTrafficStats []*ComposeHTTPDNSBoardResponse_HourlyTrafficStat `protobuf:"bytes,31,rep,name=hourlyTrafficStats,proto3" json:"hourlyTrafficStats,omitempty"`
TopAppStats []*ComposeHTTPDNSBoardResponse_TopAppStat `protobuf:"bytes,32,rep,name=topAppStats,proto3" json:"topAppStats,omitempty"`
TopDomainStats []*ComposeHTTPDNSBoardResponse_TopDomainStat `protobuf:"bytes,33,rep,name=topDomainStats,proto3" json:"topDomainStats,omitempty"`
TopNodeStats []*ComposeHTTPDNSBoardResponse_TopNodeStat `protobuf:"bytes,34,rep,name=topNodeStats,proto3" json:"topNodeStats,omitempty"`
CpuNodeValues []*NodeValue `protobuf:"bytes,35,rep,name=cpuNodeValues,proto3" json:"cpuNodeValues,omitempty"`
MemoryNodeValues []*NodeValue `protobuf:"bytes,36,rep,name=memoryNodeValues,proto3" json:"memoryNodeValues,omitempty"`
LoadNodeValues []*NodeValue `protobuf:"bytes,37,rep,name=loadNodeValues,proto3" json:"loadNodeValues,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ComposeHTTPDNSBoardResponse) Reset() {
*x = ComposeHTTPDNSBoardResponse{}
mi := &file_service_httpdns_board_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ComposeHTTPDNSBoardResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComposeHTTPDNSBoardResponse) ProtoMessage() {}
func (x *ComposeHTTPDNSBoardResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_httpdns_board_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ComposeHTTPDNSBoardResponse.ProtoReflect.Descriptor instead.
func (*ComposeHTTPDNSBoardResponse) Descriptor() ([]byte, []int) {
return file_service_httpdns_board_proto_rawDescGZIP(), []int{1}
}
func (x *ComposeHTTPDNSBoardResponse) GetCountApps() int64 {
if x != nil {
return x.CountApps
}
return 0
}
func (x *ComposeHTTPDNSBoardResponse) GetCountDomains() int64 {
if x != nil {
return x.CountDomains
}
return 0
}
func (x *ComposeHTTPDNSBoardResponse) GetCountClusters() int64 {
if x != nil {
return x.CountClusters
}
return 0
}
func (x *ComposeHTTPDNSBoardResponse) GetCountNodes() int64 {
if x != nil {
return x.CountNodes
}
return 0
}
func (x *ComposeHTTPDNSBoardResponse) GetCountOfflineNodes() int64 {
if x != nil {
return x.CountOfflineNodes
}
return 0
}
func (x *ComposeHTTPDNSBoardResponse) GetDailyTrafficStats() []*ComposeHTTPDNSBoardResponse_DailyTrafficStat {
if x != nil {
return x.DailyTrafficStats
}
return nil
}
func (x *ComposeHTTPDNSBoardResponse) GetHourlyTrafficStats() []*ComposeHTTPDNSBoardResponse_HourlyTrafficStat {
if x != nil {
return x.HourlyTrafficStats
}
return nil
}
func (x *ComposeHTTPDNSBoardResponse) GetTopAppStats() []*ComposeHTTPDNSBoardResponse_TopAppStat {
if x != nil {
return x.TopAppStats
}
return nil
}
func (x *ComposeHTTPDNSBoardResponse) GetTopDomainStats() []*ComposeHTTPDNSBoardResponse_TopDomainStat {
if x != nil {
return x.TopDomainStats
}
return nil
}
func (x *ComposeHTTPDNSBoardResponse) GetTopNodeStats() []*ComposeHTTPDNSBoardResponse_TopNodeStat {
if x != nil {
return x.TopNodeStats
}
return nil
}
func (x *ComposeHTTPDNSBoardResponse) GetCpuNodeValues() []*NodeValue {
if x != nil {
return x.CpuNodeValues
}
return nil
}
func (x *ComposeHTTPDNSBoardResponse) GetMemoryNodeValues() []*NodeValue {
if x != nil {
return x.MemoryNodeValues
}
return nil
}
func (x *ComposeHTTPDNSBoardResponse) GetLoadNodeValues() []*NodeValue {
if x != nil {
return x.LoadNodeValues
}
return nil
}
type ComposeHTTPDNSBoardResponse_DailyTrafficStat struct {
state protoimpl.MessageState `protogen:"open.v1"`
Day string `protobuf:"bytes,1,opt,name=day,proto3" json:"day,omitempty"`
Bytes int64 `protobuf:"varint,2,opt,name=bytes,proto3" json:"bytes,omitempty"`
CountRequests int64 `protobuf:"varint,3,opt,name=countRequests,proto3" json:"countRequests,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ComposeHTTPDNSBoardResponse_DailyTrafficStat) Reset() {
*x = ComposeHTTPDNSBoardResponse_DailyTrafficStat{}
mi := &file_service_httpdns_board_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ComposeHTTPDNSBoardResponse_DailyTrafficStat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComposeHTTPDNSBoardResponse_DailyTrafficStat) ProtoMessage() {}
func (x *ComposeHTTPDNSBoardResponse_DailyTrafficStat) ProtoReflect() protoreflect.Message {
mi := &file_service_httpdns_board_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ComposeHTTPDNSBoardResponse_DailyTrafficStat.ProtoReflect.Descriptor instead.
func (*ComposeHTTPDNSBoardResponse_DailyTrafficStat) Descriptor() ([]byte, []int) {
return file_service_httpdns_board_proto_rawDescGZIP(), []int{1, 0}
}
func (x *ComposeHTTPDNSBoardResponse_DailyTrafficStat) GetDay() string {
if x != nil {
return x.Day
}
return ""
}
func (x *ComposeHTTPDNSBoardResponse_DailyTrafficStat) GetBytes() int64 {
if x != nil {
return x.Bytes
}
return 0
}
func (x *ComposeHTTPDNSBoardResponse_DailyTrafficStat) GetCountRequests() int64 {
if x != nil {
return x.CountRequests
}
return 0
}
type ComposeHTTPDNSBoardResponse_HourlyTrafficStat struct {
state protoimpl.MessageState `protogen:"open.v1"`
Hour string `protobuf:"bytes,1,opt,name=hour,proto3" json:"hour,omitempty"`
Bytes int64 `protobuf:"varint,2,opt,name=bytes,proto3" json:"bytes,omitempty"`
CountRequests int64 `protobuf:"varint,3,opt,name=countRequests,proto3" json:"countRequests,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ComposeHTTPDNSBoardResponse_HourlyTrafficStat) Reset() {
*x = ComposeHTTPDNSBoardResponse_HourlyTrafficStat{}
mi := &file_service_httpdns_board_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ComposeHTTPDNSBoardResponse_HourlyTrafficStat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComposeHTTPDNSBoardResponse_HourlyTrafficStat) ProtoMessage() {}
func (x *ComposeHTTPDNSBoardResponse_HourlyTrafficStat) ProtoReflect() protoreflect.Message {
mi := &file_service_httpdns_board_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ComposeHTTPDNSBoardResponse_HourlyTrafficStat.ProtoReflect.Descriptor instead.
func (*ComposeHTTPDNSBoardResponse_HourlyTrafficStat) Descriptor() ([]byte, []int) {
return file_service_httpdns_board_proto_rawDescGZIP(), []int{1, 1}
}
func (x *ComposeHTTPDNSBoardResponse_HourlyTrafficStat) GetHour() string {
if x != nil {
return x.Hour
}
return ""
}
func (x *ComposeHTTPDNSBoardResponse_HourlyTrafficStat) GetBytes() int64 {
if x != nil {
return x.Bytes
}
return 0
}
func (x *ComposeHTTPDNSBoardResponse_HourlyTrafficStat) GetCountRequests() int64 {
if x != nil {
return x.CountRequests
}
return 0
}
type ComposeHTTPDNSBoardResponse_TopAppStat struct {
state protoimpl.MessageState `protogen:"open.v1"`
AppId int64 `protobuf:"varint,1,opt,name=appId,proto3" json:"appId,omitempty"`
AppName string `protobuf:"bytes,2,opt,name=appName,proto3" json:"appName,omitempty"`
CountRequests int64 `protobuf:"varint,3,opt,name=countRequests,proto3" json:"countRequests,omitempty"`
Bytes int64 `protobuf:"varint,4,opt,name=bytes,proto3" json:"bytes,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ComposeHTTPDNSBoardResponse_TopAppStat) Reset() {
*x = ComposeHTTPDNSBoardResponse_TopAppStat{}
mi := &file_service_httpdns_board_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ComposeHTTPDNSBoardResponse_TopAppStat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComposeHTTPDNSBoardResponse_TopAppStat) ProtoMessage() {}
func (x *ComposeHTTPDNSBoardResponse_TopAppStat) ProtoReflect() protoreflect.Message {
mi := &file_service_httpdns_board_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ComposeHTTPDNSBoardResponse_TopAppStat.ProtoReflect.Descriptor instead.
func (*ComposeHTTPDNSBoardResponse_TopAppStat) Descriptor() ([]byte, []int) {
return file_service_httpdns_board_proto_rawDescGZIP(), []int{1, 2}
}
func (x *ComposeHTTPDNSBoardResponse_TopAppStat) GetAppId() int64 {
if x != nil {
return x.AppId
}
return 0
}
func (x *ComposeHTTPDNSBoardResponse_TopAppStat) GetAppName() string {
if x != nil {
return x.AppName
}
return ""
}
func (x *ComposeHTTPDNSBoardResponse_TopAppStat) GetCountRequests() int64 {
if x != nil {
return x.CountRequests
}
return 0
}
func (x *ComposeHTTPDNSBoardResponse_TopAppStat) GetBytes() int64 {
if x != nil {
return x.Bytes
}
return 0
}
type ComposeHTTPDNSBoardResponse_TopDomainStat struct {
state protoimpl.MessageState `protogen:"open.v1"`
DomainId int64 `protobuf:"varint,1,opt,name=domainId,proto3" json:"domainId,omitempty"`
DomainName string `protobuf:"bytes,2,opt,name=domainName,proto3" json:"domainName,omitempty"`
CountRequests int64 `protobuf:"varint,3,opt,name=countRequests,proto3" json:"countRequests,omitempty"`
Bytes int64 `protobuf:"varint,4,opt,name=bytes,proto3" json:"bytes,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ComposeHTTPDNSBoardResponse_TopDomainStat) Reset() {
*x = ComposeHTTPDNSBoardResponse_TopDomainStat{}
mi := &file_service_httpdns_board_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ComposeHTTPDNSBoardResponse_TopDomainStat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComposeHTTPDNSBoardResponse_TopDomainStat) ProtoMessage() {}
func (x *ComposeHTTPDNSBoardResponse_TopDomainStat) ProtoReflect() protoreflect.Message {
mi := &file_service_httpdns_board_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ComposeHTTPDNSBoardResponse_TopDomainStat.ProtoReflect.Descriptor instead.
func (*ComposeHTTPDNSBoardResponse_TopDomainStat) Descriptor() ([]byte, []int) {
return file_service_httpdns_board_proto_rawDescGZIP(), []int{1, 3}
}
func (x *ComposeHTTPDNSBoardResponse_TopDomainStat) GetDomainId() int64 {
if x != nil {
return x.DomainId
}
return 0
}
func (x *ComposeHTTPDNSBoardResponse_TopDomainStat) GetDomainName() string {
if x != nil {
return x.DomainName
}
return ""
}
func (x *ComposeHTTPDNSBoardResponse_TopDomainStat) GetCountRequests() int64 {
if x != nil {
return x.CountRequests
}
return 0
}
func (x *ComposeHTTPDNSBoardResponse_TopDomainStat) GetBytes() int64 {
if x != nil {
return x.Bytes
}
return 0
}
type ComposeHTTPDNSBoardResponse_TopNodeStat struct {
state protoimpl.MessageState `protogen:"open.v1"`
ClusterId int64 `protobuf:"varint,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
NodeId int64 `protobuf:"varint,2,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
NodeName string `protobuf:"bytes,3,opt,name=nodeName,proto3" json:"nodeName,omitempty"`
CountRequests int64 `protobuf:"varint,4,opt,name=countRequests,proto3" json:"countRequests,omitempty"`
Bytes int64 `protobuf:"varint,5,opt,name=bytes,proto3" json:"bytes,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ComposeHTTPDNSBoardResponse_TopNodeStat) Reset() {
*x = ComposeHTTPDNSBoardResponse_TopNodeStat{}
mi := &file_service_httpdns_board_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ComposeHTTPDNSBoardResponse_TopNodeStat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ComposeHTTPDNSBoardResponse_TopNodeStat) ProtoMessage() {}
func (x *ComposeHTTPDNSBoardResponse_TopNodeStat) ProtoReflect() protoreflect.Message {
mi := &file_service_httpdns_board_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ComposeHTTPDNSBoardResponse_TopNodeStat.ProtoReflect.Descriptor instead.
func (*ComposeHTTPDNSBoardResponse_TopNodeStat) Descriptor() ([]byte, []int) {
return file_service_httpdns_board_proto_rawDescGZIP(), []int{1, 4}
}
func (x *ComposeHTTPDNSBoardResponse_TopNodeStat) GetClusterId() int64 {
if x != nil {
return x.ClusterId
}
return 0
}
func (x *ComposeHTTPDNSBoardResponse_TopNodeStat) GetNodeId() int64 {
if x != nil {
return x.NodeId
}
return 0
}
func (x *ComposeHTTPDNSBoardResponse_TopNodeStat) GetNodeName() string {
if x != nil {
return x.NodeName
}
return ""
}
func (x *ComposeHTTPDNSBoardResponse_TopNodeStat) GetCountRequests() int64 {
if x != nil {
return x.CountRequests
}
return 0
}
func (x *ComposeHTTPDNSBoardResponse_TopNodeStat) GetBytes() int64 {
if x != nil {
return x.Bytes
}
return 0
}
var File_service_httpdns_board_proto protoreflect.FileDescriptor
const file_service_httpdns_board_proto_rawDesc = "" +
"\n" +
"\x1bservice_httpdns_board.proto\x12\x02pb\x1a\x1dmodels/model_node_value.proto\"\x1c\n" +
"\x1aComposeHTTPDNSBoardRequest\"\x9c\v\n" +
"\x1bComposeHTTPDNSBoardResponse\x12\x1c\n" +
"\tcountApps\x18\x01 \x01(\x03R\tcountApps\x12\"\n" +
"\fcountDomains\x18\x02 \x01(\x03R\fcountDomains\x12$\n" +
"\rcountClusters\x18\x03 \x01(\x03R\rcountClusters\x12\x1e\n" +
"\n" +
"countNodes\x18\x04 \x01(\x03R\n" +
"countNodes\x12,\n" +
"\x11countOfflineNodes\x18\x05 \x01(\x03R\x11countOfflineNodes\x12^\n" +
"\x11dailyTrafficStats\x18\x1e \x03(\v20.pb.ComposeHTTPDNSBoardResponse.DailyTrafficStatR\x11dailyTrafficStats\x12a\n" +
"\x12hourlyTrafficStats\x18\x1f \x03(\v21.pb.ComposeHTTPDNSBoardResponse.HourlyTrafficStatR\x12hourlyTrafficStats\x12L\n" +
"\vtopAppStats\x18 \x03(\v2*.pb.ComposeHTTPDNSBoardResponse.TopAppStatR\vtopAppStats\x12U\n" +
"\x0etopDomainStats\x18! \x03(\v2-.pb.ComposeHTTPDNSBoardResponse.TopDomainStatR\x0etopDomainStats\x12O\n" +
"\ftopNodeStats\x18\" \x03(\v2+.pb.ComposeHTTPDNSBoardResponse.TopNodeStatR\ftopNodeStats\x123\n" +
"\rcpuNodeValues\x18# \x03(\v2\r.pb.NodeValueR\rcpuNodeValues\x129\n" +
"\x10memoryNodeValues\x18$ \x03(\v2\r.pb.NodeValueR\x10memoryNodeValues\x125\n" +
"\x0eloadNodeValues\x18% \x03(\v2\r.pb.NodeValueR\x0eloadNodeValues\x1a`\n" +
"\x10DailyTrafficStat\x12\x10\n" +
"\x03day\x18\x01 \x01(\tR\x03day\x12\x14\n" +
"\x05bytes\x18\x02 \x01(\x03R\x05bytes\x12$\n" +
"\rcountRequests\x18\x03 \x01(\x03R\rcountRequests\x1ac\n" +
"\x11HourlyTrafficStat\x12\x12\n" +
"\x04hour\x18\x01 \x01(\tR\x04hour\x12\x14\n" +
"\x05bytes\x18\x02 \x01(\x03R\x05bytes\x12$\n" +
"\rcountRequests\x18\x03 \x01(\x03R\rcountRequests\x1ax\n" +
"\n" +
"TopAppStat\x12\x14\n" +
"\x05appId\x18\x01 \x01(\x03R\x05appId\x12\x18\n" +
"\aappName\x18\x02 \x01(\tR\aappName\x12$\n" +
"\rcountRequests\x18\x03 \x01(\x03R\rcountRequests\x12\x14\n" +
"\x05bytes\x18\x04 \x01(\x03R\x05bytes\x1a\x87\x01\n" +
"\rTopDomainStat\x12\x1a\n" +
"\bdomainId\x18\x01 \x01(\x03R\bdomainId\x12\x1e\n" +
"\n" +
"domainName\x18\x02 \x01(\tR\n" +
"domainName\x12$\n" +
"\rcountRequests\x18\x03 \x01(\x03R\rcountRequests\x12\x14\n" +
"\x05bytes\x18\x04 \x01(\x03R\x05bytes\x1a\x9b\x01\n" +
"\vTopNodeStat\x12\x1c\n" +
"\tclusterId\x18\x01 \x01(\x03R\tclusterId\x12\x16\n" +
"\x06nodeId\x18\x02 \x01(\x03R\x06nodeId\x12\x1a\n" +
"\bnodeName\x18\x03 \x01(\tR\bnodeName\x12$\n" +
"\rcountRequests\x18\x04 \x01(\x03R\rcountRequests\x12\x14\n" +
"\x05bytes\x18\x05 \x01(\x03R\x05bytes2m\n" +
"\x13HTTPDNSBoardService\x12V\n" +
"\x13composeHTTPDNSBoard\x12\x1e.pb.ComposeHTTPDNSBoardRequest\x1a\x1f.pb.ComposeHTTPDNSBoardResponseB\x06Z\x04./pbb\x06proto3"
var (
file_service_httpdns_board_proto_rawDescOnce sync.Once
file_service_httpdns_board_proto_rawDescData []byte
)
func file_service_httpdns_board_proto_rawDescGZIP() []byte {
file_service_httpdns_board_proto_rawDescOnce.Do(func() {
file_service_httpdns_board_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_service_httpdns_board_proto_rawDesc), len(file_service_httpdns_board_proto_rawDesc)))
})
return file_service_httpdns_board_proto_rawDescData
}
var file_service_httpdns_board_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_service_httpdns_board_proto_goTypes = []any{
(*ComposeHTTPDNSBoardRequest)(nil), // 0: pb.ComposeHTTPDNSBoardRequest
(*ComposeHTTPDNSBoardResponse)(nil), // 1: pb.ComposeHTTPDNSBoardResponse
(*ComposeHTTPDNSBoardResponse_DailyTrafficStat)(nil), // 2: pb.ComposeHTTPDNSBoardResponse.DailyTrafficStat
(*ComposeHTTPDNSBoardResponse_HourlyTrafficStat)(nil), // 3: pb.ComposeHTTPDNSBoardResponse.HourlyTrafficStat
(*ComposeHTTPDNSBoardResponse_TopAppStat)(nil), // 4: pb.ComposeHTTPDNSBoardResponse.TopAppStat
(*ComposeHTTPDNSBoardResponse_TopDomainStat)(nil), // 5: pb.ComposeHTTPDNSBoardResponse.TopDomainStat
(*ComposeHTTPDNSBoardResponse_TopNodeStat)(nil), // 6: pb.ComposeHTTPDNSBoardResponse.TopNodeStat
(*NodeValue)(nil), // 7: pb.NodeValue
}
var file_service_httpdns_board_proto_depIdxs = []int32{
2, // 0: pb.ComposeHTTPDNSBoardResponse.dailyTrafficStats:type_name -> pb.ComposeHTTPDNSBoardResponse.DailyTrafficStat
3, // 1: pb.ComposeHTTPDNSBoardResponse.hourlyTrafficStats:type_name -> pb.ComposeHTTPDNSBoardResponse.HourlyTrafficStat
4, // 2: pb.ComposeHTTPDNSBoardResponse.topAppStats:type_name -> pb.ComposeHTTPDNSBoardResponse.TopAppStat
5, // 3: pb.ComposeHTTPDNSBoardResponse.topDomainStats:type_name -> pb.ComposeHTTPDNSBoardResponse.TopDomainStat
6, // 4: pb.ComposeHTTPDNSBoardResponse.topNodeStats:type_name -> pb.ComposeHTTPDNSBoardResponse.TopNodeStat
7, // 5: pb.ComposeHTTPDNSBoardResponse.cpuNodeValues:type_name -> pb.NodeValue
7, // 6: pb.ComposeHTTPDNSBoardResponse.memoryNodeValues:type_name -> pb.NodeValue
7, // 7: pb.ComposeHTTPDNSBoardResponse.loadNodeValues:type_name -> pb.NodeValue
0, // 8: pb.HTTPDNSBoardService.composeHTTPDNSBoard:input_type -> pb.ComposeHTTPDNSBoardRequest
1, // 9: pb.HTTPDNSBoardService.composeHTTPDNSBoard:output_type -> pb.ComposeHTTPDNSBoardResponse
9, // [9:10] is the sub-list for method output_type
8, // [8:9] is the sub-list for method input_type
8, // [8:8] is the sub-list for extension type_name
8, // [8:8] is the sub-list for extension extendee
0, // [0:8] is the sub-list for field type_name
}
func init() { file_service_httpdns_board_proto_init() }
func file_service_httpdns_board_proto_init() {
if File_service_httpdns_board_proto != nil {
return
}
file_models_model_node_value_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_service_httpdns_board_proto_rawDesc), len(file_service_httpdns_board_proto_rawDesc)),
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_service_httpdns_board_proto_goTypes,
DependencyIndexes: file_service_httpdns_board_proto_depIdxs,
MessageInfos: file_service_httpdns_board_proto_msgTypes,
}.Build()
File_service_httpdns_board_proto = out.File
file_service_httpdns_board_proto_goTypes = nil
file_service_httpdns_board_proto_depIdxs = nil
}

View File

@@ -0,0 +1,125 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc v3.12.4
// source: service_httpdns_board.proto
package pb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
HTTPDNSBoardService_ComposeHTTPDNSBoard_FullMethodName = "/pb.HTTPDNSBoardService/composeHTTPDNSBoard"
)
// HTTPDNSBoardServiceClient is the client API for HTTPDNSBoardService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// HTTPDNS 看板服务
type HTTPDNSBoardServiceClient interface {
// 组合看板数据
ComposeHTTPDNSBoard(ctx context.Context, in *ComposeHTTPDNSBoardRequest, opts ...grpc.CallOption) (*ComposeHTTPDNSBoardResponse, error)
}
type hTTPDNSBoardServiceClient struct {
cc grpc.ClientConnInterface
}
func NewHTTPDNSBoardServiceClient(cc grpc.ClientConnInterface) HTTPDNSBoardServiceClient {
return &hTTPDNSBoardServiceClient{cc}
}
func (c *hTTPDNSBoardServiceClient) ComposeHTTPDNSBoard(ctx context.Context, in *ComposeHTTPDNSBoardRequest, opts ...grpc.CallOption) (*ComposeHTTPDNSBoardResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ComposeHTTPDNSBoardResponse)
err := c.cc.Invoke(ctx, HTTPDNSBoardService_ComposeHTTPDNSBoard_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// HTTPDNSBoardServiceServer is the server API for HTTPDNSBoardService service.
// All implementations should embed UnimplementedHTTPDNSBoardServiceServer
// for forward compatibility.
//
// HTTPDNS 看板服务
type HTTPDNSBoardServiceServer interface {
// 组合看板数据
ComposeHTTPDNSBoard(context.Context, *ComposeHTTPDNSBoardRequest) (*ComposeHTTPDNSBoardResponse, error)
}
// UnimplementedHTTPDNSBoardServiceServer should be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedHTTPDNSBoardServiceServer struct{}
func (UnimplementedHTTPDNSBoardServiceServer) ComposeHTTPDNSBoard(context.Context, *ComposeHTTPDNSBoardRequest) (*ComposeHTTPDNSBoardResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ComposeHTTPDNSBoard not implemented")
}
func (UnimplementedHTTPDNSBoardServiceServer) testEmbeddedByValue() {}
// UnsafeHTTPDNSBoardServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HTTPDNSBoardServiceServer will
// result in compilation errors.
type UnsafeHTTPDNSBoardServiceServer interface {
mustEmbedUnimplementedHTTPDNSBoardServiceServer()
}
func RegisterHTTPDNSBoardServiceServer(s grpc.ServiceRegistrar, srv HTTPDNSBoardServiceServer) {
// If the following call panics, it indicates UnimplementedHTTPDNSBoardServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&HTTPDNSBoardService_ServiceDesc, srv)
}
func _HTTPDNSBoardService_ComposeHTTPDNSBoard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ComposeHTTPDNSBoardRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPDNSBoardServiceServer).ComposeHTTPDNSBoard(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: HTTPDNSBoardService_ComposeHTTPDNSBoard_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPDNSBoardServiceServer).ComposeHTTPDNSBoard(ctx, req.(*ComposeHTTPDNSBoardRequest))
}
return interceptor(ctx, in, info, handler)
}
// HTTPDNSBoardService_ServiceDesc is the grpc.ServiceDesc for HTTPDNSBoardService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var HTTPDNSBoardService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pb.HTTPDNSBoardService",
HandlerType: (*HTTPDNSBoardServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "composeHTTPDNSBoard",
Handler: _HTTPDNSBoardService_ComposeHTTPDNSBoard_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_httpdns_board.proto",
}

View File

@@ -12,6 +12,7 @@ import (
)
var httpAuthTimestampRegexp = regexp.MustCompile(`^\d{10}$`)
var httpAuthHexTimestampRegexp = regexp.MustCompile(`^[0-9a-fA-F]{1,16}$`)
type HTTPAuthBaseMethod struct {
Exts []string `json:"exts"`

View File

@@ -7,12 +7,12 @@ type HTTPAuthType = string
const (
HTTPAuthTypeBasicAuth HTTPAuthType = "basicAuth" // BasicAuth
HTTPAuthTypeSubRequest HTTPAuthType = "subRequest" // 子请求
HTTPAuthTypeTypeA HTTPAuthType = "typeA"
HTTPAuthTypeTypeB HTTPAuthType = "typeB"
HTTPAuthTypeTypeC HTTPAuthType = "typeC"
HTTPAuthTypeTypeD HTTPAuthType = "typeD"
HTTPAuthTypeSubRequest HTTPAuthType = "subRequest" // SubRequest
HTTPAuthTypeTypeA HTTPAuthType = "typeA"
HTTPAuthTypeTypeB HTTPAuthType = "typeB"
HTTPAuthTypeTypeC HTTPAuthType = "typeC"
HTTPAuthTypeTypeD HTTPAuthType = "typeD"
HTTPAuthTypeTypeE HTTPAuthType = "typeE"
)
type HTTPAuthTypeDefinition struct {
@@ -23,10 +23,11 @@ type HTTPAuthTypeDefinition struct {
}
func FindAllHTTPAuthTypes(role string) []*HTTPAuthTypeDefinition {
var urlDocA = ""
var urlDocB = ""
var urlDocC = ""
var urlDocD = ""
urlDocA := ""
urlDocB := ""
urlDocC := ""
urlDocD := ""
urlDocE := "https://help.aliyun.com/zh/cdn/user-guide/type-c-signing"
switch role {
case "admin":
@@ -66,15 +67,21 @@ func FindAllHTTPAuthTypes(role string) []*HTTPAuthTypeDefinition {
Description: "示例URLhttps://example.com/images/test.jpg?sign=f66af42f87cf63a64f4b86ec11c7797a&t=1661753717<br/><a href=\"" + urlDocD + "\" target=\"_blank\">[算法详解]</a>",
IsPlus: true,
},
{
Name: "URL鉴权E",
Code: HTTPAuthTypeTypeE,
Description: "严格兼容阿里云 Type-C 路径鉴权示例URLhttps://example.com/3a2c79f2d2f0df2f8f9e05ec9f482e5d/67cfdb9e/images/test.jpg<br/><a href=\"" + urlDocE + "\" target=\"_blank\">[阿里云文档]</a>",
IsPlus: true,
},
{
Name: "基本认证",
Code: HTTPAuthTypeBasicAuth,
Description: "BasicAuth最简单的HTTP请求认证方式通过传递<span class=\"ui label tiny basic text\">Authorization: Basic xxx</span> Header认证。",
Description: "BasicAuth最简单的 HTTP 请求认证方式,通过传递 <span class=\"ui label tiny basic text\">Authorization: Basic xxx</span> Header 认证。",
},
{
Name: "子请求",
Code: HTTPAuthTypeSubRequest,
Description: "通过自定义的URL子请求来认证请求。",
Description: "通过自定义的 URL 子请求来认证请求。",
},
}
}

View File

@@ -22,6 +22,8 @@ func (this *HTTPAuthPolicy) Init() error {
this.method = NewHTTPAuthTypeCMethod()
case HTTPAuthTypeTypeD:
this.method = NewHTTPAuthTypeDMethod()
case HTTPAuthTypeTypeE:
this.method = NewHTTPAuthTypeEMethod()
}
if this.method == nil {