service

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAlarmLevel

func RegisterAlarmLevel(i IAlarmLevel)

func RegisterAlarmLog

func RegisterAlarmLog(i IAlarmLog)

func RegisterAlarmRule

func RegisterAlarmRule(i IAlarmRule)
func RegisterBaseDbLink(i IBaseDbLink)

func RegisterCaptcha

func RegisterCaptcha(i ICaptcha)

func RegisterCityData

func RegisterCityData(i ICityData)

func RegisterConfigData

func RegisterConfigData(i IConfigData)

func RegisterContext

func RegisterContext(i IContext)

func RegisterDataNode

func RegisterDataNode(i IDataNode)

func RegisterDataSource

func RegisterDataSource(i IDataSource)

func RegisterDataSourceRecord

func RegisterDataSourceRecord(i IDataSourceRecord)

func RegisterDataTemplate

func RegisterDataTemplate(i IDataTemplate)

func RegisterDataTemplateBusi

func RegisterDataTemplateBusi(i IDataTemplateBusi)

func RegisterDataTemplateNode

func RegisterDataTemplateNode(i IDataTemplateNode)

func RegisterDataTemplateRecord

func RegisterDataTemplateRecord(i IDataTemplateRecord)

func RegisterDevCategory

func RegisterDevCategory(i IDevCategory)

func RegisterDevDataReport

func RegisterDevDataReport(i IDevDataReport)

func RegisterDevDevice

func RegisterDevDevice(i IDevDevice)

func RegisterDevDeviceLog

func RegisterDevDeviceLog(i IDevDeviceLog)

func RegisterDevDeviceTag

func RegisterDevDeviceTag(i IDevDeviceTag)

func RegisterDevProduct

func RegisterDevProduct(i IDevProduct)

func RegisterDevTSLDataType

func RegisterDevTSLDataType(i IDevTSLDataType)

func RegisterDevTSLEvent

func RegisterDevTSLEvent(i IDevTSLEvent)

func RegisterDevTSLFunction

func RegisterDevTSLFunction(i IDevTSLFunction)

func RegisterDevTSLProperty

func RegisterDevTSLProperty(i IDevTSLProperty)

func RegisterDevTSLTag

func RegisterDevTSLTag(i IDevTSLTag)

func RegisterDictData

func RegisterDictData(i IDictData)

func RegisterDictType

func RegisterDictType(i IDictType)

func RegisterEnvWeather

func RegisterEnvWeather(i IEnvWeather)

func RegisterLogin

func RegisterLogin(i ILogin)

func RegisterMiddleware

func RegisterMiddleware(i IMiddleware)

func RegisterNetworkServer

func RegisterNetworkServer(i INetworkServer)

func RegisterNetworkTunnel

func RegisterNetworkTunnel(i INetworkTunnel)

func RegisterNoticeConfig

func RegisterNoticeConfig(i INoticeConfig)

func RegisterNoticeInfo

func RegisterNoticeInfo(i INoticeInfo)

func RegisterNoticeLog

func RegisterNoticeLog(i INoticeLog)

func RegisterNoticeTemplate

func RegisterNoticeTemplate(i INoticeTemplate)

func RegisterSysApi

func RegisterSysApi(i ISysApi)

func RegisterSysAuthorize

func RegisterSysAuthorize(i ISysAuthorize)

func RegisterSysDept

func RegisterSysDept(i ISysDept)

func RegisterSysJob

func RegisterSysJob(i ISysJob)

func RegisterSysLoginLog

func RegisterSysLoginLog(i ISysLoginLog)

func RegisterSysMenu

func RegisterSysMenu(i ISysMenu)

func RegisterSysMenuApi

func RegisterSysMenuApi(i ISysMenuApi)

func RegisterSysMenuButton

func RegisterSysMenuButton(i ISysMenuButton)

func RegisterSysMenuColumn

func RegisterSysMenuColumn(i ISysMenuColumn)

func RegisterSysNotifications

func RegisterSysNotifications(i ISysNotifications)

func RegisterSysOperLog

func RegisterSysOperLog(i ISysOperLog)

func RegisterSysOrganization

func RegisterSysOrganization(i ISysOrganization)

func RegisterSysPlugins

func RegisterSysPlugins(i ISysPlugins)

func RegisterSysPost

func RegisterSysPost(i ISysPost)

func RegisterSysRole

func RegisterSysRole(i ISysRole)

func RegisterSysRoleDept

func RegisterSysRoleDept(i ISysRoleDept)

func RegisterSysToken

func RegisterSysToken(i ISysToken)

func RegisterSysUser

func RegisterSysUser(i ISysUser)

func RegisterSysUserOnline

func RegisterSysUserOnline(i ISysUserOnline)

func RegisterSysUserPost

func RegisterSysUserPost(i ISysUserPost)

func RegisterSysUserRole

func RegisterSysUserRole(i ISysUserRole)

func RegisterSystemPluginsConfig

func RegisterSystemPluginsConfig(i ISystemPluginsConfig)

func RegisterTSLTable

func RegisterTSLTable(i ITSLTable)

func RegisterTdEngine

func RegisterTdEngine(i ITdEngine)

func RegisterTdLogTable

func RegisterTdLogTable(i ITdLogTable)

func RegisterUpload

func RegisterUpload(i IUpload)

Types

type IAlarmLevel

type IAlarmLevel interface {
	Detail(ctx context.Context, level uint) (out model.AlarmLevelOutput, err error)
	All(ctx context.Context) (out *model.AlarmLevelListOutput, err error)
	Edit(ctx context.Context, in []*model.AlarmLevelEditInput) (err error)
}

func AlarmLevel

func AlarmLevel() IAlarmLevel

type IAlarmLog

type IAlarmLog interface {
	Detail(ctx context.Context, id uint64) (out *model.AlarmLogOutput, err error)
	Add(ctx context.Context, in *model.AlarmLogAddInput) (id uint64, err error)
	List(ctx context.Context, in *model.AlarmLogListInput) (out *model.AlarmLogListOutput, err error)
	Handle(ctx context.Context, in *model.AlarmLogHandleInput) (err error)
	TotalForLevel(ctx context.Context) (total []model.AlarmLogLevelTotal, err error)
	ClearLogByDays(ctx context.Context, days int) (err error)
}

