1
0
mirror of https://github.com/rancher/types.git synced 2025-08-31 04:40:56 +00:00

Merge pull request #1044 from XianglongLuo/wechat

Support API URL for WeChat notifier
This commit is contained in:
Dan Ramich
2020-02-13 16:59:48 -07:00
committed by GitHub
2 changed files with 3 additions and 0 deletions

1
apis/management.cattle.io/v3/alerting_types.go Normal file → Executable file
View File

@@ -311,6 +311,7 @@ type WechatConfig struct {
Agent string `json:"agent,omitempty" norman:"required"`
Corp string `json:"corp,omitempty" norman:"required"`
RecipientType string `json:"recipientType,omitempty" norman:"required,options=tag|party|user,default=party"`
APIURL string `json:"apiUrl,omitempty"`
*HTTPClientConfig
}

View File

@@ -2,6 +2,7 @@ package client
const (
WechatConfigType = "wechatConfig"
WechatConfigFieldAPIURL = "apiUrl"
WechatConfigFieldAgent = "agent"
WechatConfigFieldCorp = "corp"
WechatConfigFieldDefaultRecipient = "defaultRecipient"
@@ -11,6 +12,7 @@ const (
)
type WechatConfig struct {
APIURL string `json:"apiUrl,omitempty" yaml:"apiUrl,omitempty"`
Agent string `json:"agent,omitempty" yaml:"agent,omitempty"`
Corp string `json:"corp,omitempty" yaml:"corp,omitempty"`
DefaultRecipient string `json:"defaultRecipient,omitempty" yaml:"defaultRecipient,omitempty"`