webui

package
v0.0.0-...-b03fc3e Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SessKeyUserID UserID auth type
	SessKeyUserID = "uid"
)

Variables

This section is empty.

Functions

func AddAlertID

func AddAlertID(ctx *Context, dev config.AlertIDCfg)

AddAlertID Inserts new alert into the internal DB and into the kapacitor servers

func AddDeviceStat

func AddDeviceStat(ctx *Context, dev config.DeviceStatCfg)

AddDeviceStat Insert new devicestat to the internal BBDD --pending--

func AddEndpoint

func AddEndpoint(ctx *Context, dev config.EndpointCfg)

AddEndpoint Insert new endpoint to the internal BBDD --pending--

func AddIfxDB

func AddIfxDB(ctx *Context, dev config.IfxDBCfg)

AddIfxDB Insert new influxdb to the internal BBDD --pending--

func AddIfxMeasurement

func AddIfxMeasurement(ctx *Context, dev config.IfxMeasurementCfg)

AddIfxMeasurement Insert new IfxMeasurement to the internal BBDD --pending--

func AddIfxServer

func AddIfxServer(ctx *Context, dev config.IfxServerCfg)

AddIfxServer Inserts Influx Server to the internal database and returns the result on context

func AddKapacitor

func AddKapacitor(ctx *Context, dev config.KapacitorCfg)

AddKapacitor Insert new Kapacitor to the internal BBDD --pending--

func AddOperation

func AddOperation(ctx *Context, dev config.OperationCfg)

AddOperation Insert new Operation to the internal BBDD

func AddProduct

func AddProduct(ctx *Context, dev config.ProductCfg)

AddProduct Insert new Product to the internal BBDD --pending--

func AddProductGroup

func AddProductGroup(ctx *Context, dev config.ProductGroupCfg)

AddProductGroup Insert new productgroup to the internal BBDD --pending--

func AddRangeTime

func AddRangeTime(ctx *Context, dev config.RangeTimeCfg)

AddRangeTime Insert new rangetime to the internal BBDD

func AddTemplate

func AddTemplate(ctx *Context, dev config.TemplateCfg)

AddTemplate Inserts new template into the internal DB and into the kapacitor servers

func BulkExportObjectToFile

func BulkExportObjectToFile(ctx *Context, data impexp.ExportData)

BulkExportObjectToFile bulk export to file

func Create

func Create(
	SSLCA, SSLCert, SSLKey string,
	InsecureSkipVerify bool,
) (*tls.Config, error)

Create creates a new tls.Config object from the given certs, key, and CA files.

func DeleteAlertEvent

func DeleteAlertEvent(ctx *Context)

DeleteAlertEvent removes alert event from resistor database

func DeleteAlertEventHist

func DeleteAlertEventHist(ctx *Context)

DeleteAlertEventHist removes alert event from resistor database

func DeleteAlertID

func DeleteAlertID(ctx *Context)

DeleteAlertID removes alert from resistor database

func DeleteDeviceStat

func DeleteDeviceStat(ctx *Context)

DeleteDeviceStat delete device stats

func DeleteEndpoint

func DeleteEndpoint(ctx *Context)

DeleteEndpoint removes and output backend

func DeleteIfxDB

func DeleteIfxDB(ctx *Context)

DeleteIfxDB delete from the catalog database

func DeleteIfxMeasurement

func DeleteIfxMeasurement(ctx *Context)

DeleteIfxMeasurement delete from the catalog database

func DeleteIfxServer

func DeleteIfxServer(ctx *Context)

DeleteIfxServer Deletes Influx Server from the internal database and returns the result on context

func DeleteKapaTask

func DeleteKapaTask(id string) (int, int, []string)

DeleteKapaTask Deletes task from kapacitor servers

func DeleteKapacitor

func DeleteKapacitor(ctx *Context)

DeleteKapacitor delete a backend config

func DeleteOperation

func DeleteOperation(ctx *Context)

DeleteOperation deletes Operation

func DeleteProduct

func DeleteProduct(ctx *Context)

DeleteProduct delete from the catalog database

func DeleteProductGroup

func DeleteProductGroup(ctx *Context)

DeleteProductGroup delete from the catalog database

func DeleteRangeTime

func DeleteRangeTime(ctx *Context)

DeleteRangeTime delete range time

func DeleteTemplate

func DeleteTemplate(ctx *Context)

DeleteTemplate Deletes template from resistor database and from kapacitor servers. First of all, a checking is done to ensure this template is not used by any resistor alert

func DeployAlertID

func DeployAlertID(ctx *Context, dev config.AlertIDCfg)

DeployAlertID Deploys the task related to this alert into the kapacitor server and returns the result in context

func DeployTemplate

func DeployTemplate(ctx *Context, dev config.TemplateCfg)

DeployTemplate Deploys template into the kapacitor servers and returns the result in context

func ExportObject

func ExportObject(ctx *Context)

ExportObject export

func ExportObjectToFile

func ExportObjectToFile(ctx *Context, info impexp.ExportInfo)

ExportObjectToFile export to file

func GetAlertEvent

func GetAlertEvent(ctx *Context)

GetAlertEvent Returns Alert Events list to frontend

func GetAlertEventAffectOnDel

func GetAlertEventAffectOnDel(ctx *Context)

GetAlertEventAffectOnDel Returns array of objects affected when deleting an alert event (empty array in this case)

func GetAlertEventByID

func GetAlertEventByID(ctx *Context)

GetAlertEventByID Returns Alert Event to frontend

func GetAlertEventHist

func GetAlertEventHist(ctx *Context)

GetAlertEventHist Returns Alert Events list to frontend

func GetAlertEventHistAffectOnDel

func GetAlertEventHistAffectOnDel(ctx *Context)

GetAlertEventHistAffectOnDel Returns array of objects affected when deleting an alert event (empty array in this case)

func GetAlertEventHistByID

func GetAlertEventHistByID(ctx *Context)

GetAlertEventHistByID Returns Alert Event to frontend

func GetAlertEventHistWithParams

func GetAlertEventHistWithParams(ctx *Context)

GetAlertEventHistWithParams Returns Alert Events list to frontend

func GetAlertEventWithParams

func GetAlertEventWithParams(ctx *Context)

GetAlertEventWithParams Returns Alert Events list to frontend

func GetAlertEventsByLevel

func GetAlertEventsByLevel(ctx *Context)

GetAlertEventsByLevel Returns Alert Events grouped by level to frontend

func GetAlertEventsHistByLevel

func GetAlertEventsHistByLevel(ctx *Context)

GetAlertEventsHistByLevel Returns Alert Events History grouped by level to frontend

func GetAlertID

func GetAlertID(ctx *Context)

GetAlertID Return alerts list to frontend

func GetAlertIDAffectOnDel

func GetAlertIDAffectOnDel(ctx *Context)

GetAlertIDAffectOnDel --pending--

func GetAlertIDCfgArrayByProductID

func GetAlertIDCfgArrayByProductID(ctx *Context)

GetAlertIDCfgArrayByProductID Gets AlertIDCfgArray By ProductID from resistor database Returns the information of the process with a JSON in context

func GetAlertIDCfgByID

func GetAlertIDCfgByID(ctx *Context)

GetAlertIDCfgByID Gets AlertIDCfg By ID from resistor database and checks if the corresponding kapacitor task is deployed on all kapacitor servers. Returns the information of the process with a JSON in context

func GetAlertIDCfgByTemplate

func GetAlertIDCfgByTemplate(sTriggerType string, sCritDirection string, sTrendType string, sTrendSign string, sFieldType string, sStatFunc string) ([]string, error)

GetAlertIDCfgByTemplate Gets an array of strings with the IDs of the Alerts where this template is used. The input parameters are the 6 fields needed to define a template.

func GetContextHandler

func GetContextHandler() macaron.Handler

GetContextHandler get handler

func GetDeviceStat

