fscan/RPC/lib/rpc.pb.go

477 lines
14 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc (unknown)
// source: lib/rpc.proto
package lib
import (
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
structpb "google.golang.org/protobuf/types/known/structpb"
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 StartScanRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Arg string `protobuf:"bytes,1,opt,name=arg,proto3" json:"arg,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StartScanRequest) Reset() {
*x = StartScanRequest{}
mi := &file_lib_rpc_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StartScanRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StartScanRequest) ProtoMessage() {}
func (x *StartScanRequest) ProtoReflect() protoreflect.Message {
mi := &file_lib_rpc_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 StartScanRequest.ProtoReflect.Descriptor instead.
func (*StartScanRequest) Descriptor() ([]byte, []int) {
return file_lib_rpc_proto_rawDescGZIP(), []int{0}
}
func (x *StartScanRequest) GetArg() string {
if x != nil {
return x.Arg
}
return ""
}
// 启动任务的响应
type StartScanResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StartScanResponse) Reset() {
*x = StartScanResponse{}
mi := &file_lib_rpc_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StartScanResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StartScanResponse) ProtoMessage() {}
func (x *StartScanResponse) ProtoReflect() protoreflect.Message {
mi := &file_lib_rpc_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 StartScanResponse.ProtoReflect.Descriptor instead.
func (*StartScanResponse) Descriptor() ([]byte, []int) {
return file_lib_rpc_proto_rawDescGZIP(), []int{1}
}
func (x *StartScanResponse) GetTaskId() string {
if x != nil {
return x.TaskId
}
return ""
}
func (x *StartScanResponse) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
// 获取扫描结果的请求
type TaskResultsRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Filter *Filter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` // 筛选条件(如关键字、状态等)
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TaskResultsRequest) Reset() {
*x = TaskResultsRequest{}
mi := &file_lib_rpc_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TaskResultsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TaskResultsRequest) ProtoMessage() {}
func (x *TaskResultsRequest) ProtoReflect() protoreflect.Message {
mi := &file_lib_rpc_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 TaskResultsRequest.ProtoReflect.Descriptor instead.
func (*TaskResultsRequest) Descriptor() ([]byte, []int) {
return file_lib_rpc_proto_rawDescGZIP(), []int{2}
}
func (x *TaskResultsRequest) GetFilter() *Filter {
if x != nil {
return x.Filter
}
return nil
}
type Filter struct {
state protoimpl.MessageState `protogen:"open.v1"`
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` // 任务ID
StartTime string `protobuf:"bytes,2,opt,name=Start_time,json=StartTime,proto3" json:"Start_time,omitempty"` // 开始时间
EndTime string `protobuf:"bytes,3,opt,name=End_time,json=EndTime,proto3" json:"End_time,omitempty"` // 结束时间
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Filter) Reset() {
*x = Filter{}
mi := &file_lib_rpc_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Filter) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Filter) ProtoMessage() {}
func (x *Filter) ProtoReflect() protoreflect.Message {
mi := &file_lib_rpc_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 Filter.ProtoReflect.Descriptor instead.
func (*Filter) Descriptor() ([]byte, []int) {
return file_lib_rpc_proto_rawDescGZIP(), []int{3}
}
func (x *Filter) GetTaskId() string {
if x != nil {
return x.TaskId
}
return ""
}
func (x *Filter) GetStartTime() string {
if x != nil {
return x.StartTime
}
return ""
}
func (x *Filter) GetEndTime() string {
if x != nil {
return x.EndTime
}
return ""
}
// 获取扫描结果的响应
type TaskResultsResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
Results []*ScanResult `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"`
Finished bool `protobuf:"varint,3,opt,name=finished,proto3" json:"finished,omitempty"`
Total int64 `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"` // 总结果数
End int64 `protobuf:"varint,5,opt,name=end,proto3" json:"end,omitempty"` // 结束结果数
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TaskResultsResponse) Reset() {
*x = TaskResultsResponse{}
mi := &file_lib_rpc_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TaskResultsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TaskResultsResponse) ProtoMessage() {}
func (x *TaskResultsResponse) ProtoReflect() protoreflect.Message {
mi := &file_lib_rpc_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 TaskResultsResponse.ProtoReflect.Descriptor instead.
func (*TaskResultsResponse) Descriptor() ([]byte, []int) {
return file_lib_rpc_proto_rawDescGZIP(), []int{4}
}
func (x *TaskResultsResponse) GetTaskId() string {
if x != nil {
return x.TaskId
}
return ""
}
func (x *TaskResultsResponse) GetResults() []*ScanResult {
if x != nil {
return x.Results
}
return nil
}
func (x *TaskResultsResponse) GetFinished() bool {
if x != nil {
return x.Finished
}
return false
}
func (x *TaskResultsResponse) GetTotal() int64 {
if x != nil {
return x.Total
}
return 0
}
func (x *TaskResultsResponse) GetEnd() int64 {
if x != nil {
return x.End
}
return 0
}
// 扫描结果结构体
type ScanResult struct {
state protoimpl.MessageState `protogen:"open.v1"`
Time string `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"`
Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
DetailsJson *structpb.Struct `protobuf:"bytes,5,opt,name=details_json,json=detailsJson,proto3" json:"details_json,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ScanResult) Reset() {
*x = ScanResult{}
mi := &file_lib_rpc_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ScanResult) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ScanResult) ProtoMessage() {}
func (x *ScanResult) ProtoReflect() protoreflect.Message {
mi := &file_lib_rpc_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 ScanResult.ProtoReflect.Descriptor instead.
func (*ScanResult) Descriptor() ([]byte, []int) {
return file_lib_rpc_proto_rawDescGZIP(), []int{5}
}
func (x *ScanResult) GetTime() string {
if x != nil {
return x.Time
}
return ""
}
func (x *ScanResult) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *ScanResult) GetTarget() string {
if x != nil {
return x.Target
}
return ""
}
func (x *ScanResult) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
func (x *ScanResult) GetDetailsJson() *structpb.Struct {
if x != nil {
return x.DetailsJson
}
return nil
}
var File_lib_rpc_proto protoreflect.FileDescriptor
const file_lib_rpc_proto_rawDesc = "" +
"\n" +
"\rlib/rpc.proto\x12\x03lib\x1a\x1cgoogle/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto\"$\n" +
"\x10StartScanRequest\x12\x10\n" +
"\x03arg\x18\x01 \x01(\tR\x03arg\"F\n" +
"\x11StartScanResponse\x12\x17\n" +
"\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x18\n" +
"\amessage\x18\x02 \x01(\tR\amessage\"9\n" +
"\x12TaskResultsRequest\x12#\n" +
"\x06filter\x18\x01 \x01(\v2\v.lib.FilterR\x06filter\"[\n" +
"\x06Filter\x12\x17\n" +
"\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x1d\n" +
"\n" +
"Start_time\x18\x02 \x01(\tR\tStartTime\x12\x19\n" +
"\bEnd_time\x18\x03 \x01(\tR\aEndTime\"\x9d\x01\n" +
"\x13TaskResultsResponse\x12\x17\n" +
"\atask_id\x18\x01 \x01(\tR\x06taskId\x12)\n" +
"\aresults\x18\x02 \x03(\v2\x0f.lib.ScanResultR\aresults\x12\x1a\n" +
"\bfinished\x18\x03 \x01(\bR\bfinished\x12\x14\n" +
"\x05total\x18\x04 \x01(\x03R\x05total\x12\x10\n" +
"\x03end\x18\x05 \x01(\x03R\x03end\"\xa0\x01\n" +
"\n" +
"ScanResult\x12\x12\n" +
"\x04time\x18\x01 \x01(\tR\x04time\x12\x12\n" +
"\x04type\x18\x02 \x01(\tR\x04type\x12\x16\n" +
"\x06target\x18\x03 \x01(\tR\x06target\x12\x16\n" +
"\x06status\x18\x04 \x01(\tR\x06status\x12:\n" +
"\fdetails_json\x18\x05 \x01(\v2\x17.google.protobuf.StructR\vdetailsJson2\xc4\x01\n" +
"\fFscanService\x12T\n" +
"\tStartScan\x12\x15.lib.StartScanRequest\x1a\x16.lib.StartScanResponse\"\x18\x82\xd3\xe4\x93\x02\x12:\x01*\"\r/v1/startscan\x12^\n" +
"\x0eGetScanResults\x12\x17.lib.TaskResultsRequest\x1a\x18.lib.TaskResultsResponse\"\x19\x82\xd3\xe4\x93\x02\x13:\x01*\"\x0e/v1/getresultsB\bZ\x06./;libb\x06proto3"
var (
file_lib_rpc_proto_rawDescOnce sync.Once
file_lib_rpc_proto_rawDescData []byte
)
func file_lib_rpc_proto_rawDescGZIP() []byte {
file_lib_rpc_proto_rawDescOnce.Do(func() {
file_lib_rpc_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_lib_rpc_proto_rawDesc), len(file_lib_rpc_proto_rawDesc)))
})
return file_lib_rpc_proto_rawDescData
}
var file_lib_rpc_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_lib_rpc_proto_goTypes = []any{
(*StartScanRequest)(nil), // 0: lib.StartScanRequest
(*StartScanResponse)(nil), // 1: lib.StartScanResponse
(*TaskResultsRequest)(nil), // 2: lib.TaskResultsRequest
(*Filter)(nil), // 3: lib.Filter
(*TaskResultsResponse)(nil), // 4: lib.TaskResultsResponse
(*ScanResult)(nil), // 5: lib.ScanResult
(*structpb.Struct)(nil), // 6: google.protobuf.Struct
}
var file_lib_rpc_proto_depIdxs = []int32{
3, // 0: lib.TaskResultsRequest.filter:type_name -> lib.Filter
5, // 1: lib.TaskResultsResponse.results:type_name -> lib.ScanResult
6, // 2: lib.ScanResult.details_json:type_name -> google.protobuf.Struct
0, // 3: lib.FscanService.StartScan:input_type -> lib.StartScanRequest
2, // 4: lib.FscanService.GetScanResults:input_type -> lib.TaskResultsRequest
1, // 5: lib.FscanService.StartScan:output_type -> lib.StartScanResponse
4, // 6: lib.FscanService.GetScanResults:output_type -> lib.TaskResultsResponse
5, // [5:7] is the sub-list for method output_type
3, // [3:5] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_lib_rpc_proto_init() }
func file_lib_rpc_proto_init() {
if File_lib_rpc_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_lib_rpc_proto_rawDesc), len(file_lib_rpc_proto_rawDesc)),
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_lib_rpc_proto_goTypes,
DependencyIndexes: file_lib_rpc_proto_depIdxs,
MessageInfos: file_lib_rpc_proto_msgTypes,
}.Build()
File_lib_rpc_proto = out.File
file_lib_rpc_proto_goTypes = nil
file_lib_rpc_proto_depIdxs = nil
}