Skip to content

Commit

Permalink
Merge pull request #18 from iLert/fix/typo-dingtalk
Browse files Browse the repository at this point in the history
Fix/typo dingtalk
  • Loading branch information
yacut authored Nov 28, 2022
2 parents 26e74c3 + f08a4de commit f533967
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
10 changes: 7 additions & 3 deletions alertaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,16 @@ type AlertActionParamsStatusPageIO struct {

// AlertActionParamsDingTalk definition
type AlertActionParamsDingTalk struct {
URL string `json:"url,omitempty"`
Secret string `json:"secret,omitempty"`
IsAtAll bool `json:"isAtAll,omitempty"`
AtMobiles []string `json:"atMobiles,omitempty"`
}

// AlertActionParamsDingTalkAction definition
type AlertActionParamsDingTalkAction struct {
URL string `json:"url,omitempty"`
URL string `json:"url,omitempty"`
Secret string `json:"secret,omitempty"`
IsAtAll bool `json:"isAtAll,omitempty"`
AtMobiles []string `json:"atMobiles,omitempty"`
}

// AlertActionParamsAutomationRule definition
Expand Down Expand Up @@ -262,6 +263,7 @@ var AlertActionTriggerTypes = struct {
AlertRaised string
AlertCommentAdded string
AlertResolved string
AlertAutoResolved string
}{
AlertCreated: "alert-created",
AlertAssigned: "alert-assigned",
Expand All @@ -270,6 +272,7 @@ var AlertActionTriggerTypes = struct {
AlertRaised: "alert-raised",
AlertCommentAdded: "alert-comment-added",
AlertResolved: "alert-resolved",
AlertAutoResolved: "alert-auto-resolved",
}

// AlertActionTriggerTypesAll defines all alertAction trigger types
Expand All @@ -281,6 +284,7 @@ var AlertActionTriggerTypesAll = []string{
AlertActionTriggerTypes.AlertRaised,
AlertActionTriggerTypes.AlertCommentAdded,
AlertActionTriggerTypes.AlertResolved,
AlertActionTriggerTypes.AlertAutoResolved,
}

// AlertFilterOperator defines alertFilter operator
Expand Down
12 changes: 6 additions & 6 deletions automationrule.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strconv"
)

// Legacy API - please use alert-actions of type 'automation_rule' - for more information see https://api.ilert.com/api-docs/#tag/Connectors/paths/~1connectors/post
// Legacy API - please use alert-actions of type 'automation_rule' - for more information see https://api.ilert.com/api-docs/#tag/Alert-Actions/paths/~1alert-actions/post
type AutomationRule struct {
ID string `json:"id"`
AlertType string `json:"alertType"`
Expand Down Expand Up @@ -48,7 +48,7 @@ type CreateAutomationRuleOutput struct {
AutomationRule *AutomationRule
}

// Legacy API - please use alert-actions of type 'automation_rule' - for more information see https://api.ilert.com/api-docs/#tag/Connectors/paths/~1connectors/post
// Legacy API - please use alert-actions of type 'automation_rule' - for more information see https://api.ilert.com/api-docs/#tag/Alert-Actions/paths/~1alert-actions/post
func (c *Client) CreateAutomationRule(input *CreateAutomationRuleInput) (*CreateAutomationRuleOutput, error) {
if input == nil {
return nil, errors.New("input is required")
Expand Down Expand Up @@ -93,7 +93,7 @@ type GetAutomationRulesOutput struct {
AutomationRules []*AutomationRule
}

// Legacy API - please use alert-actions of type 'automation_rule' - for more information see https://api.ilert.com/api-docs/#tag/Connectors/paths/~1connectors/post
// Legacy API - please use alert-actions of type 'automation_rule' - for more information see https://api.ilert.com/api-docs/#tag/Alert-Actions/paths/~1alert-actions/post
func (c *Client) GetAutomationRules(input *GetAutomationRulesInput) (*GetAutomationRulesOutput, error) {
if input == nil {
input = &GetAutomationRulesInput{}
Expand Down Expand Up @@ -142,7 +142,7 @@ type GetAutomationRuleOutput struct {
AutomationRule *AutomationRule
}

// Legacy API - please use alert-actions of type 'automation_rule' - for more information see https://api.ilert.com/api-docs/#tag/Connectors/paths/~1connectors/post
// Legacy API - please use alert-actions of type 'automation_rule' - for more information see https://api.ilert.com/api-docs/#tag/Alert-Actions/paths/~1alert-actions/post
func (c *Client) GetAutomationRule(input *GetAutomationRuleInput) (*GetAutomationRuleOutput, error) {
if input == nil {
return nil, errors.New("input is required")
Expand Down Expand Up @@ -185,7 +185,7 @@ type UpdateAutomationRuleOutput struct {
AutomationRule *AutomationRule
}

// Legacy API - please use alert-actions of type 'automation_rule' - for more information see https://api.ilert.com/api-docs/#tag/Connectors/paths/~1connectors/post
// Legacy API - please use alert-actions of type 'automation_rule' - for more information see https://api.ilert.com/api-docs/#tag/Alert-Actions/paths/~1alert-actions/post
func (c *Client) UpdateAutomationRule(input *UpdateAutomationRuleInput) (*UpdateAutomationRuleOutput, error) {
if input == nil {
return nil, errors.New("input is required")
Expand Down Expand Up @@ -227,7 +227,7 @@ type DeleteAutomationRuleOutput struct {
_ struct{}
}

// Legacy API - please use alert-actions of type 'automation_rule' - for more information see https://api.ilert.com/api-docs/#tag/Connectors/paths/~1connectors/post
// Legacy API - please use alert-actions of type 'automation_rule' - for more information see https://api.ilert.com/api-docs/#tag/Alert-Actions/paths/~1alert-actions/post
func (c *Client) DeleteAutomationRule(input *DeleteAutomationRuleInput) (*DeleteAutomationRuleOutput, error) {
if input == nil {
return nil, errors.New("input is required")
Expand Down
4 changes: 2 additions & 2 deletions connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ var ConnectorTypes = struct {
ZoomMeeting: "zoom_meeting",
StatusPageIO: "status_page_io",
Webex: "webex",
DingTalk: "ding_talk",
DingTalkAction: "ding_talk_action",
DingTalk: "dingtalk",
DingTalkAction: "dingtalk_action",
AutomationRule: "automation_rule",
}

Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ilert

// Version package version
const Version = "v2.3.2"
const Version = "v2.3.3"

0 comments on commit f533967

Please sign in to comment.