func GetDeviceStat(ctx *Context)

GetDeviceStat Return devicestats list to frontend

func GetDeviceStatAffectOnDel

func GetDeviceStatAffectOnDel(ctx *Context)

GetDeviceStatAffectOnDel --pending--

func GetDeviceStatCfgByID

func GetDeviceStatCfgByID(ctx *Context)

GetDeviceStatCfgByID --pending--

func GetDevicesByAlertID

func GetDevicesByAlertID(ctx *Context)

GetDevicesByAlertID Gets the list of devices related to the alertid parameter and returns the result on context

func GetDevicesByProductID

func GetDevicesByProductID(ctx *Context)

GetDevicesByProductID Gets the list of devices related to the productid parameter and returns the result on context

func GetEndpoint

func GetEndpoint(ctx *Context)

GetEndpoint Return endpoints list to frontend

func GetEndpointAffectOnDel

func GetEndpointAffectOnDel(ctx *Context)

GetEndpointAffectOnDel --pending--

func GetEndpointCfgByID

func GetEndpointCfgByID(ctx *Context)

GetEndpointCfgByID --pending--

func GetIfxDB

func GetIfxDB(ctx *Context)

GetIfxDB Return influxdb list to frontend

func GetIfxDBAffectOnDel

func GetIfxDBAffectOnDel(ctx *Context)

GetIfxDBAffectOnDel --pending--

func GetIfxDBCfgArrayByMeasName

func GetIfxDBCfgArrayByMeasName(ctx *Context)

GetIfxDBCfgArrayByMeasName Gets an array of Influx databases with their measurements

func GetIfxDBCfgByID

func GetIfxDBCfgByID(ctx *Context)

GetIfxDBCfgByID --pending--

func GetIfxMeasurement

func GetIfxMeasurement(ctx *Context)

GetIfxMeasurement Return IfxMeasurement list to frontend

func GetIfxMeasurementAffectOnDel

func GetIfxMeasurementAffectOnDel(ctx *Context)

GetIfxMeasurementAffectOnDel --pending--

func GetIfxMeasurementCfgByDbIDMeasName

func GetIfxMeasurementCfgByDbIDMeasName(ctx *Context)

GetIfxMeasurementCfgByDbIDMeasName Gets an Influx Measurement with all its information from DbID and Measurement Name

func GetIfxMeasurementCfgByID

func GetIfxMeasurementCfgByID(ctx *Context)

GetIfxMeasurementCfgByID --pending--

func GetIfxMeasurementCfgDistinctNamesArray

func GetIfxMeasurementCfgDistinctNamesArray(ctx *Context)

GetIfxMeasurementCfgDistinctNamesArray Return IfxMeasurement list with different names to frontend

func GetIfxMeasurementTagsArray

func GetIfxMeasurementTagsArray(ctx *Context)

GetIfxMeasurementTagsArray Gets the array of tags for the measurements passed in filter The filter contains a list of measurement names then with these measurement names a list of tags is obtained

func GetIfxServer

func GetIfxServer(ctx *Context)

GetIfxServer Returns Influx Server list to frontend

func GetIfxServerAffectOnDel

func GetIfxServerAffectOnDel(ctx *Context)

GetIfxServerAffectOnDel Checks if Deletion of Influx Server affects on some other items of the internal database and returns the result on context

func GetIfxServerCfgByID

func GetIfxServerCfgByID(ctx *Context)

GetIfxServerCfgByID Returns Influx Server to frontend

func GetKapacitor

func GetKapacitor(ctx *Context)

GetKapacitor Return kapacitor servers list to frontend

func GetKapacitorAffectOnDel

func GetKapacitorAffectOnDel(ctx *Context)

GetKapacitorAffectOnDel --pending--

func GetKapacitorCfgByID

func GetKapacitorCfgByID(ctx *Context)

GetKapacitorCfgByID --pending--

func GetKapacitorRtTasks

func GetKapacitorRtTasks(ctx *Context)

GetKapacitorRtTasks Return tasks list from kapacitor servers