func AlarmLog

func AlarmLog() IAlarmLog

type IAlarmRule

type IAlarmRule interface {
	List(ctx context.Context, in *model.AlarmRuleListInput) (out *model.AlarmRuleListOutput, err error)
	Cache(ctx context.Context) (rs map[string][]model.AlarmRuleOutput, err error)
	Detail(ctx context.Context, id uint64) (out *model.AlarmRuleOutput, err error)
	Add(ctx context.Context, in *model.AlarmRuleAddInput) (err error)
	Edit(ctx context.Context, in *model.AlarmRuleEditInput) (err error)
	Deploy(ctx context.Context, id uint64) (err error)
	Undeploy(ctx context.Context, id uint64) (err error)
	Del(ctx context.Context, id uint64) (err error)
	Operator(ctx context.Context) (out []model.OperatorOutput, err error)
	TriggerType(ctx context.Context, productKey string) (out []model.TriggerTypeOutput, err error)
	TriggerParam(ctx context.Context, productKey string, triggerType int) (out []model.TriggerParamOutput, err error)
	Check(ctx context.Context, productKey string, deviceKey string, triggerType int, data map[string]any) (err error)
}

func AlarmRule

func AlarmRule() IAlarmRule
type IBaseDbLink interface {
	GetList(ctx context.Context, input *model.BaseDbLinkDoInput) (total int, out []*model.BaseDbLinkOut, err error)
	Add(ctx context.Context, input *model.AddBaseDbLinkInput) (err error)
	Detail(ctx context.Context, baseDbLinkId int) (entity *entity.BaseDbLink, err error)
	Edit(ctx context.Context, input *model.EditBaseDbLinkInput) (err error)
	Del(ctx context.Context, BaseDbLinkId int) (err error)
}
func BaseDbLink() IBaseDbLink

type ICaptcha

type ICaptcha interface {
	GetVerifyImgString(ctx context.Context) (idKeyC string, base64stringC string, err error)
	VerifyString(id, answer string) bool
}

func Captcha

func Captcha() ICaptcha

type ICityData

type ICityData interface {
	GetList(ctx context.Context, status int, name string, code string) (data []*entity.CityData, err error)
	Add(ctx context.Context, city *entity.CityData) (err error)
	Edit(ctx context.Context, city *entity.CityData) (err error)
	GetInfoById(ctx context.Context, id int) (cityInfo *entity.CityData, err error)
	DelById(ctx context.Context, id int) (err error)
	GetAll(ctx context.Context) (data []*entity.CityData, err error)
}

func CityData

func CityData() ICityData

type IConfigData

type IConfigData interface {
	List(ctx context.Context, input *model.ConfigDoInput) (total int, out []*model.SysConfigOut, err error)
	Add(ctx context.Context, input *model.AddConfigInput, userId int) (err error)
	CheckConfigKeyUnique(ctx context.Context, configKey string, configId ...int) (err error)
	Get(ctx context.Context, id int) (out *model.SysConfigOut, err error)
	Edit(ctx context.Context, input *model.EditConfigInput, userId int) (err error)
	Delete(ctx context.Context, ids []int) (err error)
	GetConfigByKey(ctx context.Context, key string) (config *entity.SysConfig, err error)
	GetByKey(ctx context.Context, key string) (config *entity.SysConfig, err error)
}

func ConfigData

func ConfigData() IConfigData

type IContext

type IContext interface {
	Init(r *ghttp.Request, customCtx *model.Context)
	Get(ctx context.Context) *model.Context
	SetUser(ctx context.Context, ctxUser *model.ContextUser)
	GetLoginUser(ctx context.Context) *model.ContextUser
	GetUserId(ctx context.Context) int
	GetUserDeptId(ctx context.Context) int
}

func Context

func Context() IContext

type IDataNode

type IDataNode interface {
	Add(ctx context.Context, in *model.DataNodeAddInput) (err error)
	Edit(ctx context.Context, in *model.DataNodeEditInput) (err error)
	Del(ctx context.Context, nodeId uint64) (err error)
	List(ctx context.Context, sourceId uint64) (list []*model.DataNodeOutput, err error)
	Detail(ctx context.Context, nodeId uint64) (out *model.DataNodeOutput, err error)
}

func DataNode

func DataNode() IDataNode

type IDataSource

type IDataSource interface {
	Add(ctx context.Context, in *model.DataSourceApiAddInput) (sourceId uint64, err error)
	Edit(ctx context.Context, in *model.DataSourceApiEditInput) (err error)
	Del(ctx context.Context, ids []uint64) (err error)
	Search(ctx context.Context, in *model.DataSourceSearchInput) (out *model.DataSourceSearchOutput, err error)
	List(ctx context.Context) (list []*entity.DataSource, err error)
	Detail(ctx context.Context, sourceId uint64) (out *model.DataSourceOutput, err error)
	Deploy(ctx context.Context, sourceId uint64) (err error)
	Undeploy(ctx context.Context, sourceId uint64) (err error)
	UpdateData(ctx context.Context, sourceId uint64) (err error)
	GetData(ctx context.Context, in *model.DataSourceDataInput) (out *model.DataSourceDataOutput, err error)
	GetAllData(ctx context.Context, in *model.SourceDataAllInput) (out *model.SourceDataAllOutput, err error)
	AllSource(ctx context.Context) (out []*model.AllSourceOut, err error)
	CopeSource(ctx context.Context, sourceId uint64) (err error)
	UpdateInterval(ctx context.Context, sourceId uint64, cronExpression string) (err error)
	GetApiData(ctx context.Context, sourceId uint64) (apiData []string, err error)
	AddDb(ctx context.Context, in *model.DataSourceDbAddInput) (sourceId uint64, err error)
	EditDb(ctx context.Context, in *model.DataSourceDbEditInput) (err error)
	GetDbFields(ctx context.Context, sourceId uint64) (g.MapStrAny, error)
	GetDbData(ctx context.Context, sourceId uint64) (string, error)
	AddDevice(ctx context.Context, in *model.DataSourceDeviceAddInput) (sourceId uint64, err error)
	EditDevice(ctx context.Context, in *model.DataSourceDeviceEditInput) (err error)
	GetDeviceData(ctx context.Context, sourceId uint64) (string, error)
}

