packet

package
v6.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MPL-2.0 Imports: 5 Imported by: 29

Documentation

Index

Constants

View Source
const (
	CONNACK_CONNECTION_ACCEPTED int32 = iota
	CONNACK_REFUSED_BAD_PROTOCOL_VERSION
	CONNACK_REFUSED_IDENTIFIER_REJECTED
	CONNACK_REFUSED_SERVER_UNAVAILABLE
	CONNACK_REFUSED_BAD_USERNAME_OR_PASSWORD
	CONNACK_REFUSED_NOT_AUTHORIZED
)
View Source
const (
	CONNECT_FLAG_CLEAN_SESSION byte
	CONNECT_FLAG_WILL_FLAG
	CONNECT_FLAG_WILL_QOS byte = 3 << iota

	CONNECT_FLAG_WILL_RETAIN byte = 1 << iota
	CONNECT_FLAG_PASSWORD
	CONNECT_FLAG_USERNAME
)
View Source
const (
	RESERVED byte = iota
	CONNECT
	CONNACK
	PUBLISH
	PUBACK
	PUBREC
	PUBREL
	PUBCOMP
	SUBSCRIBE
	SUBACK
	UNSUBSCRIBE
	UNSUBACK
	PINGREQ
	PINGRESP
	DISCONNECT
)
View Source
const DefaultKeepalive int32 = 30

Variables

This section is empty.

Functions

func ConnAckDecoder

func ConnAckDecoder(fn connAckHandler) func(h *Header, buffer []byte) error

func ConnAckLength

func ConnAckLength(p *ConnAck) int

func ConnectDecoder

func ConnectDecoder(fn connectHandler) func(h *Header, buffer []byte) error

func ConnectLength

func ConnectLength(p *Connect) int

func DisconnectDecoder

func DisconnectDecoder(fn disconnectHandler) func(h *Header, buffer []byte) error

func EncodeConnAck

func EncodeConnAck(p *ConnAck, buff []byte) (int, error)

func EncodeConnect

func EncodeConnect(p *Connect, buff []byte) (int, error)

func EncodeDisconnect

func EncodeDisconnect(p *Disconnect, buff []byte) (int, error)

func EncodePingReq

func EncodePingReq(p *PingReq, buff []byte) (int, error)

func EncodePingResp

func EncodePingResp(p *PingResp, buff []byte) (int, error)

func EncodePubAck

func EncodePubAck(p *PubAck, buff []byte) (int, error)

func EncodePubComp

func EncodePubComp(p *PubComp, buff []byte) (int, error)

func EncodePubRec

func EncodePubRec(p *PubRec, buff []byte) (int, error)

func EncodePubRel

func EncodePubRel(p *PubRel, buff []byte) (int, error)

func EncodePublish

func EncodePublish(p *Publish, buff []byte) (int, error)

func EncodeSubAck

func EncodeSubAck(p *SubAck, buff []byte) (int, error)

func EncodeSubscribe

func EncodeSubscribe(p *Subscribe, buff []byte) (int, error)

func EncodeUnsubAck

func EncodeUnsubAck(p *UnsubAck, buff []byte) (int, error)

func EncodeUnsubscribe

func EncodeUnsubscribe(p *Unsubscribe, buff []byte) (int, error)

func PingReqDecoder

func PingReqDecoder(fn pingReqHandler) func(h *Header, buffer []byte) error

func PingReqLength

func PingReqLength(p *PingReq) int

func PingRespDecoder

func PingRespDecoder(fn pingRespHandler) func(h *Header, buffer []byte) error

func PingRespLength

func PingRespLength(p *PingResp) int

func PubAckDecoder

func PubAckDecoder(fn pubAckHandler) func(h *Header, buffer []byte) error

func PubAckLength

func PubAckLength(p *PubAck) int

func PubCompDecoder

func PubCompDecoder(fn pubCompHandler) func(h *Header, buffer []byte) error

func PubCompLength

func PubCompLength(p *PubComp) int

func PubRecDecoder

func PubRecDecoder(fn pubRecHandler) func(h *Header, buffer []byte) error

func PubRecLength

func PubRecLength(p *PubRec) int

func PubRelDecoder

func PubRelDecoder(fn pubRelHandler) func(h *Header, buffer []byte) error

func PubRelLength

func PubRelLength(p *PubRel) int

func PublishDecoder

