unitd

package
Version: v0.0.0-...-53883ab Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: MIT Imports: 7 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
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",
}
View Source
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) Descriptor() ([]byte, []int)

func (*Conn) GetCleanSessFlag

func (m *Conn) GetCleanSessFlag() bool

func (*Conn) GetClientID

func (m *Conn) GetClientID() []byte

func (*Conn) GetInsecureFlag

func (m *Conn) GetInsecureFlag() bool

func (*Conn) GetKeepAlive

func (m *Conn) GetKeepAlive() uint32

func (*Conn) GetPassword

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

func (*Conn) GetPasswordFlag

func (m *Conn) GetPasswordFlag() bool

func (*Conn) GetProtoName

func (m *Conn) GetProtoName() []byte

func (*Conn) GetUsername

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

func (*Conn) GetUsernameFlag

func (m *Conn) GetUsernameFlag() bool

func (*Conn) GetVersion

func (m *Conn) GetVersion() uint32

func (*Conn) ProtoMessage

func (*Conn) ProtoMessage()

func (*Conn) Reset

func (m *Conn) Reset()

func (*Conn) String

func (m *Conn) String() string

func (*Conn) XXX_DiscardUnknown

func (m *Conn) XXX_DiscardUnknown()

func (*Conn) XXX_Marshal

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

func (*Conn) XXX_Merge

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

func (*Conn) XXX_Size

func (m *Conn) XXX_Size() int

func (*Conn) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*ConnInfo) GetAddress

func (m *ConnInfo) GetAddress() string

func (*ConnInfo) GetClientId

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

func (*ConnInfo) GetNetwork

func (m *ConnInfo) GetNetwork() string

func (*ConnInfo) ProtoMessage

func (*ConnInfo) ProtoMessage()

func (*ConnInfo) Reset

func (m *ConnInfo) Reset()

func (*ConnInfo) String

func (m *ConnInfo) String() string

func (*ConnInfo) XXX_DiscardUnknown

func (m *ConnInfo) XXX_DiscardUnknown()

func (*ConnInfo) XXX_Marshal

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

func (*ConnInfo) XXX_Merge

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

func (*ConnInfo) XXX_Size

func (m *ConnInfo) XXX_Size() int

func (*ConnInfo) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Connack) GetConnID

func (m *Connack) GetConnID() uint32

func (*Connack) GetReturnCode

func (m *Connack) GetReturnCode() uint32

func (*Connack) ProtoMessage

func (*Connack) ProtoMessage()

func (*Connack) Reset

func (m *Connack) Reset()

func (*Connack) String

func (m *Connack) String() string

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 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) Descriptor() ([]byte, []int)

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

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

func (*Empty) XXX_Merge

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

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*InMsg) GetConn

func (m *InMsg) GetConn() *Conn

func (*InMsg) GetMessage

func (m *InMsg) GetMessage() isInMsg_Message

func (*InMsg) GetPub

func (m *InMsg) GetPub() *Publish

func (*InMsg) GetSub

func (m *InMsg) GetSub() *Subscribe

func (*InMsg) ProtoMessage

func (*InMsg) ProtoMessage()

func (*InMsg) Reset

func (m *InMsg) Reset()

func (*InMsg) String

func (m *InMsg) String() string

func (*InMsg) XXX_DiscardUnknown

func (m *InMsg) XXX_DiscardUnknown()

func (*InMsg) XXX_Marshal

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

func (*InMsg) XXX_Merge

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

func (*InMsg) XXX_OneofWrappers

func (*InMsg) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*InMsg) XXX_Size

func (m *InMsg) XXX_Size() int

func (*InMsg) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*OutMsg) GetConnack

func (m *OutMsg) GetConnack() *Connack

func (*OutMsg) GetMessage

func (m *OutMsg) GetMessage() isOutMsg_Message

func (*OutMsg) GetPuback

func (m *OutMsg) GetPuback() *Puback

func (*OutMsg) GetSuback

func (m *OutMsg) GetSuback() *Suback

func (*OutMsg) ProtoMessage

func (*OutMsg) ProtoMessage()

func (*OutMsg) Reset

func (m *OutMsg) Reset()

func (*OutMsg) String

func (m *OutMsg) String() string

func (*OutMsg) XXX_DiscardUnknown

func (m *OutMsg) XXX_DiscardUnknown()

func (*OutMsg) XXX_Marshal

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

func (*OutMsg) XXX_Merge

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

func (*OutMsg) XXX_OneofWrappers

func (*OutMsg) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*OutMsg) XXX_Size

func (m *OutMsg) XXX_Size() int

func (*OutMsg) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Packet) GetData

func (m *Packet) GetData() []byte

func (*Packet) ProtoMessage

func (*Packet) ProtoMessage()

