topic

package
v0.0.0-...-648f786 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTopic = iota
	ServiceTopic
	PropertyTopic
)
View Source
const (
	LogClassify1 = iota

	ThingClassify1
)

Variables

View Source
var (
	TopicPrefix = []string{
		"/sys/",
		"/ext/session/",
	}
	// Classify1 = map[string][int]{
	// 	"log": ,
	// 	"ota",
	// 	"thing",
	// 	"sub",
	// }
	TopicReplySuffix      = "reply"
	ErrInvalidTopicPrefix = errors.New("invalid topic prefix")
	ErrInvalidTopic       = errors.New("invalid topic")
)

Functions

This section is empty.

Types

type Topic

type Topic struct {
	OrigTopic  string
	Prefix     string
	ProductKey string
	DeviceName string
	Classify1  string
	Classify2  string
	SubDirs    []string
	IsReply    bool
}

func ParseTopic

func ParseTopic(topic string) (*Topic, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL