Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - Variables
 - func ToBool[boolType constraints.Integer](in boolType) bool
 - func ToIntBool[boolType constraints.Integer](in bool) boolType
 - type AuthMode
 - type AutoReg
 - type CoordinateSystem
 - type DataProto
 - type DeviceStatus
 - type DeviceType
 - type LogLevel
 - type Net
 - type Opt
 - type OrderBy
 - type PageInfo
 - type PageInfo2
 - type Point
 - type RoleID
 - type TimeRange
 
Constants ¶
      View Source
      
  
    const ( OrderAes = iota //从久到近排序 OrderDesc //时间从近到久排序 )
      View Source
      
  
    const ( GatewayBind = 1 //绑定 GatewayUnbind = 2 //解绑 )
      View Source
      
  
    const ( True = 1 //是 False = 2 //否 )
      View Source
      
  
    const ( Enable = 1 //启用 Disable = 2 //禁用 )
      View Source
      
  
    const ( Male = 1 //男性 Female = 2 //女鞋 )
      View Source
      
  
    const DeviceGroupLevel = 3
    
      View Source
      
  
const Unknown = 0
    Variables ¶
      View Source
      
  
    var LogLevelTextToIntMap = map[string]LogLevel{ "关闭": LogClose, "错误": LogError, "告警": LogWarn, "信息": LogInfo, "调试": LogDebug, }
      View Source
      
  
var SystemCoordinate = CoordinateSystemBaidu //默认坐标系
    Functions ¶
func ToBool ¶
func ToBool[boolType constraints.Integer](in boolType) bool
func ToIntBool ¶
func ToIntBool[boolType constraints.Integer](in bool) boolType
Types ¶
type CoordinateSystem ¶ added in v0.5.1
type CoordinateSystem string
const ( CoordinateSystemEarth CoordinateSystem = "WGS84" //GPS坐标系:地球系 CoordinateSystemMars CoordinateSystem = "GCJ02" //GPS坐标系:火星系 CoordinateSystemBaidu CoordinateSystem = "BD09" //GPS坐标系:百度系 )
type DeviceStatus ¶ added in v0.3.0
type DeviceStatus = int64
const ( DeviceStatusInactive DeviceStatus = 0 // 未激活 DeviceStatusOnline DeviceStatus = 1 //在线 DeviceStatusOffline DeviceStatus = 2 //离线 )
type DeviceType ¶
type DeviceType = int64
const ( DeviceTypeDevice DeviceType = 1 //设备 DeviceTypeGateway DeviceType = 2 //网关 DeviceTypeSubset DeviceType = 3 //子设备 )
type OrderBy ¶ added in v0.5.1
type OrderBy struct {
	Filed string `json:"filed" form:"filed"` //要排序的字段名
	Sort  int64  `json:"sort" form:"sort"`   //排序的方式:0 OrderAes、1 OrderDesc
}
    排序结构体
type PageInfo ¶
type PageInfo2 ¶
type PageInfo2 struct {
	TimeStart int64     `json:"timeStart"`
	TimeEnd   int64     `json:"timeEnd"`
	Page      int64     `json:"page" form:"page"`       // 页码
	Size      int64     `json:"size" form:"size"`       // 每页大小
	Orders    []OrderBy `json:"orderBy" form:"orderBy"` // 排序信息
}
    func (PageInfo2) FmtSql ¶
func (p PageInfo2) FmtSql(sql sq.SelectBuilder) sq.SelectBuilder
func (PageInfo2) FmtWhere ¶
func (p PageInfo2) FmtWhere(sql sq.SelectBuilder) sq.SelectBuilder
func (PageInfo2) GetTimeEnd ¶
func (PageInfo2) GetTimeStart ¶
type Point ¶ added in v0.5.1
type Point struct {
	CoordinateSystem CoordinateSystem `json:"coordinateSystem,omitempty"` //坐标系:WGS84(地球系),GCJ02(火星系),BD09(百度系)<br/>参考解释:https://www.cnblogs.com/bigroc/p/16423120.html
	Longitude        float64          `json:"longitude,range=[0:180]"`    //经度
	Latitude         float64          `json:"latitude,range=[0:90]"`      //纬度
}
    坐标,
 Click to show internal directories. 
   Click to hide internal directories.