func GetOperation

func GetOperation(ctx *Context)

GetOperation Return operation list to frontend

func GetOperationAffectOnDel

func GetOperationAffectOnDel(ctx *Context)

GetOperationAffectOnDel Gets array of alerts affected On Deletion

func GetOperationCfgByID

func GetOperationCfgByID(ctx *Context)

GetOperationCfgByID Gets OperationCfg By ID

func GetProduct

func GetProduct(ctx *Context)

GetProduct Return Product list to frontend

func GetProductAffectOnDel

func GetProductAffectOnDel(ctx *Context)

GetProductAffectOnDel --pending--

func GetProductCfgByID

func GetProductCfgByID(ctx *Context)

GetProductCfgByID --pending--

func GetProductGroup

func GetProductGroup(ctx *Context)

GetProductGroup Return productgroup list to frontend

func GetProductGroupAffectOnDel

func GetProductGroupAffectOnDel(ctx *Context)

GetProductGroupAffectOnDel --pending--

func GetProductGroupCfgByID

func GetProductGroupCfgByID(ctx *Context)

GetProductGroupCfgByID --pending--

func GetRangeTime

func GetRangeTime(ctx *Context)

GetRangeTime Return rangetimes list to frontend

func GetRangeTimeAffectOnDel

func GetRangeTimeAffectOnDel(ctx *Context)

GetRangeTimeAffectOnDel Check if there are any AlertIDCfg affected when deleting RangeTimeCfg

func GetRangeTimeCfgByID

func GetRangeTimeCfgByID(ctx *Context)

GetRangeTimeCfgByID Gets RangeTimeCfg By ID and returns it on context

func GetTemplate

func GetTemplate(ctx *Context)

GetTemplate Return templates list to frontend

func GetTemplateAffectOnDel

func GetTemplateAffectOnDel(ctx *Context)

GetTemplateAffectOnDel --pending--

func GetTemplateCfgByID

func GetTemplateCfgByID(ctx *Context)

GetTemplateCfgByID --pending--

func GetTemplates

func GetTemplates(templateid string) ([]*config.TemplateCfg, error)

GetTemplates Gets templates array

func ImportDataFile

func ImportDataFile(ctx *Context, uf UploadForm)

ImportDataFile gets data from file upa

func ImportIfxCatalog

func ImportIfxCatalog(ctx *Context, dev config.IfxServerCfg)

ImportIfxCatalog Imports Influx Catalog to the internal database

func InfluxQuery

func InfluxQuery(cli client.Client, query string, db string, colidx int) ([]string, error)

InfluxQuery does IQL queries

func MoveAlertEvents

func MoveAlertEvents(filter string) []*config.AlertEvent

MoveAlertEvents Moves previous alert events with this filter from alert_event to alert_event_hist

func NewAPICfgAlertID

func NewAPICfgAlertID(m *macaron.Macaron) error

NewAPICfgAlertID config API for alerts

func NewAPICfgDeviceStat

func NewAPICfgDeviceStat(m *macaron.Macaron) error

NewAPICfgDeviceStat get DeviceStat API

func NewAPICfgEndpoint

func NewAPICfgEndpoint(m *macaron.Macaron) error

NewAPICfgEndpoint create new API

func NewAPICfgIfxDB

func NewAPICfgIfxDB(m *macaron.Macaron) error

NewAPICfgIfxDB API for IfxDB Catalog Management

func NewAPICfgIfxMeasurement

func NewAPICfgIfxMeasurement(m *macaron.Macaron) error

NewAPICfgIfxMeasurement API for IfxMeasurement Catalog Management

func NewAPICfgIfxServer

func NewAPICfgIfxServer(m *macaron.Macaron) error

NewAPICfgIfxServer API for IfxServer Catalog Management

func NewAPICfgImportExport

func NewAPICfgImportExport(m *macaron.Macaron) error

NewAPICfgImportExport import export API

func NewAPICfgKapacitor

func NewAPICfgKapacitor(m *macaron.Macaron) error

