proto

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MessageType_name = map[int32]string{
		0:  "Ping",
		1:  "Pong",
		2:  "Success",
		3:  "Failed",
		4:  "CreateChannel",
		5:  "CreateChannelSuccess",
		6:  "CreateChannelFailed",
		7:  "JoinChannel",
		8:  "JoinChannelSuccess",
		9:  "JoinChannelFailed",
		10: "ChannelFull",
		11: "ChannelNotFound",
		12: "GetFileStat",
		13: "FileStat",
		14: "FileInfo",
		15: "AgreeReceive",
		16: "RefuseReceive",
		17: "Cancel",
		18: "SkipFile",
		19: "FileData",
		20: "FileFinish",
		21: "ReadyForReceive",
		22: "SendFileFinish",
		23: "Interrupt",
		24: "LocalNetworkMode",
	}
	MessageType_value = map[string]int32{
		"Ping":                 0,
		"Pong":                 1,
		"Success":              2,
		"Failed":               3,
		"CreateChannel":        4,
		"CreateChannelSuccess": 5,
		"CreateChannelFailed":  6,
		"JoinChannel":          7,
		"JoinChannelSuccess":   8,
		"JoinChannelFailed":    9,
		"ChannelFull":          10,
		"ChannelNotFound":      11,
		"GetFileStat":          12,
		"FileStat":             13,
		"FileInfo":             14,
		"AgreeReceive":         15,
		"RefuseReceive":        16,
		"Cancel":               17,
		"SkipFile":             18,
		"FileData":             19,
		"FileFinish":           20,
		"ReadyForReceive":      21,
		"SendFileFinish":       22,
		"Interrupt":            23,
		"LocalNetworkMode":     24,
	}
)

Enum value maps for MessageType.

View Source
var File_proto_pdh_proto protoreflect.FileDescriptor
View Source
var PdhService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "PdhService",
	HandlerType: (*PdhServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Transmit",
			Handler:       _PdhService_Transmit_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "proto/pdh.proto",
}

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

Functions

func RegisterPdhServiceServer

func RegisterPdhServiceServer(s grpc.ServiceRegistrar, srv PdhServiceServer)

Types

type Message

type Message struct {
	MessageType MessageType `protobuf:"varint,1,opt,name=MessageType,proto3,enum=MessageType" json:"MessageType,omitempty"`
	Payload     []byte      `protobuf:"bytes,2,opt,name=Payload,proto3" json:"Payload,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetMessageType

func (x *Message) GetMessageType() MessageType

func (*Message) GetPayload

func (x *Message) GetPayload() []byte

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type MessageType

type MessageType int32
const (
	MessageType_Ping                 MessageType = 0
	MessageType_Pong                 MessageType = 1
	MessageType_Success              MessageType = 2
	MessageType_Failed               MessageType = 3
	MessageType_CreateChannel        MessageType = 4
	MessageType_CreateChannelSuccess MessageType = 5
	MessageType_CreateChannelFailed  MessageType = 6
	MessageType_JoinChannel          MessageType = 7
	MessageType_JoinChannelSuccess   MessageType = 8
	MessageType_JoinChannelFailed    MessageType = 9
	MessageType_ChannelFull          MessageType = 10
	MessageType_ChannelNotFound      MessageType = 11
	MessageType_GetFileStat          MessageType = 12
	MessageType_FileStat             MessageType = 13
	MessageType_FileInfo             MessageType = 14
	MessageType_AgreeReceive         MessageType = 15
	MessageType_RefuseReceive        MessageType = 16
	MessageType_Cancel               MessageType = 17
	MessageType_SkipFile             MessageType = 18
	MessageType_FileData             MessageType = 19
	MessageType_FileFinish           MessageType = 20
	MessageType_ReadyForReceive      MessageType = 21
	MessageType_SendFileFinish       MessageType = 22
	MessageType_Interrupt            MessageType = 23
	MessageType_LocalNetworkMode     MessageType = 24
)

func (MessageType) Descriptor

func (MessageType) Enum

func (x MessageType) Enum() *MessageType

func (MessageType) EnumDescriptor deprecated

func (MessageType) EnumDescriptor() ([]byte, []int)

Deprecated: Use MessageType.Descriptor instead.

func (MessageType) Number

func (x MessageType) Number() protoreflect.EnumNumber

func (MessageType) String

func (x MessageType) String() string

func (MessageType) Type

type PdhServiceClient

type PdhServiceClient interface {
	Transmit(ctx context.Context, opts ...grpc.CallOption) (PdhService_TransmitClient, error)
}

PdhServiceClient is the client API for PdhService 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 NewPdhServiceClient

func NewPdhServiceClient(cc grpc.ClientConnInterface) PdhServiceClient

type PdhServiceServer

type PdhServiceServer interface {
	Transmit(PdhService_TransmitServer) error
	// contains filtered or unexported methods
}

PdhServiceServer is the server API for PdhService service. All implementations must embed UnimplementedPdhServiceServer for forward compatibility

type PdhService_TransmitClient

type PdhService_TransmitClient interface {
	Send(*Message) error
	Recv() (*Message, error)
	grpc.ClientStream
}

type PdhService_TransmitServer

type PdhService_TransmitServer interface {
	Send(*Message) error
	Recv() (*Message, error)
	grpc.ServerStream
}

type UnimplementedPdhServiceServer

type UnimplementedPdhServiceServer struct {
}

UnimplementedPdhServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedPdhServiceServer) Transmit

type UnsafePdhServiceServer

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

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

Jump to

Keyboard shortcuts

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