svc

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2024 License: AGPL-3.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceContext

type ServiceContext struct {
	Config config.Config

	PubDev pubDev.PubDev
	PubApp pubApp.PubApp

	OssClient            *oss.Client
	TimedM               timedmanage.TimedManage
	ProductSchemaRepo    *caches.Cache[schema.Model, string]
	DeviceSchemaRepo     *caches.Cache[schema.Model, devices.Core]
	SchemaManaRepo       msgThing.SchemaDataRepo
	HubLogRepo           deviceLog.HubRepo
	StatusRepo           deviceLog.StatusRepo
	SendRepo             deviceLog.SendRepo
	AbnormalRepo         deviceLog.AbnormalRepo
	SDKLogRepo           deviceLog.SDKRepo
	Cache                kv.Store
	DeviceStatus         *cache.DeviceStatus
	FastEvent            *eventBus.FastEvent
	AreaM                areamanage.AreaManage
	UserM                usermanage.UserManage
	DictM                dictmanage.DictManage
	Common               common.Common
	DataM                datamanage.DataManage
	ProjectM             projectmanage.ProjectManage
	ProductCache         *caches.Cache[dm.ProductInfo, string]
	DeviceCache          *caches.Cache[dm.DeviceInfo, devices.Core]
	UserDeviceShare      *caches.Cache[dm.UserDeviceShareInfo, userShared.UserShareKey]
	UserMultiDeviceShare *caches.Cache[dm.UserDeviceShareMultiInfo, string]
	TenantCache          sysExport.TenantCacheT
	ProjectCache         sysExport.ProjectCacheT
	AreaCache            sysExport.AreaCacheT
	WebHook              *sysExport.Webhook
	Slot                 sysExport.SlotCacheT
	UserSubscribe        *ws.UserSubscribe
	GatewayCanBind       *cache.GatewayCanBind
	NodeID               int64
}

func NewServiceContext

func NewServiceContext(c config.Config) *ServiceContext

func (*ServiceContext) WithDeviceTenant

func (s *ServiceContext) WithDeviceTenant(ctx context.Context, dev devices.Core) context.Context

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL