notify

package
v0.0.0-...-2b29b9b Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 14

Documentation

Index

Constants

View Source
const (
	NotifyPriorityImportant = TNotifyPriority("important")
	NotifyPriorityCritical  = TNotifyPriority("fatal")
	NotifyPriorityNormal    = TNotifyPriority("normal")

	NotifyByEmail      = TNotifyChannel("email")
	NotifyByMobile     = TNotifyChannel("mobile")
	NotifyByDingTalk   = TNotifyChannel("dingtalk")
	NotifyByWebConsole = TNotifyChannel("webconsole")
	NotifyByFeishu     = TNotifyChannel("feishu")
	NotifyByWorkwx     = TNotifyChannel("workwx")
	NotifyByRobot      = TNotifyChannel("robot")

	NotifyFeishuRobot     = TNotifyChannel("feishu-robot")
	NotifyByDingTalkRobot = TNotifyChannel("dingtalk-robot")
	NotifyByWorkwxRobot   = TNotifyChannel("workwx-robot")
	NotifyByWebhook       = TNotifyChannel("webhook")
)

Variables

View Source
var (
	ContactGroups modulebase.ResourceManager
)
View Source
var (
	EmailConfigs modulebase.ResourceManager
)
View Source
var (
	EmailQueues modulebase.ResourceManager
)
View Source
var (
	Verifications modulebase.ResourceManager
)

Functions

This section is empty.

Types

type ConfigsManager

type ConfigsManager struct {
	modulebase.ResourceManager
}

type ContactsManager

type ContactsManager struct {
	modulebase.ResourceManager
}
var (
	Contacts ContactsManager
)

func (*ContactsManager) CustomizedGet

func (this *ContactsManager) CustomizedGet(session *mcclient.ClientSession, id string,
	params jsonutils.JSONObject) (jsonutils.JSONObject,
	error)

func (*ContactsManager) CustomizedPerformAction

func (this *ContactsManager) CustomizedPerformAction(session *mcclient.ClientSession, id, action string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*ContactsManager) DoBatchDeleteContacts

func (this *ContactsManager) DoBatchDeleteContacts(s *mcclient.ClientSession, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*ContactsManager) PerformActionWithArrayParams

func (this *ContactsManager) PerformActionWithArrayParams(s *mcclient.ClientSession, id string, action string, params jsonutils.JSONObject) (jsonutils.JSONObject, error)

type NotificationManager

type NotificationManager struct {
	modulebase.ResourceManager
}
var (
	Notifications NotificationManager
)

func (*NotificationManager) Send

type SNotifyMessage

type SNotifyMessage struct {
	Uid                       []string               `json:"uid,omitempty"`
	Gid                       []string               `json:"gid,omitempty"`
	Robots                    []string               `json:"robots,omitempty"`
	ContactType               TNotifyChannel         `json:"contact_type,omitempty"`
	Contacts                  []string               `json:"contracts"`
	Topic                     string                 `json:"topic,omitempty"`
	Priority                  TNotifyPriority        `json:"priority,omitempty"`
	Msg                       string                 `json:"msg,omitempty"`
	Remark                    string                 `json:"remark,omitempty"`
	Broadcast                 bool                   `json:"broadcast,omitempty"`
	Tag                       string                 `json:"tag"`
	Metadata                  map[string]interface{} `json:"metadata"`
	IgnoreNonexistentReceiver bool                   `json:"ignore_nonexistent_receiver"`
}

type SNotifyV2Message

type SNotifyV2Message struct {
	Receivers                 []string               `json:"receivers"`
	Contacts                  []string               `json:"contacts"`
	Robots                    []string               `json:"robots"`
	ContactType               string                 `json:"contact_type"`
	Topic                     string                 `json:"topic"`
	Priority                  string                 `json:"priority"`
	Message                   string                 `json:"message"`
	Tag                       string                 `json:"tag"`
	Metadata                  map[string]interface{} `json:"metadata"`
	IgnoreNonexistentReceiver bool                   `json:"ignore_nonexistent_receiver"`
}

type TNotifyChannel

type TNotifyChannel string

type TNotifyPriority

type TNotifyPriority string

Jump to

Keyboard shortcuts

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