NewAPICfgKapacitor Kapacitor ouput

func NewAPICfgOperation

func NewAPICfgOperation(m *macaron.Macaron) error

NewAPICfgOperation Operation instructions

func NewAPICfgProduct

func NewAPICfgProduct(m *macaron.Macaron) error

NewAPICfgProduct API for Product Catalog Management

func NewAPICfgProductGroup

func NewAPICfgProductGroup(m *macaron.Macaron) error

NewAPICfgProductGroup API for Product Catalog Management

func NewAPICfgRangeTime

func NewAPICfgRangeTime(m *macaron.Macaron) error

NewAPICfgRangeTime create a Range Time management API

func NewAPICfgTemplate

func NewAPICfgTemplate(m *macaron.Macaron) error

NewAPICfgTemplate set API for the template management

func NewAPIRtAgent

func NewAPIRtAgent(m *macaron.Macaron) error

NewAPIRtAgent set API for the runtime management

func NewAPIRtAlertEvent

func NewAPIRtAlertEvent(m *macaron.Macaron) error

NewAPIRtAlertEvent creates an Alert Event management API

func NewAPIRtAlertEventHist

func NewAPIRtAlertEventHist(m *macaron.Macaron) error

NewAPIRtAlertEventHist creates an Alert Event History management API

func NewAPIRtKapFilter

func NewAPIRtKapFilter(m *macaron.Macaron) error

NewAPIRtKapFilter set the runtime Kapacitor filter API

func NewAPIRtKapProxy

func NewAPIRtKapProxy(m *macaron.Macaron) error

NewAPIRtKapProxy set the runtime Kapacitor Proxy

func NewAPIRtKapacitor

func NewAPIRtKapacitor(m *macaron.Macaron) error

NewAPIRtKapacitor Kapacitor ouput

func PingIfxServer

func PingIfxServer(ctx *Context, dev config.IfxServerCfg)

PingIfxServer Pings Influx Server and returns the result on context

func PingKapacitor

func PingKapacitor(ctx *Context, dev config.KapacitorCfg)

PingKapacitor Pings kapacitor server and returns time elapsed and kapacitor server version

func RTAlertHandler

func RTAlertHandler(ctx *Context, al alert.Data)

RTAlertHandler xx

func RTGetVersion

func RTGetVersion(ctx *Context)

RTGetVersion xx

func RTKapProxyGETHandler

func RTKapProxyGETHandler(ctx *Context)

RTKapProxyGETHandler GET handler

func RTKapProxyOTHERHandler

func RTKapProxyOTHERHandler(ctx *Context)

RTKapProxyOTHERHandler for handing other than GET/POST methots ( rigth now DELETE/PATCH)

func RTKapProxyPOSTHandler

func RTKapProxyPOSTHandler(ctx *Context)

RTKapProxyPOSTHandler POST handler

func RTKapProxyTest

func RTKapProxyTest(ctx *Context)

RTKapProxyTest GET handler

func Sessioner

func Sessioner(options session.Options) macaron.Handler

Sessioner session handler

func SetConfDir

func SetConfDir(dir string)

SetConfDir et dir for logs

func SetLogDir

func SetLogDir(dir string)

SetLogDir et dir for logs

func SetLogger

func SetLogger(l *logrus.Logger)

SetLogger set output log

func UpdateAlertID

func UpdateAlertID(ctx *Context, dev config.AlertIDCfg)

UpdateAlertID Updates alert into the internal DB and into the kapacitor servers

func UpdateDeviceStat

func UpdateDeviceStat(ctx *Context, dev config.DeviceStatCfg)

UpdateDeviceStat --pending--

func UpdateEndpoint

func UpdateEndpoint(ctx *Context, dev config.EndpointCfg)

UpdateEndpoint --pending--

func UpdateIfxDB

func UpdateIfxDB(ctx *Context, dev config.IfxDBCfg)

UpdateIfxDB --pending--

func UpdateIfxMeasurement

