proto

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Notifier_SendFsEvent_FullMethodName       = "/proto.Notifier/SendFsEvent"
	Notifier_SendProviderEvent_FullMethodName = "/proto.Notifier/SendProviderEvent"
	Notifier_SendLogEvent_FullMethodName      = "/proto.Notifier/SendLogEvent"
)

Variables

View Source
var File_proto_notifier_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use FsEvent.ProtoReflect.Descriptor instead.

func (*FsEvent) GetAction

func (x *FsEvent) GetAction() string

func (*FsEvent) GetBucket

func (x *FsEvent) GetBucket() string

func (*FsEvent) GetElapsed added in v0.1.3

func (x *FsEvent) GetElapsed() int64

func (*FsEvent) GetEndpoint

func (x *FsEvent) GetEndpoint() string

func (*FsEvent) GetFileSize

func (x *FsEvent) GetFileSize() int64

func (*FsEvent) GetFsPath

func (x *FsEvent) GetFsPath() string

func (*FsEvent) GetFsProvider

func (x *FsEvent) GetFsProvider() int32

func (*FsEvent) GetFsTargetPath

func (x *FsEvent) GetFsTargetPath() string

func (*FsEvent) GetIp

func (x *FsEvent) GetIp() string

func (*FsEvent) GetMetadata added in v0.1.7

func (x *FsEvent) GetMetadata() map[string]string

func (*FsEvent) GetOpenFlags

func (x *FsEvent) GetOpenFlags() int32

func (*FsEvent) GetProtocol

func (x *FsEvent) GetProtocol() string

func (*FsEvent) GetRole added in v0.1.3

func (x *FsEvent) GetRole() string

func (*FsEvent) GetSessionId

func (x *FsEvent) GetSessionId() string

func (*FsEvent) GetSshCmd

func (x *FsEvent) GetSshCmd() string

func (*FsEvent) GetStatus

func (x *FsEvent) GetStatus() int32

func (*FsEvent) GetTimestamp

func (x *FsEvent) GetTimestamp() int64

func (*FsEvent) GetUsername

func (x *FsEvent) GetUsername() string

func (*FsEvent) GetVirtualPath

func (x *FsEvent) GetVirtualPath() string

func (*FsEvent) GetVirtualTargetPath

func (x *FsEvent) GetVirtualTargetPath() string

func (*FsEvent) ProtoMessage

func (*FsEvent) ProtoMessage()

func (*FsEvent) ProtoReflect

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

func (*FsEvent) Reset

func (x *FsEvent) Reset()

func (*FsEvent) String

func (x *FsEvent) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use LogEvent.ProtoReflect.Descriptor instead.

func (*LogEvent) GetEvent added in v0.1.4

func (x *LogEvent) GetEvent() int32

func (*LogEvent) GetIp added in v0.1.4

func (x *LogEvent) GetIp() string

func (*LogEvent) GetMessage added in v0.1.4

func (x *LogEvent) GetMessage() string

func (*LogEvent) GetProtocol added in v0.1.4

func (x *LogEvent) GetProtocol() string

func (*LogEvent) GetRole added in v0.1.4

func (x *LogEvent) GetRole() string

func (*LogEvent) GetTimestamp added in v0.1.4

func (x *LogEvent) GetTimestamp() int64

func (*LogEvent) GetUsername added in v0.1.4

func (x *LogEvent) GetUsername() string

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

func (*LogEvent) Reset added in v0.1.4

func (x *LogEvent) Reset()

func (*LogEvent) String added in v0.1.4

func (x *LogEvent) String() string

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.golang.ir/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

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.

Jump to

Keyboard shortcuts

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