api

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TWLogEyeService_Stop_FullMethodName         = "/twlogeye.TWLogEyeService/Stop"
	TWLogEyeService_Reload_FullMethodName       = "/twlogeye.TWLogEyeService/Reload"
	TWLogEyeService_WatchNotify_FullMethodName  = "/twlogeye.TWLogEyeService/WatchNotify"
	TWLogEyeService_SearchNotify_FullMethodName = "/twlogeye.TWLogEyeService/SearchNotify"
	TWLogEyeService_SearchLog_FullMethodName    = "/twlogeye.TWLogEyeService/SearchLog"
)

Variables

View Source
var File_twlogeye_proto protoreflect.FileDescriptor
View Source
var TWLogEyeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "twlogeye.TWLogEyeService",
	HandlerType: (*TWLogEyeServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Stop",
			Handler:    _TWLogEyeService_Stop_Handler,
		},
		{
			MethodName: "Reload",
			Handler:    _TWLogEyeService_Reload_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "WatchNotify",
			Handler:       _TWLogEyeService_WatchNotify_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "SearchNotify",
			Handler:       _TWLogEyeService_SearchNotify_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "SearchLog",
			Handler:       _TWLogEyeService_SearchLog_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "twlogeye.proto",
}

TWLogEyeService_ServiceDesc is the grpc.ServiceDesc for TWLogEyeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTWLogEyeServiceServer

func RegisterTWLogEyeServiceServer(s grpc.ServiceRegistrar, srv TWLogEyeServiceServer)

Types

type ControlResponse

type ControlResponse struct {
	Ok      bool   `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*ControlResponse) Descriptor deprecated

func (*ControlResponse) Descriptor() ([]byte, []int)

Deprecated: Use ControlResponse.ProtoReflect.Descriptor instead.

func (*ControlResponse) GetMessage

func (x *ControlResponse) GetMessage() string

func (*ControlResponse) GetOk

func (x *ControlResponse) GetOk() bool

func (*ControlResponse) ProtoMessage

func (*ControlResponse) ProtoMessage()

func (*ControlResponse) ProtoReflect

func (x *ControlResponse) ProtoReflect() protoreflect.Message

func (*ControlResponse) Reset

func (x *ControlResponse) Reset()

func (*ControlResponse) String

func (x *ControlResponse) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type LogRequest

type LogRequest struct {
	Start   int64  `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
	End     int64  `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
	Logtype string `protobuf:"bytes,3,opt,name=logtype,proto3" json:"logtype,omitempty"`
	Search  string `protobuf:"bytes,4,opt,name=search,proto3" json:"search,omitempty"`
	// contains filtered or unexported fields
}

func (*LogRequest) Descriptor deprecated

func (*LogRequest) Descriptor() ([]byte, []int)

Deprecated: Use LogRequest.ProtoReflect.Descriptor instead.

func (*LogRequest) GetEnd

func (x *LogRequest) GetEnd() int64

func (*LogRequest) GetLogtype

func (x *LogRequest) GetLogtype() string

func (*LogRequest) GetSearch

func (x *LogRequest) GetSearch() string

func (*LogRequest) GetStart

func (x *LogRequest) GetStart() int64

func (*LogRequest) ProtoMessage

func (*LogRequest) ProtoMessage()

func (*LogRequest) ProtoReflect

func (x *LogRequest) ProtoReflect() protoreflect.Message

func (*LogRequest) Reset

func (x *LogRequest) Reset()

func (*LogRequest) String

func (x *LogRequest) String() string

type LogResponse

type LogResponse struct {
	Time int64  `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"`
	Src  string `protobuf:"bytes,3,opt,name=src,proto3" json:"src,omitempty"`
	Log  string `protobuf:"bytes,4,opt,name=log,proto3" json:"log,omitempty"`
	// contains filtered or unexported fields
}

func (*LogResponse) Descriptor deprecated

func (*LogResponse) Descriptor() ([]byte, []int)

Deprecated: Use LogResponse.ProtoReflect.Descriptor instead.

func (*LogResponse) GetLog

func (x *LogResponse) GetLog() string

func (*LogResponse) GetSrc

func (x *LogResponse) GetSrc() string

func (*LogResponse) GetTime

func (x *LogResponse) GetTime() int64

func (*LogResponse) ProtoMessage

func (*LogResponse) ProtoMessage()

func (*LogResponse) ProtoReflect

func (x *LogResponse) ProtoReflect() protoreflect.Message

func (*LogResponse) Reset

func (x *LogResponse) Reset()

func (*LogResponse) String

func (x *LogResponse) String() string

type NofifyRequest

type NofifyRequest struct {
	Start int64  `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
	End   int64  `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
	Level string `protobuf:"bytes,3,opt,name=level,proto3" json:"level,omitempty"`
	// contains filtered or unexported fields
}

func (*NofifyRequest) Descriptor deprecated

func (*NofifyRequest) Descriptor() ([]byte, []int)

Deprecated: Use NofifyRequest.ProtoReflect.Descriptor instead.

func (*NofifyRequest) GetEnd

func (x *NofifyRequest) GetEnd() int64

func (*NofifyRequest) GetLevel