func UpdateIfxMeasurement(ctx *Context, dev config.IfxMeasurementCfg)

UpdateIfxMeasurement --pending--

func UpdateIfxServer

func UpdateIfxServer(ctx *Context, dev config.IfxServerCfg)

UpdateIfxServer Updates Influx Server into the internal database and returns the result on context

func UpdateKapacitor

func UpdateKapacitor(ctx *Context, dev config.KapacitorCfg)

UpdateKapacitor --pending--

func UpdateOperation

func UpdateOperation(ctx *Context, dev config.OperationCfg)

UpdateOperation Updates Operation

func UpdateProduct

func UpdateProduct(ctx *Context, dev config.ProductCfg)

UpdateProduct --pending--

func UpdateProductGroup

func UpdateProductGroup(ctx *Context, dev config.ProductGroupCfg)

UpdateProductGroup --pending--

func UpdateRangeTime

func UpdateRangeTime(ctx *Context, dev config.RangeTimeCfg)

UpdateRangeTime Updates rangetime into the internal BBDD

func UpdateTemplate

func UpdateTemplate(ctx *Context, dev config.TemplateCfg)

UpdateTemplate Updates template into the internal DB and into the kapacitor servers

func WebServer

func WebServer(publicPath string, httpPort int, cfg *config.HTTPConfig, id string)

WebServer the main process

Types

type Context

type Context struct {
	*macaron.Context
	SignedInUser string
	Session      SessionStore
	IsSignedIn   bool
}

Context for macaron sessions on resistor

func (*Context) RawAsJSON

func (ctx *Context) RawAsJSON(status int, json []byte)

RawAsJSON Get Context in JSON format

type Diagnostic

type Diagnostic interface {
	WithContext(ctx ...keyvalue.T) Diagnostic

	InsecureSkipVerify()

	Error(msg string, err error)
}

Diagnostic data for Slack

type ImportCheck

type ImportCheck struct {
	IsOk    bool
	Message string
	Data    *impexp.ExportData
}

ImportCheck type

type KapaTaskRt

type KapaTaskRt struct {
	ID             string                     `json:"ID"`
	ServerID       string                     `json:"ServerID"`
	URL            string                     `json:"URL,omitempty"`
	Type           kapacitorClient.TaskType   `json:"Type,omitempty"`
	DBRPs          string                     `json:"DBRPs,omitempty"`
	TICKscript     string                     `json:"script,omitempty"`
	Vars           string                     `json:"vars,omitempty"`
	Dot            string                     `json:"Dot,omitempty"`
	Status         kapacitorClient.TaskStatus `json:"Status,omitempty"`
	Executing      bool                       `json:"Executing,omitempty"`
	Error          string                     `json:"Error,omitempty"`
	NumErrors      int64                      `json:"NumErrors,omitempty"`
	ExecutionStats string                     `json:"stats,omitempty"`
	Created        time.Time                  `json:"Created,omitempty"`
	Modified       time.Time                  `json:"Modified,omitempty"`
	LastEnabled    time.Time                  `json:"LastEnabled,omitempty"`
	AlertModified  time.Time                  `json:"AlertModified,omitempty"`
}

KapaTaskRt Structure with Kapacitor server info and Task info

type Service

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

Service data for Slack

func NewService

func NewService(c SlackConfig, d Diagnostic) (*Service, error)

NewService function for Slack

func (*Service) Alert

func (s *Service) Alert(al TaskAlertInfo, channel, message, username, iconEmoji string, level alert.Level) error

Alert function for Slack

type SessionStore

type SessionStore interface {
	// Set sets value to given key in session.
	Set(interface{}, interface{}) error
	// Get gets value by given key in session.
	Get(interface{}) interface{}
	// ID returns current session ID.
	ID() string
	// Release releases session resource and save data to provider.
	Release() error
	// Destory deletes a session.
	Destory(*Context) error
	// init
	Start(*Context) error
}

SessionStore where to store sessions

func GetSession

func GetSession() SessionStore

GetSession get Session

