Versions in this module Expand all Collapse all v0 v0.0.1 Dec 29, 2014 Changes in this version + const SUBACKRetFailure + const TypeCONNACK + const TypeCONNECT + const TypeDISCONNECT + const TypePINGREQ + const TypePINGRESP + const TypePUBACK + const TypePUBCOMP + const TypePUBLISH + const TypePUBREC + const TypePUBREL + const TypeSUBACK + const TypeSUBSCRIBE + const TypeUNSUBACK + const TypeUNSUBSCRIBE + var ErrClientIDExceedsMaxStringsLen = errors.New("the length of the Client Identifier exceeds the maximum strings legnth") + var ErrInvalidByteLen = errors.New("invalid byte length") + var ErrInvalidClientIDCleanSession = errors.New("the Clean Session must be true if the Client Identifier is zero-byte") + var ErrInvalidClientIDPassword = errors.New("the Password must be zero-byte if the Client Identifier is zero-byte") + var ErrInvalidConnectReturnCode = errors.New("invalid Connect Return code") + var ErrInvalidFixedHeader = errors.New("invalid fixed header") + var ErrInvalidFixedHeaderLen = errors.New("the length of the fixed header is invalid") + var ErrInvalidNoSubReq = errors.New("subscription request must be specified") + var ErrInvalidPacketID = errors.New("invalid Packet Identifier") + var ErrInvalidPacketType = errors.New("invalid MQTT Control Packet type") + var ErrInvalidQoS = errors.New("the QoS is invalid") + var ErrInvalidRemainingLen = errors.New("invalid length of the remaining") + var ErrInvalidRemainingLength = errors.New("invalid Remaining Length") + var ErrInvalidSUBACKReturnCode = errors.New("invalid SUBACK Return Code") + var ErrInvalidVariableHeader = errors.New("invalid variable header") + var ErrInvalidVariableHeaderLen = errors.New("invalid length of the variable header") + var ErrInvalidWillQoS = errors.New("the Will QoS is invalid") + var ErrInvalidWillTopicMessage = errors.New(...) + var ErrInvalidWillTopicMessageQoS = errors.New(...) + var ErrInvalidWillTopicMessageRetain = errors.New(...) + var ErrMessageExceedsMaxStringsLen = errors.New("the length of the Message exceeds the maximum strings legnth") + var ErrNoTopicFilter = errors.New("the Topic Filter must be specified") + var ErrPasswordExceedsMaxStringsLen = errors.New("the length of the Password exceeds the maximum strings legnth") + var ErrTopicFilterExceedsMaxStringsLen = errors.New("the length of the Topic Filter exceeds the maximum strings legnth") + var ErrTopicNameContainsWildcards = errors.New("the Topic Name contains wildcard characters") + var ErrTopicNameExceedsMaxStringsLen = errors.New("the length of the Topic Name exceeds the maximum strings legnth") + var ErrUserNameExceedsMaxStringsLen = errors.New("the length of the User Name exceeds the maximum strings legnth") + var ErrWillMessageExceedsMaxStringsLen = errors.New("the length of the Will Message exceeds the maximum strings legnth") + var ErrWillTopicExceedsMaxStringsLen = errors.New("the length of the Will Topic exceeds the maximum strings legnth") + type CONNACK struct + func (b *CONNACK) Type() (byte, error) + func (b *CONNACK) WriteTo(w io.Writer) (int64, error) + type CONNECT struct + func (b *CONNECT) Type() (byte, error) + func (b *CONNECT) WriteTo(w io.Writer) (int64, error) + type CONNECTOptions struct + CleanSession bool + ClientID []byte + KeepAlive uint16 + Password []byte + UserName []byte + WillMessage []byte + WillQoS byte + WillRetain bool + WillTopic []byte + type DISCONNECT struct + func (b *DISCONNECT) Type() (byte, error) + func (b *DISCONNECT) WriteTo(w io.Writer) (int64, error) + type FixedHeader []byte + type PINGREQ struct + func (b *PINGREQ) Type() (byte, error) + func (b *PINGREQ) WriteTo(w io.Writer) (int64, error) + type PINGRESP struct + func (b *PINGRESP) Type() (byte, error) + func (b *PINGRESP) WriteTo(w io.Writer) (int64, error) + type PUBACK struct + PacketID uint16 + func (b *PUBACK) Type() (byte, error) + func (b *PUBACK) WriteTo(w io.Writer) (int64, error) + type PUBACKOptions struct + PacketID uint16 + type PUBCOMP struct + PacketID uint16 + func (b *PUBCOMP) Type() (byte, error) + func (b *PUBCOMP) WriteTo(w io.Writer) (int64, error) + type PUBCOMPOptions struct + PacketID uint16 + type PUBLISH struct + DUP bool + Message []byte + PacketID uint16 + QoS byte + TopicName []byte + func (b *PUBLISH) Type() (byte, error) + func (b *PUBLISH) WriteTo(w io.Writer) (int64, error) + type PUBLISHOptions struct + DUP bool + Message []byte + PacketID uint16 + QoS byte + Retain bool + TopicName []byte + type PUBREC struct + PacketID uint16 + func (b *PUBREC) Type() (byte, error) + func (b *PUBREC) WriteTo(w io.Writer) (int64, error) + type PUBRECOptions struct + PacketID uint16 + type PUBREL struct + PacketID uint16 + func (b *PUBREL) Type() (byte, error) + func (b *PUBREL) WriteTo(w io.Writer) (int64, error) + type PUBRELOptions struct + PacketID uint16 + type Packet interface + Type func() (byte, error) + func NewCONNACKFromBytes(fixedHeader FixedHeader, variableHeader []byte) (Packet, error) + func NewCONNECT(opts *CONNECTOptions) (Packet, error) + func NewDISCONNECT() Packet + func NewFromBytes(fixedHeader FixedHeader, remaining []byte) (Packet, error) + func NewPINGREQ() Packet + func NewPINGRESPFromBytes(fixedHeader FixedHeader, remaining []byte) (Packet, error) + func NewPUBACK(opts *PUBACKOptions) (Packet, error) + func NewPUBACKFromBytes(fixedHeader FixedHeader, variableHeader []byte) (Packet, error) + func NewPUBCOMP(opts *PUBCOMPOptions) (Packet, error) + func NewPUBCOMPFromBytes(fixedHeader FixedHeader, variableHeader []byte) (Packet, error) + func NewPUBLISH(opts *PUBLISHOptions) (Packet, error) + func NewPUBLISHFromBytes(fixedHeader FixedHeader, remaining []byte) (Packet, error) + func NewPUBREC(opts *PUBRECOptions) (Packet, error) + func NewPUBRECFromBytes(fixedHeader FixedHeader, variableHeader []byte) (Packet, error) + func NewPUBREL(opts *PUBRELOptions) (Packet, error) + func NewPUBRELFromBytes(fixedHeader FixedHeader, variableHeader []byte) (Packet, error) + func NewSUBACKFromBytes(fixedHeader FixedHeader, remaining []byte) (Packet, error) + func NewSUBSCRIBE(opts *SUBSCRIBEOptions) (Packet, error) + func NewUNSUBACKFromBytes(fixedHeader FixedHeader, variableHeader []byte) (Packet, error) + func NewUNSUBSCRIBE(opts *UNSUBSCRIBEOptions) (Packet, error) + type SUBACK struct + PacketID uint16 + ReturnCodes []byte + func (b *SUBACK) Type() (byte, error) + func (b *SUBACK) WriteTo(w io.Writer) (int64, error) + type SUBSCRIBE struct + PacketID uint16 + SubReqs []*SubReq + func (b *SUBSCRIBE) Type() (byte, error) + func (b *SUBSCRIBE) WriteTo(w io.Writer) (int64, error) + type SUBSCRIBEOptions struct + PacketID uint16 + SubReqs []*SubReq + type SubReq struct + QoS byte + TopicFilter []byte + type UNSUBACK struct + PacketID uint16 + func (b *UNSUBACK) Type() (byte, error) + func (b *UNSUBACK) WriteTo(w io.Writer) (int64, error) + type UNSUBSCRIBE struct + PacketID uint16 + TopicFilters [][]byte + func (b *UNSUBSCRIBE) Type() (byte, error) + func (b *UNSUBSCRIBE) WriteTo(w io.Writer) (int64, error) + type UNSUBSCRIBEOptions struct + PacketID uint16 + TopicFilters [][]byte