Documentation ¶
Index ¶
- Variables
- func IsPacketWithCtrlKind(pkt *Packet, kind PacketCtrlKind) bool
- type KexReq
- func (*KexReq) Descriptor() ([]byte, []int)deprecated
- func (x *KexReq) GetNonce() []byte
- func (x *KexReq) GetPublicKeyHash() []byte
- func (x *KexReq) GetSignature() []byte
- func (*KexReq) ProtoMessage()
- func (x *KexReq) ProtoReflect() protoreflect.Message
- func (x *KexReq) Reset()
- func (x *KexReq) String() string
- type KexResp
- func (*KexResp) Descriptor() ([]byte, []int)deprecated
- func (x *KexResp) GetKexPublicKey() []byte
- func (x *KexResp) GetNonce() []byte
- func (x *KexResp) GetSignature() []byte
- func (*KexResp) ProtoMessage()
- func (x *KexResp) ProtoReflect() protoreflect.Message
- func (x *KexResp) Reset()
- func (x *KexResp) String() string
- type Packet
- func (*Packet) Descriptor() ([]byte, []int)deprecated
- func (x *Packet) GetData() []byte
- func (x *Packet) GetKind() PacketKind
- func (x *Packet) GetSourceID() uint32
- func (x *Packet) GetTargetID() uint32
- func (*Packet) ProtoMessage()
- func (x *Packet) ProtoReflect() protoreflect.Message
- func (x *Packet) Reset()
- func (x *Packet) String() string
- type PacketCtrlKind
- type PacketKind
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PacketKind_name = map[int32]string{ 0: "PacketKindNone", 1: "PacketKindInfo", 2: "PacketKindCtrl", 3: "PacketKindData", 4: "PacketKindError", } PacketKind_value = map[string]int32{ "PacketKindNone": 0, "PacketKindInfo": 1, "PacketKindCtrl": 2, "PacketKindData": 3, "PacketKindError": 4, } )
Enum value maps for PacketKind.
View Source
var File_med_proto protoreflect.FileDescriptor
Functions ¶
func IsPacketWithCtrlKind ¶
func IsPacketWithCtrlKind(pkt *Packet, kind PacketCtrlKind) bool
Types ¶
type KexReq ¶
type KexReq struct { Nonce []byte `protobuf:"bytes,1,opt,name=Nonce,proto3" json:"Nonce,omitempty"` PublicKeyHash []byte `protobuf:"bytes,2,opt,name=PublicKeyHash,proto3" json:"PublicKeyHash,omitempty"` Signature []byte `protobuf:"bytes,3,opt,name=Signature,proto3" json:"Signature,omitempty"` // contains filtered or unexported fields }
func (*KexReq) Descriptor
deprecated
func (*KexReq) GetPublicKeyHash ¶
func (*KexReq) GetSignature ¶
func (*KexReq) ProtoMessage ¶
func (*KexReq) ProtoMessage()
func (*KexReq) ProtoReflect ¶
func (x *KexReq) ProtoReflect() protoreflect.Message
type KexResp ¶
type KexResp struct { Nonce []byte `protobuf:"bytes,1,opt,name=Nonce,proto3" json:"Nonce,omitempty"` KexPublicKey []byte `protobuf:"bytes,2,opt,name=KexPublicKey,proto3" json:"KexPublicKey,omitempty"` Signature []byte `protobuf:"bytes,3,opt,name=Signature,proto3" json:"Signature,omitempty"` // contains filtered or unexported fields }
func (*KexResp) Descriptor
deprecated
func (*KexResp) GetKexPublicKey ¶
func (*KexResp) GetSignature ¶
func (*KexResp) ProtoMessage ¶
func (*KexResp) ProtoMessage()
func (*KexResp) ProtoReflect ¶
func (x *KexResp) ProtoReflect() protoreflect.Message
type Packet ¶
type Packet struct { TargetID uint32 `protobuf:"varint,1,opt,name=TargetID,proto3" json:"TargetID,omitempty"` SourceID uint32 `protobuf:"varint,2,opt,name=SourceID,proto3" json:"SourceID,omitempty"` Kind PacketKind `protobuf:"varint,3,opt,name=Kind,proto3,enum=med.PacketKind" json:"Kind,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=Data,proto3" json:"Data,omitempty"` // contains filtered or unexported fields }
func NewCtrlPacket ¶
func NewCtrlPacket(targetID uint32, kind PacketCtrlKind) *Packet
func (*Packet) Descriptor
deprecated
func (*Packet) GetKind ¶
func (x *Packet) GetKind() PacketKind
func (*Packet) GetSourceID ¶
func (*Packet) GetTargetID ¶
func (*Packet) ProtoMessage ¶
func (*Packet) ProtoMessage()
func (*Packet) ProtoReflect ¶
func (x *Packet) ProtoReflect() protoreflect.Message
type PacketCtrlKind ¶
type PacketCtrlKind byte
const ( PacketCtrl_None PacketCtrlKind = 0x00 PacketCtrl_Exit PacketCtrlKind = 0x0e )
func GetPacketCtrlKind ¶
func GetPacketCtrlKind(pkt *Packet) PacketCtrlKind
type PacketKind ¶
type PacketKind int32
const ( PacketKind_PacketKindNone PacketKind = 0 PacketKind_PacketKindInfo PacketKind = 1 PacketKind_PacketKindCtrl PacketKind = 2 PacketKind_PacketKindData PacketKind = 3 PacketKind_PacketKindError PacketKind = 4 )
func (PacketKind) Descriptor ¶
func (PacketKind) Descriptor() protoreflect.EnumDescriptor
func (PacketKind) Enum ¶
func (x PacketKind) Enum() *PacketKind
func (PacketKind) EnumDescriptor
deprecated
func (PacketKind) EnumDescriptor() ([]byte, []int)
Deprecated: Use PacketKind.Descriptor instead.
func (PacketKind) Number ¶
func (x PacketKind) Number() protoreflect.EnumNumber
func (PacketKind) String ¶
func (x PacketKind) String() string
func (PacketKind) Type ¶
func (PacketKind) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.