func PublishDecoder(fn publishHandler) func(h *Header, buffer []byte) error

func PublishLength

func PublishLength(p *Publish) int

func SubAckDecoder

func SubAckDecoder(fn subAckHandler) func(h *Header, buffer []byte) error

func SubAckLength

func SubAckLength(p *SubAck) int

func SubscribeDecoder

func SubscribeDecoder(fn subscribeHandler) func(h *Header, buffer []byte) error

func SubscribeLength

func SubscribeLength(p *Subscribe) int

func TypeString

func TypeString(p Packet) string

func UnmarshalDisconnect

func UnmarshalDisconnect(p *Disconnect, buff []byte) (int, error)

func UnmarshalPingReq

func UnmarshalPingReq(p *PingReq, buff []byte) (int, error)

func UnmarshalPingResp

func UnmarshalPingResp(p *PingResp, buff []byte) (int, error)

func UnmarshalPubAck

func UnmarshalPubAck(p *PubAck, buff []byte) (int, error)

func UnmarshalPubComp

func UnmarshalPubComp(p *PubComp, buff []byte) (int, error)

func UnmarshalPubRec

func UnmarshalPubRec(p *PubRec, buff []byte) (int, error)

func UnmarshalPubRel

func UnmarshalPubRel(p *PubRel, buff []byte) (int, error)

func UnmarshalPublish

func UnmarshalPublish(p *Publish, buff []byte) (int, error)

func UnmarshalSubAck

func UnmarshalSubAck(p *SubAck, buff []byte) (int, error)

func UnmarshalSubscribe

func UnmarshalSubscribe(p *Subscribe, buff []byte) (int, error)

func UnmarshalUnsubAck

func UnmarshalUnsubAck(p *UnsubAck, buff []byte) (int, error)

func UnmarshalUnsubscribe

func UnmarshalUnsubscribe(p *Unsubscribe, buff []byte) (int, error)

func UnsubAckDecoder

func UnsubAckDecoder(fn unsubAckHandler) func(h *Header, buffer []byte) error

func UnsubAckLength

func UnsubAckLength(p *UnsubAck) int

func UnsubscribeDecoder

func UnsubscribeDecoder(fn unsubscribeHandler) func(h *Header, buffer []byte) error

func UnsubscribeLength

func UnsubscribeLength(p *Unsubscribe) int

Types

type ConnAck