func DataSource

func DataSource() IDataSource

type IDataSourceRecord

type IDataSourceRecord interface {
	GetForTpl(ctx context.Context, sourceId uint64, tid uint64) (rs gdb.Result, err error)
}

func DataSourceRecord

func DataSourceRecord() IDataSourceRecord

type IDataTemplate

type IDataTemplate interface {
	Add(ctx context.Context, in *model.DataTemplateAddInput) (id uint64, err error)
	Edit(ctx context.Context, in *model.DataTemplateEditInput) (err error)
	Del(ctx context.Context, ids []uint64) (err error)
	Search(ctx context.Context, in *model.DataTemplateSearchInput) (out *model.DataTemplateSearchOutput, err error)
	List(ctx context.Context) (list []*entity.DataTemplate, err error)
	Detail(ctx context.Context, id uint64) (out *model.DataTemplateOutput, err error)
	Deploy(ctx context.Context, id uint64) (err error)
	Undeploy(ctx context.Context, id uint64) (err error)
	GetData(ctx context.Context, in *model.DataTemplateDataInput) (out *model.DataTemplateDataOutput, err error)
	GetAllData(ctx context.Context, in *model.TemplateDataAllInput) (out *model.TemplateDataAllOutput, err error)
	GetDataBySql(ctx context.Context, sql string) (df dataframe.DataFrame, err error)
	GetDataByTableName(ctx context.Context, tableName string) (df dataframe.DataFrame, err error)
	GetLastData(ctx context.Context, in *model.TemplateDataLastInput) (out *model.TemplateDataLastOutput, err error)
	UpdateData(ctx context.Context, id uint64) error
	GetInfoByIds(ctx context.Context, ids []uint64) (data []*entity.DataTemplate, err error)
	AllTemplate(ctx context.Context) (out []*model.AllTemplateOut, err error)
	UpdateInterval(ctx context.Context, id uint64, cronExpression string) (err error)
	CopeTemplate(ctx context.Context, id uint64) (err error)
	CheckRelation(ctx context.Context, id uint64) (yes bool, err error)
	SetRelation(ctx context.Context, in *model.TemplateDataRelationInput) (err error)
	SourceList(ctx context.Context, id uint64) (list []*model.DataSourceOutput, err error)
}

func DataTemplate

func DataTemplate() IDataTemplate

type IDataTemplateBusi

type IDataTemplateBusi interface {
	Add(ctx context.Context, in *model.DataTemplateBusiAddInput) (err error)
	GetInfos(ctx context.Context, busiTypes int) (data *entity.DataTemplateBusi, err error)
	GetInfo(ctx context.Context, busiTypes int) (data *entity.DataTemplateBusi, err error)
	GetTable(ctx context.Context, busiTypes int) (table string, err error)
	Del(ctx context.Context, tid uint64) error
}

func DataTemplateBusi

func DataTemplateBusi() IDataTemplateBusi

type IDataTemplateNode

type IDataTemplateNode interface {
	Add(ctx context.Context, in *model.DataTemplateNodeAddInput) (err error)
	Edit(ctx context.Context, in *model.DataTemplateNodeEditInput) (err error)
	Del(ctx context.Context, id uint64) (err error)
	List(ctx context.Context, tid uint64) (list []*model.DataTemplateNodeOutput, err error)
}

func DataTemplateNode

func DataTemplateNode() IDataTemplateNode

type IDataTemplateRecord

type IDataTemplateRecord interface {
	UpdateData(ctx context.Context, tid uint64) error
}

func DataTemplateRecord

func DataTemplateRecord() IDataTemplateRecord

type IDevCategory

type IDevCategory interface {
	Detail(ctx context.Context, id uint) (out *model.ProductCategoryOutput, err error)
	GetNameByIds(ctx context.Context, categoryIds []uint) (names map[uint]string, err error)
	ListForPage(ctx context.Context, page, limit int, name string) (out []*model.ProductCategoryTreeOutput, total int, err error)
	List(ctx context.Context, name string) (out []*model.ProductCategoryTreeOutput, err error)
	Add(ctx context.Context, in *model.AddProductCategoryInput) (err error)
	Edit(ctx context.Context, in *model.EditProductCategoryInput) (err error)
	Del(ctx context.Context, id uint) (err error)
}

func DevCategory

func DevCategory() IDevCategory

type IDevDataReport

type IDevDataReport interface {
	Event(ctx context.Context, deviceKey string, data map[string]any) (err error)
}

func DevDataReport

func DevDataReport() IDevDataReport

type IDevDevice

type IDevDevice interface {
	Get(ctx context.Context, key string) (out *model.DeviceOutput, err error)
	Detail(ctx context.Context, id uint) (out *model.DeviceOutput, err error)
	ListForPage(ctx context.Context, in *model.ListDeviceForPageInput) (out *model.ListDeviceForPageOutput, err error)
	List(ctx context.Context, in *model.ListDeviceInput) (list []*model.DeviceOutput, err error)
	Add(ctx context.Context, in *model.AddDeviceInput) (deviceId uint, err error)
	Edit(ctx context.Context, in *model.EditDeviceInput) (err error)
	Del(ctx context.Context, ids []uint) (err error)
	Deploy(ctx context.Context, id uint) (err error)
	Undeploy(ctx context.Context, id uint) (err error)
	Online(ctx context.Context, key string) (err error)
	Offline(ctx context.Context, key string) (err error)
	TotalByProductId(ctx context.Context, productIds []uint) (totals map[uint]int, err error)
	Total(ctx context.Context) (data model.DeviceTotalOutput, err error)
	TotalForMonths(ctx context.Context) (data map[int]int, err error)
	AlarmTotalForMonths(ctx context.Context) (data map[int]int, err error)
	RunStatus(ctx context.Context, id uint) (out *model.DeviceRunStatusOutput, err error)
	GetProperty(ctx context.Context, in *model.DeviceGetPropertyInput) (out *model.DevicePropertiy, err error)
	GetPropertyList(ctx context.Context, in *model.DeviceGetPropertyListInput) (out *model.DeviceGetPropertyListOutput, err error)
}

func DevDevice

func DevDevice() IDevDevice

type IDevDeviceLog

