MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / validateCommunityAlertConfigType

Method validateCommunityAlertConfigType

agent/app/service/alert.go:621–629  ·  view source on GitHub ↗
(configType string)

Source from the content-addressed store, hash-verified

619}
620
621func (a AlertService) validateCommunityAlertConfigType(configType string) error {
622 if global.CONF.Base.IsEnterprise || global.CONF.Base.Edition == "cn" {
623 return nil
624 }
625 if _, ok := communityAlertMethodTypeNames[configType]; ok {
626 return buserr.WithErr("ErrAlertMethodNotSupported", nil)
627 }
628 return nil
629}
630
631func alertConfigDisplayName(configType, configData string) string {
632 switch configType {

Callers 1

UpdateAlertConfigMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected