Documentation ¶
Index ¶
Constants ¶
View Source
const ( CacheModelMem = "memory" CacheModelRedis = "redis" // CacheSysDict 字典缓存菜单KEY CacheSysDict = "sysDict" // CacheSysRole 角色缓存key CacheSysRole = "sysRole" // CacheSysDept 部门缓存key CacheSysDept = "sysDept" // CacheSysAuthTag 权限缓存TAG标签 CacheSysAuthTag = "sysAuthTag" // CacheSysDictTag 字典缓存标签 CacheSysDictTag = "sysDictTag" // CacheSysConfigTag 系统参数配置 CacheSysConfigTag = "sysConfigTag" //CacheSysMenu 系统菜单 CacheSysMenu = "sysMenu" //CacheSysMenuButton 系统菜单按钮 CacheSysMenuButton = "sysMenuButton" //CacheSysMenuColumn 系统菜单按钮 CacheSysMenuColumn = "sysMenuColumn" //CacheSysAuthorize 系统权限 CacheSysAuthorize = "sysAuthorize" //CacheSysMenuApi 系统API与菜单绑定关系表 CacheSysMenuApi = "sysMenuApi" //CacheSysApi 系统API CacheSysApi = "sysApi" //CacheUserAuthorize 用户权限 CacheUserAuthorize = "userAuthorize" //CacheUserInfo 用户信息 CacheUserInfo = "userInfo" )
View Source
const ( Version = "v0.2.0" // 当前服务版本(用于模板展示) CaptchaDefaultName = "CaptchaDefaultName" // 验证码默认存储空间名称 ContextKey = "ContextKey" // 上下文变量存储键名,前后端系统共享 FileMaxUploadCountMinute = 10 // 同一用户1分钟之内最大上传数量 DefaultPageSize = 10 //默认分页条数 )
View Source
const ( Start = 1 //启动 Disabled = 0 //禁用 )
系统启动OR禁用常量
View Source
const ( Menu = "menu" Button = "button" Column = "column" Api = "api" )
权限类型常量
View Source
const ( FolderTypesTopology = "topology" //图纸文件夹类型 FolderTypesComponents = "components" //自定义组件文件夹类型 )
组态图常量
View Source
const ( ConfigureDiagram = "configureDiagram" //组态拓扑图 MonitorServer = "monitorServer" //服务监控 )
WebSocket
View Source
const ( ErrorInvalidFunction = 1 //功能不正确 ErrorAccessDenied = 2 //访问被拒绝 ErrorInvalidData = 3 //数据无效 ErrorGetApiData = 4 //获取接口错误 ErrorInvalidRole = 5 //未设置角色 ErrorNotLogged = 401 //未登录,或是token失效 )
错误代码
View Source
const ( Weather = 1 //天气 LoopRegulation = 2 //环路监管 LoopMap = 3 //分布图 Energy = 4 //能耗分析 )
View Source
const ( ServerStatusOffline = 0 ServerStatusOnline = 1 )
服务状态
View Source
const ( PLOT = "plot" Floor = "floor" Unit = "unit" )
业务单元
View Source
const ( IsAutoRunJob = "sys.auto.run.job" IsOpenAccessControl = "sys.access.control" )
系统参数KEY常量
View Source
const ( ContentListDefaultSize = 10 ContentListMaxSize = 50 ContentSortDefault = 0 // 排序:按照创建时间 ContentSortActive = 1 // 排序:按照更新时间 ContentSortHot = 2 // 排序:按照浏览量 ContentSortScore = 3 // 排序:按照搜索结果关联性 ContentTypeArticle = "article" ContentTypeAsk = "ask" ContentTypeTopic = "topic" )
View Source
const ( DeviceStatueDisable = 0 DeviceStatueOffline = 1 DeviceStatueOnline = 2 )
View Source
const ( LossWaterId = "energy.loss.water" StationInfos = "energy.station.infos" StationLists = "energy.station.lists" )
View Source
const ( InteractTypeZan = 0 InteractTypeCai = 1 InteractTargetTypeContent = "content" InteractTargetTypeReply = "reply" )
View Source
const ( OpenAPITagNameLogin = `登录` OpenAPITagNameOrganization = `组织管理` OpenAPITagNameDept = `部门管理` OpenAPITagNamePost = `岗位管理` OpenAPITagNameRole = `角色管理` OpenAPITagNameUser = `用户管理` OpenAPITagNameMenu = `菜单管理` OpenAPITagNameApi = `接口管理` OpenAPITagNameAuthorize = `权限管理` )
View Source
const ( SessionNoticeTypeSuccess = "success" SessionNoticeTypeInfo = "primary" SessionNoticeTypeWarn = "warning" SessionNoticeTypeError = "danger" )
View Source
const ( Online = "online" Offline = "offline" Event = "event" PropertyRead = "property_read" PropertyReadReply = "property_read_reply" PropertyWrite = "property_write" PropertyWriteReply = "property_write_reply" FunctionSend = "function_send" FunctionReply = "function_reply" PropertyReport = "property_report" ChildDeviceMessage = "child_device_message" ChildDeviceMessageReply = "child_device_message_reply" Register = "register" UnRegister = "un_register" )
View Source
const ( TypeInt = "int" TypeLong = "long" TypeFloat = "float" TypeDouble = "double" TypeText = "text" TypeBool = "boolean" TypeDate = "date" TypeEnum = "enum" TypeArray = "array" TypeObject = "object" )
View Source
const ( UploadPath = "upload_file" ImgTypeKey = "sys.uploadFile.imageType" ImgSizeKey = "sys.uploadFile.imageSize" FileTypeKey = "sys.uploadFile.fileType" FileSizeKey = "sys.uploadFile.fileSize" CheckFileTypeImg = "img" // 文件类型(图片) CheckFileTypeFile = "file" // 文件类型(任意) )
View Source
const ( SourceLocal = iota // 上传到本地 SourceTencent // 上传至腾讯云 SourceAli // 上传到阿里云 SourceQiniu // 上传到七牛云 )
View Source
const ( UserStatusOk = 0 // 用户状态正常 UserStatusDisabled = 1 // 用户状态禁用 UserGenderUnknown = 0 // 性别: 未知 UserGenderMale = 1 // 性别: 男 UserGenderFemale = 2 // 性别: 女 UserLoginUrl = "/login" )
View Source
const CommonDataBusPrefix = "/device/+/+"
View Source
const (
DefaultProtocol = "SagooMqtt"
)
默认的插件协议
View Source
const (
// IotOverviewIndex iot概览指标
IotOverviewIndex = "system.iot.overview.index"
)
View Source
const (
PageSize = 10 //分页长度
)
View Source
const (
ServerListLimit = 10000
)
ServerListLimit 服务限制
Variables ¶
This section is empty.
Functions ¶
func GetDataBusWrapperTopic ¶
func GetTopicType ¶
func GetTopicTypes ¶
func GetTopicTypes() []string
Types ¶
type Topic ¶
type Topic string
const ( DataBusOnline Topic = "/online" DataBusOffline Topic = "/offline" DataBusEvent Topic = "/message/event/{eventId}" DataBusPropertyReport Topic = "/message/property/report" DataBusPropertyRead Topic = "/message/send/property/read" DataBusPropertyReadReply Topic = "/message/property/read/reply" DataBusPropertyWrite Topic = "/message/send/property/write" DataBusPropertyWriteReply Topic = "/message/property/write/reply" DataBusFunctionSend Topic = "/message/send/function" DataBusFunctionReply Topic = "/message/function/reply" DataBusRegister Topic = "/register" DataBusUnRegister Topic = "/unregister" DataBusChildDeviceMessage Topic = "/message/children/{childrenDeviceId}/{topic}" DataBusChildDeviceMessageReply Topic = "/message/children/reply/{childrenDeviceId}/{topic}" DataBusDirect Topic = "/message/direct" DataBusUpdate Topic = "/message/tags/update" DataBusFirmwarePull Topic = "/firmware/pull" DataBusFirmwarePullReply Topic = "/firmware/pull/reply" DataBusFirmwarePush Topic = "/firmware/push" DataBusFirmwarePushReply Topic = "/firmware/push/reply" DataBusFirmwareReport Topic = "/firmware/report" DataBusFirmwareProgress Topic = "/firmware/progress" DataBusLog Topic = "/message/log" DataBusMetadataDerived Topic = "/metadata/derived" )
const (
TopicDeviceData Topic = "device/+/#"
)
Click to show internal directories.
Click to hide internal directories.