Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNil ¶
func IsNil(str NilOrString) bool
func String ¶
func String(str NilOrString) string
func ValidMqttPublishTopic ¶
ValidMqttPublishTopic validates the Topic is validate or not This is used with validator packages.
Types ¶
type Config ¶
type Config struct { GatewayName string BrokerNames []string Sections []ConfigSection }
func LoadConfig ¶
Loadini loads ini format file from confPath arg and returns []ConfigSection. ConfigSection has a Type, Name and arg. example: [broker "sango"] [broker "sango/1"] [broker "sango/2"]
ret = [
ConfigSection{Type: "broker", Name: "sango"}, ConfigSection{Type: "broker", Name: "sango", Arg: "1"}, ConfigSection{Type: "broker", Name: "sango", Arg: "2"},
]
func LoadConfigByte ¶
LoadConfigByte returnes []ConfigSection from []byte. This is invoked from LoadConfig.
type ConfigSection ¶
type InputPortType ¶
type InputPortType int
InputPortType defines port type used by gateway
const ( INPUT_PORT_SERIAL InputPortType = 0 INPUT_PORT_DUMMY InputPortType = 1 )
Click to show internal directories.
Click to hide internal directories.