type SessionWrapper

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

SessionWrapper wrapper for session handlers

func (*SessionWrapper) Destory

func (s *SessionWrapper) Destory(c *Context) error

Destory destory

func (*SessionWrapper) Get

func (s *SessionWrapper) Get(k interface{}) interface{}

Get Session getter

func (*SessionWrapper) ID

func (s *SessionWrapper) ID() string

ID get Session ID

func (*SessionWrapper) Release

func (s *SessionWrapper) Release() error

Release release session

func (*SessionWrapper) Set

func (s *SessionWrapper) Set(k interface{}, v interface{}) error

Set session setter

func (*SessionWrapper) Start

func (s *SessionWrapper) Start(c *Context) error

Start start

type SlackConfig

type SlackConfig struct {
	// Whether Slack integration is enabled.
	Enabled bool `json:"enabled" override:"enabled"`
	// The Slack webhook URL, can be obtained by adding Incoming Webhook integration.
	URL string `json:"url" override:"url,redact"`
	// The default channel, can be overridden per alert.
	Channel string `json:"channel" override:"channel"`
	// The username of the Slack bot.
	// Default: kapacitor
	Username string `json:"username" override:"username"`
	// IconEmoji uses an emoji instead of the normal icon for the message.
	// The contents should be the name of an emoji surrounded with ':', i.e. ':chart_with_upwards_trend:'
	IconEmoji string `json:"icon-emoji" override:"icon-emoji"`
	// Whether all alerts should automatically post to slack
	Global bool `json:"global" override:"global"`
	// Whether all alerts should automatically use stateChangesOnly mode.
	// Only applies if global is also set.
	StateChangesOnly bool `json:"state-changes-only" override:"state-changes-only"`

	// Path to CA file
	SSLCA string `json:"ssl-ca" override:"ssl-ca"`
	// Path to host cert file
	SSLCert string `json:"ssl-cert" override:"ssl-cert"`
	// Path to cert key file
	SSLKey string `json:"ssl-key" override:"ssl-key"`
	// Use SSL but skip chain & host verification
	InsecureSkipVerify bool `json:"insecure-skip-verify" override:"insecure-skip-verify"`
}

SlackConfig data for Slack

type TaskAlertInfo

type TaskAlertInfo struct {
	ID                      string                 `json:"id"`
	Message                 string                 `json:"message"`
	Details                 string                 `json:"details"`
	Time                    time.Time              `json:"time"`
	Level                   alert.Level            `json:"level"`
	CorrelationID           string                 `json:"correlationid"`
	Origin                  string                 `json:"origin"`
	ResistorOperationID     string                 `json:"resistor-operationid"`
	ResistorOperationURL    string                 `json:"resistor-operationurl"`
	ResistorDashboardURL    string                 `json:"resistor-dashboardurl"`
	ResistorIDTagName       string                 `json:"resistor-id-tag-name"`
	ResistorIDTagValue      string                 `json:"resistor-id-tag-value"`
	ResistorProductTagName  string                 `json:"resistor-product-tag-name"`
	ResistorProductTagValue string                 `json:"resistor-product-tag-value"`
	ResistorAlertTriggered  string                 `json:"resistor-alert-triggered"`
	ResistorAlertTags       map[string]string      `json:"resistor-alert-tags,omitempty"`
	ResistorAlertFields     map[string]interface{} `json:"resistor-alert-fields,omitempty"`
	ResistorAlertInfo       config.AlertIDCfgJSON  `json:"resistor-alert-info,omitempty"`
}

TaskAlertInfo represents the info of a kapacitor alert event completed with the info of the related resistor alert

type UploadForm

type UploadForm struct {
	AutoRename bool
	OverWrite  bool
	ExportFile *multipart.FileHeader
}

UploadForm struct to upload files

type UserLogin

type UserLogin struct {
	UserName string `form:"username" binding:"Required"`
	Password string `form:"password" binding:"Required"`
}

UserLogin for login purposes

Jump to

Keyboard shortcuts

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