webapi

package
v0.0.0-...-68b20d9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebApiClient

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

func NewWebApiClient

func NewWebApiClient(lc logger.LoggingClient, p *di.Container) *WebApiClient

func (*WebApiClient) Send

func (d *WebApiClient) Send(webhook string, header []map[string]string, rule models.AlertRule, device models.Device, product models.Product, messages map[string]interface{})

type WebApiTemplate

type WebApiTemplate struct {
	Product struct {
		ProductId   string `json:"product_id"`
		ProductName string `json:"product_name"`
	} `json:"product"`
	Device struct {
		DeviceId   string `json:"device_id"`
		DeviceName string `json:"device_name"`
	} `json:"device"`
	Rule struct {
		RuleId      string `json:"rule_id"`
		RuleName    string `json:"rule_name"`
		AlertLevel  string `json:"alert_level"`
		Trigger     string `json:"trigger,omitempty"`
		TriggerTime int64  `json:"trigger_time,omitempty"`
	} `json:"rule"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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