type IDevDeviceLog interface {
	LogType(ctx context.Context) (list []string)
	Search(ctx context.Context, in *model.DeviceLogSearchInput) (out *model.DeviceLogSearchOutput, err error)
}

func DevDeviceLog

func DevDeviceLog() IDevDeviceLog

type IDevDeviceTag

type IDevDeviceTag interface {
	Add(ctx context.Context, in *model.AddTagDeviceInput) (err error)
	Edit(ctx context.Context, in *model.EditTagDeviceInput) (err error)
	Del(ctx context.Context, id uint) (err error)
}

func DevDeviceTag

func DevDeviceTag() IDevDeviceTag

type IDevProduct

type IDevProduct interface {
	Get(ctx context.Context, key string) (out *model.DetailProductOutput, err error)
	Detail(ctx context.Context, id uint) (out *model.DetailProductOutput, err error)
	GetNameByIds(ctx context.Context, productIds []uint) (names map[uint]string, err error)
	ListForPage(ctx context.Context, in *model.ListForPageInput) (out *model.ListForPageOutput, err error)
	List(ctx context.Context) (list []*model.ProductOutput, err error)
	Add(ctx context.Context, in *model.AddProductInput) (err error)
	Edit(ctx context.Context, in *model.EditProductInput) (err error)
	Del(ctx context.Context, ids []uint) (err error)
	Deploy(ctx context.Context, id uint) (err error)
	Undeploy(ctx context.Context, id uint) (err error)
}

func DevProduct

func DevProduct() IDevProduct

type IDevTSLDataType

type IDevTSLDataType interface {
	DataTypeValueList(ctx context.Context) (out *model.DataTypeOutput, err error)
}

func DevTSLDataType

func DevTSLDataType() IDevTSLDataType

type IDevTSLEvent

type IDevTSLEvent interface {
	Detail(ctx context.Context, deviceKey string, eventKey string) (event *model.TSLEvent, err error)
	ListEvent(ctx context.Context, in *model.ListTSLEventInput) (out *model.ListTSLEventOutput, err error)
	AddEvent(ctx context.Context, in *model.TSLEventInput) (err error)
	EditEvent(ctx context.Context, in *model.TSLEventInput) (err error)
	DelEvent(ctx context.Context, in *model.DelTSLEventInput) (err error)
}

func DevTSLEvent

func DevTSLEvent() IDevTSLEvent

type IDevTSLFunction

type IDevTSLFunction interface {
	ListFunction(ctx context.Context, in *model.ListTSLFunctionInput) (out *model.ListTSLFunctionOutput, err error)
	AddFunction(ctx context.Context, in *model.TSLFunctionAddInput) (err error)
	EditFunction(ctx context.Context, in *model.TSLFunctionAddInput) (err error)
	DelFunction(ctx context.Context, in *model.DelTSLFunctionInput) (err error)
}

func DevTSLFunction

func DevTSLFunction() IDevTSLFunction

type IDevTSLProperty

type IDevTSLProperty interface {
	ListProperty(ctx context.Context, in *model.ListTSLPropertyInput) (out *model.ListTSLPropertyOutput, err error)
	AllProperty(ctx context.Context, key string) (list []model.TSLProperty, err error)
	AddProperty(ctx context.Context, in *model.TSLPropertyInput) (err error)
	EditProperty(ctx context.Context, in *model.TSLPropertyInput) (err error)
	DelProperty(ctx context.Context, in *model.DelTSLPropertyInput) (err error)
}

func DevTSLProperty

func DevTSLProperty() IDevTSLProperty

type IDevTSLTag

type IDevTSLTag interface {
	ListTag(ctx context.Context, in *model.ListTSLTagInput) (out *model.ListTSLTagOutput, err error)
	AddTag(ctx context.Context, in *model.TSLTagInput) (err error)
	EditTag(ctx context.Context, in *model.TSLTagInput) (err error)
	DelTag(ctx context.Context, in *model.DelTSLTagInput) (err error)
}

func DevTSLTag

func DevTSLTag() IDevTSLTag

type IDictData

type IDictData interface {
	GetDictWithDataByType(ctx context.Context, input *model.GetDictInput) (dict *model.GetDictOut, err error)
	List(ctx context.Context, input *model.SysDictSearchInput) (total int, out []*model.SysDictDataOut, err error)
	Add(ctx context.Context, input *model.AddDictDataInput, userId int) (err error)
	Get(ctx context.Context, dictCode uint) (out *model.SysDictDataOut, err error)
	Edit(ctx context.Context, input *model.EditDictDataInput, userId int) (err error)
	Delete(ctx context.Context, ids []int) (err error)
}

func DictData

func DictData() IDictData

type IDictType

type IDictType interface {
	List(ctx context.Context, input *model.DictTypeDoInput) (total int, out []*model.SysDictTypeInfoOut, err error)
	Add(ctx context.Context, input *model.AddDictTypeInput, userId int) (err error)
	Edit(ctx context.Context, input *model.EditDictTypeInput, userId int) (err error)
	Get(ctx context.Context, req *common.DictTypeGetReq) (dictType *model.SysDictTypeOut, err error)
	ExistsDictType(ctx context.Context, dictType string, dictId ...int) (err error)
	Delete(ctx context.Context, dictIds []int) (err error)
}

func DictType

func DictType() IDictType

type IEnvWeather

type IEnvWeather interface {
	CityWeatherList(ctx context.Context) (cityWeatherListOut []*model.CityWeatherListOut, err error)
	GetCityWeatherById(ctx context.Context, id int) (cityWeatherListOut *model.CityWeatherListOut, err error)
	GetCityTemperatureById(ctx context.Context, id int, types int) (cityWeatherEchartOut []*model.CityWeatherEchartOut, avgCityWeatherEchartOut []*model.CityWeatherEchartOut, foreCastCityWeatherEchartOut []*model.CityWeatherEchartOut, foreCastAvgCityWeatherEchartOut []*model.CityWeatherEchartOut, err error)
	GetCityWindpowerById(ctx context.Context, id int, types int) (cityWeatherEchartOut []*model.CityWeatherEchartOut, avgCityWeatherEchartOut []*model.CityWeatherEchartOut, foreCastCityWeatherEchartOut []*model.CityWeatherEchartOut, foreCastAvgCityWeatherEchartOut []*model.CityWeatherEchartOut, err error)
}

