-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Use keptn/go-utils to access Keptn APIs #767
feat: Use keptn/go-utils to access Keptn APIs #767
Conversation
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
} | ||
|
||
func NewErrorHandler(err error, event cloudevents.Event) *ErrorHandler { | ||
func NewErrorHandler(err error, event cloudevents.Event, uniformClient keptn.UniformClientInterface) *ErrorHandler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golint] reported by reviewdog 🐶
exported function NewErrorHandler should have comment or be unexported
@@ -24,18 +26,23 @@ type DynatraceEventHandler interface { | |||
HandleEvent() error | |||
} | |||
|
|||
func NewEventHandler(event cloudevents.Event) DynatraceEventHandler { | |||
eventHandler, err := getEventHandler(event) | |||
func NewEventHandler(event cloudevents.Event) (DynatraceEventHandler, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golint] reported by reviewdog 🐶
exported function NewEventHandler should have comment or be unexported
internal/keptn/keptn_event_client.go
Outdated
} | ||
|
||
func NewEventClientBase() *EventClientBase { | ||
func NewEventClientBase(client keptnapi.EventsV1Interface) *EventClientBase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golint] reported by reviewdog 🐶
exported function NewEventClientBase should have comment or be unexported
} | ||
|
||
func NewServiceClient(client *keptnapi.ServiceHandler, httpClient *http.Client) *ServiceClient { | ||
func NewServiceClient(client keptnapi.ServicesV1Interface, apiClient keptnapi.APIV1Interface) *ServiceClient { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golint] reported by reviewdog 🐶
exported function NewServiceClient should have comment or be unexported
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
Signed-off-by: Arthur Pitman <[email protected]>
} | ||
|
||
func NewDynatraceConfigGetter(client keptn.DynatraceConfigResourceClientInterface) *DynatraceConfigGetter { | ||
func NewDynatraceConfigGetter(client keptn.DynatraceConfigReaderInterface) *DynatraceConfigGetter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golint] reported by reviewdog 🐶
exported function NewDynatraceConfigGetter should have comment or be unexported
serviceClient keptn.ServiceClientInterface | ||
} | ||
|
||
func NewConfiguration(dynatraceClient dynatrace.ClientInterface, keptnClient keptn.ClientInterface, sloReader keptn.SLOResourceReaderInterface, serviceClient keptn.ServiceClientInterface) *Configuration { | ||
func NewConfiguration(dynatraceClient dynatrace.ClientInterface, keptnClient keptn.ClientInterface, sloReader keptn.SLOReaderInterface, serviceClient keptn.ServiceClientInterface) *Configuration { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golint] reported by reviewdog 🐶
exported function NewConfiguration should have comment or be unexported
} | ||
|
||
func NewMetricEventCreation(dynatraceClient dynatrace.ClientInterface, keptnClient keptn.ClientInterface, sloReader keptn.SLOResourceReaderInterface) MetricEventCreation { | ||
func NewMetricEventCreation(dynatraceClient dynatrace.ClientInterface, keptnClient keptn.ClientInterface, sloReader keptn.SLOReaderInterface) MetricEventCreation { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golint] reported by reviewdog 🐶
exported function NewMetricEventCreation should have comment or be unexported
|
||
secretName string | ||
dashboard string | ||
} | ||
|
||
func NewGetSLITriggeredHandler(event GetSLITriggeredAdapterInterface, dtClient dynatrace.ClientInterface, kClient keptn.ClientInterface, resourceClient keptn.ResourceClientInterface, secretName string, dashboard string) GetSLIEventHandler { | ||
func NewGetSLITriggeredHandler(event GetSLITriggeredAdapterInterface, dtClient dynatrace.ClientInterface, kClient keptn.ClientInterface, resourceClient keptn.SLOAndSLIClientInterface, secretName string, dashboard string) GetSLIEventHandler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golint] reported by reviewdog 🐶
exported function NewGetSLITriggeredHandler should have comment or be unexported
Signed-off-by: Arthur Pitman <[email protected]>
@@ -16,7 +16,7 @@ import ( | |||
"github.com/keptn/go-utils/pkg/lib/keptn" | |||
) | |||
|
|||
const KEPTNSBRIDGE_LABEL = "Keptns Bridge" | |||
const BridgeLabel = "Keptns Bridge" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golint] reported by reviewdog 🐶
exported const BridgeLabel should have comment or be unexported
Signed-off-by: Arthur Pitman <[email protected]>
@@ -16,7 +16,8 @@ import ( | |||
"github.com/keptn/go-utils/pkg/lib/keptn" | |||
) | |||
|
|||
const KEPTNSBRIDGE_LABEL = "Keptns Bridge" | |||
const BridgeLabel = "Keptns Bridge" | |||
const ProblemURLLabel = "Problem URL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golint] reported by reviewdog 🐶
exported const ProblemURLLabel should have comment or be unexported
Signed-off-by: Arthur Pitman <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
The following Docker Images have been built: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Closes #754