mirror of
https://github.com/usual2970/certimate.git
synced 2025-10-04 13:34:52 +00:00
refactor: clean code
This commit is contained in:
@@ -31,7 +31,7 @@ func NewWithWorkflowNode(config NotifierWithWorkflowNodeConfig) (Notifier, error
|
||||
|
||||
nodeConfig := config.Node.GetConfigForNotify()
|
||||
options := ¬ifierProviderOptions{
|
||||
Provider: domain.NotifyProviderType(nodeConfig.Provider),
|
||||
Provider: domain.NotificationProviderType(nodeConfig.Provider),
|
||||
ProviderAccessConfig: make(map[string]any),
|
||||
ProviderNotifyConfig: nodeConfig.ProviderConfig,
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
type notifierProviderOptions struct {
|
||||
Provider domain.NotifyProviderType
|
||||
Provider domain.NotificationProviderType
|
||||
ProviderAccessConfig map[string]any
|
||||
ProviderNotifyConfig map[string]any
|
||||
}
|
||||
@@ -21,7 +21,7 @@ func createNotifierProvider(options *notifierProviderOptions) (notifier.Notifier
|
||||
NOTICE: If you add new constant, please keep ASCII order.
|
||||
*/
|
||||
switch options.Provider {
|
||||
case domain.NotifyProviderTypeWebhook:
|
||||
case domain.NotificationProviderTypeWebhook:
|
||||
return pWebhook.NewNotifier(&pWebhook.NotifierConfig{
|
||||
Url: maputil.GetString(options.ProviderAccessConfig, "url"),
|
||||
AllowInsecureConnections: maputil.GetBool(options.ProviderAccessConfig, "allowInsecureConnections"),
|
||||
|
Reference in New Issue
Block a user