proto

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0, BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_message_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Message

type Message struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated added in v0.2.0

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetData added in v0.2.0

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

func (*Message) Name

func (m *Message) Name() string

Name returns the name of the message packet.

func (*Message) ProtoMessage added in v0.2.0

func (*Message) ProtoMessage()

func (*Message) ProtoReflect added in v0.2.3

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

func (*Message) Reset added in v0.2.0

func (x *Message) Reset()

func (*Message) String added in v0.2.0

func (x *Message) String() string

func (*Message) Type

func (m *Message) Type() PacketType

Type returns the packet type id of the message packet.

type MessageRequest added in v0.2.0

type MessageRequest struct {
	Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use MessageRequest.ProtoReflect.Descriptor instead.

func (*MessageRequest) GetId added in v0.2.0

func (x *MessageRequest) GetId() []byte

func (*MessageRequest) Name added in v0.2.0

func (m *MessageRequest) Name() string

Name returns the name of the message request packet.

func (*MessageRequest) ProtoMessage added in v0.2.0

func (*MessageRequest) ProtoMessage()

func (*MessageRequest) ProtoReflect added in v0.2.3

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

func (*MessageRequest) Reset added in v0.2.0

func (x *MessageRequest) Reset()

func (*MessageRequest) String added in v0.2.0

func (x *MessageRequest) String() string

func (*MessageRequest) Type added in v0.2.0

func (m *MessageRequest) Type() PacketType

Type returns the packet type id of the message request packet.

type Packet added in v0.2.0

type Packet interface {
	proto.Message

	// Name returns the name of the corresponding packet type for debugging.
	Name() string
	// Type returns the type of the corresponding packet as an enum.
	Type() PacketType
}

Packet extends the proto.Message interface with additional util functions.

type PacketType added in v0.2.0

type PacketType uint

PacketType is the type of packet type enum.

const (
	PacketMessage PacketType = 20 + iota
	PacketMessageRequest
)

An enum for the different packet types.

Jump to

Keyboard shortcuts

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