iot_server/internal/pkg/constants/dirver.go

37 lines
951 B
Go
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package constants
const (
DefaultDriverBaseAddress = "localhost:-1"
HostAddress = "127.0.0.1"
ConfigSuffix = ".toml"
ConfigKeyDriver = "driver"
DriverBaseDir = "driver-data" // 驱动相关目录dir
DriverLibraryDir = DriverBaseDir + "/driver-library"
DriverBinDir = DriverBaseDir + "/bin"
DriverRunConfigDir = DriverBaseDir + "/run-config"
DriverMntDir = DriverBaseDir + "/mnt"
DriverDefaultLogPath = "logs/driver.log"
DockerHummingbirdRootDir = "/var/bin/hummingbird"
)
const (
DriverLibTypeDefault = iota + 1
DriverLibTypeAppService
)
const (
DeviceLibraryUploadTypeConfig = 2
// 驱动配置定义key=>value 的type
DriverConfigTypeInt = "int"
DriverConfigTypeFloat = "float"
DriverConfigTypeString = "string"
DriverConfigTypeBool = "bool"
DriverConfigTypeSelect = "select"
DriverConfigTypeObject = "object"
DriverConfigTypeArray = "array"
)