func EnvWeather

func EnvWeather() IEnvWeather

type ILogin

type ILogin interface {
	Login(ctx context.Context, verifyKey string, captcha string, userName string, password string) (loginUserOut *model.LoginUserOut, token string, err error)
	LoginOut(ctx context.Context) (err error)
}

func Login

func Login() ILogin

type IMiddleware

type IMiddleware interface {
	ResponseHandler(r *ghttp.Request)
	Ctx(r *ghttp.Request)
	Auth(r *ghttp.Request)
	MiddlewareCORS(r *ghttp.Request)
	OperationLog(r *ghttp.Request)
}

func Middleware

func Middleware() IMiddleware

type INetworkServer

type INetworkServer interface {
	GetServerList(ctx context.Context, in *model.GetNetworkServerListInput) (total int, out []*model.NetworkServerOut, err error)
	GetServerRunList(ctx context.Context) (list []*model.NetworkServerRes, err error)
	GetServerById(ctx context.Context, id int) (out *model.NetworkServerOut, err error)
	AddServer(ctx context.Context, in model.NetworkServerAddInput) (err error)
	EditServer(ctx context.Context, in model.NetworkServerEditInput) (err error)
	DeleteServer(ctx context.Context, ids []int) (err error)
	SetServerStatus(ctx context.Context, id, status int) (err error)
}

func NetworkServer

func NetworkServer() INetworkServer

type INetworkTunnel

type INetworkTunnel interface {
	GetTunnelList(ctx context.Context, in *model.GetNetworkTunnelListInput) (total int, out []*model.NetworkTunnelOut, err error)
	GetTunnelRunList(ctx context.Context) (out []*model.NetworkTunnelOut, err error)
	GetTunnelById(ctx context.Context, id int) (out *model.NetworkTunnelOut, err error)
	AddTunnel(ctx context.Context, in model.NetworkTunnelAddInput) (id int, err error)
	EditTunnel(ctx context.Context, in model.NetworkTunnelEditInput) (err error)
	DeleteTunnel(ctx context.Context, ids []int) (err error)
	SetTunnelStatus(ctx context.Context, id, status int) (err error)
}

func NetworkTunnel

func NetworkTunnel() INetworkTunnel

type INoticeConfig

type INoticeConfig interface {
	GetNoticeConfigList(ctx context.Context, in *model.GetNoticeConfigListInput) (total, page int, list []*model.NoticeConfigOutput, err error)
	GetNoticeConfigById(ctx context.Context, id int) (out *model.NoticeConfigOutput, err error)
	AddNoticeConfig(ctx context.Context, in model.NoticeConfigAddInput) (err error)
	EditNoticeConfig(ctx context.Context, in model.NoticeConfigEditInput) (err error)
	DeleteNoticeConfig(ctx context.Context, Ids []string) (err error)
}

func NoticeConfig

func NoticeConfig() INoticeConfig

type INoticeInfo

type INoticeInfo interface {
	GetNoticeInfoList(ctx context.Context, in *model.GetNoticeInfoListInput) (total, page int, list []*model.NoticeInfoOutput, err error)
	GetNoticeInfoById(ctx context.Context, id int) (out *model.NoticeInfoOutput, err error)
	AddNoticeInfo(ctx context.Context, in model.NoticeInfoAddInput) (err error)
	EditNoticeInfo(ctx context.Context, in model.NoticeInfoEditInput) (err error)
	DeleteNoticeInfo(ctx context.Context, Ids []int) (err error)
}

func NoticeInfo

func NoticeInfo() INoticeInfo

type INoticeLog

type INoticeLog interface {
	Add(ctx context.Context, in *model.NoticeLogAddInput) (err error)
	Del(ctx context.Context, ids []uint64) (err error)
	Search(ctx context.Context, in *model.NoticeLogSearchInput) (out *model.NoticeLogSearchOutput, err error)
	ClearLogByDays(ctx context.Context, days int) (err error)
}

func NoticeLog

func NoticeLog() INoticeLog

type INoticeTemplate

type INoticeTemplate interface {
	GetNoticeTemplateList(ctx context.Context, in *model.GetNoticeTemplateListInput) (total, page int, list []*model.NoticeTemplateOutput, err error)
	GetNoticeTemplateById(ctx context.Context, id string) (out *model.NoticeTemplateOutput, err error)
	GetNoticeTemplateByConfigId(ctx context.Context, configId string) (out *model.NoticeTemplateOutput, err error)
	AddNoticeTemplate(ctx context.Context, in model.NoticeTemplateAddInput) (err error)
	EditNoticeTemplate(ctx context.Context, in model.NoticeTemplateEditInput) (err error)
	SaveNoticeTemplate(ctx context.Context, in model.NoticeTemplateAddInput) (err error)
	DeleteNoticeTemplate(ctx context.Context, Ids []string) (err error)
}

func NoticeTemplate

func NoticeTemplate() INoticeTemplate

type ISysApi

type ISysApi interface {
	GetInfoByIds(ctx context.Context, ids []int) (data []*entity.SysApi, err error)
	GetApiByMenuId(ctx context.Context, apiId int) (data []*entity.SysApi, err error)
	GetInfoById(ctx context.Context, id int) (entity *entity.SysApi, err error)
	GetApiAll(ctx context.Context) (data []*entity.SysApi, err error)
	GetApiTree(ctx context.Context, name string, address string, status int, types int) (out []*model.SysApiTreeOut, err error)
	Add(ctx context.Context, input *model.AddApiInput) (err error)
	Detail(ctx context.Context, id int) (out *model.SysApiOut, err error)
	Edit(ctx context.Context, input *model.EditApiInput) (err error)
	Del(ctx context.Context, Id int) (err error)
	EditStatus(ctx context.Context, id int, status int) (err error)
	GetInfoByAddress(ctx context.Context, address string) (entity *entity.SysApi, err error)
}

func SysApi

func SysApi() ISysApi

type ISysAuthorize

type ISysAuthorize interface {
	AuthorizeQuery(ctx context.Context, itemsType string, menuIds []int) (out []*model.AuthorizeQueryTreeOut, err error)
	GetInfoByRoleId(ctx context.Context, roleId int) (data []*entity.SysAuthorize, err error)
	GetInfoByRoleIds(ctx context.Context, roleIds []int) (data []*entity.SysAuthorize, err error)
	GetInfoByRoleIdsAndItemsType(ctx context.Context, roleIds []int, itemsType string) (data []*entity.SysAuthorize, err error)
	DelByRoleId(ctx context.Context, roleId int) (err error)
	Add(ctx context.Context, authorize []*entity.SysAuthorize) (err error)
	AddAuthorize(ctx context.Context, roleId int, menuIds []string, buttonIds []string, columnIds []string, apiIds []string) (err error)
	IsAllowAuthorize(ctx context.Context, roleId int) (isAllow bool, err error)
	InitAuthorize(ctx context.Context) (err error)
}

func SysAuthorize

func SysAuthorize() ISysAuthorize

type ISysDept

type ISysDept interface {
	GetTree(ctx context.Context, deptName string, status int) (out []*model.DeptOut, err error)
	GetData(ctx context.Context, deptName string, status int) (data []*model.DeptOut, err error)
	Add(ctx context.Context, input *model.AddDeptInput) (err error)
	Edit(ctx context.Context, input *model.EditDeptInput) (err error)
	Detail(ctx context.Context, deptId int64) (entity *entity.SysDept, err error)
	Del(ctx context.Context, deptId int64) (err error)
	GetAll(ctx context.Context) (data []*entity.SysDept, err error)
	GetFromCache(ctx context.Context) (list []*entity.SysDept, err error)
	FindSonByParentId(deptList []*entity.SysDept, deptId int64) []*entity.SysDept
}

func SysDept

func SysDept() ISysDept

type ISysJob

type ISysJob interface {
	JobList(ctx context.Context, input *model.GetJobListInput) (total int, out []*model.SysJobOut, err error)
	GetJobs(ctx context.Context) (jobs []*model.SysJobOut, err error)
	AddJob(ctx context.Context, input *model.SysJobAddInput) (err error)
	GetJobInfoById(ctx context.Context, id int) (job *model.SysJobOut, err error)
	EditJob(ctx context.Context, input *model.SysJobEditInput) error
	JobStart(ctx context.Context, job *model.SysJobOut) error
	JobStartMult(ctx context.Context, jobs []*model.SysJobOut) error
	JobStop(ctx context.Context, job *model.SysJobOut) error
	JobRun(ctx context.Context, job *model.SysJobOut) error
	DeleteJobByIds(ctx context.Context, ids []int) (err error)
	WithValue(ctx context.Context, value string) context.Context
	Value(ctx context.Context) uint64
}

func SysJob

func SysJob() ISysJob

type ISysLoginLog

type ISysLoginLog interface {
	Invoke(ctx context.Context, data *model.LoginLogParams)
	Add(ctx context.Context, params *model.LoginLogParams)
	GetList(ctx context.Context, req *model.SysLoginLogInput) (total, page int, list []*model.SysLoginLogOut, err error)
	Detail(ctx context.Context, infoId int) (entity *entity.SysLoginLog, err error)
	Del(ctx context.Context, infoIds []int) (err error)
}

func SysLoginLog

func SysLoginLog() ISysLoginLog

type ISysMenu

type ISysMenu interface {
	GetAll(ctx context.Context) (data []*entity.SysMenu, err error)
	GetTree(ctx context.Context, title string, status int) (data []*model.SysMenuOut, err error)
	Add(ctx context.Context, input *model.AddMenuInput) (err error)
	Detail(ctx context.Context, menuId int64) (entity *entity.SysMenu, err error)
	Edit(ctx context.Context, input *model.EditMenuInput) (err error)
	Del(ctx context.Context, menuId int64) (err error)
	GetData(ctx context.Context, title string, status int) (data []*model.SysMenuOut, err error)
	GetInfoByMenuIds(ctx context.Context, menuIds []int) (data []*entity.SysMenu, err error)
	GetInfoById(ctx context.Context, id int) (data *entity.SysMenu, err error)
}

func SysMenu

func SysMenu() ISysMenu

type ISysMenuApi

type ISysMenuApi interface {
	GetInfoByIds(ctx context.Context, ids []int) (data []*entity.SysMenuApi, err error)
	GetInfoByMenuIds(ctx context.Context, menuIds []int) (data []*entity.SysMenuApi, err error)
	GetInfoByApiId(ctx context.Context, apiId int) (data []*entity.SysMenuApi, err error)
}

func SysMenuApi

func SysMenuApi() ISysMenuApi

type ISysMenuButton

type ISysMenuButton interface {
	GetList(ctx context.Context, status int, name string, menuId int) (data []model.UserMenuButtonRes, err error)
	GetData(ctx context.Context, status int, name string, menuId int, menuButton []model.UserMenuButtonRes) (data []model.UserMenuButtonRes, err error)
	Add(ctx context.Context, input *model.AddMenuButtonInput) (err error)
	Detail(ctx context.Context, Id int64) (entity *entity.SysMenuButton, err error)
	Edit(ctx context.Context, input *model.EditMenuButtonInput) (err error)
	Del(ctx context.Context, id int64) (err error)
	GetInfoByButtonIds(ctx context.Context, ids []int) (data []*entity.SysMenuButton, err error)
	GetInfoByMenuIds(ctx context.Context, menuIds []int) (data []*entity.SysMenuButton, err error)
	GetInfoByMenuId(ctx context.Context, menuId int) (data []*entity.SysMenuButton, err error)
	GetAll(ctx context.Context) (data []*entity.SysMenuButton, err error)
	EditStatus(ctx context.Context, id int, menuId int, status int) (err error)
}

func SysMenuButton

func SysMenuButton() ISysMenuButton

type ISysMenuColumn