type ConnAck struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	ReturnCode           int32    `protobuf:"varint,2,opt,name=returnCode,proto3" json:"returnCode,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ConnAck) Descriptor

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

func (*ConnAck) Encode

func (p *ConnAck) Encode(buff []byte) (int, error)

func (*ConnAck) GetHeader

func (m *ConnAck) GetHeader() *Header

func (*ConnAck) GetReturnCode

func (m *ConnAck) GetReturnCode() int32

func (*ConnAck) GetType

func (p *ConnAck) GetType() byte

func (*ConnAck) Length

func (p *ConnAck) Length() int

func (*ConnAck) ProtoMessage

func (*ConnAck) ProtoMessage()

func (*ConnAck) Reset

func (m *ConnAck) Reset()

func (*ConnAck) String

func (m *ConnAck) String() string

func (*ConnAck) Type

func (*ConnAck) Type() byte

func (*ConnAck) UnmarshalMQTT

func (c *ConnAck) UnmarshalMQTT(buf []byte) (int, error)

func (*ConnAck) XXX_DiscardUnknown

func (m *ConnAck) XXX_DiscardUnknown()

func (*ConnAck) XXX_Marshal

func (m *ConnAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnAck) XXX_Merge

func (m *ConnAck) XXX_Merge(src proto.Message)

func (*ConnAck) XXX_Size

func (m *ConnAck) XXX_Size() int

func (*ConnAck) XXX_Unmarshal

func (m *ConnAck) XXX_Unmarshal(b []byte) error

type Connect

type Connect struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Clean                bool     `protobuf:"varint,3,opt,name=clean,proto3" json:"clean,omitempty"`
	ClientId             []byte   `protobuf:"bytes,4,opt,name=clientId,proto3" json:"clientId,omitempty"`
	Username             []byte   `protobuf:"bytes,5,opt,name=username,proto3" json:"username,omitempty"`
	Password             []byte   `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"`
	WillTopic            []byte   `protobuf:"bytes,7,opt,name=willTopic,proto3" json:"willTopic,omitempty"`
	WillPayload          []byte   `protobuf:"bytes,8,opt,name=willPayload,proto3" json:"willPayload,omitempty"`
	WillQos              int32    `protobuf:"varint,9,opt,name=willQos,proto3" json:"willQos,omitempty"`
	WillRetain           bool     `protobuf:"varint,10,opt,name=willRetain,proto3" json:"willRetain,omitempty"`
	KeepaliveTimer       int32    `protobuf:"varint,11,opt,name=keepaliveTimer,proto3" json:"keepaliveTimer,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Connect) Descriptor

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

func (*Connect) Encode

func (p *Connect) Encode(buff []byte) (int, error)

func (*Connect) GetClean

func (m *Connect) GetClean() bool

func (*Connect) GetClientId

func (m *Connect) GetClientId() []byte

func (*Connect) GetHeader

func (m *Connect) GetHeader() *Header

func (*Connect) GetKeepaliveTimer

func (m *Connect) GetKeepaliveTimer() int32

func (*Connect) GetPassword

func (m *Connect) GetPassword() []byte

func (*Connect) GetUsername

func (m *Connect) GetUsername() []byte

func (*Connect) GetWillPayload

func (m *Connect) GetWillPayload() []byte

func (*Connect) GetWillQos

func (m *Connect) GetWillQos() int32

func (*Connect) GetWillRetain

func (m *Connect) GetWillRetain() bool

func (*Connect) GetWillTopic

func (m *Connect) GetWillTopic() []byte

func (*Connect) Length

func (p *Connect) Length() int

func (*Connect) ProtoMessage

func (*Connect) ProtoMessage()

func (*Connect) Reset

func (m *Connect) Reset()

func (*Connect) String

func (m *Connect) String() string

func (*Connect) Type

func (*Connect) Type() byte

func (*Connect) UnmarshalMQTT

func (c *Connect) UnmarshalMQTT(buf []byte) (int, error)

func (*Connect) XXX_DiscardUnknown

func (m *Connect) XXX_DiscardUnknown()

func (*Connect) XXX_Marshal

func (m *Connect) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Connect) XXX_Merge

func (m *Connect) XXX_Merge(src proto.Message)

func (*Connect) XXX_Size

func (m *Connect) XXX_Size() int

func (*Connect) XXX_Unmarshal

func (m *Connect) XXX_Unmarshal(b []byte) error

type Decoder

type Decoder interface {
	Packet
	UnmarshalMQTT(buf []byte) (int, error)
}

type Disconnect

type Disconnect struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Id                   string   `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Disconnect) Descriptor

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

func (*Disconnect) Encode

func (p *Disconnect) Encode(buff []byte) (int, error)

func (*Disconnect) GetHeader

func (m *Disconnect) GetHeader() *Header

func (*Disconnect) GetId

func (m *Disconnect) GetId() string

func (*Disconnect) Length

func (p *Disconnect) Length() int

func (*Disconnect) ProtoMessage

func (*Disconnect) ProtoMessage()

func (*Disconnect) Reset

func (m *Disconnect) Reset()

func (*Disconnect) String

func (m *Disconnect) String() string

func (*Disconnect) Type

func (*Disconnect) Type() byte

func (*Disconnect) UnmarshalMQTT

func (c *Disconnect) UnmarshalMQTT(buf []byte) (int, error)

func (*Disconnect) XXX_DiscardUnknown

func (m *Disconnect) XXX_DiscardUnknown()

func (*Disconnect) XXX_Marshal

func (m *Disconnect) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Disconnect) XXX_Merge

func (m *Disconnect) XXX_Merge(src proto.Message)

func (*Disconnect) XXX_Size

func (m *Disconnect) XXX_Size() int

func (*Disconnect) XXX_Unmarshal

func (m *Disconnect) XXX_Unmarshal(b []byte) error
type Header struct {
	Dup                  bool     `protobuf:"varint,1,opt,name=dup,proto3" json:"dup,omitempty"`
	Qos                  int32    `protobuf:"varint,2,opt,name=qos,proto3" json:"qos,omitempty"`
	Retain               bool     `protobuf:"varint,3,opt,name=retain,proto3" json:"retain,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Header) Descriptor

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

func (*Header) GetDup

func (m *Header) GetDup() bool

func (*Header) GetQos

func (m *Header) GetQos() int32

func (*Header) GetRetain

func (m *Header) GetRetain() bool

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) String

func (m *Header) String() string

func (*Header) XXX_DiscardUnknown

func (m *Header) XXX_DiscardUnknown()

func (*Header) XXX_Marshal

func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Header) XXX_Merge

func (m *Header) XXX_Merge(src proto.Message)

func (*Header) XXX_Size

func (m *Header) XXX_Size() int

func (*Header) XXX_Unmarshal

func (m *Header) XXX_Unmarshal(b []byte) error

type Packet

type Packet interface {
	Type() byte
	Length() int
	Encode(buff []byte) (int, error)
	GetHeader() *Header
}

type PingReq

type PingReq struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PingReq) Descriptor

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

func (*PingReq) Encode

func (p *PingReq) Encode(buff []byte) (int, error)

func (*PingReq) GetHeader

func (m *PingReq) GetHeader() *Header

func (*PingReq) Length

func (p *PingReq) Length() int

func (*PingReq) ProtoMessage

func (*PingReq) ProtoMessage()

func (*PingReq) Reset

func (m *PingReq) Reset()

func (*PingReq) String

func (m *PingReq) String() string

func (*PingReq) Type

func (*PingReq) Type() byte

func (*PingReq) UnmarshalMQTT

func (c *PingReq) UnmarshalMQTT(buf []byte) (int, error)

func (*PingReq) XXX_DiscardUnknown

func (m *PingReq) XXX_DiscardUnknown()

func (*PingReq) XXX_Marshal

func (m *PingReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PingReq) XXX_Merge

func (m *PingReq) XXX_Merge(src proto.Message)

func (*PingReq) XXX_Size

func (m *PingReq) XXX_Size() int

func (*PingReq) XXX_Unmarshal

func (m *PingReq) XXX_Unmarshal(b []byte) error

type PingResp

type PingResp struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PingResp) Descriptor

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

func (*PingResp) Encode

func (p *PingResp) Encode(buff []byte) (int, error)

func (*PingResp) GetHeader

func (m *PingResp) GetHeader() *Header

func (*PingResp) GetType

func (p *PingResp) GetType() byte

func (*PingResp) Length

func (p *PingResp) Length() int

func (*PingResp) ProtoMessage

func (*PingResp) ProtoMessage()

func (*PingResp) Reset

func (m *PingResp) Reset()

func (*PingResp) String

func (m *PingResp) String() string

func (*PingResp) Type

func (*PingResp) Type() byte

func (*PingResp) UnmarshalMQTT

func (c *PingResp) UnmarshalMQTT(buf []byte) (int, error)

func (*PingResp) XXX_DiscardUnknown

func (m *PingResp) XXX_DiscardUnknown()

func (*PingResp) XXX_Marshal

func (m *PingResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PingResp) XXX_Merge

func (m *PingResp) XXX_Merge(src proto.Message)

func (*PingResp) XXX_Size

func (m *PingResp) XXX_Size() int

func (*PingResp) XXX_Unmarshal

func (m *PingResp) XXX_Unmarshal(b []byte) error

type PubAck

type PubAck struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	MessageId            int32    `protobuf:"varint,2,opt,name=messageId,proto3" json:"messageId,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PubAck) Descriptor

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

func (*PubAck) Encode

func (p *PubAck) Encode(buff []byte) (int, error)

func (*PubAck) GetHeader

func (m *PubAck) GetHeader() *Header

func (*PubAck) GetMessageId

func (m *PubAck) GetMessageId() int32

func (*PubAck) GetType

func (p *PubAck) GetType() byte

func (*PubAck) Length

func (p *PubAck) Length() int

func (*PubAck) ProtoMessage

func (*PubAck) ProtoMessage()

func (*PubAck) Reset

func (m *PubAck) Reset()

func (*PubAck) String

func (m *PubAck) String() string

func (*PubAck) Type

func (*PubAck) Type() byte

func (*PubAck) UnmarshalMQTT

func (c *PubAck) UnmarshalMQTT(buf []byte) (int, error)

func (*PubAck) XXX_DiscardUnknown

func (m *PubAck) XXX_DiscardUnknown()

func (*PubAck) XXX_Marshal

func (m *PubAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PubAck) XXX_Merge

func (m *PubAck) XXX_Merge(src proto.Message)

func (*PubAck) XXX_Size

func (m *PubAck) XXX_Size() int

func (*PubAck) XXX_Unmarshal

func (m *PubAck) XXX_Unmarshal(b []byte) error

type PubComp

type PubComp struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	MessageId            int32    `protobuf:"varint,2,opt,name=messageId,proto3" json:"messageId,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PubComp) Descriptor

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

func (*PubComp) Encode

func (p *PubComp) Encode(buff []byte) (int, error)

func (*PubComp) GetHeader

func (m *PubComp) GetHeader() *Header

func (*PubComp) GetMessageId

func (m *PubComp) GetMessageId() int32

func (*PubComp) GetType

func (p *PubComp) GetType() byte

func (*PubComp) Length

func (p *PubComp) Length() int

func (*PubComp) ProtoMessage

func (*PubComp) ProtoMessage()

func (*PubComp) Reset

func (m *PubComp) Reset()

func (*PubComp) String

func (m *PubComp) String() string

func (*PubComp) Type

func (*PubComp) Type() byte

func (*PubComp) UnmarshalMQTT

func (c *PubComp) UnmarshalMQTT(buf []byte) (int, error)

func (*PubComp) XXX_DiscardUnknown

func (m *PubComp) XXX_DiscardUnknown()

func (*PubComp) XXX_Marshal

func (m *PubComp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PubComp) XXX_Merge

func (m *PubComp) XXX_Merge(src proto.Message)

func (*PubComp) XXX_Size

func (m *PubComp) XXX_Size() int

func (*PubComp) XXX_Unmarshal

func (m *PubComp) XXX_Unmarshal(b []byte) error

type PubRec

type PubRec struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	MessageId            int32    `protobuf:"varint,2,opt,name=messageId,proto3" json:"messageId,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PubRec) Descriptor

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

func (*PubRec) Encode

func (p *PubRec) Encode(buff []byte) (int, error)

func (*PubRec) GetHeader

func (m *PubRec) GetHeader() *Header

func (*PubRec) GetMessageId

func (m *PubRec) GetMessageId() int32

func (*PubRec) GetType

func (p *PubRec) GetType() byte

func (*PubRec) Length

func (p *PubRec) Length() int

func (*PubRec) ProtoMessage

func (*PubRec) ProtoMessage()

func (*PubRec) Reset

func (m *PubRec) Reset()

func (*PubRec) String

func (m *PubRec) String() string

func (*PubRec) Type

func (*PubRec) Type() byte

func (*PubRec) UnmarshalMQTT

func (c *PubRec) UnmarshalMQTT(buf []byte) (int, error)

func (*PubRec) XXX_DiscardUnknown

func (m *PubRec) XXX_DiscardUnknown()

func (*PubRec) XXX_Marshal

func (m *PubRec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PubRec) XXX_Merge

func (m *PubRec) XXX_Merge(src proto.Message)

func (*PubRec) XXX_Size

func (m *PubRec) XXX_Size() int

func (*PubRec) XXX_Unmarshal

func (m *PubRec) XXX_Unmarshal(b []byte) error

type PubRel

type PubRel struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	MessageId            int32    `protobuf:"varint,2,opt,name=messageId,proto3" json:"messageId,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PubRel) Descriptor

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

func (*PubRel) Encode

func (p *PubRel) Encode(buff []byte) (int, error)

func (*PubRel) GetHeader

func (m *PubRel) GetHeader() *Header

func (*PubRel) GetMessageId

func (m *PubRel) GetMessageId() int32

func (*PubRel) GetType

func (p *PubRel) GetType() byte

func (*PubRel) Length

func (p *PubRel) Length() int

func (*PubRel) ProtoMessage

func (*PubRel) ProtoMessage()

func (*PubRel) Reset

func (m *PubRel) Reset()

func (*PubRel) String

func (m *PubRel) String() string

func (*PubRel) Type

func (*PubRel) Type() byte

func (*PubRel) UnmarshalMQTT

func (c *PubRel) UnmarshalMQTT(buf []byte) (int, error)

func (*PubRel) XXX_DiscardUnknown

func (m *PubRel) XXX_DiscardUnknown()

func (*PubRel) XXX_Marshal

func (m *PubRel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PubRel) XXX_Merge

func (m *PubRel) XXX_Merge(src proto.Message)

func (*PubRel) XXX_Size

func (m *PubRel) XXX_Size() int

func (*PubRel) XXX_Unmarshal

func (m *PubRel) XXX_Unmarshal(b []byte) error

type Publish

type Publish struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	MessageId            int32    `protobuf:"varint,2,opt,name=messageId,proto3" json:"messageId,omitempty"`
	Topic                []byte   `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"`
	Payload              []byte   `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Publish) Descriptor

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

func (*Publish) Encode

func (p *Publish) Encode(buff []byte) (int, error)

func (*Publish) GetHeader

func (m *Publish) GetHeader() *Header

func (*Publish) GetMessageId

func (m *Publish) GetMessageId() int32

func (*Publish) GetPayload

func (m *Publish) GetPayload() []byte

func (*Publish) GetTopic

func (m *Publish) GetTopic() []byte

func (*Publish) GetType

func (p *Publish) GetType() byte

func (*Publish) Length

func (p *Publish) Length() int

func (*Publish) ProtoMessage

func (*Publish) ProtoMessage()

func (*Publish) Reset

func (m *Publish) Reset()

func (*Publish) String

func (m *Publish) String() string

func (*Publish) Type

func (*Publish) Type() byte

func (*Publish) UnmarshalMQTT

func (c *Publish) UnmarshalMQTT(buf []byte) (int, error)

func (*Publish) XXX_DiscardUnknown

func (m *Publish) XXX_DiscardUnknown()

func (*Publish) XXX_Marshal

func (m *Publish) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Publish) XXX_Merge

func (m *Publish) XXX_Merge(src proto.Message)

func (*Publish) XXX_Size

func (m *Publish) XXX_Size() int

func (*Publish) XXX_Unmarshal

func (m *Publish) XXX_Unmarshal(b []byte) error

type SubAck

type SubAck struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	MessageId            int32    `protobuf:"varint,2,opt,name=messageId,proto3" json:"messageId,omitempty"`
	Qos                  []int32  `protobuf:"varint,3,rep,packed,name=qos,proto3" json:"qos,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SubAck) Descriptor

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

func (*SubAck) Encode

func (p *SubAck) Encode(buff []byte) (int, error)

func (*SubAck) GetHeader

func (m *SubAck) GetHeader() *Header

func (*SubAck) GetMessageId

func (m *SubAck) GetMessageId() int32

func (*SubAck) GetQos

func (m *SubAck) GetQos() []int32

func (*SubAck) GetType

func (p *SubAck) GetType() byte

func (*SubAck) Length

func (p *SubAck) Length() int

func (*SubAck) ProtoMessage

func (*SubAck) ProtoMessage()

func (*SubAck) Reset

func (m *SubAck) Reset()

func (*SubAck) String

func (m *SubAck) String() string

func (*SubAck) Type

func (*SubAck) Type() byte

func (*SubAck) UnmarshalMQTT

func (c *SubAck) UnmarshalMQTT(buf []byte) (int, error)

func (*SubAck) XXX_DiscardUnknown

func (m *SubAck) XXX_DiscardUnknown()

func (*SubAck) XXX_Marshal

func (m *SubAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SubAck) XXX_Merge

func (m *SubAck) XXX_Merge(src proto.Message)

func (*SubAck) XXX_Size

func (m *SubAck) XXX_Size() int

func (*SubAck) XXX_Unmarshal

func (m *SubAck) XXX_Unmarshal(b []byte) error

type Subscribe

type Subscribe struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	MessageId            int32    `protobuf:"varint,2,opt,name=messageId,proto3" json:"messageId,omitempty"`
	Topic                [][]byte `protobuf:"bytes,3,rep,name=topic,proto3" json:"topic,omitempty"`
	Qos                  []int32  `protobuf:"varint,4,rep,packed,name=qos,proto3" json:"qos,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Subscribe) Descriptor

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

func (*Subscribe) Encode

func (p *Subscribe) Encode(buff []byte) (int, error)

func (*Subscribe) GetHeader

func (m *Subscribe) GetHeader() *Header

func (*Subscribe) GetMessageId

func (m *Subscribe) GetMessageId() int32

func (*Subscribe) GetQos

func (m *Subscribe) GetQos() []int32

func (*Subscribe) GetTopic

func (m *Subscribe) GetTopic() [][]byte

func (*Subscribe) Length

func (p *Subscribe) Length() int

func (*Subscribe) ProtoMessage

func (*Subscribe) ProtoMessage()

func (*Subscribe) Reset

func (m *Subscribe) Reset()

func (*Subscribe) String

func (m *Subscribe) String() string

func (*Subscribe) Type

func (*Subscribe) Type() byte

func (*Subscribe) UnmarshalMQTT

func (c *Subscribe) UnmarshalMQTT(buf []byte) (int, error)

func (*Subscribe) XXX_DiscardUnknown

func (m *Subscribe) XXX_DiscardUnknown()

func (*Subscribe) XXX_Marshal

func (m *Subscribe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Subscribe) XXX_Merge

func (m *Subscribe) XXX_Merge(src proto.Message)

func (*Subscribe) XXX_Size

func (m *Subscribe) XXX_Size() int

func (*Subscribe) XXX_Unmarshal

func (m *Subscribe) XXX_Unmarshal(b []byte) error

type UnsubAck

type UnsubAck struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	MessageId            int32    `protobuf:"varint,2,opt,name=messageId,proto3" json:"messageId,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UnsubAck) Descriptor

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

func (*UnsubAck) Encode

func (p *UnsubAck) Encode(buff []byte) (int, error)

func (*UnsubAck) GetHeader

func (m *UnsubAck) GetHeader() *Header

func (*UnsubAck) GetMessageId

func (m *UnsubAck) GetMessageId() int32

func (*UnsubAck) GetType

func (p *UnsubAck) GetType() byte

func (*UnsubAck) Length

func (p *UnsubAck) Length() int

func (*UnsubAck) ProtoMessage

func (*UnsubAck) ProtoMessage()

func (*UnsubAck) Reset

func (m *UnsubAck) Reset()

func (*UnsubAck) String

func (m *UnsubAck) String() string

func (*UnsubAck) Type

func (*UnsubAck) Type() byte

func (*UnsubAck) UnmarshalMQTT

func (c *UnsubAck) UnmarshalMQTT(buf []byte) (int, error)

func (*UnsubAck) XXX_DiscardUnknown

func (m *UnsubAck) XXX_DiscardUnknown()

func (*UnsubAck) XXX_Marshal

func (m *UnsubAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UnsubAck) XXX_Merge

func (m *UnsubAck) XXX_Merge(src proto.Message)

func (*UnsubAck) XXX_Size

func (m *UnsubAck) XXX_Size() int

func (*UnsubAck) XXX_Unmarshal

func (m *UnsubAck) XXX_Unmarshal(b []byte) error

type Unsubscribe

type Unsubscribe struct {
	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	MessageId            int32    `protobuf:"varint,2,opt,name=messageId,proto3" json:"messageId,omitempty"`
	Topic                [][]byte `protobuf:"bytes,3,rep,name=topic,proto3" json:"topic,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Unsubscribe) Descriptor

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

func (*Unsubscribe) Encode

func (p *Unsubscribe) Encode(buff []byte) (int, error)

func (*Unsubscribe) GetHeader

func (m *Unsubscribe) GetHeader() *Header

func (*Unsubscribe) GetMessageId

func (m *Unsubscribe) GetMessageId() int32

func (*Unsubscribe) GetTopic

func (m *Unsubscribe) GetTopic() [][]byte

func (*Unsubscribe) Length

func (p *Unsubscribe) Length() int

func (*Unsubscribe) ProtoMessage

func (*Unsubscribe) ProtoMessage()

func (*Unsubscribe) Reset

func (m *Unsubscribe) Reset()

func (*Unsubscribe) String

func (m *Unsubscribe) String() string

func (*Unsubscribe) Type

func (*Unsubscribe) Type() byte

func (*Unsubscribe) UnmarshalMQTT

func (c *Unsubscribe) UnmarshalMQTT(buf []byte) (int, error)

func (*Unsubscribe) XXX_DiscardUnknown

func (m *Unsubscribe) XXX_DiscardUnknown()

func (*Unsubscribe) XXX_Marshal

func (m *Unsubscribe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Unsubscribe) XXX_Merge

func (m *Unsubscribe) XXX_Merge(src proto.Message)

func (*Unsubscribe) XXX_Size

func (m *Unsubscribe) XXX_Size() int

func (*Unsubscribe) XXX_Unmarshal

func (m *Unsubscribe) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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