Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDeviceManager ¶
func NewDeviceManager(srv *ServiceContext) *device.DeviceManager
Types ¶
type DeviceMessage ¶
type DeviceMessage struct {
Method DeviceMessageMethod `json:"method"`
}
func (*DeviceMessage) Json ¶
func (dm *DeviceMessage) Json() string
type DeviceMessageMethod ¶
type DeviceMessageMethod string
const ( // DeviceKickedMax 设备数量超出限制 DeviceKickedMax DeviceMessageMethod = "kicked_device" // DeviceKickedAdmin 管理员踢下线 DeviceKickedAdmin DeviceMessageMethod = "kicked_admin" // SubscribeUpdate 订阅有更新 SubscribeUpdate DeviceMessageMethod = "subscribe_update" )
type ServiceContext ¶
type ServiceContext struct { DB *gorm.DB Redis *redis.Client Config config.Config Queue *asynq.Client NodeCache *cache.NodeCacheClient AuthModel auth.Model AdsModel ads.Model LogModel log.Model UserModel user.Model OrderModel order.Model TicketModel ticket.Model ServerModel server.Model SystemModel system.Model CouponModel coupon.Model PaymentModel payment.Model DocumentModel document.Model SubscribeModel subscribe.Model TrafficLogModel traffic.Model ApplicationModel application.Model AnnouncementModel announcement.Model SubscribeTypeModel subscribeType.Model Restart func() error TelegramBot *tgbotapi.BotAPI NodeMultiplierManager *nodeMultiplier.Manager AuthLimiter *limit.PeriodLimit DeviceManager *device.DeviceManager }
func NewServiceContext ¶
func NewServiceContext(c config.Config) *ServiceContext
func (ServiceContext) Validate ¶
func (svc ServiceContext) Validate(dataStruct interface{}) error
Click to show internal directories.
Click to hide internal directories.