apis

package
v0.0.0-...-159ceb7 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2018 License: MPL-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RpcServer *rpc.Server

Functions

func Run

func Run(route ...string)

Types

type Apis

type Apis struct {
	// contains filtered or unexported fields
}

func NewApis

func NewApis(mux *mux.Router) *Apis

func (*Apis) ChkToken

func (req *Apis) ChkToken() error

验证token--权限严重,每个方法添加此方法调用

func (*Apis) ServeHTTP

func (this *Apis) ServeHTTP(w http.ResponseWriter, req *http.Request)

func (*Apis) ToBool

func (req *Apis) ToBool(val interface{}, def ...bool) (rval bool, err error)

转bool

func (*Apis) ToInt

func (req *Apis) ToInt(val interface{}, def ...int) (rval int, err error)

转int

func (*Apis) ToInt32

func (req *Apis) ToInt32(val interface{}, def ...int32) (rval int32, err error)

转int32

func (*Apis) ToString

func (req *Apis) ToString(val interface{}, def ...string) (str string)
格式转换

转string

type AppName

type AppName struct {
	Apis
}

func (*AppName) AddAppName

func (this *AppName) AddAppName(r *http.Request, args *map[string]interface{}, response *Response) error

添加appname字段配置

func (*AppName) AppNameList

func (this *AppName) AppNameList(r *http.Request, args *map[string]interface{}, response *Response) error

appname 列表

func (*AppName) DelAppName

func (this *AppName) DelAppName(r *http.Request, args *map[string]interface{}, response *Response) error

删除

func (*AppName) EditAppName

func (this *AppName) EditAppName(r *http.Request, args *map[string]interface{}, response *Response) error

编辑appname字段配置

func (*AppName) InfoAppName

func (this *AppName) InfoAppName(r *http.Request, args *map[string]interface{}, response *Response) error

获取单条消息

type Device

type Device struct {
	Apis
}

func (*Device) AutoDiscoveryDevice

func (this *Device) AutoDiscoveryDevice(r *http.Request, args *map[string]interface{}, response *Response) error

AutoDiscoveryDevice 设备发现页面

func (*Device) DelIdsDevice

func (this *Device) DelIdsDevice(r *http.Request, args *map[string]interface{}, response *Response) error

删除设备

func (*Device) DeviceList

func (this *Device) DeviceList(r *http.Request, args *map[string]interface{}, response *Response) error

ajax获取设备列表

func (*Device) DeviceNativeGroupList

func (this *Device) DeviceNativeGroupList(r *http.Request, args *map[string]interface{}, response *Response) error

数据上传分组列表

func (*Device) RestoreIdsDevice

func (this *Device) RestoreIdsDevice(r *http.Request, args *map[string]interface{}, response *Response) error

还原删除的设备

func (*Device) SaveOneDevice

func (this *Device) SaveOneDevice(r *http.Request, args *map[string]interface{}, response *Response) error

func (*Device) SynchroDeviceids

func (this *Device) SynchroDeviceids(r *http.Request, args *map[string]interface{}, response *Response) error

同步设备id列表到redis

func (*Device) UpDevice

func (this *Device) UpDevice(r *http.Request, args *map[string]interface{}, response *Response) error

保存描述信息和删除与否

type DeviceGroup

type DeviceGroup struct {
	Apis
}

func (*DeviceGroup) AddDeviceGroup

func (this *DeviceGroup) AddDeviceGroup(r *http.Request, args *map[string]interface{}, response *Response) error

添加

func (*DeviceGroup) AddDeviceOnGroup

func (this *DeviceGroup) AddDeviceOnGroup(r *http.Request, args *map[string]interface{}, response *Response) error

添加设备到分组

func (*DeviceGroup) DelDeviceGroup

func (this *DeviceGroup) DelDeviceGroup(r *http.Request, args *map[string]interface{}, response *Response) error

删除

func (*DeviceGroup) DelTrueDeviceGroup

func (this *DeviceGroup) DelTrueDeviceGroup(r *http.Request, args *map[string]interface{}, response *Response) error

真实删除

func (*DeviceGroup) EditDeviceGroup

func (this *DeviceGroup) EditDeviceGroup(r *http.Request, args *map[string]interface{}, response *Response) error

编辑

func (*DeviceGroup) GetDeviceGroupTypeList

func (this *DeviceGroup) GetDeviceGroupTypeList(r *http.Request, args *map[string]interface{}, response *Response) error

设备设备分组

func (*DeviceGroup) GetGroupGroupList

func (this *DeviceGroup) GetGroupGroupList(r *http.Request, args *map[string]interface{}, response *Response) error

获取分组的分组

func (*DeviceGroup) GetGroupTypeList

func (this *DeviceGroup) GetGroupTypeList(r *http.Request, args *map[string]interface{}, response *Response) error

根据type查询父id列表

func (*DeviceGroup) GroupList

func (this *DeviceGroup) GroupList(r *http.Request, args *map[string]interface{}, response *Response) error

ajax获取设备分组列表

func (*DeviceGroup) RemoveDeviceOnGroup

func (this *DeviceGroup) RemoveDeviceOnGroup(r *http.Request, args *map[string]interface{}, response *Response) error

移除设备在某个分组

func (*DeviceGroup) RestoreDeviceGroup

func (this *DeviceGroup) RestoreDeviceGroup(r *http.Request, args *map[string]interface{}, response *Response) error

还原删除

type DeviceGroupGroup

type DeviceGroupGroup struct {
	Apis
}

func (*DeviceGroupGroup) AddGroupTypes

func (this *DeviceGroupGroup) AddGroupTypes(r *http.Request, args *map[string]interface{}, response *Response) error

添加

func (*DeviceGroupGroup) DelGroupTypes

func (this *DeviceGroupGroup) DelGroupTypes(r *http.Request, args *map[string]interface{}, response *Response) error

删除

func (*DeviceGroupGroup) EditGroupTypes

func (this *DeviceGroupGroup) EditGroupTypes(r *http.Request, args *map[string]interface{}, response *Response) error

编辑

func (*DeviceGroupGroup) GetGroupTypes

func (this *DeviceGroupGroup) GetGroupTypes(r *http.Request, args *map[string]interface{}, response *Response) error

type EventDevice

type EventDevice struct {
	Apis
}

func (*EventDevice) AddEventDevice

func (this *EventDevice) AddEventDevice(r *http.Request, args *map[string]interface{}, response *Response) error

添加设备到告警

func (*EventDevice) DelEventDevice

func (this *EventDevice) DelEventDevice(r *http.Request, args *map[string]interface{}, response *Response) error

删除

func (*EventDevice) EventDeviceList

func (this *EventDevice) EventDeviceList(r *http.Request, args *map[string]interface{}, response *Response) error

告警设备列表

type EventLevel

type EventLevel struct {
	Apis
}

func (*EventLevel) AddEventLevel

func (this *EventLevel) AddEventLevel(r *http.Request, args *map[string]interface{}, response *Response) error

添加

func (*EventLevel) DelEventLevel

func (this *EventLevel) DelEventLevel(r *http.Request, args *map[string]interface{}, response *Response) error

删除

func (*EventLevel) EditEventLevel

func (this *EventLevel) EditEventLevel(r *http.Request, args *map[string]interface{}, response *Response) error

编辑

func (*EventLevel) EventLevelList

func (this *EventLevel) EventLevelList(r *http.Request, args *map[string]interface{}, response *Response) error

级别列表

func (*EventLevel) InfoEventLevel

func (this *EventLevel) InfoEventLevel(r *http.Request, args *map[string]interface{}, response *Response) error

获取信息

type EventPush

type EventPush struct {
	Apis
}

func (*EventPush) AddEventPush

func (this *EventPush) AddEventPush(r *http.Request, args *map[string]interface{}, response *Response) error

AjaxAddEventPush 添加

func (*EventPush) DelEventPush

func (this *EventPush) DelEventPush(r *http.Request, args *map[string]interface{}, response *Response) error

删除

func (*EventPush) EventPushList

func (this *EventPush) EventPushList(r *http.Request, args *map[string]interface{}, response *Response) error

级别列表

