Versions in this module Expand all Collapse all v0 v0.0.3 Sep 21, 2017 Changes in this version + const MaxLPString + const PropertyAssignedClientIdentifier + const PropertyAuthData + const PropertyAuthMethod + const PropertyContentType + const PropertyCorrelationData + const PropertyMaximumPacketSize + const PropertyMaximumQoS + const PropertyPayloadFormat + const PropertyPublicationExpiry + const PropertyReasonString + const PropertyReceiveMaximum + const PropertyRequestProblemInfo + const PropertyRequestResponseInfo + const PropertyResponseInfo + const PropertyResponseTopic + const PropertyRetainAvailable + const PropertyServerKeepAlive + const PropertyServerReverence + const PropertySessionExpiryInterval + const PropertySharedSubscriptionAvailable + const PropertySubscriptionIdentifier + const PropertySubscriptionIdentifierAvailable + const PropertyTopicAlias + const PropertyTopicAliasMaximum + const PropertyTypeBinary + const PropertyTypeByte + const PropertyTypeInt + const PropertyTypeShort + const PropertyTypeString + const PropertyTypeStringPair + const PropertyTypeVarInt + const PropertyUserProperty + const PropertyWildcardSubscriptionAvailable + const PropertyWillDelayInterval + const ProtocolV31 + const ProtocolV311 + const ProtocolV50 + var SupportedVersions = map[ProtocolVersion]string + func Encode(p Provider) ([]byte, error) + func ReadLPBytes(buf []byte) ([]byte, int, error) + func ValidTopic(topic string) bool + func WriteLPBytes(buf []byte, b []byte) (int, error) + type Ack struct + func (h *Ack) Desc() string + func (h *Ack) Encode(to []byte) (int, error) + func (h *Ack) Flags() byte + func (h *Ack) ID() (IDType, error) + func (h *Ack) Name() string + func (h *Ack) PropertyForEach(f func(PropertyID, PropertyToType)) error + func (h *Ack) PropertyGet(id PropertyID) PropertyToType + func (h *Ack) PropertySet(id PropertyID, val interface{}) error + func (h *Ack) RemainingLength() int32 + func (h *Ack) SetVersion(v ProtocolVersion) + func (h *Ack) Size() (int, error) + func (h *Ack) Type() Type + func (h *Ack) Version() ProtocolVersion + func (msg *Ack) Reason() ReasonCode + func (msg *Ack) SetPacketID(v IDType) + func (msg *Ack) SetReason(c ReasonCode) + type Auth struct + func (h *Auth) Desc() string + func (h *Auth) Encode(to []byte) (int, error) + func (h *Auth) Flags() byte + func (h *Auth) ID() (IDType, error) + func (h *Auth) Name() string + func (h *Auth) PropertyForEach(f func(PropertyID, PropertyToType)) error + func (h *Auth) PropertyGet(id PropertyID) PropertyToType + func (h *Auth) PropertySet(id PropertyID, val interface{}) error + func (h *Auth) RemainingLength() int32 + func (h *Auth) SetVersion(v ProtocolVersion) + func (h *Auth) Size() (int, error) + func (h *Auth) Type() Type + func (h *Auth) Version() ProtocolVersion + func (msg *Auth) ReasonCode() ReasonCode + func (msg *Auth) SetReasonCode(c ReasonCode) error + type CodeIssuer byte + const CodeIssuerBoth + const CodeIssuerClient + const CodeIssuerInvalid + const CodeIssuerServer + type ConnAck struct + func (h *ConnAck) Desc() string + func (h *ConnAck) Encode(to []byte) (int, error) + func (h *ConnAck) Flags() byte + func (h *ConnAck) ID() (IDType, error) + func (h *ConnAck) Name() string + func (h *ConnAck) PropertyForEach(f func(PropertyID, PropertyToType)) error + func (h *ConnAck) PropertyGet(id PropertyID) PropertyToType + func (h *ConnAck) PropertySet(id PropertyID, val interface{}) error + func (h *ConnAck) RemainingLength() int32 + func (h *ConnAck) SetVersion(v ProtocolVersion) + func (h *ConnAck) Size() (int, error) + func (h *ConnAck) Type() Type + func (h *ConnAck) Version() ProtocolVersion + func (msg *ConnAck) ReturnCode() ReasonCode + func (msg *ConnAck) SessionPresent() bool + func (msg *ConnAck) SetReturnCode(ret ReasonCode) error + func (msg *ConnAck) SetSessionPresent(v bool) + type Connect struct + func (h *Connect) Desc() string + func (h *Connect) Encode(to []byte) (int, error) + func (h *Connect) Flags() byte + func (h *Connect) ID() (IDType, error) + func (h *Connect) Name() string + func (h *Connect) PropertyForEach(f func(PropertyID, PropertyToType)) error + func (h *Connect) PropertyGet(id PropertyID) PropertyToType + func (h *Connect) PropertySet(id PropertyID, val interface{}) error + func (h *Connect) RemainingLength() int32 + func (h *Connect) SetVersion(v ProtocolVersion) + func (h *Connect) Size() (int, error) + func (h *Connect) Type() Type + func (h *Connect) Version() ProtocolVersion + func (msg *Connect) ClientID() []byte + func (msg *Connect) Credentials() ([]byte, []byte) + func (msg *Connect) IsClean() bool + func (msg *Connect) KeepAlive() uint16 + func (msg *Connect) ResetWill() + func (msg *Connect) SetClean(v bool) + func (msg *Connect) SetClientID(v []byte) error + func (msg *Connect) SetCredentials(u []byte, p []byte) error + func (msg *Connect) SetKeepAlive(v uint16) + func (msg *Connect) SetWill(t string, m []byte, qos QosType, retain bool) error + func (msg *Connect) Will() (string, []byte, QosType, bool, bool) + type Disconnect struct + func (h *Disconnect) Desc() string + func (h *Disconnect) Encode(to []byte) (int, error) + func (h *Disconnect) Flags() byte + func (h *Disconnect) ID() (IDType, error) + func (h *Disconnect) Name() string + func (h *Disconnect) PropertyForEach(f func(PropertyID, PropertyToType)) error + func (h *Disconnect) PropertyGet(id PropertyID) PropertyToType + func (h *Disconnect) PropertySet(id PropertyID, val interface{}) error + func (h *Disconnect) RemainingLength() int32 + func (h *Disconnect) SetVersion(v ProtocolVersion) + func (h *Disconnect) Size() (int, error) + func (h *Disconnect) Type() Type + func (h *Disconnect) Version() ProtocolVersion + func (msg *Disconnect) ReasonCode() ReasonCode + func (msg *Disconnect) SetReasonCode(c ReasonCode) + type Error byte + const ErrDupViolation + const ErrEmptyPayload + const ErrInsufficientBufferSize + const ErrInsufficientDataSize + const ErrInvalid + const ErrInvalidArgs + const ErrInvalidLPStringSize + const ErrInvalidLength + const ErrInvalidMessageType + const ErrInvalidMessageTypeFlags + const ErrInvalidProtocolVersion + const ErrInvalidQoS + const ErrInvalidReturnCode + const ErrInvalidTopic + const ErrInvalidUnSubAck + const ErrInvalidUnSubscribe + const ErrInvalidUtf8 + const ErrMalformedStream + const ErrMalformedTopic + const ErrNotSet + const ErrNotSupported + const ErrOnPublishNil + const ErrPackedIDNotMatched + const ErrPackedIDZero + const ErrPanicDetected + const ErrProtocolInvalidName + const ErrProtocolViolation + const ErrUnimplemented + func (e Error) Error() string + type IDType uint16 + type PingReq struct + func (h *PingReq) Desc() string + func (h *PingReq) Encode(to []byte) (int, error) + func (h *PingReq) Flags() byte + func (h *PingReq) ID() (IDType, error) + func (h *PingReq) Name() string + func (h *PingReq) PropertyForEach(f func(PropertyID, PropertyToType)) error + func (h *PingReq) PropertyGet(id PropertyID) PropertyToType + func (h *PingReq) PropertySet(id PropertyID, val interface{}) error + func (h *PingReq) RemainingLength() int32 + func (h *PingReq) SetVersion(v ProtocolVersion) + func (h *PingReq) Size() (int, error) + func (h *PingReq) Type() Type + func (h *PingReq) Version() ProtocolVersion + type PingResp struct + func (h *PingResp) Desc() string + func (h *PingResp) Encode(to []byte) (int, error) + func (h *PingResp) Flags() byte + func (h *PingResp) ID() (IDType, error) + func (h *PingResp) Name() string + func (h *PingResp) PropertyForEach(f func(PropertyID, PropertyToType)) error + func (h *PingResp) PropertyGet(id PropertyID) PropertyToType + func (h *PingResp) PropertySet(id PropertyID, val interface{}) error + func (h *PingResp) RemainingLength() int32 + func (h *PingResp) SetVersion(v ProtocolVersion) + func (h *PingResp) Size() (int, error) + func (h *PingResp) Type() Type + func (h *PingResp) Version() ProtocolVersion + type PropertyError int + const ErrPropertyDuplicate + const ErrPropertyInvalidID + const ErrPropertyNotFound + const ErrPropertyPacketTypeMismatch + const ErrPropertyTypeMismatch + const ErrPropertyUnsupported + const ErrPropertyWrongType + func (e PropertyError) Error() string + type PropertyID uint32 + func (p PropertyID) DupAllowed(t Type) bool + func (p PropertyID) IsValid() bool + func (p PropertyID) IsValidPacketType(t Type) bool + type PropertyToType interface + AsBinary func() ([]byte, error) + AsByte func() (byte, error) + AsInt func() (uint32, error) + AsShort func() (uint16, error) + AsString func() (string, error) + AsStringPair func() (StringPair, error) + AsStringPairs func() ([]StringPair, error) + Type func() PropertyType + type PropertyType byte + type ProtocolVersion byte + func (p ProtocolVersion) IsValid() bool + type Provider interface + Desc func() string + Encode func([]byte) (int, error) + ID func() (IDType, error) + PropertyForEach func(func(PropertyID, PropertyToType)) error + PropertyGet func(PropertyID) PropertyToType + PropertySet func(PropertyID, interface{}) error + SetVersion func(v ProtocolVersion) + Size func() (int, error) + Type func() Type + Version func() ProtocolVersion + func Decode(v ProtocolVersion, buf []byte) (msg Provider, total int, err error) + func New(v ProtocolVersion, t Type) (Provider, error) + type Publish struct + func (h *Publish) Desc() string + func (h *Publish) Encode(to []byte) (int, error) + func (h *Publish) Flags() byte + func (h *Publish) ID() (IDType, error) + func (h *Publish) Name() string + func (h *Publish) PropertyForEach(f func(PropertyID, PropertyToType)) error + func (h *Publish) PropertyGet(id PropertyID) PropertyToType + func (h *Publish) PropertySet(id PropertyID, val interface{}) error + func (h *Publish) RemainingLength() int32 + func (h *Publish) SetVersion(v ProtocolVersion) + func (h *Publish) Size() (int, error) + func (h *Publish) Type() Type + func (h *Publish) Version() ProtocolVersion + func (msg *Publish) Clone(v ProtocolVersion) (*Publish, error) + func (msg *Publish) Dup() bool + func (msg *Publish) Expired(set bool) bool + func (msg *Publish) GetExpiry() *time.Time + func (msg *Publish) Payload() []byte + func (msg *Publish) PublishID() uintptr + func (msg *Publish) QoS() QosType + func (msg *Publish) Retain() bool + func (msg *Publish) Set(t string, p []byte, q QosType, r bool, d bool) error + func (msg *Publish) SetDup(v bool) + func (msg *Publish) SetExpiry(tm time.Time) + func (msg *Publish) SetPacketID(v IDType) + func (msg *Publish) SetPayload(v []byte) + func (msg *Publish) SetPublishID(id uintptr) + func (msg *Publish) SetQoS(v QosType) error + func (msg *Publish) SetRetain(v bool) + func (msg *Publish) SetTopic(v string) error + func (msg *Publish) Topic() string + type QosType byte + const QoS0 + const QoS1 + const QoS2 + const QosFailure + func (c QosType) Desc() string + func (c QosType) IsValid() bool + func (c QosType) IsValidFull() bool + type ReasonCode byte + const CodeAdministrativeAction + const CodeBadAuthMethod + const CodeBadUserOrPassword + const CodeBanned + const CodeConnectionRateExceeded + const CodeContinueAuthentication + const CodeImplementationSpecificError + const CodeInvalidClientID + const CodeInvalidPayloadFormat + const CodeInvalidTopicAlias + const CodeInvalidTopicFilter + const CodeInvalidTopicName + const CodeKeepAliveTimeout + const CodeMalformedPacket + const CodeMaximumConnectTime + const CodeMessageRateTooHigh + const CodeNoMatchingSubscribers + const CodeNoSubscriptionExisted + const CodeNotAuthorized + const CodeNotSupportedQoS + const CodePacketIDInUse + const CodePacketIDNotFound + const CodePacketTooLarge + const CodeProtocolError + const CodeQuotaExceeded + const CodeReAuthenticate + const CodeReceiveMaximumExceeded + const CodeRefusedBadUsernameOrPassword + const CodeRefusedIdentifierRejected + const CodeRefusedNotAuthorized + const CodeRefusedServerUnavailable + const CodeRefusedUnacceptableProtocolVersion + const CodeRetainNotSupported + const CodeServerBusy + const CodeServerMoved + const CodeServerShuttingDown + const CodeServerUnavailable + const CodeSessionTakenOver + const CodeSharedSubscriptionNotSupported + const CodeSubscriptionIDNotSupported + const CodeSuccess + const CodeUnspecifiedError + const CodeUnsupportedProtocol + const CodeUseAnotherServer + const CodeWildcardSubscriptionsNotSupported + func (c ReasonCode) Desc() string + func (c ReasonCode) Error() string + func (c ReasonCode) IsValid() bool + func (c ReasonCode) IsValidForType(p Type) bool + func (c ReasonCode) IsValidV3() bool + func (c ReasonCode) IsValidV5() bool + func (c ReasonCode) PacketTypeDir(p Type) (CodeIssuer, error) + func (c ReasonCode) Value() byte + type RetainHandling uint8 + const RetainHandlingDoNotRetain + const RetainHandlingIfNotExists + const RetainHandlingRetain + type StringPair struct + K string + V string + type SubAck struct + func (h *SubAck) Desc() string + func (h *SubAck) Encode(to []byte) (int, error) + func (h *SubAck) Flags() byte + func (h *SubAck) ID() (IDType, error) + func (h *SubAck) Name() string + func (h *SubAck) PropertyForEach(f func(PropertyID, PropertyToType)) error + func (h *SubAck) PropertyGet(id PropertyID) PropertyToType + func (h *SubAck) PropertySet(id PropertyID, val interface{}) error + func (h *SubAck) RemainingLength() int32 + func (h *SubAck) SetVersion(v ProtocolVersion) + func (h *SubAck) Size() (int, error) + func (h *SubAck) Type() Type + func (h *SubAck) Version() ProtocolVersion + func (msg *SubAck) AddReturnCode(ret ReasonCode) error + func (msg *SubAck) AddReturnCodes(ret []ReasonCode) error + func (msg *SubAck) ReturnCodes() []ReasonCode + func (msg *SubAck) SetPacketID(v IDType) + type Subscribe struct + func (h *Subscribe) Desc() string + func (h *Subscribe) Encode(to []byte) (int, error) + func (h *Subscribe) Flags() byte + func (h *Subscribe) ID() (IDType, error) + func (h *Subscribe) Name() string + func (h *Subscribe) PropertyForEach(f func(PropertyID, PropertyToType)) error + func (h *Subscribe) PropertyGet(id PropertyID) PropertyToType + func (h *Subscribe) PropertySet(id PropertyID, val interface{}) error + func (h *Subscribe) RemainingLength() int32 + func (h *Subscribe) SetVersion(v ProtocolVersion) + func (h *Subscribe) Size() (int, error) + func (h *Subscribe) Type() Type + func (h *Subscribe) Version() ProtocolVersion + func (msg *Subscribe) AddTopic(topic string, ops SubscriptionOptions) error + func (msg *Subscribe) RemoveTopic(topic string) + func (msg *Subscribe) SetPacketID(v IDType) + func (msg *Subscribe) Topics() omap.Map + type SubscriptionOptions byte + func (s SubscriptionOptions) NL() bool + func (s SubscriptionOptions) QoS() QosType + func (s SubscriptionOptions) RAP() bool + func (s SubscriptionOptions) RetainHandling() RetainHandling + type TopicQos map[string]SubscriptionOptions + type Type byte + const AUTH + const CONNACK + const CONNECT + const DISCONNECT + const PINGREQ + const PINGRESP + const PUBACK + const PUBCOMP + const PUBLISH + const PUBREC + const PUBREL + const RESERVED + const SUBACK + const SUBSCRIBE + const UNSUBACK + const UNSUBSCRIBE + func (t Type) DefaultFlags() byte + func (t Type) Desc() string + func (t Type) Name() string + func (t Type) Valid(v ProtocolVersion) (bool, error) + type UnSubAck struct + func (h *UnSubAck) Desc() string + func (h *UnSubAck) Encode(to []byte) (int, error) + func (h *UnSubAck) Flags() byte + func (h *UnSubAck) ID() (IDType, error) + func (h *UnSubAck) Name() string + func (h *UnSubAck) PropertyForEach(f func(PropertyID, PropertyToType)) error + func (h *UnSubAck) PropertyGet(id PropertyID) PropertyToType + func (h *UnSubAck) PropertySet(id PropertyID, val interface{}) error + func (h *UnSubAck) RemainingLength() int32 + func (h *UnSubAck) SetVersion(v ProtocolVersion) + func (h *UnSubAck) Size() (int, error) + func (h *UnSubAck) Type() Type + func (h *UnSubAck) Version() ProtocolVersion + func (msg *UnSubAck) AddReturnCode(ret ReasonCode) error + func (msg *UnSubAck) AddReturnCodes(ret []ReasonCode) error + func (msg *UnSubAck) ReturnCodes() []ReasonCode + func (msg *UnSubAck) SetPacketID(v IDType) + type UnSubscribe struct + func (h *UnSubscribe) Desc() string + func (h *UnSubscribe) Encode(to []byte) (int, error) + func (h *UnSubscribe) Flags() byte + func (h *UnSubscribe) ID() (IDType, error) + func (h *UnSubscribe) Name() string + func (h *UnSubscribe) PropertyForEach(f func(PropertyID, PropertyToType)) error + func (h *UnSubscribe) PropertyGet(id PropertyID) PropertyToType + func (h *UnSubscribe) PropertySet(id PropertyID, val interface{}) error + func (h *UnSubscribe) RemainingLength() int32 + func (h *UnSubscribe) SetVersion(v ProtocolVersion) + func (h *UnSubscribe) Size() (int, error) + func (h *UnSubscribe) Type() Type + func (h *UnSubscribe) Version() ProtocolVersion + func (msg *UnSubscribe) AddTopic(topic string) error + func (msg *UnSubscribe) RemoveTopic(topic string) + func (msg *UnSubscribe) SetPacketID(v IDType) + func (msg *UnSubscribe) Topics() omap.Map v0.0.2-beta Sep 1, 2017