api

package
v0.0.0-...-d369a32 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AckEventHandler

func AckEventHandler(ctx *fasthttp.RequestCtx) interface{}

AckEventHandler return all the event receivers' username

func AddBlock

func AddBlock(ctx *fasthttp.RequestCtx) (int, interface{})

func AddEventTagHandler

func AddEventTagHandler(ctx *fasthttp.RequestCtx) interface{}

func AddEventTrackHandler

func AddEventTrackHandler(ctx *fasthttp.RequestCtx) interface{}

func AddTaskMark

func AddTaskMark(ctx *fasthttp.RequestCtx) interface{}

AddTaskMark set a new mark for a task

func AddTaskReceiver

func AddTaskReceiver(ctx *fasthttp.RequestCtx) (int, interface{})

AddTaskReceiver add a receiver group for task

func AddTaskThreshold

func AddTaskThreshold(ctx *fasthttp.RequestCtx) (int, interface{})

func AddUser

func AddUser(ctx *fasthttp.RequestCtx) interface{}

func AddUser2Group

func AddUser2Group(ctx *fasthttp.RequestCtx) interface{}

func ChangePassword

func ChangePassword(ctx *fasthttp.RequestCtx) interface{}

ChangePassword 修改用户密码

func CreateDatasource

func CreateDatasource(ctx *fasthttp.RequestCtx) interface{}

CreateDatasource handle the database creation request if the owner is empty, the login use will be set as owner

func CreateTask

func CreateTask(ctx *fasthttp.RequestCtx) interface{}

CreateTask store a new task, and run it(if needed)

func CreateUserGroup

func CreateUserGroup(ctx *fasthttp.RequestCtx) interface{}

func DeleteBlock

func DeleteBlock(ctx *fasthttp.RequestCtx) (int, interface{})

func DeleteDatasource

func DeleteDatasource(ctx *fasthttp.RequestCtx) interface{}

DeleteDatasource delete a datasource by id

func DeleteEventTagHandler

func DeleteEventTagHandler(ctx *fasthttp.RequestCtx) interface{}

func DeleteTask

func DeleteTask(ctx *fasthttp.RequestCtx) (int, interface{})

DeleteTask remove the task by id

func DeleteTaskReceiver

func DeleteTaskReceiver(ctx *fasthttp.RequestCtx) (int, interface{})

DeleteTaskReceiver delete a receiver list in task-receiver group

func DeleteTaskThreshold

func DeleteTaskThreshold(ctx *fasthttp.RequestCtx) (int, interface{})

func DeleteUser

func DeleteUser(ctx *fasthttp.RequestCtx) interface{}

func DeleteUserFromGroup

func DeleteUserFromGroup(ctx *fasthttp.RequestCtx) interface{}

func DeleteUserGroup

func DeleteUserGroup(ctx *fasthttp.RequestCtx) interface{}

func GetBlocks

func GetBlocks(ctx *fasthttp.RequestCtx) (int, interface{})

func GetDatasource

func GetDatasource(ctx *fasthttp.RequestCtx) interface{}

GetDatasource fetch the datasource list which is visitable for login user it return all the datasources for admin user

func GetEventReceiversHandler

func GetEventReceiversHandler(ctx *fasthttp.RequestCtx) interface{}

GetEventReceiversHandler return all the event receivers' username

func GetEventTrackHandler

func GetEventTrackHandler(ctx *fasthttp.RequestCtx) (int, interface{})

func GetEventsHandler

func GetEventsHandler(ctx *fasthttp.RequestCtx) (int, interface{})

GetEventsHandler fetch the events list by using conditions, it return one event item if event id is given

func GetTask

func GetTask(ctx *fasthttp.RequestCtx) (int, interface{})

GetTask return one tasks's specification by id

func GetTaskPoints

func GetTaskPoints(ctx *fasthttp.RequestCtx) interface{}

func GetTaskReceivers

func GetTaskReceivers(ctx *fasthttp.RequestCtx) (int, interface{})

GetTaskReceivers get the task's receiver settings

func GetTaskThresholds

func GetTaskThresholds(ctx *fasthttp.RequestCtx) (int, interface{})

func GetTaskTrack

func GetTaskTrack(ctx *fasthttp.RequestCtx) (int, interface{})

GetTaskTrack return the track list for task

func GetTasks

func GetTasks(ctx *fasthttp.RequestCtx) (int, interface{})

GetTasks return a tasks list by conditions

func GetUserGroups

func GetUserGroups(ctx *fasthttp.RequestCtx) interface{}

func GetUsers

func GetUsers(ctx *fasthttp.RequestCtx) interface{}

func Login

func Login(ctx *fasthttp.RequestCtx) interface{}