func (x *NofifyRequest) GetLevel() string

func (*NofifyRequest) GetStart

func (x *NofifyRequest) GetStart() int64

func (*NofifyRequest) ProtoMessage

func (*NofifyRequest) ProtoMessage()

func (*NofifyRequest) ProtoReflect

func (x *NofifyRequest) ProtoReflect() protoreflect.Message

func (*NofifyRequest) Reset

func (x *NofifyRequest) Reset()

func (*NofifyRequest) String

func (x *NofifyRequest) String() string

type NotifyResponse

type NotifyResponse struct {
	Time  int64  `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"`
	Id    string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Level string `protobuf:"bytes,3,opt,name=level,proto3" json:"level,omitempty"`
	Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
	Tags  string `protobuf:"bytes,5,opt,name=tags,proto3" json:"tags,omitempty"`
	Src   string `protobuf:"bytes,6,opt,name=src,proto3" json:"src,omitempty"`
	Log   string `protobuf:"bytes,7,opt,name=log,proto3" json:"log,omitempty"`
	// contains filtered or unexported fields
}

func (*NotifyResponse) Descriptor deprecated

func (*NotifyResponse) Descriptor() ([]byte, []int)

Deprecated: Use NotifyResponse.ProtoReflect.Descriptor instead.

func (*NotifyResponse) GetId

func (x *NotifyResponse) GetId() string

func (*NotifyResponse) GetLevel

func (x *NotifyResponse) GetLevel() string

func (*NotifyResponse) GetLog

func (x *NotifyResponse) GetLog() string

func (*NotifyResponse) GetSrc

func (x *NotifyResponse) GetSrc() string

func (*NotifyResponse) GetTags

func (x *NotifyResponse) GetTags() string

func (*NotifyResponse) GetTime

func (x *NotifyResponse) GetTime() int64

func (*NotifyResponse) GetTitle

func (x *NotifyResponse) GetTitle() string

func (*NotifyResponse) ProtoMessage

func (*NotifyResponse) ProtoMessage()

func (*NotifyResponse) ProtoReflect

func (x *NotifyResponse) ProtoReflect() protoreflect.Message

func (*NotifyResponse) Reset

func (x *NotifyResponse) Reset()

func (*NotifyResponse) String

func (x *NotifyResponse) String() string

type TWLogEyeServiceClient

type TWLogEyeServiceClient interface {
	// Stop
	Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ControlResponse, error)
	// Reload sigma rules
	Reload(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ControlResponse, error)
	// Watch Notify
	WatchNotify(ctx context.Context, in *Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[NotifyResponse], error)
	// Search Notify
	SearchNotify(ctx context.Context, in *NofifyRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[NotifyResponse], error)
	// Search Log
	SearchLog(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LogResponse], error)
}

TWLogEyeServiceClient is the client API for TWLogEyeService 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.

type TWLogEyeServiceServer

type TWLogEyeServiceServer interface {
	// Stop
	Stop(context.Context, *Empty) (*ControlResponse, error)
	// Reload sigma rules
	Reload(context.Context, *Empty) (*ControlResponse, error)
	// Watch Notify
	WatchNotify(*Empty, grpc.ServerStreamingServer[NotifyResponse]) error
	// Search Notify
	SearchNotify(*NofifyRequest, grpc.ServerStreamingServer[NotifyResponse]) error
	// Search Log
	SearchLog(*LogRequest, grpc.ServerStreamingServer[LogResponse]) error
	// contains filtered or unexported methods
}

TWLogEyeServiceServer is the server API for TWLogEyeService service. All implementations must embed UnimplementedTWLogEyeServiceServer for forward compatibility.

type TWLogEyeService_SearchLogClient

type TWLogEyeService_SearchLogClient = grpc.ServerStreamingClient[LogResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type TWLogEyeService_SearchLogServer

type TWLogEyeService_SearchLogServer = grpc.ServerStreamingServer[LogResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type TWLogEyeService_SearchNotifyClient

type TWLogEyeService_SearchNotifyClient = grpc.ServerStreamingClient[NotifyResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type TWLogEyeService_SearchNotifyServer

type TWLogEyeService_SearchNotifyServer = grpc.ServerStreamingServer[NotifyResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type TWLogEyeService_WatchNotifyClient

type TWLogEyeService_WatchNotifyClient = grpc.ServerStreamingClient[NotifyResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type TWLogEyeService_WatchNotifyServer

type TWLogEyeService_WatchNotifyServer = grpc.ServerStreamingServer[NotifyResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type UnimplementedTWLogEyeServiceServer

type UnimplementedTWLogEyeServiceServer struct{}

UnimplementedTWLogEyeServiceServer must 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.

func (UnimplementedTWLogEyeServiceServer) Reload

func (UnimplementedTWLogEyeServiceServer) SearchLog

func (UnimplementedTWLogEyeServiceServer) SearchNotify

func (UnimplementedTWLogEyeServiceServer) Stop

func (UnimplementedTWLogEyeServiceServer) WatchNotify

type UnsafeTWLogEyeServiceServer

type UnsafeTWLogEyeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeTWLogEyeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TWLogEyeServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL