Documentation ¶
Index ¶
- Constants
- Variables
- func NewPublishAck() *packets.Puback
- func NewPublishComp() *packets.Pubcomp
- func NewPublishRec() *packets.Pubrec
- func NewPublishRel() *packets.Pubrel
- func WritePacket(writer io.Writer, packet packets.Packet) error
- type ConnectProperties
- type PublishMessage
- type StorePublishMessage
- func (*StorePublishMessage) Descriptor() ([]byte, []int)deprecated
- func (x *StorePublishMessage) GetClientID() string
- func (x *StorePublishMessage) GetExpiredTime() int64
- func (x *StorePublishMessage) GetFromSession() bool
- func (x *StorePublishMessage) GetMessageID() string
- func (x *StorePublishMessage) GetPubReceived() bool
- func (x *StorePublishMessage) GetPubRelPacket() []byte
- func (x *StorePublishMessage) GetPublishPacket() []byte
- func (x *StorePublishMessage) GetTimeStamp() int64
- func (x *StorePublishMessage) GetWill() bool
- func (*StorePublishMessage) ProtoMessage()
- func (x *StorePublishMessage) ProtoReflect() protoreflect.Message
- func (x *StorePublishMessage) Reset()
- func (x *StorePublishMessage) String() string
- type StorePublishPacket
- type User
- type WillProperties
Constants ¶
View Source
const ( DisconnectNormalDisconnection = 0x00 DisconnectDisconnectWithWillMessage = 0x04 DisconnectUnspecifiedError = 0x80 DisconnectMalformedPacket = 0x81 DisconnectProtocolError = 0x82 DisconnectImplementationSpecificError = 0x83 DisconnectNotAuthorized = 0x87 DisconnectServerBusy = 0x89 DisconnectServerShuttingDown = 0x8B DisconnectKeepAliveTimeout = 0x8D DisconnectSessionTakenOver = 0x8E DisconnectTopicFilterInvalid = 0x8F DisconnectTopicNameInvalid = 0x90 DisconnectReceiveMaximumExceeded = 0x93 DisconnectTopicAliasInvalid = 0x94 DisconnectPacketTooLarge = 0x95 DisconnectMessageRateTooHigh = 0x96 DisconnectQuotaExceeded = 0x97 DisconnectAdministrativeAction = 0x98 DisconnectPayloadFormatInvalid = 0x99 DisconnectRetainNotSupported = 0x9A DisconnectQoSNotSupported = 0x9B DisconnectUseAnotherServer = 0x9C DisconnectServerMoved = 0x9D DisconnectConnectionRateExceeded = 0x9F DisconnectMaximumConnectTime = 0xA0 DisconnectSubscriptionIdentifiersNotSupported = 0xA1 DisconnectWildcardSubscriptionsNotSupported = 0xA2 )
View Source
const ( CONNECT byte CONNACK PUBLISH PUBACK PUBREC PUBREL PUBCOMP SUBSCRIBE SUBACK UNSUBSCRIBE UNSUBACK PINGREQ PINGRESP DISCONNECT AUTH )
View Source
const ( PublishAckSuccess = 0x00 PublishAckNoMatchingSubscribers = 0x10 PublishAckUnspecifiedError = 0x80 PublishAckImplementationSpecificError = 0x83 PublishAckNotAuthorized = 0x87 PublishAckTopicNameInvalid = 0x90 PublishAckPacketIdentifierInUse = 0x91 PublishAckQuotaExceeded = 0x97 PublishAckPayloadFormatInvalid = 0x99 )
Variables ¶
View Source
var File_message_proto protoreflect.FileDescriptor
Functions ¶
func NewPublishAck ¶
func NewPublishComp ¶
func NewPublishRec ¶
func NewPublishRel ¶
Types ¶
type ConnectProperties ¶
type ConnectProperties struct { SessionExpiryInterval int64 `json:"session_expiry_interval,omitempty"` ReceiveMaximum int64 `json:"receive_maximum,omitempty"` MaximumPacketSize int64 `json:"maximum_packet_size,omitempty"` TopicAliasMaximum int64 `json:"topic_alias_maximum,omitempty"` RequestResponseInfo string `json:"request_response_info,omitempty"` RequestProblemInfo bool `json:"request_problem_info,omitempty"` UserProperties []User `json:"user_properties,omitempty"` AuthMethod string `json:"auth_method,omitempty"` AuthData []byte `json:"auth_data,omitempty"` }
func PropertyToConnectProperties ¶
func PropertyToConnectProperties(properties *packets.Properties) (*ConnectProperties, error)
type PublishMessage ¶
type StorePublishMessage ¶
type StorePublishMessage struct { MessageID string `protobuf:"bytes,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"` PublishPacket []byte `protobuf:"bytes,2,opt,name=PublishPacket,proto3" json:"PublishPacket,omitempty"` PubRelPacket []byte `protobuf:"bytes,3,opt,name=PubRelPacket,proto3" json:"PubRelPacket,omitempty"` PubReceived bool `protobuf:"varint,4,opt,name=PubReceived,proto3" json:"PubReceived,omitempty"` FromSession bool `protobuf:"varint,5,opt,name=FromSession,proto3" json:"FromSession,omitempty"` TimeStamp int64 `protobuf:"varint,6,opt,name=TimeStamp,proto3" json:"TimeStamp,omitempty"` ExpiredTime int64 `protobuf:"varint,7,opt,name=ExpiredTime,proto3" json:"ExpiredTime,omitempty"` Will bool `protobuf:"varint,8,opt,name=Will,proto3" json:"Will,omitempty"` ClientID string `protobuf:"bytes,9,opt,name=ClientID,proto3" json:"ClientID,omitempty"` // contains filtered or unexported fields }
func (*StorePublishMessage) Descriptor
deprecated
func (*StorePublishMessage) Descriptor() ([]byte, []int)
Deprecated: Use StorePublishMessage.ProtoReflect.Descriptor instead.
func (*StorePublishMessage) GetClientID ¶
func (x *StorePublishMessage) GetClientID() string
func (*StorePublishMessage) GetExpiredTime ¶
func (x *StorePublishMessage) GetExpiredTime() int64
func (*StorePublishMessage) GetFromSession ¶
func (x *StorePublishMessage) GetFromSession() bool
func (*StorePublishMessage) GetMessageID ¶
func (x *StorePublishMessage) GetMessageID() string
func (*StorePublishMessage) GetPubReceived ¶
func (x *StorePublishMessage) GetPubReceived() bool
func (*StorePublishMessage) GetPubRelPacket ¶
func (x *StorePublishMessage) GetPubRelPacket() []byte
func (*StorePublishMessage) GetPublishPacket ¶
func (x *StorePublishMessage) GetPublishPacket() []byte
func (*StorePublishMessage) GetTimeStamp ¶
func (x *StorePublishMessage) GetTimeStamp() int64
func (*StorePublishMessage) GetWill ¶
func (x *StorePublishMessage) GetWill() bool
func (*StorePublishMessage) ProtoMessage ¶
func (*StorePublishMessage) ProtoMessage()
func (*StorePublishMessage) ProtoReflect ¶
func (x *StorePublishMessage) ProtoReflect() protoreflect.Message
func (*StorePublishMessage) Reset ¶
func (x *StorePublishMessage) Reset()
func (*StorePublishMessage) String ¶
func (x *StorePublishMessage) String() string
type StorePublishPacket ¶
type WillProperties ¶
type WillProperties struct { DelayInterval int64 `json:"delay_interval,omitempty"` PayloadFormat int64 `json:"payload_format"` ExpiryInterval int64 `json:"expiry_interval"` ContentType string `json:"content_type"` ResponseTopic string `json:"response_topic"` CorrelationData []byte `json:"correlation_data,omitempty"` UserProperties []User `json:"user_properties,omitempty"` }
func PropertyToWillProperties ¶
func PropertyToWillProperties(properties *packets.Properties) *WillProperties
Click to show internal directories.
Click to hide internal directories.