Login 登录认证

func LoginUserInfo

func LoginUserInfo(ctx *fasthttp.RequestCtx) interface{}

LoginUserInfo 返回登录者的用户信息

func RemoveTaskMark

func RemoveTaskMark(ctx *fasthttp.RequestCtx) interface{}

RemoveTaskMark unset a mark from task

func Run

func Run(addr string) error

Run serve http service

func RunTask

func RunTask(ctx *fasthttp.RequestCtx) interface{}

func SetAccount

func SetAccount(a *account.Account)

func SetAuther

func SetAuther(a auth.Auth)

func SetEngine

func SetEngine(e *events.Engine)

func SetGroupMessageReceiver

func SetGroupMessageReceiver(ctx *fasthttp.RequestCtx) interface{}

func SetIndexFile

func SetIndexFile(file string)

func SetManager

func SetManager(m *task.Manager)

func SetMuteProvider

func SetMuteProvider(provider *events.StageMute)

func SetTracker

func SetTracker(t track.Tracker)

func SetUserMessageReceiver

func SetUserMessageReceiver(ctx *fasthttp.RequestCtx) interface{}

func SetWebDir

func SetWebDir(dir string)

func ShiftTaskThreshold

func ShiftTaskThreshold(ctx *fasthttp.RequestCtx) (int, interface{})

func Shutdown

func Shutdown() error

Shutdown stop the http service

func UpdateDatasource

func UpdateDatasource(ctx *fasthttp.RequestCtx) interface{}

UpdateDatasource update a datasource setting by id, it return error if login user has no permission

func UpdateTask

func UpdateTask(ctx *fasthttp.RequestCtx) (int, interface{})

UpdateTask update the task specification and restart it

func UpdateTaskReceiver

func UpdateTaskReceiver(ctx *fasthttp.RequestCtx) (int, interface{})

UpdateTaskReceiver update the receiver setting for tasks

func UpdateTaskThreshold

func UpdateTaskThreshold(ctx *fasthttp.RequestCtx) (int, interface{})

func UpdateUser

func UpdateUser(ctx *fasthttp.RequestCtx) interface{}

func UpdateUserGroup

func UpdateUserGroup(ctx *fasthttp.RequestCtx) interface{}

func UpdateUserInGroup

func UpdateUserInGroup(ctx *fasthttp.RequestCtx) interface{}

Types

type ExtraAPI

type ExtraAPI struct{}

func (ExtraAPI) Channels

func (extra ExtraAPI) Channels(ctx *fasthttp.RequestCtx) interface{}

func (ExtraAPI) CheckCron

func (extra ExtraAPI) CheckCron(ctx *fasthttp.RequestCtx) interface{}

func (ExtraAPI) CheckMessage

func (extra ExtraAPI) CheckMessage(ctx *fasthttp.RequestCtx) interface{}

func (ExtraAPI) CheckQuery

func (extra ExtraAPI) CheckQuery(ctx *fasthttp.RequestCtx) (int, interface{})

func (ExtraAPI) ExecQuery

func (extra ExtraAPI) ExecQuery(ctx *fasthttp.RequestCtx) interface{}

ExecQuery 执行一个指标查询语句并返回结果

func (ExtraAPI) GenToken

func (extra ExtraAPI) GenToken(ctx *fasthttp.RequestCtx) interface{}

func (ExtraAPI) GetTaskNames

func (extra ExtraAPI) GetTaskNames(ctx *fasthttp.RequestCtx) (int, interface{})

func (ExtraAPI) PauseSender

func (extra ExtraAPI) PauseSender(ctx *fasthttp.RequestCtx) interface{}

func (ExtraAPI) SearchUserGroup

func (extra ExtraAPI) SearchUserGroup(ctx *fasthttp.RequestCtx) interface{}

func (ExtraAPI) UnpauseSender

func (extra ExtraAPI) UnpauseSender(ctx *fasthttp.RequestCtx) interface{}

type ReceiverResource

type ReceiverResource struct {
}

type TaskSpecTiny

type TaskSpecTiny struct {
	ID          int64        `json:"id" db:"id"`
	Name        string       `json:"name" db:"name"` // required, 名称
	Tags        []string     `json:"tags" db:"-"`
	Owners      []string     `json:"owners" db:"-"`
	Description string       `json:"description" db:"description"`
	Status      types.Status `json:"status" db:"status"`
	CreatedTime time.Time    `json:"created_time" db:"created_time"`
	UpdatedTime time.Time    `json:"updated_time" db:"updated_time"`
}

TaskSpecTiny 代表 Spec 的缩减版, 主要用来减小 http response

Jump to

Keyboard shortcuts

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