type ISysMenuColumn interface {
	GetList(ctx context.Context, input *model.MenuColumnDoInput) (data []model.UserMenuColumnRes, err error)
	GetData(ctx context.Context, input *model.MenuColumnDoInput, menuColumn []model.UserMenuColumnRes) (data []model.UserMenuColumnRes, err error)
	Add(ctx context.Context, input *model.AddMenuColumnInput) (err error)
	Detail(ctx context.Context, Id int64) (entity *entity.SysMenuColumn, err error)
	Edit(ctx context.Context, input *model.EditMenuColumnInput) (err error)
	Del(ctx context.Context, Id int64) (err error)
	EditStatus(ctx context.Context, id int, menuId int, status int) (err error)
	GetInfoByColumnIds(ctx context.Context, ids []int) (data []*entity.SysMenuColumn, err error)
	GetInfoByMenuIds(ctx context.Context, menuIds []int) (data []*entity.SysMenuColumn, err error)
	GetInfoByMenuId(ctx context.Context, menuId int) (data []*entity.SysMenuColumn, err error)
	GetAll(ctx context.Context) (data []*entity.SysMenuColumn, err error)
}

func SysMenuColumn

func SysMenuColumn() ISysMenuColumn

type ISysNotifications

type ISysNotifications interface {
	GetSysNotificationsList(ctx context.Context, input *model.GetNotificationsListInput) (total, page int, list []*model.NotificationsOut, err error)
	GetSysNotificationsById(ctx context.Context, id int) (out *model.NotificationsRes, err error)
	AddSysNotifications(ctx context.Context, in model.NotificationsAddInput) (err error)
	EditSysNotifications(ctx context.Context, in model.NotificationsEditInput) (err error)
	DeleteSysNotifications(ctx context.Context, in *system.DeleteNotificationsReq) (err error)
}

func SysNotifications

func SysNotifications() ISysNotifications

type ISysOperLog

type ISysOperLog interface {
	GetList(ctx context.Context, input *model.SysOperLogDoInput) (total int, out []*model.SysOperLogOut, err error)
	Invoke(ctx context.Context, userId int, url *url.URL, param g.Map, method string, clientIp string, res map[string]interface{}, err error)
	Add(ctx context.Context, userId int, url *url.URL, param g.Map, method string, clientIp string, res map[string]interface{}, erro error) (err error)
	Detail(ctx context.Context, operId int) (entity *entity.SysOperLog, err error)
	Del(ctx context.Context, operIds []int) (err error)
	ClearOperationLogByDays(ctx context.Context, days int) (err error)
}

func SysOperLog

func SysOperLog() ISysOperLog

type ISysOrganization

type ISysOrganization interface {
	GetTree(ctx context.Context, name string, status int) (data []*model.OrganizationOut, err error)
	GetData(ctx context.Context, name string, status int) (data []*model.OrganizationOut, err error)
	Add(ctx context.Context, input *model.AddOrganizationInput) (err error)
	Edit(ctx context.Context, input *model.EditOrganizationInput) (err error)
	Detail(ctx context.Context, id int64) (entity *entity.SysOrganization, err error)
	Del(ctx context.Context, id int64) (err error)
	GetAll(ctx context.Context) (data []*entity.SysOrganization, err error)
	Count(ctx context.Context) (count int, err error)
}

func SysOrganization

func SysOrganization() ISysOrganization

type ISysPlugins

type ISysPlugins interface {
	GetSysPluginsList(ctx context.Context, in *model.GetSysPluginsListInput) (total, page int, list []*model.SysPluginsOutput, err error)
	GetSysPluginsById(ctx context.Context, id int) (out *model.SysPluginsOutput, err error)
	AddSysPlugins(ctx context.Context, in model.SysPluginsAddInput) (err error)
	EditSysPlugins(ctx context.Context, in model.SysPluginsEditInput) (err error)
	DeleteSysPlugins(ctx context.Context, Ids []int) (err error)
	SaveSysPlugins(ctx context.Context, in model.SysPluginsAddInput) (err error)
	EditStatus(ctx context.Context, id int, status int) (err error)
}

func SysPlugins

func SysPlugins() ISysPlugins

type ISysPost

type ISysPost interface {
	GetTree(ctx context.Context, postName string, postCode string, status int) (data []*model.PostOut, err error)
	Add(ctx context.Context, input *model.AddPostInput) (err error)
	Edit(ctx context.Context, input *model.EditPostInput) (err error)
	Detail(ctx context.Context, postId int64) (entity *entity.SysPost, err error)
	GetData(ctx context.Context, postName string, postCode string, status int) (data []*model.PostOut, err error)
	Del(ctx context.Context, postId int64) (err error)
	GetUsedPost(ctx context.Context) (list []*model.DetailPostRes, err error)
}

func SysPost

func SysPost() ISysPost

type ISysRole

type ISysRole interface {
	GetAll(ctx context.Context) (entity []*entity.SysRole, err error)
	GetTree(ctx context.Context, name string, status int) (out []*model.RoleTreeOut, err error)
	Add(ctx context.Context, input *model.AddRoleInput) (err error)
	Edit(ctx context.Context, input *model.EditRoleInput) (err error)
	GetInfoById(ctx context.Context, id uint) (entity *entity.SysRole, err error)
	DelInfoById(ctx context.Context, id uint) (err error)
	GetRoleList(ctx context.Context) (list []*model.RoleInfoRes, err error)
	GetInfoByIds(ctx context.Context, id []int) (entity []*entity.SysRole, err error)
	DataScope(ctx context.Context, id int, dataScope uint, deptIds []int64) (err error)
	GetAuthorizeById(ctx context.Context, id int) (menuIds []string, menuButtonIds []string, menuColumnIds []string, menuApiIds []string, err error)
}

func SysRole

func SysRole() ISysRole

type ISysRoleDept

type ISysRoleDept interface {
	GetInfoByRoleId(ctx context.Context, roleId int) (data []*entity.SysRoleDept, err error)
}

func SysRoleDept

func SysRoleDept() ISysRoleDept

type ISysToken

type ISysToken interface {
	GenerateToken(ctx context.Context, key string, data interface{}) (keys string, err error)
	ParseToken(r *ghttp.Request) (*gftoken.CustomClaims, error)
}

func SysToken

func SysToken() ISysToken

type ISysUser

type ISysUser interface {
	GetUserByUsername(ctx context.Context, userName string) (data *entity.SysUser, err error)
	GetAdminUserByUsernamePassword(ctx context.Context, userName string, password string) (user *entity.SysUser, err error)
	UpdateLoginInfo(ctx context.Context, id uint64, ip string) (err error)
	UserList(ctx context.Context, input *model.UserListDoInput) (total int, out []*model.UserListOut, err error)
	Add(ctx context.Context, input *model.AddUserInput) (err error)
	Edit(ctx context.Context, input *model.EditUserInput) (err error)
	GetUserById(ctx context.Context, id uint) (out *model.UserInfoOut, err error)
	DelInfoById(ctx context.Context, id uint) (err error)
	ResetPassword(ctx context.Context, id uint, userPassword string) (err error)
	EditUserStatus(ctx context.Context, id uint, status uint) (err error)
	GetUserByIds(ctx context.Context, id []int) (data []*entity.SysUser, err error)
	GetAll(ctx context.Context) (data []*entity.SysUser, err error)
	CurrentUser(ctx context.Context) (userInfoOut *model.UserInfoOut, menuTreeOut []*model.UserMenuTreeOut, err error)
	EditUserAvatar(ctx context.Context, id uint, avatar string) (err error)
}

func SysUser

func SysUser() ISysUser

type ISysUserOnline

type ISysUserOnline interface {
	Invoke(ctx context.Context, data *entity.SysUserOnline)
	Add(ctx context.Context, data *entity.SysUserOnline)
	DelByToken(ctx context.Context, token string) (err error)
	GetInfoByToken(ctx context.Context, token string) (data *entity.SysUserOnline, err error)
	DelByIds(ctx context.Context, ids []uint) (err error)
	GetAll(ctx context.Context) (data []*entity.SysUserOnline, err error)
	UserOnlineList(ctx context.Context, input *model.UserOnlineDoListInput) (total int, out []*model.UserOnlineListOut, err error)
	UserOnlineStrongBack(ctx context.Context, id int) (err error)
}

func SysUserOnline

func SysUserOnline() ISysUserOnline

type ISysUserPost

type ISysUserPost interface {
	GetInfoByUserId(ctx context.Context, userId int) (data []*entity.SysUserPost, err error)
}

func SysUserPost

func SysUserPost() ISysUserPost

type ISysUserRole

type ISysUserRole interface {
	GetInfoByUserId(ctx context.Context, userId int) (data []*entity.SysUserRole, err error)
}

func SysUserRole

func SysUserRole() ISysUserRole

type ISystemPluginsConfig

type ISystemPluginsConfig interface {
	GetPluginsConfigList(ctx context.Context, in *model.GetPluginsConfigListInput) (total, page int, list []*model.PluginsConfigOutput, err error)
	GetPluginsConfigById(ctx context.Context, id int) (out *model.PluginsConfigOutput, err error)
	GetPluginsConfigByName(ctx context.Context, types, name string) (out *model.PluginsConfigOutput, err error)
	AddPluginsConfig(ctx context.Context, in model.PluginsConfigAddInput) (err error)
	EditPluginsConfig(ctx context.Context, in model.PluginsConfigEditInput) (err error)
	SavePluginsConfig(ctx context.Context, in model.PluginsConfigAddInput) (err error)
	DeletePluginsConfig(ctx context.Context, Ids []int) (err error)
	UpdateAllPluginsConfigCache() (err error)
	GetPluginsConfigData(pluginType, pluginName string) (res map[interface{}]interface{}, err error)
}

func SystemPluginsConfig

func SystemPluginsConfig() ISystemPluginsConfig

type ITSLTable

type ITSLTable interface {
	Insert(ctx context.Context, deviceKey string, data map[string]any) (err error)
	CreateStable(ctx context.Context, tsl *model.TSL) (err error)
	CreateTable(ctx context.Context, stable, table string) (err error)
	DropStable(ctx context.Context, table string) (err error)
	DropTable(ctx context.Context, table string) (err error)
	CreateDatabase(ctx context.Context) (err error)
	AddDatabaseField(ctx context.Context, tableName, fieldName string, dataType string, len int) (err error)
	DelDatabaseField(ctx context.Context, tableName, fieldName string) (err error)
	ModifyDatabaseField(ctx context.Context, tableName, fieldName string, dataType string, len int) (err error)
	AddTag(ctx context.Context, tableName, tagName string, dataType string, len int) (err error)
	DelTag(ctx context.Context, tableName, tagName string) (err error)
	ModifyTag(ctx context.Context, tableName, tagName string, dataType string, len int) (err error)
}

func TSLTable

func TSLTable() ITSLTable

type ITdEngine

type ITdEngine interface {
	GetConn(ctx context.Context, dbName string) (db *sql.DB, err error)
	GetTdEngineAllDb(ctx context.Context) (data []string, err error)
	GetListTableByDatabases(ctx context.Context, dbName string) (data []*model.TDEngineTablesList, err error)
	GetTdEngineTableInfoByTable(ctx context.Context, dbName string, tableName string) (data []*model.TDEngineTableInfo, err error)
	GetTdEngineTableDataByTable(ctx context.Context, dbName string, tableName string) (data *model.TableDataInfo, err error)
	GetOne(ctx context.Context, sql string, args ...any) (rs gdb.Record, err error)
	GetAll(ctx context.Context, sql string, args ...any) (rs gdb.Result, err error)
	Time(v *g.Var) (rs *g.Var)
}

func TdEngine

func TdEngine() ITdEngine

type ITdLogTable

type ITdLogTable interface {
	CreateStable(ctx context.Context) (err error)
	Insert(ctx context.Context, log *model.TdLogAddInput) (err error)
	Clear(ctx context.Context) (err error)
	GetAll(ctx context.Context, sql string, args ...any) (list []model.TdLog, err error)
}

func TdLogTable

func TdLogTable() ITdLogTable

type IUpload

type IUpload interface {
	UploadFiles(ctx context.Context, files []*ghttp.UploadFile, checkFileType string, source int) (result common.UploadMultipleRes, err error)
	UploadFile(ctx context.Context, file *ghttp.UploadFile, checkFileType string, source int) (result common.UploadResponse, err error)
	UploadTencent(ctx context.Context, file *ghttp.UploadFile) (result common.UploadResponse, err error)
	UploadLocal(ctx context.Context, file *ghttp.UploadFile) (result common.UploadResponse, err error)
	CheckSize(ctx context.Context, checkFileType string, file *ghttp.UploadFile) (err error)
	CheckType(ctx context.Context, checkFileType string, file *ghttp.UploadFile) (err error)
}

func Upload

func Upload() IUpload

Jump to

Keyboard shortcuts

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