Documentation ¶
Index ¶
- func NewUUID() string
- type BaseDao
- func (dao *BaseDao[T]) CheckExist(id uint64) bool
- func (dao *BaseDao[T]) Create(model *T) error
- func (dao *BaseDao[T]) CreateList(list []T) error
- func (dao *BaseDao[T]) DB() *gorm.DB
- func (dao *BaseDao[T]) Delete(id uint64) error
- func (dao *BaseDao[T]) DeleteCondition(condition string, args ...any) error
- func (dao *BaseDao[T]) GetAll() ([]T, error)
- func (dao *BaseDao[T]) GetCondition(query interface{}, args ...interface{}) (*T, error)
- func (dao *BaseDao[T]) GetConditions(query interface{}, args ...interface{}) ([]T, error)
- func (dao *BaseDao[T]) GetConditionsLimit(maxCount int, query interface{}, args ...interface{}) ([]*T, error)
- func (dao *BaseDao[T]) GetCount() int64
- func (dao *BaseDao[T]) GetList(startId uint64, maxCount int) ([]T, error)
- func (dao *BaseDao[T]) GetModel(id uint64) (*T, error)
- func (dao *BaseDao[T]) Save(model *T) error
- func (dao *BaseDao[T]) Update(model *T) error
- type BrokerConfig
- type Context
- type Date
- type DateTime
- type DbFull
- type DbSimple
- type DeviceInfo
- type ECommState
- type ELog
- type File
- type InitHandler
- type NoticeHandler
- type ReqHandler
- type SendRequestHandler
- type StateHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseDao ¶
type BaseDao[T any] struct { // contains filtered or unexported fields }
func (*BaseDao[T]) CheckExist ¶
CheckExist
@Description: 验证数据是否存在 @param id @return bool @return error
func (*BaseDao[T]) DeleteCondition ¶
DeleteCondition
@Description: 自定义条件删除数据 @param condition @param args @return error
func (*BaseDao[T]) GetCondition ¶
GetCondition
@Description: 条件查询一条记录 @param query 条件,如 id = ? 或 id IN (?) 等 @param args 条件参数,如 id, ids 等 @return []*T @return error
func (*BaseDao[T]) GetConditions ¶
GetConditions
@Description: 条件查询一组列表 @param query 条件,如 id = ? 或 id IN (?) 等 @param args 条件参数,如 id, ids 等 @return []*T @return error
func (*BaseDao[T]) GetConditionsLimit ¶
func (dao *BaseDao[T]) GetConditionsLimit(maxCount int, query interface{}, args ...interface{}) ([]*T, error)
GetConditionsLimit
@Description: 条件查询一组列表 @param maxCount 最大数量 @param query 条件,如 id = ? 或 id IN (?) 等 @param args 条件参数,如 id, ids 等 @return []*T @return error
func (*BaseDao[T]) GetList ¶
GetList
@Description: 查询一组列表 @param startId 起始Id @param maxCount 最大数量 @return []*T @return error
type BrokerConfig ¶
BrokerConfig 主服务配置
type Context ¶
type Context interface { GetString(key string) string GetInt(key string) int GetUInt(key string) uint64 GetByte(key string) byte GetBool(key string) bool GetDate(key string) Date GetDateTime(key string) DateTime GetFiles(key string) []File GetStruct(refStruct any) Raw() any }
Context 上下文
type Date ¶
type Date uint32
Date 日期
type DateTime ¶
type DateTime uint64
DateTime 日期+时间
type DeviceInfo ¶ added in v0.0.3
DeviceInfo 本地设备信息
func (DeviceInfo) IsEmpty ¶ added in v0.0.3
func (dev DeviceInfo) IsEmpty() bool
type ECommState ¶
type ECommState string
const ( ECommStateConnecting ECommState = "Connecting" //连接中 ECommStateLinked ECommState = "Linked" //已连接 ECommStateLinkLost ECommState = "LinkLost" //连接丢失 ECommStateFault ECommState = "Fault" //故障 ECommStateStopped ECommState = "Stopped" //已停止 )
type SendRequestHandler ¶
SendRequestHandler 发送请求方法定义
Click to show internal directories.
Click to hide internal directories.