func (*EventPush) UpEventPush

func (this *EventPush) UpEventPush(r *http.Request, args *map[string]interface{}, response *Response) error

AjaxUpEventPush 编辑

type EventRule

type EventRule struct {
	Apis
}

func (*EventRule) AddOneEventRule

func (this *EventRule) AddOneEventRule(r *http.Request, args *map[string]interface{}, response *Response) error

添加告警规则

func (*EventRule) DelEventRule

func (this *EventRule) DelEventRule(r *http.Request, args *map[string]interface{}, response *Response) error

删除

func (*EventRule) EventRuleChageSort

func (this *EventRule) EventRuleChageSort(r *http.Request, args *map[string]interface{}, response *Response) error

调整排序

func (*EventRule) InfoEventRule

func (this *EventRule) InfoEventRule(r *http.Request, args *map[string]interface{}, response *Response) error

获取信息

func (*EventRule) RuleList

func (this *EventRule) RuleList(r *http.Request, args *map[string]interface{}, response *Response) error

规则列表

func (*EventRule) UpEventRuleInfo

func (this *EventRule) UpEventRuleInfo(r *http.Request, args *map[string]interface{}, response *Response) error

保存编辑信息

type Public

type Public struct {
	Apis
}

func (*Public) LeftNavTree

func (this *Public) LeftNavTree(r *http.Request, args *map[string]interface{}, response *Response) error

递归菜单

func (*Public) LogOut

func (this *Public) LogOut(r *http.Request, args *map[string]interface{}, response *Response) error

退出

func (*Public) Login

func (this *Public) Login(r *http.Request, args *map[string]interface{}, response *Response) error

登录

func (*Public) RpcServerList

func (this *Public) RpcServerList(r *http.Request, args *map[string]interface{}, response *Response) error

级别列表

type Response

type Response interface{}

响应数据--请求数据都使用map[string]interface{}

type Search struct {
	Apis
}

func (*Search) AddAutocomplete

func (this *Search) AddAutocomplete(r *http.Request, args *map[string]interface{}, response *Response) error

添加搜索zql

func (*Search) Autocomplete

func (this *Search) Autocomplete(r *http.Request, args *map[string]interface{}, response *Response) error

当前可用数据源

func (*Search) DataSource

func (this *Search) DataSource(r *http.Request, args *map[string]interface{}, response *Response) error

当前可用数据源

func (*Search) IncrementAutocomplete

func (this *Search) IncrementAutocomplete(r *http.Request, args *map[string]interface{}, response *Response) error

搜索次数自增

func (*Search) ZqlQueryV1

func (this *Search) ZqlQueryV1(r *http.Request, args *map[string]interface{}, response *Response) error

查询api

type Setings

type Setings struct {
	Apis
}

func (*Setings) AddSetingEvent

func (this *Setings) AddSetingEvent(r *http.Request, args *map[string]interface{}, response *Response) error

添加告警配置

func (*Setings) ChangeEnable

func (this *Setings) ChangeEnable(r *http.Request, args *map[string]interface{}, response *Response) error

修改启用状态

func (*Setings) DelSetingsEvent

func (this *Setings) DelSetingsEvent(r *http.Request, args *map[string]interface{}, response *Response) error

删除告警设置

func (*Setings) EventList

func (this *Setings) EventList(r *http.Request, args *map[string]interface{}, response *Response) error

告警列表

func (*Setings) InfoSetingsEvent

func (this *Setings) InfoSetingsEvent(r *http.Request, args *map[string]interface{}, response *Response) error

获取单条消息

func (*Setings) SynchroConfigure

func (this *Setings) SynchroConfigure(r *http.Request, args *map[string]interface{}, response *Response) error

同步配置

func (*Setings) UpSetingEvent

func (this *Setings) UpSetingEvent(r *http.Request, args *map[string]interface{}, response *Response) error

保存编辑告警

type SetingsTemplate

type SetingsTemplate struct {
	Apis
}

func (*SetingsTemplate) AddSetingsTemplate

func (this *SetingsTemplate) AddSetingsTemplate(r *http.Request, args *map[string]interface{}, response *Response) error

添加

func (*SetingsTemplate) GetAllSetingsTemplate

func (this *SetingsTemplate) GetAllSetingsTemplate(r *http.Request, args *map[string]interface{}, response *Response) error

获取模版列表-全部

func (*SetingsTemplate) InfoTemplate

func (this *SetingsTemplate) InfoTemplate(r *http.Request, args *map[string]interface{}, response *Response) error

获取模板信息

func (*SetingsTemplate) UpSetingsTemplate

func (this *SetingsTemplate) UpSetingsTemplate(r *http.Request, args *map[string]interface{}, response *Response) error

编辑

type System

type System struct {
	Apis
}

func (*System) AddSystemUnitConversion

func (this *System) AddSystemUnitConversion(r *http.Request, args *map[string]interface{}, response *Response) error

添加

func (*System) DelSystemUnitConversion

func (this *System) DelSystemUnitConversion(r *http.Request, args *map[string]interface{}, response *Response) error

删除

func (*System) EditSystemUnitConversion

func (this *System) EditSystemUnitConversion(r *http.Request, args *map[string]interface{}, response *Response) error

编辑

func (*System) SystemUnitConversionList

func (this *System) SystemUnitConversionList(r *http.Request, args *map[string]interface{}, response *Response) error

告警列表

type Topics

type Topics struct {
	Apis
}

话题设置

func (*Topics) AddTopics

func (this *Topics) AddTopics(r *http.Request, args *map[string]interface{}, response *Response) error

新增话题

func (*Topics) ChangeEnable

func (this *Topics) ChangeEnable(r *http.Request, args *map[string]interface{}, response *Response) error

修改话题状态

func (*Topics) DelTopics

func (this *Topics) DelTopics(r *http.Request, args *map[string]interface{}, response *Response) error

删除

func (*Topics) InfoTopics

func (this *Topics) InfoTopics(r *http.Request, args *map[string]interface{}, response *Response) error

获取单挑消息

func (*Topics) NsqTopics

func (this *Topics) NsqTopics(r *http.Request, args *map[string]interface{}, response *Response) error

nsq所有话题列表(调用nsq接口)

func (*Topics) RestartServerd

func (this *Topics) RestartServerd(r *http.Request, args *map[string]interface{}, response *Response) error

重启serverd服务

func (*Topics) TopicsList

func (this *Topics) TopicsList(r *http.Request, args *map[string]interface{}, response *Response) error

获取话题列表

func (*Topics) UpTopics

func (this *Topics) UpTopics(r *http.Request, args *map[string]interface{}, response *Response) error

保存信息

type TopicsRule

type TopicsRule struct {
	Apis
}

话题设置

func (*TopicsRule) AddTopicsRule

func (this *TopicsRule) AddTopicsRule(r *http.Request, args *map[string]interface{}, response *Response) error

添加解析规则

func (*TopicsRule) ChangeEnable

func (this *TopicsRule) ChangeEnable(r *http.Request, args *map[string]interface{}, response *Response) error

修改状态

func (*TopicsRule) DelTopicsRule

func (this *TopicsRule) DelTopicsRule(r *http.Request, args *map[string]interface{}, response *Response) error

删除

func (*TopicsRule) EditTopicsRuleInfo

func (this *TopicsRule) EditTopicsRuleInfo(r *http.Request, args *map[string]interface{}, response *Response) error

编辑

func (*TopicsRule) IdTopicsRules

func (this *TopicsRule) IdTopicsRules(r *http.Request, args *map[string]interface{}, response *Response) error

获取规则列表

func (*TopicsRule) UpTopicsRule

func (this *TopicsRule) UpTopicsRule(r *http.Request, args *map[string]interface{}, response *Response) error

保存修改

type User

type User struct {
	Apis
}

func (*User) MyUserInfo

func (this *User) MyUserInfo(r *http.Request, args *map[string]interface{}, response *Response) error

获取用户信息

func (*User) SaveMyUserInfo

func (this *User) SaveMyUserInfo(r *http.Request, args *map[string]interface{}, response *Response) error

提交修改个人信息

Jump to

Keyboard shortcuts

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