func (*Packet) Reset

func (m *Packet) Reset()

func (*Packet) String

func (m *Packet) String() string

func (*Packet) XXX_DiscardUnknown

func (m *Packet) XXX_DiscardUnknown()

func (*Packet) XXX_Marshal

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

func (*Packet) XXX_Merge

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

func (*Packet) XXX_Size

func (m *Packet) XXX_Size() int

func (*Packet) XXX_Unmarshal

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

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) Descriptor() ([]byte, []int)

func (*Pingreq) ProtoMessage

func (*Pingreq) ProtoMessage()

func (*Pingreq) Reset

func (m *Pingreq) Reset()

func (*Pingreq) String

func (m *Pingreq) String() string

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 {
	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) Descriptor() ([]byte, []int)

func (*Pingresp) ProtoMessage

func (*Pingresp) ProtoMessage()

func (*Pingresp) Reset

func (m *Pingresp) Reset()

func (*Pingresp) String

func (m *Pingresp) String() string

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 {
	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) Descriptor() ([]byte, []int)

func (*Puback) GetMessageID

func (m *Puback) GetMessageID() uint32

func (*Puback) ProtoMessage

func (*Puback) ProtoMessage()

func (*Puback) Reset

func (m *Puback) Reset()

func (*Puback) String

func (m *Puback) String() string

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 {
	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) Descriptor() ([]byte, []int)

func (*Pubcomp) GetMessageID

func (m *Pubcomp) GetMessageID() uint32

func (*Pubcomp) ProtoMessage

func (*Pubcomp) ProtoMessage()

func (*Pubcomp) Reset

func (m *Pubcomp) Reset()

func (*Pubcomp) String

func (m *Pubcomp) String() string

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 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) Descriptor() ([]byte, []int)

func (*Publish) GetMessageID

func (m *Publish) GetMessageID() uint32

func (*Publish) GetPayload

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

func (*Publish) GetQos

func (m *Publish) GetQos() uint32

func (*Publish) GetTopic

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

func (*Publish) ProtoMessage

func (*Publish) ProtoMessage()

func (*Publish) Reset

func (m *Publish) Reset()

func (*Publish) String

func (m *Publish) String() string

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 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) Descriptor() ([]byte, []int)

func (*Pubrec) GetMessageID

func (m *Pubrec) GetMessageID() uint32

func (*Pubrec) GetQos

func (m *Pubrec) GetQos() uint32

func (*Pubrec) ProtoMessage

func (*Pubrec) ProtoMessage()

func (*Pubrec) Reset

func (m *Pubrec) Reset()

func (*Pubrec) String

func (m *Pubrec) String() string

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 {
	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) Descriptor() ([]byte, []int)

func (*Pubrel) GetMessageID

func (m *Pubrel) GetMessageID() uint32

func (*Pubrel) GetQos

func (m *Pubrel) GetQos() uint32

func (*Pubrel) ProtoMessage

func (*Pubrel) ProtoMessage()

func (*Pubrel) Reset

func (m *Pubrel) Reset()

func (*Pubrel) String

func (m *Pubrel) String() string

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 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) Descriptor() ([]byte, []int)

func (*Suback) GetMessageID

func (m *Suback) GetMessageID() uint32

func (*Suback) GetQos

func (m *Suback) GetQos() []uint32

func (*Suback) ProtoMessage

func (*Suback) ProtoMessage()

func (*Suback) Reset

func (m *Suback) Reset()

func (*Suback) String

func (m *Suback) String() string

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 {
	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) Descriptor() ([]byte, []int)

func (*Subscribe) GetMessageID

func (m *Subscribe) GetMessageID() uint32

func (*Subscribe) GetSubscribers

func (m *Subscribe) GetSubscribers() []*Subscriber

func (*Subscribe) ProtoMessage

func (*Subscribe) ProtoMessage()

func (*Subscribe) Reset

func (m *Subscribe) Reset()

func (*Subscribe) String

func (m *Subscribe) String() string

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 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) Start

func (*UnimplementedUnitdServer) Stop

func (*UnimplementedUnitdServer) Stream

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_StreamClient interface {
	Send(*Packet) error
	Recv() (*Packet, error)
	grpc.ClientStream
}

type Unitd_StreamServer

type Unitd_StreamServer interface {
	Send(*Packet) error
	Recv() (*Packet, error)
	grpc.ServerStream
}

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) Descriptor() ([]byte, []int)

func (*Unsuback) GetMessageID

func (m *Unsuback) GetMessageID() uint32

func (*Unsuback) ProtoMessage

func (*Unsuback) ProtoMessage()

func (*Unsuback) Reset

func (m *Unsuback) Reset()

func (*Unsuback) String

func (m *Unsuback) String() string

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 {
	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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL