Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterNotifierServer(s grpc.ServiceRegistrar, srv NotifierServer)
- type FsEvent
- func (*FsEvent) Descriptor() ([]byte, []int)deprecated
- func (x *FsEvent) GetAction() string
- func (x *FsEvent) GetBucket() string
- func (x *FsEvent) GetElapsed() int64
- func (x *FsEvent) GetEndpoint() string
- func (x *FsEvent) GetFileSize() int64
- func (x *FsEvent) GetFsPath() string
- func (x *FsEvent) GetFsProvider() int32
- func (x *FsEvent) GetFsTargetPath() string
- func (x *FsEvent) GetIp() string
- func (x *FsEvent) GetMetadata() map[string]string
- func (x *FsEvent) GetOpenFlags() int32
- func (x *FsEvent) GetProtocol() string
- func (x *FsEvent) GetRole() string
- func (x *FsEvent) GetSessionId() string
- func (x *FsEvent) GetSshCmd() string
- func (x *FsEvent) GetStatus() int32
- func (x *FsEvent) GetTimestamp() int64
- func (x *FsEvent) GetUsername() string
- func (x *FsEvent) GetVirtualPath() string
- func (x *FsEvent) GetVirtualTargetPath() string
- func (*FsEvent) ProtoMessage()
- func (x *FsEvent) ProtoReflect() protoreflect.Message
- func (x *FsEvent) Reset()
- func (x *FsEvent) String() string
- type LogEvent
- func (*LogEvent) Descriptor() ([]byte, []int)deprecated
- func (x *LogEvent) GetEvent() int32
- func (x *LogEvent) GetIp() string
- func (x *LogEvent) GetMessage() string
- func (x *LogEvent) GetProtocol() string
- func (x *LogEvent) GetRole() string
- func (x *LogEvent) GetTimestamp() int64
- func (x *LogEvent) GetUsername() string
- func (*LogEvent) ProtoMessage()
- func (x *LogEvent) ProtoReflect() protoreflect.Message
- func (x *LogEvent) Reset()
- func (x *LogEvent) String() string
- type NotifierClient
- type NotifierServer
- type ProviderEvent
- func (*ProviderEvent) Descriptor() ([]byte, []int)deprecated
- func (x *ProviderEvent) GetAction() string
- func (x *ProviderEvent) GetIp() string
- func (x *ProviderEvent) GetObjectData() []byte
- func (x *ProviderEvent) GetObjectName() string
- func (x *ProviderEvent) GetObjectType() string
- func (x *ProviderEvent) GetRole() string
- func (x *ProviderEvent) GetTimestamp() int64
- func (x *ProviderEvent) GetUsername() string
- func (*ProviderEvent) ProtoMessage()
- func (x *ProviderEvent) ProtoReflect() protoreflect.Message
- func (x *ProviderEvent) Reset()
- func (x *ProviderEvent) String() string
- type UnimplementedNotifierServer
- func (UnimplementedNotifierServer) SendFsEvent(context.Context, *FsEvent) (*emptypb.Empty, error)
- func (UnimplementedNotifierServer) SendLogEvent(context.Context, *LogEvent) (*emptypb.Empty, error)
- func (UnimplementedNotifierServer) SendProviderEvent(context.Context, *ProviderEvent) (*emptypb.Empty, error)
- type UnsafeNotifierServer
Constants ¶
const ( Notifier_SendFsEvent_FullMethodName = "/proto.Notifier/SendFsEvent" Notifier_SendProviderEvent_FullMethodName = "/proto.Notifier/SendProviderEvent" Notifier_SendLogEvent_FullMethodName = "/proto.Notifier/SendLogEvent" )
Variables ¶
var File_proto_notifier_proto protoreflect.FileDescriptor
var Notifier_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Notifier", HandlerType: (*NotifierServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendFsEvent", Handler: _Notifier_SendFsEvent_Handler, }, { MethodName: "SendProviderEvent", Handler: _Notifier_SendProviderEvent_Handler, }, { MethodName: "SendLogEvent", Handler: _Notifier_SendLogEvent_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/notifier.proto", }
Notifier_ServiceDesc is the grpc.ServiceDesc for Notifier service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNotifierServer ¶
func RegisterNotifierServer(s grpc.ServiceRegistrar, srv NotifierServer)
Types ¶
type FsEvent ¶
type FsEvent struct { Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"` Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` FsPath string `protobuf:"bytes,4,opt,name=fs_path,json=fsPath,proto3" json:"fs_path,omitempty"` FsTargetPath string `protobuf:"bytes,5,opt,name=fs_target_path,json=fsTargetPath,proto3" json:"fs_target_path,omitempty"` SshCmd string `protobuf:"bytes,6,opt,name=ssh_cmd,json=sshCmd,proto3" json:"ssh_cmd,omitempty"` FileSize int64 `protobuf:"varint,7,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"` Protocol string `protobuf:"bytes,8,opt,name=protocol,proto3" json:"protocol,omitempty"` Status int32 `protobuf:"varint,9,opt,name=status,proto3" json:"status,omitempty"` Ip string `protobuf:"bytes,10,opt,name=ip,proto3" json:"ip,omitempty"` VirtualPath string `protobuf:"bytes,11,opt,name=virtual_path,json=virtualPath,proto3" json:"virtual_path,omitempty"` VirtualTargetPath string `protobuf:"bytes,12,opt,name=virtual_target_path,json=virtualTargetPath,proto3" json:"virtual_target_path,omitempty"` SessionId string `protobuf:"bytes,13,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` FsProvider int32 `protobuf:"varint,14,opt,name=fs_provider,json=fsProvider,proto3" json:"fs_provider,omitempty"` Bucket string `protobuf:"bytes,15,opt,name=bucket,proto3" json:"bucket,omitempty"` Endpoint string `protobuf:"bytes,16,opt,name=endpoint,proto3" json:"endpoint,omitempty"` OpenFlags int32 `protobuf:"varint,17,opt,name=open_flags,json=openFlags,proto3" json:"open_flags,omitempty"` Role string `protobuf:"bytes,18,opt,name=role,proto3" json:"role,omitempty"` Elapsed int64 `protobuf:"varint,19,opt,name=elapsed,proto3" json:"elapsed,omitempty"` Metadata map[string]string `` /* 158-byte string literal not displayed */ // contains filtered or unexported fields }
func (*FsEvent) Descriptor
deprecated
func (*FsEvent) GetElapsed ¶ added in v0.1.3
func (*FsEvent) GetEndpoint ¶
func (*FsEvent) GetFileSize ¶
func (*FsEvent) GetFsProvider ¶
func (*FsEvent) GetFsTargetPath ¶
func (*FsEvent) GetMetadata ¶ added in v0.1.7
func (*FsEvent) GetOpenFlags ¶
func (*FsEvent) GetProtocol ¶
func (*FsEvent) GetSessionId ¶
func (*FsEvent) GetTimestamp ¶
func (*FsEvent) GetUsername ¶
func (*FsEvent) GetVirtualPath ¶
func (*FsEvent) GetVirtualTargetPath ¶
func (*FsEvent) ProtoMessage ¶
func (*FsEvent) ProtoMessage()
func (*FsEvent) ProtoReflect ¶
func (x *FsEvent) ProtoReflect() protoreflect.Message
type LogEvent ¶ added in v0.1.4
type LogEvent struct { Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Event int32 `protobuf:"varint,2,opt,name=event,proto3" json:"event,omitempty"` Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` Protocol string `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"` Ip string `protobuf:"bytes,5,opt,name=ip,proto3" json:"ip,omitempty"` Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` Role string `protobuf:"bytes,7,opt,name=role,proto3" json:"role,omitempty"` // contains filtered or unexported fields }
func (*LogEvent) Descriptor
deprecated
added in
v0.1.4
func (*LogEvent) GetMessage ¶ added in v0.1.4
func (*LogEvent) GetProtocol ¶ added in v0.1.4
func (*LogEvent) GetTimestamp ¶ added in v0.1.4
func (*LogEvent) GetUsername ¶ added in v0.1.4
func (*LogEvent) ProtoMessage ¶ added in v0.1.4
func (*LogEvent) ProtoMessage()
func (*LogEvent) ProtoReflect ¶ added in v0.1.4
func (x *LogEvent) ProtoReflect() protoreflect.Message
type NotifierClient ¶
type NotifierClient interface { SendFsEvent(ctx context.Context, in *FsEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) SendProviderEvent(ctx context.Context, in *ProviderEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) SendLogEvent(ctx context.Context, in *LogEvent, opts ...grpc.CallOption) (*emptypb.Empty, error) }
NotifierClient is the client API for Notifier 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.
func NewNotifierClient ¶
func NewNotifierClient(cc grpc.ClientConnInterface) NotifierClient
type NotifierServer ¶
type NotifierServer interface { SendFsEvent(context.Context, *FsEvent) (*emptypb.Empty, error) SendProviderEvent(context.Context, *ProviderEvent) (*emptypb.Empty, error) SendLogEvent(context.Context, *LogEvent) (*emptypb.Empty, error) }
NotifierServer is the server API for Notifier service. All implementations should embed UnimplementedNotifierServer for forward compatibility
type ProviderEvent ¶
type ProviderEvent struct { Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"` ObjectType string `protobuf:"bytes,3,opt,name=object_type,json=objectType,proto3" json:"object_type,omitempty"` Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` Ip string `protobuf:"bytes,5,opt,name=ip,proto3" json:"ip,omitempty"` ObjectName string `protobuf:"bytes,6,opt,name=object_name,json=objectName,proto3" json:"object_name,omitempty"` ObjectData []byte `protobuf:"bytes,7,opt,name=object_data,json=objectData,proto3" json:"object_data,omitempty"` // object JSON serialized Role string `protobuf:"bytes,8,opt,name=role,proto3" json:"role,omitempty"` // contains filtered or unexported fields }
func (*ProviderEvent) Descriptor
deprecated
func (*ProviderEvent) Descriptor() ([]byte, []int)
Deprecated: Use ProviderEvent.ProtoReflect.Descriptor instead.
func (*ProviderEvent) GetAction ¶
func (x *ProviderEvent) GetAction() string
func (*ProviderEvent) GetIp ¶
func (x *ProviderEvent) GetIp() string
func (*ProviderEvent) GetObjectData ¶
func (x *ProviderEvent) GetObjectData() []byte
func (*ProviderEvent) GetObjectName ¶
func (x *ProviderEvent) GetObjectName() string
func (*ProviderEvent) GetObjectType ¶
func (x *ProviderEvent) GetObjectType() string
func (*ProviderEvent) GetRole ¶ added in v0.1.3
func (x *ProviderEvent) GetRole() string
func (*ProviderEvent) GetTimestamp ¶
func (x *ProviderEvent) GetTimestamp() int64
func (*ProviderEvent) GetUsername ¶
func (x *ProviderEvent) GetUsername() string
func (*ProviderEvent) ProtoMessage ¶
func (*ProviderEvent) ProtoMessage()
func (*ProviderEvent) ProtoReflect ¶
func (x *ProviderEvent) ProtoReflect() protoreflect.Message
func (*ProviderEvent) Reset ¶
func (x *ProviderEvent) Reset()
func (*ProviderEvent) String ¶
func (x *ProviderEvent) String() string
type UnimplementedNotifierServer ¶
type UnimplementedNotifierServer struct { }
UnimplementedNotifierServer should be embedded to have forward compatible implementations.
func (UnimplementedNotifierServer) SendFsEvent ¶
func (UnimplementedNotifierServer) SendLogEvent ¶ added in v0.1.4
func (UnimplementedNotifierServer) SendProviderEvent ¶
func (UnimplementedNotifierServer) SendProviderEvent(context.Context, *ProviderEvent) (*emptypb.Empty, error)
type UnsafeNotifierServer ¶ added in v0.1.3
type UnsafeNotifierServer interface {
// contains filtered or unexported methods
}
UnsafeNotifierServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NotifierServer will result in compilation errors.