Documentation ¶
Index ¶
- Variables
- func RegisterUnitdServer(s *grpc.Server, srv UnitdServer)
- type Conn
- func (*Conn) Descriptor() ([]byte, []int)
- func (m *Conn) GetCleanSessFlag() bool
- func (m *Conn) GetClientID() []byte
- func (m *Conn) GetInsecureFlag() bool
- func (m *Conn) GetKeepAlive() uint32
- func (m *Conn) GetPassword() []byte
- func (m *Conn) GetPasswordFlag() bool
- func (m *Conn) GetProtoName() []byte
- func (m *Conn) GetUsername() []byte
- func (m *Conn) GetUsernameFlag() bool
- func (m *Conn) GetVersion() uint32
- func (*Conn) ProtoMessage()
- func (m *Conn) Reset()
- func (m *Conn) String() string
- func (m *Conn) XXX_DiscardUnknown()
- func (m *Conn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Conn) XXX_Merge(src proto.Message)
- func (m *Conn) XXX_Size() int
- func (m *Conn) XXX_Unmarshal(b []byte) error
- type ConnInfo
- func (*ConnInfo) Descriptor() ([]byte, []int)
- func (m *ConnInfo) GetAddress() string
- func (m *ConnInfo) GetClientId() []byte
- func (m *ConnInfo) GetNetwork() string
- func (*ConnInfo) ProtoMessage()
- func (m *ConnInfo) Reset()
- func (m *ConnInfo) String() string
- func (m *ConnInfo) XXX_DiscardUnknown()
- func (m *ConnInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConnInfo) XXX_Merge(src proto.Message)
- func (m *ConnInfo) XXX_Size() int
- func (m *ConnInfo) XXX_Unmarshal(b []byte) error
- type Connack
- func (*Connack) Descriptor() ([]byte, []int)
- func (m *Connack) GetConnID() uint32
- func (m *Connack) GetReturnCode() uint32
- func (*Connack) ProtoMessage()
- func (m *Connack) Reset()
- func (m *Connack) String() string
- func (m *Connack) XXX_DiscardUnknown()
- func (m *Connack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Connack) XXX_Merge(src proto.Message)
- func (m *Connack) XXX_Size() int
- func (m *Connack) XXX_Unmarshal(b []byte) error
- type Disconnect
- func (*Disconnect) Descriptor() ([]byte, []int)
- func (m *Disconnect) GetMessageID() uint32
- func (*Disconnect) ProtoMessage()
- func (m *Disconnect) Reset()
- func (m *Disconnect) String() string
- func (m *Disconnect) XXX_DiscardUnknown()
- func (m *Disconnect) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Disconnect) XXX_Merge(src proto.Message)
- func (m *Disconnect) XXX_Size() int
- func (m *Disconnect) XXX_Unmarshal(b []byte) error
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) String() string
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type FixedHeader
- func (*FixedHeader) Descriptor() ([]byte, []int)
- func (m *FixedHeader) GetDup() bool
- func (m *FixedHeader) GetMessageType() MessageType
- func (m *FixedHeader) GetQos() uint32
- func (m *FixedHeader) GetRemainingLength() uint32
- func (m *FixedHeader) GetRetain() bool
- func (*FixedHeader) ProtoMessage()
- func (m *FixedHeader) Reset()
- func (m *FixedHeader) String() string
- func (m *FixedHeader) XXX_DiscardUnknown()
- func (m *FixedHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FixedHeader) XXX_Merge(src proto.Message)
- func (m *FixedHeader) XXX_Size() int
- func (m *FixedHeader) XXX_Unmarshal(b []byte) error
- type InMsg
- func (*InMsg) Descriptor() ([]byte, []int)
- func (m *InMsg) GetConn() *Conn
- func (m *InMsg) GetMessage() isInMsg_Message
- func (m *InMsg) GetPub() *Publish
- func (m *InMsg) GetSub() *Subscribe
- func (*InMsg) ProtoMessage()
- func (m *InMsg) Reset()
- func (m *InMsg) String() string
- func (m *InMsg) XXX_DiscardUnknown()
- func (m *InMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InMsg) XXX_Merge(src proto.Message)
- func (*InMsg) XXX_OneofWrappers() []interface{}
- func (m *InMsg) XXX_Size() int
- func (m *InMsg) XXX_Unmarshal(b []byte) error
- type InMsg_Conn
- type InMsg_Pub
- type InMsg_Sub
- type MessageType
- type OutMsg
- func (*OutMsg) Descriptor() ([]byte, []int)
- func (m *OutMsg) GetConnack() *Connack
- func (m *OutMsg) GetMessage() isOutMsg_Message
- func (m *OutMsg) GetPuback() *Puback
- func (m *OutMsg) GetSuback() *Suback
- func (*OutMsg) ProtoMessage()
- func (m *OutMsg) Reset()
- func (m *OutMsg) String() string
- func (m *OutMsg) XXX_DiscardUnknown()
- func (m *OutMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OutMsg) XXX_Merge(src proto.Message)
- func (*OutMsg) XXX_OneofWrappers() []interface{}
- func (m *OutMsg) XXX_Size() int
- func (m *OutMsg) XXX_Unmarshal(b []byte) error
- type OutMsg_Connack
- type OutMsg_Puback
- type OutMsg_Suback
- type Packet
- func (*Packet) Descriptor() ([]byte, []int)
- func (m *Packet) GetData() []byte
- func (*Packet) ProtoMessage()
- func (m *Packet) Reset()
- func (m *Packet) String() string
- func (m *Packet) XXX_DiscardUnknown()
- func (m *Packet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Packet) XXX_Merge(src proto.Message)
- func (m *Packet) XXX_Size() int
- func (m *Packet) XXX_Unmarshal(b []byte) error
- type Pingreq
- func (*Pingreq) Descriptor() ([]byte, []int)
- func (*Pingreq) ProtoMessage()
- func (m *Pingreq) Reset()
- func (m *Pingreq) String() string
- func (m *Pingreq) XXX_DiscardUnknown()
- func (m *Pingreq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pingreq) XXX_Merge(src proto.Message)
- func (m *Pingreq) XXX_Size() int
- func (m *Pingreq) XXX_Unmarshal(b []byte) error
- type Pingresp
- func (*Pingresp) Descriptor() ([]byte, []int)
- func (*Pingresp) ProtoMessage()
- func (m *Pingresp) Reset()
- func (m *Pingresp) String() string
- func (m *Pingresp) XXX_DiscardUnknown()
- func (m *Pingresp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pingresp) XXX_Merge(src proto.Message)
- func (m *Pingresp) XXX_Size() int
- func (m *Pingresp) XXX_Unmarshal(b []byte) error
- type Puback
- func (*Puback) Descriptor() ([]byte, []int)
- func (m *Puback) GetMessageID() uint32
- func (*Puback) ProtoMessage()
- func (m *Puback) Reset()
- func (m *Puback) String() string
- func (m *Puback) XXX_DiscardUnknown()
- func (m *Puback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Puback) XXX_Merge(src proto.Message)
- func (m *Puback) XXX_Size() int
- func (m *Puback) XXX_Unmarshal(b []byte) error
- type Pubcomp
- func (*Pubcomp) Descriptor() ([]byte, []int)
- func (m *Pubcomp) GetMessageID() uint32
- func (*Pubcomp) ProtoMessage()
- func (m *Pubcomp) Reset()
- func (m *Pubcomp) String() string
- func (m *Pubcomp) XXX_DiscardUnknown()
- func (m *Pubcomp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pubcomp) XXX_Merge(src proto.Message)
- func (m *Pubcomp) XXX_Size() int
- func (m *Pubcomp) XXX_Unmarshal(b []byte) error
- type Publish
- func (*Publish) Descriptor() ([]byte, []int)
- func (m *Publish) GetMessageID() uint32
- func (m *Publish) GetPayload() []byte
- func (m *Publish) GetQos() uint32
- func (m *Publish) GetTopic() []byte
- func (*Publish) ProtoMessage()
- func (m *Publish) Reset()
- func (m *Publish) String() string
- func (m *Publish) XXX_DiscardUnknown()
- func (m *Publish) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Publish) XXX_Merge(src proto.Message)
- func (m *Publish) XXX_Size() int
- func (m *Publish) XXX_Unmarshal(b []byte) error
- type Pubrec
- func (*Pubrec) Descriptor() ([]byte, []int)
- func (m *Pubrec) GetMessageID() uint32
- func (m *Pubrec) GetQos() uint32
- func (*Pubrec) ProtoMessage()
- func (m *Pubrec) Reset()
- func (m *Pubrec) String() string
- func (m *Pubrec) XXX_DiscardUnknown()
- func (m *Pubrec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pubrec) XXX_Merge(src proto.Message)
- func (m *Pubrec) XXX_Size() int
- func (m *Pubrec) XXX_Unmarshal(b []byte) error
- type Pubrel
- func (*Pubrel) Descriptor() ([]byte, []int)
- func (m *Pubrel) GetMessageID() uint32
- func (m *Pubrel) GetQos() uint32
- func (*Pubrel) ProtoMessage()
- func (m *Pubrel) Reset()
- func (m *Pubrel) String() string
- func (m *Pubrel) XXX_DiscardUnknown()
- func (m *Pubrel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pubrel) XXX_Merge(src proto.Message)
- func (m *Pubrel) XXX_Size() int
- func (m *Pubrel) XXX_Unmarshal(b []byte) error
- type Suback
- func (*Suback) Descriptor() ([]byte, []int)
- func (m *Suback) GetMessageID() uint32
- func (m *Suback) GetQos() []uint32
- func (*Suback) ProtoMessage()
- func (m *Suback) Reset()
- func (m *Suback) String() string
- func (m *Suback) XXX_DiscardUnknown()
- func (m *Suback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Suback) XXX_Merge(src proto.Message)
- func (m *Suback) XXX_Size() int
- func (m *Suback) XXX_Unmarshal(b []byte) error
- type Subscribe
- func (*Subscribe) Descriptor() ([]byte, []int)
- func (m *Subscribe) GetMessageID() uint32
- func (m *Subscribe) GetSubscribers() []*Subscriber
- func (*Subscribe) ProtoMessage()
- func (m *Subscribe) Reset()
- func (m *Subscribe) String() string
- func (m *Subscribe) XXX_DiscardUnknown()
- func (m *Subscribe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Subscribe) XXX_Merge(src proto.Message)
- func (m *Subscribe) XXX_Size() int
- func (m *Subscribe) XXX_Unmarshal(b []byte) error
- type Subscriber
- func (*Subscriber) Descriptor() ([]byte, []int)
- func (m *Subscriber) GetQos() uint32
- func (m *Subscriber) GetTopic() []byte
- func (*Subscriber) ProtoMessage()
- func (m *Subscriber) Reset()
- func (m *Subscriber) String() string
- func (m *Subscriber) XXX_DiscardUnknown()
- func (m *Subscriber) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Subscriber) XXX_Merge(src proto.Message)
- func (m *Subscriber) XXX_Size() int
- func (m *Subscriber) XXX_Unmarshal(b []byte) error
- type UnimplementedUnitdServer
- type UnitdClient
- type UnitdServer
- type Unitd_StreamClient
- type Unitd_StreamServer
- type Unsuback
- func (*Unsuback) Descriptor() ([]byte, []int)
- func (m *Unsuback) GetMessageID() uint32
- func (*Unsuback) ProtoMessage()
- func (m *Unsuback) Reset()
- func (m *Unsuback) String() string
- func (m *Unsuback) XXX_DiscardUnknown()
- func (m *Unsuback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Unsuback) XXX_Merge(src proto.Message)
- func (m *Unsuback) XXX_Size() int
- func (m *Unsuback) XXX_Unmarshal(b []byte) error
- type Unsubscribe
- func (*Unsubscribe) Descriptor() ([]byte, []int)
- func (m *Unsubscribe) GetMessageID() uint32
- func (m *Unsubscribe) GetSubscribers() []*Subscriber
- func (*Unsubscribe) ProtoMessage()
- func (m *Unsubscribe) Reset()
- func (m *Unsubscribe) String() string
- func (m *Unsubscribe) XXX_DiscardUnknown()
- func (m *Unsubscribe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Unsubscribe) XXX_Merge(src proto.Message)
- func (m *Unsubscribe) XXX_Size() int
- func (m *Unsubscribe) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var MessageType_name = map[int32]string{
0: "RESERVED",
1: "CONNECT",
2: "CONNACK",
3: "PUBLISH",
4: "PUBACK",
5: "PUBREC",
6: "PUBREL",
7: "PUBCOMP",
8: "SUBSCRIBE",
9: "SUBACK",
10: "UNSUBSCRIBE",
11: "UNSUBACK",
12: "PINGREQ",
13: "PINGRESP",
14: "DISCONNECT",
}
var MessageType_value = map[string]int32{
"RESERVED": 0,
"CONNECT": 1,
"CONNACK": 2,
"PUBLISH": 3,
"PUBACK": 4,
"PUBREC": 5,
"PUBREL": 6,
"PUBCOMP": 7,
"SUBSCRIBE": 8,
"SUBACK": 9,
"UNSUBSCRIBE": 10,
"UNSUBACK": 11,
"PINGREQ": 12,
"PINGRESP": 13,
"DISCONNECT": 14,
}
Functions ¶
func RegisterUnitdServer ¶
func RegisterUnitdServer(s *grpc.Server, srv UnitdServer)
Types ¶
type Conn ¶
type Conn struct { ProtoName []byte `protobuf:"bytes,1,opt,name=ProtoName,proto3" json:"ProtoName,omitempty"` Version uint32 `protobuf:"varint,2,opt,name=Version,proto3" json:"Version,omitempty"` InsecureFlag bool `protobuf:"varint,3,opt,name=InsecureFlag,proto3" json:"InsecureFlag,omitempty"` UsernameFlag bool `protobuf:"varint,4,opt,name=UsernameFlag,proto3" json:"UsernameFlag,omitempty"` PasswordFlag bool `protobuf:"varint,5,opt,name=PasswordFlag,proto3" json:"PasswordFlag,omitempty"` CleanSessFlag bool `protobuf:"varint,9,opt,name=CleanSessFlag,proto3" json:"CleanSessFlag,omitempty"` KeepAlive uint32 `protobuf:"varint,10,opt,name=KeepAlive,proto3" json:"KeepAlive,omitempty"` ClientID []byte `protobuf:"bytes,11,opt,name=ClientID,proto3" json:"ClientID,omitempty"` Username []byte `protobuf:"bytes,14,opt,name=Username,proto3" json:"Username,omitempty"` Password []byte `protobuf:"bytes,15,opt,name=Password,proto3" json:"Password,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Connect represents a connect packet.
func (*Conn) Descriptor ¶
func (*Conn) GetCleanSessFlag ¶
func (*Conn) GetClientID ¶
func (*Conn) GetInsecureFlag ¶
func (*Conn) GetKeepAlive ¶
func (*Conn) GetPassword ¶
func (*Conn) GetPasswordFlag ¶
func (*Conn) GetProtoName ¶
func (*Conn) GetUsername ¶
func (*Conn) GetUsernameFlag ¶
func (*Conn) GetVersion ¶
func (*Conn) ProtoMessage ¶
func (*Conn) ProtoMessage()
func (*Conn) XXX_DiscardUnknown ¶
func (m *Conn) XXX_DiscardUnknown()
func (*Conn) XXX_Unmarshal ¶
type ConnInfo ¶
type ConnInfo struct { ClientId []byte `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ConnInfo) Descriptor ¶
func (*ConnInfo) GetAddress ¶
func (*ConnInfo) GetClientId ¶
func (*ConnInfo) GetNetwork ¶
func (*ConnInfo) ProtoMessage ¶
func (*ConnInfo) ProtoMessage()
func (*ConnInfo) XXX_DiscardUnknown ¶
func (m *ConnInfo) XXX_DiscardUnknown()
func (*ConnInfo) XXX_Marshal ¶
func (*ConnInfo) XXX_Unmarshal ¶
type Connack ¶
type Connack struct { ReturnCode uint32 `protobuf:"varint,1,opt,name=ReturnCode,proto3" json:"ReturnCode,omitempty"` ConnID uint32 `protobuf:"varint,2,opt,name=ConnID,proto3" json:"ConnID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Connack represents a connack packet. 0x00 connection accepted 0x01 refused: unacceptable proto version 0x02 refused: identifier rejected 0x03 refused server unavailiable 0x04 bad user or password 0x05 not authorized
func (*Connack) Descriptor ¶
func (*Connack) GetReturnCode ¶
func (*Connack) ProtoMessage ¶
func (*Connack) ProtoMessage()
func (*Connack) XXX_DiscardUnknown ¶
func (m *Connack) XXX_DiscardUnknown()
func (*Connack) XXX_Marshal ¶
func (*Connack) XXX_Unmarshal ¶
type Disconnect ¶
type Disconnect struct { MessageID uint32 `protobuf:"varint,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Disconnect is to signal you want to cease communications with the server
func (*Disconnect) Descriptor ¶
func (*Disconnect) Descriptor() ([]byte, []int)
func (*Disconnect) GetMessageID ¶
func (m *Disconnect) GetMessageID() uint32
func (*Disconnect) ProtoMessage ¶
func (*Disconnect) ProtoMessage()
func (*Disconnect) Reset ¶
func (m *Disconnect) Reset()
func (*Disconnect) String ¶
func (m *Disconnect) String() string
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 Empty ¶
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶
func (*Empty) XXX_Unmarshal ¶
type FixedHeader ¶
type FixedHeader struct { MessageType MessageType `protobuf:"varint,1,opt,name=MessageType,proto3,enum=unitd.MessageType" json:"MessageType,omitempty"` Dup bool `protobuf:"varint,2,opt,name=Dup,proto3" json:"Dup,omitempty"` Qos uint32 `protobuf:"varint,3,opt,name=Qos,proto3" json:"Qos,omitempty"` Retain bool `protobuf:"varint,4,opt,name=Retain,proto3" json:"Retain,omitempty"` RemainingLength uint32 `protobuf:"varint,5,opt,name=RemainingLength,proto3" json:"RemainingLength,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*FixedHeader) Descriptor ¶
func (*FixedHeader) Descriptor() ([]byte, []int)
func (*FixedHeader) GetDup ¶
func (m *FixedHeader) GetDup() bool
func (*FixedHeader) GetMessageType ¶
func (m *FixedHeader) GetMessageType() MessageType
func (*FixedHeader) GetQos ¶
func (m *FixedHeader) GetQos() uint32
func (*FixedHeader) GetRemainingLength ¶
func (m *FixedHeader) GetRemainingLength() uint32
func (*FixedHeader) GetRetain ¶
func (m *FixedHeader) GetRetain() bool
func (*FixedHeader) ProtoMessage ¶
func (*FixedHeader) ProtoMessage()
func (*FixedHeader) Reset ¶
func (m *FixedHeader) Reset()
func (*FixedHeader) String ¶
func (m *FixedHeader) String() string
func (*FixedHeader) XXX_DiscardUnknown ¶
func (m *FixedHeader) XXX_DiscardUnknown()
func (*FixedHeader) XXX_Marshal ¶
func (m *FixedHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FixedHeader) XXX_Merge ¶
func (m *FixedHeader) XXX_Merge(src proto.Message)
func (*FixedHeader) XXX_Size ¶
func (m *FixedHeader) XXX_Size() int
func (*FixedHeader) XXX_Unmarshal ¶
func (m *FixedHeader) XXX_Unmarshal(b []byte) error
type InMsg ¶
type InMsg struct { // Types that are valid to be assigned to Message: // *InMsg_Conn // *InMsg_Pub // *InMsg_Sub Message isInMsg_Message `protobuf_oneof:"Message"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*InMsg) Descriptor ¶
func (*InMsg) GetMessage ¶
func (m *InMsg) GetMessage() isInMsg_Message
func (*InMsg) ProtoMessage ¶
func (*InMsg) ProtoMessage()
func (*InMsg) XXX_DiscardUnknown ¶
func (m *InMsg) XXX_DiscardUnknown()
func (*InMsg) XXX_Marshal ¶
func (*InMsg) XXX_OneofWrappers ¶
func (*InMsg) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*InMsg) XXX_Unmarshal ¶
type InMsg_Conn ¶
type InMsg_Conn struct {
Conn *Conn `protobuf:"bytes,1,opt,name=conn,proto3,oneof"`
}
type InMsg_Pub ¶
type InMsg_Pub struct {
Pub *Publish `protobuf:"bytes,2,opt,name=pub,proto3,oneof"`
}
type InMsg_Sub ¶
type InMsg_Sub struct {
Sub *Subscribe `protobuf:"bytes,3,opt,name=sub,proto3,oneof"`
}
type MessageType ¶
type MessageType int32
const ( MessageType_RESERVED MessageType = 0 MessageType_CONNECT MessageType = 1 MessageType_CONNACK MessageType = 2 MessageType_PUBLISH MessageType = 3 MessageType_PUBACK MessageType = 4 MessageType_PUBREC MessageType = 5 MessageType_PUBREL MessageType = 6 MessageType_PUBCOMP MessageType = 7 MessageType_SUBSCRIBE MessageType = 8 MessageType_SUBACK MessageType = 9 MessageType_UNSUBSCRIBE MessageType = 10 MessageType_UNSUBACK MessageType = 11 MessageType_PINGREQ MessageType = 12 MessageType_PINGRESP MessageType = 13 MessageType_DISCONNECT MessageType = 14 )
func (MessageType) EnumDescriptor ¶
func (MessageType) EnumDescriptor() ([]byte, []int)
func (MessageType) String ¶
func (x MessageType) String() string
type OutMsg ¶
type OutMsg struct { // Types that are valid to be assigned to Message: // *OutMsg_Connack // *OutMsg_Puback // *OutMsg_Suback Message isOutMsg_Message `protobuf_oneof:"Message"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*OutMsg) Descriptor ¶
func (*OutMsg) GetConnack ¶
func (*OutMsg) GetMessage ¶
func (m *OutMsg) GetMessage() isOutMsg_Message
func (*OutMsg) ProtoMessage ¶
func (*OutMsg) ProtoMessage()
func (*OutMsg) XXX_DiscardUnknown ¶
func (m *OutMsg) XXX_DiscardUnknown()
func (*OutMsg) XXX_Marshal ¶
func (*OutMsg) XXX_OneofWrappers ¶
func (*OutMsg) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*OutMsg) XXX_Unmarshal ¶
type OutMsg_Connack ¶
type OutMsg_Connack struct {
Connack *Connack `protobuf:"bytes,1,opt,name=connack,proto3,oneof"`
}
type OutMsg_Puback ¶
type OutMsg_Puback struct {
Puback *Puback `protobuf:"bytes,2,opt,name=puback,proto3,oneof"`
}
type OutMsg_Suback ¶
type OutMsg_Suback struct {
Suback *Suback `protobuf:"bytes,3,opt,name=suback,proto3,oneof"`
}
type Packet ¶
type Packet struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Packet) Descriptor ¶
func (*Packet) ProtoMessage ¶
func (*Packet) ProtoMessage()
func (*Packet) XXX_DiscardUnknown ¶
func (m *Packet) XXX_DiscardUnknown()
func (*Packet) XXX_Marshal ¶
func (*Packet) XXX_Unmarshal ¶
type Pingreq ¶
type Pingreq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Pingreq is a keepalive
func (*Pingreq) Descriptor ¶
func (*Pingreq) ProtoMessage ¶
func (*Pingreq) ProtoMessage()
func (*Pingreq) XXX_DiscardUnknown ¶
func (m *Pingreq) XXX_DiscardUnknown()
func (*Pingreq) XXX_Marshal ¶
func (*Pingreq) XXX_Unmarshal ¶
type Pingresp ¶
type Pingresp struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Pingresp is for saying "hey, the server is alive"
func (*Pingresp) Descriptor ¶
func (*Pingresp) ProtoMessage ¶
func (*Pingresp) ProtoMessage()
func (*Pingresp) XXX_DiscardUnknown ¶
func (m *Pingresp) XXX_DiscardUnknown()
func (*Pingresp) XXX_Marshal ¶
func (*Pingresp) XXX_Unmarshal ¶
type Puback ¶
type Puback struct { MessageID uint32 `protobuf:"varint,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Puback is sent for QOS level one to verify the receipt of a publish Qot the spec: "A PUBACK Packet is sent by a server in response to a PUBLISH Packet from a publishing client, and by a subscriber in response to a PUBLISH Packet from the server."
func (*Puback) Descriptor ¶
func (*Puback) GetMessageID ¶
func (*Puback) ProtoMessage ¶
func (*Puback) ProtoMessage()
func (*Puback) XXX_DiscardUnknown ¶
func (m *Puback) XXX_DiscardUnknown()
func (*Puback) XXX_Marshal ¶
func (*Puback) XXX_Unmarshal ¶
type Pubcomp ¶
type Pubcomp struct { MessageID uint32 `protobuf:"varint,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Pubcomp is for saying is in response to a pubrel sent by the publisher the final member of the QOS2 flow. both sides have said "hey, we did it!"
func (*Pubcomp) Descriptor ¶
func (*Pubcomp) GetMessageID ¶
func (*Pubcomp) ProtoMessage ¶
func (*Pubcomp) ProtoMessage()
func (*Pubcomp) XXX_DiscardUnknown ¶
func (m *Pubcomp) XXX_DiscardUnknown()
func (*Pubcomp) XXX_Marshal ¶
func (*Pubcomp) XXX_Unmarshal ¶
type Publish ¶
type Publish struct { MessageID uint32 `protobuf:"varint,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"` Topic []byte `protobuf:"bytes,2,opt,name=Topic,proto3" json:"Topic,omitempty"` Payload []byte `protobuf:"bytes,3,opt,name=Payload,proto3" json:"Payload,omitempty"` Qos uint32 `protobuf:"varint,4,opt,name=Qos,proto3" json:"Qos,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Publish represents a publish packet.
func (*Publish) Descriptor ¶
func (*Publish) GetMessageID ¶
func (*Publish) GetPayload ¶
func (*Publish) ProtoMessage ¶
func (*Publish) ProtoMessage()
func (*Publish) XXX_DiscardUnknown ¶
func (m *Publish) XXX_DiscardUnknown()
func (*Publish) XXX_Marshal ¶
func (*Publish) XXX_Unmarshal ¶
type Pubrec ¶
type Pubrec struct { MessageID uint32 `protobuf:"varint,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"` Qos uint32 `protobuf:"varint,2,opt,name=Qos,proto3" json:"Qos,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Pubrec is for verifying the receipt of a publish Qoth the spec:"It is the second Packet of the QoS level 2 protocol flow. A PUBREC Packet is sent by the server in response to a PUBLISH Packet from a publishing client, or by a subscriber in response to a PUBLISH Packet from the server."
func (*Pubrec) Descriptor ¶
func (*Pubrec) GetMessageID ¶
func (*Pubrec) ProtoMessage ¶
func (*Pubrec) ProtoMessage()
func (*Pubrec) XXX_DiscardUnknown ¶
func (m *Pubrec) XXX_DiscardUnknown()
func (*Pubrec) XXX_Marshal ¶
func (*Pubrec) XXX_Unmarshal ¶
type Pubrel ¶
type Pubrel struct { MessageID uint32 `protobuf:"varint,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"` Qos uint32 `protobuf:"varint,2,opt,name=Qos,proto3" json:"Qos,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Pubrel is a response to pubrec from either the client or server.
func (*Pubrel) Descriptor ¶
func (*Pubrel) GetMessageID ¶
func (*Pubrel) ProtoMessage ¶
func (*Pubrel) ProtoMessage()
func (*Pubrel) XXX_DiscardUnknown ¶
func (m *Pubrel) XXX_DiscardUnknown()
func (*Pubrel) XXX_Marshal ¶
func (*Pubrel) XXX_Unmarshal ¶
type Suback ¶
type Suback struct { MessageID uint32 `protobuf:"varint,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"` Qos []uint32 `protobuf:"varint,2,rep,packed,name=Qos,proto3" json:"Qos,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Suback is to say "hey, you got it buddy. I will send you messages that fit this pattern"
func (*Suback) Descriptor ¶
func (*Suback) GetMessageID ¶
func (*Suback) ProtoMessage ¶
func (*Suback) ProtoMessage()
func (*Suback) XXX_DiscardUnknown ¶
func (m *Suback) XXX_DiscardUnknown()
func (*Suback) XXX_Marshal ¶
func (*Suback) XXX_Unmarshal ¶
type Subscribe ¶
type Subscribe struct { MessageID uint32 `protobuf:"varint,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"` Subscribers []*Subscriber `protobuf:"bytes,2,rep,name=Subscribers,proto3" json:"Subscribers,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Subscribe tells the server which topics the client would like to subscribe to
func (*Subscribe) Descriptor ¶
func (*Subscribe) GetMessageID ¶
func (*Subscribe) GetSubscribers ¶
func (m *Subscribe) GetSubscribers() []*Subscriber
func (*Subscribe) ProtoMessage ¶
func (*Subscribe) ProtoMessage()
func (*Subscribe) XXX_DiscardUnknown ¶
func (m *Subscribe) XXX_DiscardUnknown()
func (*Subscribe) XXX_Marshal ¶
func (*Subscribe) XXX_Unmarshal ¶
type Subscriber ¶
type Subscriber struct { Topic []byte `protobuf:"bytes,2,opt,name=Topic,proto3" json:"Topic,omitempty"` Qos uint32 `protobuf:"varint,3,opt,name=Qos,proto3" json:"Qos,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Subscriber is pairing the Qos and topic together for the QOS' pairs in unsubscribe and subscribe
func (*Subscriber) Descriptor ¶
func (*Subscriber) Descriptor() ([]byte, []int)
func (*Subscriber) GetQos ¶
func (m *Subscriber) GetQos() uint32
func (*Subscriber) GetTopic ¶
func (m *Subscriber) GetTopic() []byte
func (*Subscriber) ProtoMessage ¶
func (*Subscriber) ProtoMessage()
func (*Subscriber) Reset ¶
func (m *Subscriber) Reset()
func (*Subscriber) String ¶
func (m *Subscriber) String() string
func (*Subscriber) XXX_DiscardUnknown ¶
func (m *Subscriber) XXX_DiscardUnknown()
func (*Subscriber) XXX_Marshal ¶
func (m *Subscriber) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Subscriber) XXX_Merge ¶
func (m *Subscriber) XXX_Merge(src proto.Message)
func (*Subscriber) XXX_Size ¶
func (m *Subscriber) XXX_Size() int
func (*Subscriber) XXX_Unmarshal ¶
func (m *Subscriber) XXX_Unmarshal(b []byte) error
type UnimplementedUnitdServer ¶
type UnimplementedUnitdServer struct { }
UnimplementedUnitdServer can be embedded to have forward compatible implementations.
func (*UnimplementedUnitdServer) Stream ¶
func (*UnimplementedUnitdServer) Stream(srv Unitd_StreamServer) error
type UnitdClient ¶
type UnitdClient interface { Start(ctx context.Context, in *ConnInfo, opts ...grpc.CallOption) (*ConnInfo, error) Stream(ctx context.Context, opts ...grpc.CallOption) (Unitd_StreamClient, error) Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) }
UnitdClient is the client API for Unitd service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUnitdClient ¶
func NewUnitdClient(cc *grpc.ClientConn) UnitdClient
type UnitdServer ¶
type UnitdServer interface { Start(context.Context, *ConnInfo) (*ConnInfo, error) Stream(Unitd_StreamServer) error Stop(context.Context, *Empty) (*Empty, error) }
UnitdServer is the server API for Unitd service.
type Unitd_StreamClient ¶
type Unitd_StreamServer ¶
type Unsuback ¶
type Unsuback struct { MessageID uint32 `protobuf:"varint,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Unsuback is to unsubscribe as suback is to subscribe
func (*Unsuback) Descriptor ¶
func (*Unsuback) GetMessageID ¶
func (*Unsuback) ProtoMessage ¶
func (*Unsuback) ProtoMessage()
func (*Unsuback) XXX_DiscardUnknown ¶
func (m *Unsuback) XXX_DiscardUnknown()
func (*Unsuback) XXX_Marshal ¶
func (*Unsuback) XXX_Unmarshal ¶
type Unsubscribe ¶
type Unsubscribe struct { MessageID uint32 `protobuf:"varint,1,opt,name=MessageID,proto3" json:"MessageID,omitempty"` Subscribers []*Subscriber `protobuf:"bytes,2,rep,name=Subscribers,proto3" json:"Subscribers,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Unsubscribe is the Packet to send if you don't want to subscribe to a topic anymore
func (*Unsubscribe) Descriptor ¶
func (*Unsubscribe) Descriptor() ([]byte, []int)
func (*Unsubscribe) GetMessageID ¶
func (m *Unsubscribe) GetMessageID() uint32
func (*Unsubscribe) GetSubscribers ¶
func (m *Unsubscribe) GetSubscribers() []*Subscriber
func (*Unsubscribe) ProtoMessage ¶
func (*Unsubscribe) ProtoMessage()
func (*Unsubscribe) Reset ¶
func (m *Unsubscribe) Reset()
func (*Unsubscribe) String ¶
func (m *Unsubscribe) String() string
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