Skip to content

Commit

Permalink
refactor: add integration/notifier to workspace, tidy unused code in …
Browse files Browse the repository at this point in the history
…input (#637)
  • Loading branch information
graza-io authored Feb 7, 2024
1 parent 3a4fb9e commit e330d56
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 0 additions & 5 deletions internal/primitive/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ import (

type IntegrationType string

const (
IntegrationTypeSlack IntegrationType = "slack"
IntegrationTypeEmail IntegrationType = "email"
)

type Input struct {
ExecutionID string
PipelineExecutionID string
Expand Down
2 changes: 1 addition & 1 deletion internal/primitive/input_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func XXXTestIntegrationInputSendEmail(t *testing.T) {
input := modconfig.Input(map[string]interface{}{
// schema.AttributeTypeSenderName: "Karan",

schema.AttributeTypeType: IntegrationTypeEmail,
schema.AttributeTypeType: schema.IntegrationTypeEmail,
schema.AttributeTypeUsername: "[email protected]",
schema.AttributeTypePassword: "xxxxxx",
schema.AttributeTypeSmtpServer: "smtp.gmail.com",
Expand Down
7 changes: 6 additions & 1 deletion internal/service/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,12 @@ func (m *Manager) initializeResources() error {
cache.GetCache().SetWithTTL("#flowpipeconfig", flowpipeConfig, 24*7*52*99*time.Hour)
}

w, errorAndWarning := workspace.LoadWorkspacePromptingForVariables(m.ctx, modLocation, workspace.WithCredentials(flowpipeConfig.Credentials))
w, errorAndWarning := workspace.LoadWorkspacePromptingForVariables(
m.ctx,
modLocation,
workspace.WithCredentials(flowpipeConfig.Credentials),
workspace.WithIntegrations(flowpipeConfig.Integrations),
workspace.WithNotifiers(flowpipeConfig.Notifiers))
if errorAndWarning.Error != nil {
return errorAndWarning.Error
}
Expand Down

0 comments on commit e330d56

Please sign in to comment.