-
Notifications
You must be signed in to change notification settings - Fork 12
feat: Move commonly used modules from keptn/keptn into sub-packages of go-utils #483
Conversation
…f go-utils Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golint
pkg/sdk/keptn_fake.go|55 col 1| exported method FakeKeptn.AssertSentEventStatus should have comment or be unexported
pkg/sdk/keptn_fake.go|64 col 1| exported method FakeKeptn.AssertSentEventResult should have comment or be unexported
pkg/sdk/keptn_fake.go|73 col 1| exported method FakeKeptn.SetAutomaticResponse should have comment or be unexported
pkg/sdk/keptn_fake.go|76 col 1| exported method FakeKeptn.SetResourceHandler should have comment or be unexported
pkg/sdk/keptn_fake.go|81 col 1| exported method FakeKeptn.SetAPI should have comment or be unexported
pkg/sdk/keptn_fake.go|85 col 1| exported method FakeKeptn.AddTaskHandler should have comment or be unexported
pkg/sdk/keptn_fake.go|89 col 1| exported method FakeKeptn.AddTaskHandlerWithSubscriptionID should have comment or be unexported
pkg/sdk/keptn_fake.go|98 col 1| exported function NewFakeKeptn should have comment or be unexported
pkg/sdk/keptn_fake.go|118 col 6| exported type TestResourceHandler should have comment or be unexported
pkg/sdk/keptn_fake.go|122 col 1| exported method TestResourceHandler.GetResource should have comment or be unexported
pkg/sdk/keptn_fake.go|140 col 6| exported type StringResourceHandler should have comment or be unexported
pkg/sdk/keptn_fake.go|144 col 1| exported method StringResourceHandler.GetResource should have comment or be unexported
pkg/sdk/keptn_fake.go|152 col 6| exported type FailingResourceHandler should have comment or be unexported
pkg/sdk/keptn_fake.go|155 col 1| exported method FailingResourceHandler.GetResource should have comment or be unexported
pkg/sdk/log.go|32 col 1| exported method DefaultLogger.Debug should have comment or be unexported
pkg/sdk/log.go|36 col 1| exported method DefaultLogger.Debugf should have comment or be unexported
pkg/sdk/log.go|40 col 1| exported method DefaultLogger.Info should have comment or be unexported
pkg/sdk/log.go|44 col 1| exported method DefaultLogger.Infof should have comment or be unexported
pkg/sdk/log.go|48 col 1| exported method DefaultLogger.Warn should have comment or be unexported
pkg/sdk/log.go|52 col 1| exported method DefaultLogger.Warnf should have comment or be unexported
pkg/sdk/log.go|60 col 1| exported method DefaultLogger.Errorf should have comment or be unexported
pkg/sdk/log.go|64 col 1| exported method DefaultLogger.Fatal should have comment or be unexported
pkg/sdk/log.go|68 col 1| exported method DefaultLogger.Fatalf should have comment or be unexported
pkg/sdk/connector/controlplane/controlplane.go|22 col 6| exported type EventSender should have comment or be unexported
pkg/sdk/connector/controlplane/controlplane.go|23 col 6| exported type EventSenderKeyType should have comment or be unexported
pkg/sdk/connector/controlplane/controlplane.go|24 col 6| exported type RegistrationData should have comment or be unexported
pkg/sdk/connector/controlplane/controlplane.go|28 col 5| exported var ErrEventHandleFatal should have comment or be unexported
pkg/sdk/connector/controlplane/controlplane.go|197 col 9| if block ends with a return statement, so drop this else and outdent its block
pkg/sdk/connector/eventsource/http/eventapi.go|12 col 1| comment on exported type EventAPI should be of the form "EventAPI ..." (with optional leading article)
pkg/sdk/connector/eventsource/http/eventapi.go|18 col 1| comment on exported type SendEventAPI should be of the form "SendEventAPI ..." (with optional leading article)
pkg/sdk/connector/eventsource/http/eventapi.go|23 col 1| comment on exported type GetEventAPI should be of the form "GetEventAPI ..." (with optional leading article)
pkg/sdk/connector/eventsource/http/eventapi.go|35 col 6| exported type HTTPEventAPI should have comment or be unexported
pkg/sdk/connector/eventsource/http/eventapi.go|35 col 6| type name will be used as http.HTTPEventAPI by other packages, and that stutters; consider calling this EventAPI
pkg/sdk/connector/eventsource/http/eventapi.go|45 col 1| exported function WithMaxGetRetries should have comment or be unexported
pkg/sdk/connector/eventsource/http/eventapi.go|51 col 1| exported function WithMaxSendRetries should have comment or be unexported
pkg/sdk/connector/eventsource/http/eventapi.go|57 col 1| exported function WithSendRetryDelay should have comment or be unexported
pkg/sdk/connector/eventsource/http/eventapi.go|63 col 1| exported function WithGetRetryDelay should have comment or be unexported
pkg/sdk/connector/eventsource/http/eventapi.go|69 col 1| comment on exported function WithLog should be of the form "WithLog ..."
pkg/sdk/connector/eventsource/http/eventapi.go|76 col 1| exported function NewEventAPI should have comment or be unexported
pkg/sdk/connector/eventsource/http/eventapi.go|92 col 1| exported method HTTPEventAPI.Send should have comment or be unexported
pkg/sdk/connector/eventsource/http/eventapi.go|109 col 1| exported method HTTPEventAPI.Get should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|15 col 5| exported var ErrMaxPollRetriesExceeded should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|61 col 6| exported type HTTPEventSource should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|61 col 6| type name will be used as http.HTTPEventSource by other packages, and that stutters; consider calling this EventSource
pkg/sdk/connector/eventsource/http/http.go|73 col 1| exported method HTTPEventSource.Start should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|104 col 1| exported method HTTPEventSource.OnSubscriptionUpdate should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|110 col 1| exported method HTTPEventSource.Sender should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|114 col 1| exported method HTTPEventSource.Stop should have comment or be unexported
pkg/sdk/connector/eventsource/http/utils.go|15 col 17| exported func NewCache returns unexported type *http.cache, which can be annoying to use
pkg/sdk/connector/eventsource/http/utils.go|144 col 1| exported function ToIds should have comment or be unexported
pkg/sdk/connector/eventsource/nats/nats.go|20 col 6| type name will be used as nats.NATSEventSource by other packages, and that stutters; consider calling this EventSource
pkg/sdk/connector/eventsource/nats/nats.go|49 col 1| exported method NATSEventSource.Start should have comment or be unexported
pkg/sdk/connector/eventsource/nats/nats.go|77 col 1| exported method NATSEventSource.OnSubscriptionUpdate should have comment or be unexported
pkg/sdk/connector/eventsource/nats/nats.go|98 col 1| exported method NATSEventSource.Sender should have comment or be unexported
pkg/sdk/connector/eventsource/nats/nats.go|102 col 1| exported method NATSEventSource.Stop should have comment or be unexported
pkg/sdk/connector/fake/eventsource.go|10 col 6| exported type EventSourceMock should have comment or be unexported
pkg/sdk/connector/fake/eventsource.go|17 col 1| exported method EventSourceMock.Start should have comment or be unexported
pkg/sdk/connector/fake/eventsource.go|24 col 1| exported method EventSourceMock.OnSubscriptionUpdate should have comment or be unexported
pkg/sdk/connector/fake/eventsource.go|32 col 1| exported method EventSourceMock.Sender should have comment or be unexported
pkg/sdk/connector/fake/eventsource.go|39 col 1| exported method EventSourceMock.Stop should have comment or be unexported
pkg/sdk/connector/fake/subscriptionsource.go|10 col 6| exported type SubscriptionSourceMock should have comment or be unexported
pkg/sdk/connector/fake/subscriptionsource.go|16 col 1| exported method SubscriptionSourceMock.Start should have comment or be unexported
pkg/sdk/connector/fake/subscriptionsource.go|23 col 1| exported method SubscriptionSourceMock.Register should have comment or be unexported
pkg/sdk/connector/fake/subscriptionsource.go|30 col 1| exported method SubscriptionSourceMock.Stop should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|5 col 6| exported type UniformAPIMock should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|10 col 1| exported method UniformAPIMock.Ping should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|16 col 1| exported method UniformAPIMock.RegisterIntegration should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|23 col 1| exported method UniformAPIMock.CreateSubscription should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|27 col 1| exported method UniformAPIMock.UnregisterIntegration should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|31 col 1| exported method UniformAPIMock.GetRegistrations should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|16 col 6| exported type LogForwarder should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|22 col 6| exported type LogForwardingHandler should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|23 col 2| struct field logApi should be logAPI
pkg/sdk/connector/logforwarder/logforwarder.go|27 col 1| exported function New should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|27 col 10| func parameter logApi should be logAPI
pkg/sdk/connector/logforwarder/logforwarder.go|45 col 1| exported method LogForwardingHandler.Forward should have comment or be unexported
pkg/sdk/connector/logger/log.go|32 col 1| exported method DefaultLogger.Debug should have comment or be unexported
pkg/sdk/connector/logger/log.go|36 col 1| exported method DefaultLogger.Debugf should have comment or be unexported
pkg/sdk/connector/logger/log.go|40 col 1| exported method DefaultLogger.Info should have comment or be unexported
pkg/sdk/connector/logger/log.go|44 col 1| exported method DefaultLogger.Infof should have comment or be unexported
pkg/sdk/connector/logger/log.go|48 col 1| exported method DefaultLogger.Warn should have comment or be unexported
pkg/sdk/connector/logger/log.go|52 col 1| exported method DefaultLogger.Warnf should have comment or be unexported
pkg/sdk/connector/logger/log.go|60 col 1| exported method DefaultLogger.Errorf should have comment or be unexported
pkg/sdk/connector/logger/log.go|64 col 1| exported method DefaultLogger.Fatal should have comment or be unexported
pkg/sdk/connector/logger/log.go|68 col 1| exported method DefaultLogger.Fatalf should have comment or be unexported
pkg/sdk/connector/nats/nats.go|18 col 2| exported const EnvVarNatsURL should have comment (or a comment on this block) or be unexported
pkg/sdk/connector/nats/nats.go|23 col 6| exported type NATS should have comment or be unexported
pkg/sdk/connector/nats/nats.go|34 col 2| exported var ErrSubAlreadySubscribed should have comment or be unexported
pkg/sdk/connector/nats/nats.go|45 col 6| type name will be used as nats.NatsConnector by other packages, and that stutters; consider calling this Connector
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|15 col 6| exported type SubscriptionSource should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|33 col 1| exported method UniformSubscriptionSource.Register should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|92 col 1| exported method UniformSubscriptionSource.Stop should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|97 col 42| method parameter registrationId should be registrationID
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|132 col 1| exported method FixedSubscriptionSource.Start should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|141 col 1| exported method FixedSubscriptionSource.Register should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|145 col 1| exported method FixedSubscriptionSource.Stop should have comment or be unexported
pkg/sdk/connector/types/types.go|7 col 6| exported type RegistrationData should have comment or be unexported
pkg/sdk/connector/types/types.go|9 col 6| exported type AdditionalSubscriptionData should have comment or be unexported
pkg/sdk/connector/types/types.go|13 col 6| exported type EventUpdate should have comment or be unexported
pkg/sdk/connector/types/types.go|18 col 6| exported type EventUpdateMetaData should have comment or be unexported
pkg/sdk/connector/types/types.go|22 col 6| exported type EventSenderKeyType should have comment or be unexported
pkg/sdk/connector/types/types.go|24 col 5| exported var EventSenderKey should have comment or be unexported
pkg/sdk/connector/types/types.go|26 col 6| exported type EventSender should have comment or be unexported
pkg/sdk/example/handler.go|10 col 6| exported type GreetingsHandler should have comment or be unexported
pkg/sdk/example/handler.go|13 col 6| exported type GreetingTriggeredData should have comment or be unexported
pkg/sdk/example/handler.go|18 col 6| exported type GreetingFinishedData should have comment or be unexported
pkg/sdk/example/handler.go|23 col 1| exported function NewGreetingsHandler should have comment or be unexported
pkg/sdk/example/handler.go|27 col 1| exported method GreetingsHandler.Execute should have comment or be unexported
pkg/sdk/internal/api/client.go|48 col 1| exported method OAuthClientGetter.Get should have comment or be unexported
pkg/sdk/internal/api/client.go|98 col 1| exported method SimpleClientGetter.Get should have comment or be unexported
pkg/sdk/internal/api/initializer.go|19 col 1| exported function CreateKeptnAPI should have comment or be unexported
pkg/sdk/internal/config/config.go|10 col 6| exported type EnvConfig should have comment or be unexported
pkg/sdk/internal/config/config.go|33 col 6| exported type ConnectionType should have comment or be unexported
pkg/sdk/internal/config/config.go|36 col 2| exported const DefaultAPIProxyHTTPTimeout should have comment (or a comment on this block) or be unexported
pkg/sdk/internal/config/config.go|41 col 1| exported function NewEnvConfig should have comment or be unexported
pkg/sdk/internal/config/config.go|49 col 1| exported method EnvConfig.OAuthEnabled should have comment or be unexported
pkg/sdk/internal/config/config.go|56 col 1| exported method EnvConfig.GetAPIProxyHTTPTimeout should have comment or be unexported
pkg/sdk/internal/config/config.go|64 col 1| exported method EnvConfig.PubSubConnectionType should have comment or be unexported
pkg/common/api/internal.go
Outdated
type InternalService int | ||
|
||
const ( | ||
ConfigurationService InternalService = iota |
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 ConfigurationService should have comment (or a comment on this block) or be unexported
pkg/common/api/internal.go
Outdated
const ( | ||
ConfigurationService InternalService = iota | ||
ShipyardController | ||
ApiService |
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 🐶
const ApiService should be APIService
pkg/common/api/internal.go
Outdated
// (unauthenticated) internal calls to the api-service at the moment. So this implementation | ||
// will panic as soon as a client wants to call these methods | ||
type InternalAPIHandler struct { | ||
shipyardControllerApiHandler *api.APIHandler |
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 🐶
struct field shipyardControllerApiHandler should be shipyardControllerAPIHandler
pkg/common/api/internal.go
Outdated
shipyardControllerApiHandler *api.APIHandler | ||
} | ||
|
||
func (i *InternalAPIHandler) SendEvent(event models.KeptnContextExtendedCE) (*models.EventContext, *models.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 method InternalAPIHandler.SendEvent should have comment or be unexported
pkg/common/api/internal.go
Outdated
panic("SendEvent() is not not supported for internal usage") | ||
} | ||
|
||
func (i *InternalAPIHandler) TriggerEvaluation(project string, stage string, service string, evaluation models.Evaluation) (*models.EventContext, *models.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 method InternalAPIHandler.TriggerEvaluation should have comment or be unexported
Keptn *Keptn | ||
} | ||
|
||
func (f *FakeKeptn) GetResourceHandler() ResourceHandler { |
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 method FakeKeptn.GetResourceHandler should have comment or be unexported
return f.TestResourceHandler | ||
} | ||
|
||
func (f *FakeKeptn) NewEvent(event models.KeptnContextExtendedCE) 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 method FakeKeptn.NewEvent should have comment or be unexported
return f.Keptn.OnEvent(ctx, event) | ||
} | ||
|
||
func (f *FakeKeptn) AssertNumberOfEventSent(t *testing.T, numOfEvents int) { |
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 method FakeKeptn.AssertNumberOfEventSent should have comment or be unexported
require.Equalf(t, numOfEvents, len(f.SentEvents), "number of events expected: %d got: %d", numOfEvents, len(f.SentEvents)) | ||
} | ||
|
||
func (f *FakeKeptn) AssertSentEvent(t *testing.T, eventIndex int, assertFn func(ce models.KeptnContextExtendedCE) bool) { |
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 method FakeKeptn.AssertSentEvent should have comment or be unexported
require.True(t, assertFn(f.SentEvents[eventIndex])) | ||
} | ||
|
||
func (f *FakeKeptn) AssertSentEventType(t *testing.T, eventIndex int, eventType string) { |
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 method FakeKeptn.AssertSentEventType should have comment or be unexported
…f go-utils Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
# Conflicts: # go.mod # go.sum
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golint
pkg/sdk/log.go|52 col 1| exported method DefaultLogger.Warnf should have comment or be unexported
pkg/sdk/log.go|60 col 1| exported method DefaultLogger.Errorf should have comment or be unexported
pkg/sdk/log.go|64 col 1| exported method DefaultLogger.Fatal should have comment or be unexported
pkg/sdk/log.go|68 col 1| exported method DefaultLogger.Fatalf should have comment or be unexported
pkg/sdk/connector/controlplane/controlplane.go|22 col 6| exported type EventSender should have comment or be unexported
pkg/sdk/connector/controlplane/controlplane.go|23 col 6| exported type EventSenderKeyType should have comment or be unexported
pkg/sdk/connector/controlplane/controlplane.go|24 col 6| exported type RegistrationData should have comment or be unexported
pkg/sdk/connector/controlplane/controlplane.go|28 col 5| exported var ErrEventHandleFatal should have comment or be unexported
pkg/sdk/connector/controlplane/controlplane.go|197 col 9| if block ends with a return statement, so drop this else and outdent its block
pkg/sdk/connector/eventsource/http/eventapi.go|12 col 1| comment on exported type EventAPI should be of the form "EventAPI ..." (with optional leading article)
pkg/sdk/connector/eventsource/http/eventapi.go|18 col 1| comment on exported type SendEventAPI should be of the form "SendEventAPI ..." (with optional leading article)
pkg/sdk/connector/eventsource/http/eventapi.go|23 col 1| comment on exported type GetEventAPI should be of the form "GetEventAPI ..." (with optional leading article)
pkg/sdk/connector/eventsource/http/eventapi.go|35 col 6| exported type HTTPEventAPI should have comment or be unexported
pkg/sdk/connector/eventsource/http/eventapi.go|35 col 6| type name will be used as http.HTTPEventAPI by other packages, and that stutters; consider calling this EventAPI
pkg/sdk/connector/eventsource/http/eventapi.go|45 col 1| exported function WithMaxGetRetries should have comment or be unexported
pkg/sdk/connector/eventsource/http/eventapi.go|51 col 1| exported function WithMaxSendRetries should have comment or be unexported
pkg/sdk/connector/eventsource/http/eventapi.go|57 col 1| exported function WithSendRetryDelay should have comment or be unexported
pkg/sdk/connector/eventsource/http/eventapi.go|63 col 1| exported function WithGetRetryDelay should have comment or be unexported
pkg/sdk/connector/eventsource/http/eventapi.go|69 col 1| comment on exported function WithLog should be of the form "WithLog ..."
pkg/sdk/connector/eventsource/http/eventapi.go|76 col 1| exported function NewEventAPI should have comment or be unexported
pkg/sdk/connector/eventsource/http/eventapi.go|92 col 1| exported method HTTPEventAPI.Send should have comment or be unexported
pkg/sdk/connector/eventsource/http/eventapi.go|109 col 1| exported method HTTPEventAPI.Get should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|15 col 5| exported var ErrMaxPollRetriesExceeded should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|61 col 6| exported type HTTPEventSource should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|61 col 6| type name will be used as http.HTTPEventSource by other packages, and that stutters; consider calling this EventSource
pkg/sdk/connector/eventsource/http/http.go|73 col 1| exported method HTTPEventSource.Start should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|104 col 1| exported method HTTPEventSource.OnSubscriptionUpdate should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|110 col 1| exported method HTTPEventSource.Sender should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|114 col 1| exported method HTTPEventSource.Stop should have comment or be unexported
pkg/sdk/connector/eventsource/http/utils.go|15 col 17| exported func NewCache returns unexported type *http.cache, which can be annoying to use
pkg/sdk/connector/eventsource/http/utils.go|144 col 1| exported function ToIds should have comment or be unexported
pkg/sdk/connector/eventsource/nats/nats.go|20 col 6| type name will be used as nats.NATSEventSource by other packages, and that stutters; consider calling this EventSource
pkg/sdk/connector/eventsource/nats/nats.go|49 col 1| exported method NATSEventSource.Start should have comment or be unexported
pkg/sdk/connector/eventsource/nats/nats.go|77 col 1| exported method NATSEventSource.OnSubscriptionUpdate should have comment or be unexported
pkg/sdk/connector/eventsource/nats/nats.go|98 col 1| exported method NATSEventSource.Sender should have comment or be unexported
pkg/sdk/connector/eventsource/nats/nats.go|102 col 1| exported method NATSEventSource.Stop should have comment or be unexported
pkg/sdk/connector/fake/eventsource.go|10 col 6| exported type EventSourceMock should have comment or be unexported
pkg/sdk/connector/fake/eventsource.go|17 col 1| exported method EventSourceMock.Start should have comment or be unexported
pkg/sdk/connector/fake/eventsource.go|24 col 1| exported method EventSourceMock.OnSubscriptionUpdate should have comment or be unexported
pkg/sdk/connector/fake/eventsource.go|32 col 1| exported method EventSourceMock.Sender should have comment or be unexported
pkg/sdk/connector/fake/eventsource.go|39 col 1| exported method EventSourceMock.Stop should have comment or be unexported
pkg/sdk/connector/fake/subscriptionsource.go|10 col 6| exported type SubscriptionSourceMock should have comment or be unexported
pkg/sdk/connector/fake/subscriptionsource.go|16 col 1| exported method SubscriptionSourceMock.Start should have comment or be unexported
pkg/sdk/connector/fake/subscriptionsource.go|23 col 1| exported method SubscriptionSourceMock.Register should have comment or be unexported
pkg/sdk/connector/fake/subscriptionsource.go|30 col 1| exported method SubscriptionSourceMock.Stop should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|5 col 6| exported type UniformAPIMock should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|10 col 1| exported method UniformAPIMock.Ping should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|16 col 1| exported method UniformAPIMock.RegisterIntegration should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|23 col 1| exported method UniformAPIMock.CreateSubscription should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|27 col 1| exported method UniformAPIMock.UnregisterIntegration should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|31 col 1| exported method UniformAPIMock.GetRegistrations should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|16 col 6| exported type LogForwarder should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|22 col 6| exported type LogForwardingHandler should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|23 col 2| struct field logApi should be logAPI
pkg/sdk/connector/logforwarder/logforwarder.go|27 col 1| exported function New should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|27 col 10| func parameter logApi should be logAPI
pkg/sdk/connector/logforwarder/logforwarder.go|45 col 1| exported method LogForwardingHandler.Forward should have comment or be unexported
pkg/sdk/connector/logger/log.go|32 col 1| exported method DefaultLogger.Debug should have comment or be unexported
pkg/sdk/connector/logger/log.go|36 col 1| exported method DefaultLogger.Debugf should have comment or be unexported
pkg/sdk/connector/logger/log.go|40 col 1| exported method DefaultLogger.Info should have comment or be unexported
pkg/sdk/connector/logger/log.go|44 col 1| exported method DefaultLogger.Infof should have comment or be unexported
pkg/sdk/connector/logger/log.go|48 col 1| exported method DefaultLogger.Warn should have comment or be unexported
pkg/sdk/connector/logger/log.go|52 col 1| exported method DefaultLogger.Warnf should have comment or be unexported
pkg/sdk/connector/logger/log.go|60 col 1| exported method DefaultLogger.Errorf should have comment or be unexported
pkg/sdk/connector/logger/log.go|64 col 1| exported method DefaultLogger.Fatal should have comment or be unexported
pkg/sdk/connector/logger/log.go|68 col 1| exported method DefaultLogger.Fatalf should have comment or be unexported
pkg/sdk/connector/nats/nats.go|18 col 2| exported const EnvVarNatsURL should have comment (or a comment on this block) or be unexported
pkg/sdk/connector/nats/nats.go|23 col 6| exported type NATS should have comment or be unexported
pkg/sdk/connector/nats/nats.go|34 col 2| exported var ErrSubAlreadySubscribed should have comment or be unexported
pkg/sdk/connector/nats/nats.go|45 col 6| type name will be used as nats.NatsConnector by other packages, and that stutters; consider calling this Connector
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|15 col 6| exported type SubscriptionSource should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|33 col 1| exported method UniformSubscriptionSource.Register should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|92 col 1| exported method UniformSubscriptionSource.Stop should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|97 col 42| method parameter registrationId should be registrationID
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|132 col 1| exported method FixedSubscriptionSource.Start should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|141 col 1| exported method FixedSubscriptionSource.Register should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|145 col 1| exported method FixedSubscriptionSource.Stop should have comment or be unexported
pkg/sdk/connector/types/types.go|7 col 6| exported type RegistrationData should have comment or be unexported
pkg/sdk/connector/types/types.go|9 col 6| exported type AdditionalSubscriptionData should have comment or be unexported
pkg/sdk/connector/types/types.go|13 col 6| exported type EventUpdate should have comment or be unexported
pkg/sdk/connector/types/types.go|18 col 6| exported type EventUpdateMetaData should have comment or be unexported
pkg/sdk/connector/types/types.go|22 col 6| exported type EventSenderKeyType should have comment or be unexported
pkg/sdk/connector/types/types.go|24 col 5| exported var EventSenderKey should have comment or be unexported
pkg/sdk/connector/types/types.go|26 col 6| exported type EventSender should have comment or be unexported
pkg/sdk/example/handler.go|10 col 6| exported type GreetingsHandler should have comment or be unexported
pkg/sdk/example/handler.go|13 col 6| exported type GreetingTriggeredData should have comment or be unexported
pkg/sdk/example/handler.go|18 col 6| exported type GreetingFinishedData should have comment or be unexported
pkg/sdk/example/handler.go|23 col 1| exported function NewGreetingsHandler should have comment or be unexported
pkg/sdk/example/handler.go|27 col 1| exported method GreetingsHandler.Execute should have comment or be unexported
pkg/sdk/internal/api/client.go|48 col 1| exported method OAuthClientGetter.Get should have comment or be unexported
pkg/sdk/internal/api/client.go|98 col 1| exported method SimpleClientGetter.Get should have comment or be unexported
pkg/sdk/internal/api/initializer.go|19 col 1| exported function CreateKeptnAPI should have comment or be unexported
pkg/sdk/internal/config/config.go|10 col 6| exported type EnvConfig should have comment or be unexported
pkg/sdk/internal/config/config.go|33 col 6| exported type ConnectionType should have comment or be unexported
pkg/sdk/internal/config/config.go|36 col 2| exported const DefaultAPIProxyHTTPTimeout should have comment (or a comment on this block) or be unexported
pkg/sdk/internal/config/config.go|41 col 1| exported function NewEnvConfig should have comment or be unexported
pkg/sdk/internal/config/config.go|49 col 1| exported method EnvConfig.OAuthEnabled should have comment or be unexported
pkg/sdk/internal/config/config.go|56 col 1| exported method EnvConfig.GetAPIProxyHTTPTimeout should have comment or be unexported
pkg/sdk/internal/config/config.go|64 col 1| exported method EnvConfig.PubSubConnectionType should have comment or be unexported
pkg/common/apiutils/internal.go
Outdated
type InternalService int | ||
|
||
const ( | ||
ConfigurationService InternalService = iota |
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 ConfigurationService should have comment (or a comment on this block) or be unexported
pkg/common/apiutils/internal.go
Outdated
const ( | ||
ConfigurationService InternalService = iota | ||
ShipyardController | ||
ApiService |
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 🐶
const ApiService should be APIService
pkg/common/apiutils/internal.go
Outdated
// (unauthenticated) internal calls to the api-service at the moment. So this implementation | ||
// will panic as soon as a client wants to call these methods | ||
type InternalAPIHandler struct { | ||
shipyardControllerApiHandler *api.APIHandler |
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 🐶
struct field shipyardControllerApiHandler should be shipyardControllerAPIHandler
pkg/common/apiutils/internal.go
Outdated
shipyardControllerApiHandler *api.APIHandler | ||
} | ||
|
||
func (i *InternalAPIHandler) SendEvent(event models.KeptnContextExtendedCE) (*models.EventContext, *models.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 method InternalAPIHandler.SendEvent should have comment or be unexported
pkg/common/apiutils/internal.go
Outdated
panic("SendEvent() is not not supported for internal usage") | ||
} | ||
|
||
func (i *InternalAPIHandler) TriggerEvaluation(project string, stage string, service string, evaluation models.Evaluation) (*models.EventContext, *models.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 method InternalAPIHandler.TriggerEvaluation should have comment or be unexported
return &DefaultLogger{logger: log.New(os.Stdout, "", 5)} | ||
} | ||
|
||
func (d DefaultLogger) Debug(v ...interface{}) { |
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 method DefaultLogger.Debug should have comment or be unexported
d.logger.Println(v...) | ||
} | ||
|
||
func (d DefaultLogger) Debugf(format string, v ...interface{}) { |
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 method DefaultLogger.Debugf should have comment or be unexported
d.logger.Printf(format, v...) | ||
} | ||
|
||
func (d DefaultLogger) Info(v ...interface{}) { |
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 method DefaultLogger.Info should have comment or be unexported
d.logger.Println(v...) | ||
} | ||
|
||
func (d DefaultLogger) Infof(format string, v ...interface{}) { |
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 method DefaultLogger.Infof should have comment or be unexported
d.logger.Printf(format, v...) | ||
} | ||
|
||
func (d DefaultLogger) Warn(v ...interface{}) { |
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 method DefaultLogger.Warn should have comment or be unexported
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
type InternalService int | ||
|
||
const ( | ||
ConfigurationService InternalService = iota |
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 ConfigurationService should have comment (or a comment on this block) or be unexported
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golint
pkg/sdk/connector/eventsource/http/eventapi.go|92 col 1| exported method HTTPEventAPI.Send should have comment or be unexported
pkg/sdk/connector/eventsource/http/eventapi.go|109 col 1| exported method HTTPEventAPI.Get should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|15 col 5| exported var ErrMaxPollRetriesExceeded should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|61 col 6| exported type HTTPEventSource should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|61 col 6| type name will be used as http.HTTPEventSource by other packages, and that stutters; consider calling this EventSource
pkg/sdk/connector/eventsource/http/http.go|73 col 1| exported method HTTPEventSource.Start should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|104 col 1| exported method HTTPEventSource.OnSubscriptionUpdate should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|110 col 1| exported method HTTPEventSource.Sender should have comment or be unexported
pkg/sdk/connector/eventsource/http/http.go|114 col 1| exported method HTTPEventSource.Stop should have comment or be unexported
pkg/sdk/connector/eventsource/http/utils.go|15 col 17| exported func NewCache returns unexported type *http.cache, which can be annoying to use
pkg/sdk/connector/eventsource/http/utils.go|144 col 1| exported function ToIds should have comment or be unexported
pkg/sdk/connector/eventsource/nats/nats.go|20 col 6| type name will be used as nats.NATSEventSource by other packages, and that stutters; consider calling this EventSource
pkg/sdk/connector/eventsource/nats/nats.go|49 col 1| exported method NATSEventSource.Start should have comment or be unexported
pkg/sdk/connector/eventsource/nats/nats.go|77 col 1| exported method NATSEventSource.OnSubscriptionUpdate should have comment or be unexported
pkg/sdk/connector/eventsource/nats/nats.go|98 col 1| exported method NATSEventSource.Sender should have comment or be unexported
pkg/sdk/connector/eventsource/nats/nats.go|102 col 1| exported method NATSEventSource.Stop should have comment or be unexported
pkg/sdk/connector/fake/eventsource.go|10 col 6| exported type EventSourceMock should have comment or be unexported
pkg/sdk/connector/fake/eventsource.go|17 col 1| exported method EventSourceMock.Start should have comment or be unexported
pkg/sdk/connector/fake/eventsource.go|24 col 1| exported method EventSourceMock.OnSubscriptionUpdate should have comment or be unexported
pkg/sdk/connector/fake/eventsource.go|32 col 1| exported method EventSourceMock.Sender should have comment or be unexported
pkg/sdk/connector/fake/eventsource.go|39 col 1| exported method EventSourceMock.Stop should have comment or be unexported
pkg/sdk/connector/fake/subscriptionsource.go|10 col 6| exported type SubscriptionSourceMock should have comment or be unexported
pkg/sdk/connector/fake/subscriptionsource.go|16 col 1| exported method SubscriptionSourceMock.Start should have comment or be unexported
pkg/sdk/connector/fake/subscriptionsource.go|23 col 1| exported method SubscriptionSourceMock.Register should have comment or be unexported
pkg/sdk/connector/fake/subscriptionsource.go|30 col 1| exported method SubscriptionSourceMock.Stop should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|5 col 6| exported type UniformAPIMock should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|10 col 1| exported method UniformAPIMock.Ping should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|16 col 1| exported method UniformAPIMock.RegisterIntegration should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|23 col 1| exported method UniformAPIMock.CreateSubscription should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|27 col 1| exported method UniformAPIMock.UnregisterIntegration should have comment or be unexported
pkg/sdk/connector/fake/uniformapi.go|31 col 1| exported method UniformAPIMock.GetRegistrations should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|16 col 6| exported type LogForwarder should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|22 col 6| exported type LogForwardingHandler should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|23 col 2| struct field logApi should be logAPI
pkg/sdk/connector/logforwarder/logforwarder.go|27 col 1| exported function New should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|27 col 10| func parameter logApi should be logAPI
pkg/sdk/connector/logforwarder/logforwarder.go|45 col 1| exported method LogForwardingHandler.Forward should have comment or be unexported
pkg/sdk/connector/logger/log.go|32 col 1| exported method DefaultLogger.Debug should have comment or be unexported
pkg/sdk/connector/logger/log.go|36 col 1| exported method DefaultLogger.Debugf should have comment or be unexported
pkg/sdk/connector/logger/log.go|40 col 1| exported method DefaultLogger.Info should have comment or be unexported
pkg/sdk/connector/logger/log.go|44 col 1| exported method DefaultLogger.Infof should have comment or be unexported
pkg/sdk/connector/logger/log.go|48 col 1| exported method DefaultLogger.Warn should have comment or be unexported
pkg/sdk/connector/logger/log.go|52 col 1| exported method DefaultLogger.Warnf should have comment or be unexported
pkg/sdk/connector/logger/log.go|60 col 1| exported method DefaultLogger.Errorf should have comment or be unexported
pkg/sdk/connector/logger/log.go|64 col 1| exported method DefaultLogger.Fatal should have comment or be unexported
pkg/sdk/connector/logger/log.go|68 col 1| exported method DefaultLogger.Fatalf should have comment or be unexported
pkg/sdk/connector/nats/nats.go|18 col 2| exported const EnvVarNatsURL should have comment (or a comment on this block) or be unexported
pkg/sdk/connector/nats/nats.go|23 col 6| exported type NATS should have comment or be unexported
pkg/sdk/connector/nats/nats.go|34 col 2| exported var ErrSubAlreadySubscribed should have comment or be unexported
pkg/sdk/connector/nats/nats.go|45 col 6| type name will be used as nats.NatsConnector by other packages, and that stutters; consider calling this Connector
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|15 col 6| exported type SubscriptionSource should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|33 col 1| exported method UniformSubscriptionSource.Register should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|92 col 1| exported method UniformSubscriptionSource.Stop should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|97 col 42| method parameter registrationId should be registrationID
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|132 col 1| exported method FixedSubscriptionSource.Start should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|141 col 1| exported method FixedSubscriptionSource.Register should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|145 col 1| exported method FixedSubscriptionSource.Stop should have comment or be unexported
pkg/sdk/connector/types/types.go|7 col 6| exported type RegistrationData should have comment or be unexported
pkg/sdk/connector/types/types.go|9 col 6| exported type AdditionalSubscriptionData should have comment or be unexported
pkg/sdk/connector/types/types.go|13 col 6| exported type EventUpdate should have comment or be unexported
pkg/sdk/connector/types/types.go|18 col 6| exported type EventUpdateMetaData should have comment or be unexported
pkg/sdk/connector/types/types.go|22 col 6| exported type EventSenderKeyType should have comment or be unexported
pkg/sdk/connector/types/types.go|24 col 5| exported var EventSenderKey should have comment or be unexported
pkg/sdk/connector/types/types.go|26 col 6| exported type EventSender should have comment or be unexported
pkg/sdk/example/handler.go|10 col 6| exported type GreetingsHandler should have comment or be unexported
pkg/sdk/example/handler.go|13 col 6| exported type GreetingTriggeredData should have comment or be unexported
pkg/sdk/example/handler.go|18 col 6| exported type GreetingFinishedData should have comment or be unexported
pkg/sdk/example/handler.go|23 col 1| exported function NewGreetingsHandler should have comment or be unexported
pkg/sdk/example/handler.go|27 col 1| exported method GreetingsHandler.Execute should have comment or be unexported
pkg/sdk/internal/api/client.go|48 col 1| exported method OAuthClientGetter.Get should have comment or be unexported
pkg/sdk/internal/api/client.go|98 col 1| exported method SimpleClientGetter.Get should have comment or be unexported
pkg/sdk/internal/api/initializer.go|18 col 1| exported function CreateKeptnAPI should have comment or be unexported
pkg/sdk/internal/config/config.go|10 col 6| exported type EnvConfig should have comment or be unexported
pkg/sdk/internal/config/config.go|33 col 6| exported type ConnectionType should have comment or be unexported
pkg/sdk/internal/config/config.go|36 col 2| exported const DefaultAPIProxyHTTPTimeout should have comment (or a comment on this block) or be unexported
pkg/sdk/internal/config/config.go|41 col 1| exported function NewEnvConfig should have comment or be unexported
pkg/sdk/internal/config/config.go|49 col 1| exported method EnvConfig.OAuthEnabled should have comment or be unexported
pkg/sdk/internal/config/config.go|56 col 1| exported method EnvConfig.GetAPIProxyHTTPTimeout should have comment or be unexported
pkg/sdk/internal/config/config.go|64 col 1| exported method EnvConfig.PubSubConnectionType should have comment or be unexported
const ( | ||
ConfigurationService InternalService = iota | ||
ShipyardController | ||
ApiService |
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 🐶
const ApiService should be APIService
// (unauthenticated) internal calls to the api-service at the moment. So this implementation | ||
// will panic as soon as a client wants to call these methods | ||
type InternalAPIHandler struct { | ||
shipyardControllerApiHandler *APIHandler |
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 🐶
struct field shipyardControllerApiHandler should be shipyardControllerAPIHandler
shipyardControllerApiHandler *APIHandler | ||
} | ||
|
||
func (i *InternalAPIHandler) SendEvent(event models.KeptnContextExtendedCE) (*models.EventContext, *models.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 method InternalAPIHandler.SendEvent should have comment or be unexported
panic("SendEvent() is not not supported for internal usage") | ||
} | ||
|
||
func (i *InternalAPIHandler) TriggerEvaluation(project string, stage string, service string, evaluation models.Evaluation) (*models.EventContext, *models.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 method InternalAPIHandler.TriggerEvaluation should have comment or be unexported
return i.shipyardControllerApiHandler.TriggerEvaluation(project, stage, service, evaluation) | ||
} | ||
|
||
func (i *InternalAPIHandler) CreateProject(project models.CreateProject) (string, *models.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 method InternalAPIHandler.CreateProject should have comment or be unexported
} | ||
} | ||
|
||
func WithMaxSendRetries(r uint) func(eventAPI *HTTPEventAPI) { |
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 WithMaxSendRetries should have comment or be unexported
} | ||
} | ||
|
||
func WithSendRetryDelay(d time.Duration) func(eventAPI *HTTPEventAPI) { |
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 WithSendRetryDelay should have comment or be unexported
} | ||
} | ||
|
||
func WithGetRetryDelay(d time.Duration) func(eventAPI *HTTPEventAPI) { |
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 WithGetRetryDelay should have comment or be unexported
} | ||
} | ||
|
||
// TODO: this should be called Withlogger |
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 🐶
comment on exported function WithLog should be of the form "WithLog ..."
} | ||
} | ||
|
||
func NewEventAPI(getAPI GetEventAPI, sendAPI SendEventAPI, options ...func(eventAPI *HTTPEventAPI)) *HTTPEventAPI { |
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 NewEventAPI should have comment or be unexported
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golint
pkg/sdk/connector/fake/uniformapi.go|31 col 1| exported method UniformAPIMock.GetRegistrations should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|16 col 6| exported type LogForwarder should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|22 col 6| exported type LogForwardingHandler should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|23 col 2| struct field logApi should be logAPI
pkg/sdk/connector/logforwarder/logforwarder.go|27 col 1| exported function New should have comment or be unexported
pkg/sdk/connector/logforwarder/logforwarder.go|27 col 10| func parameter logApi should be logAPI
pkg/sdk/connector/logforwarder/logforwarder.go|45 col 1| exported method LogForwardingHandler.Forward should have comment or be unexported
pkg/sdk/connector/logger/log.go|32 col 1| exported method DefaultLogger.Debug should have comment or be unexported
pkg/sdk/connector/logger/log.go|36 col 1| exported method DefaultLogger.Debugf should have comment or be unexported
pkg/sdk/connector/logger/log.go|40 col 1| exported method DefaultLogger.Info should have comment or be unexported
pkg/sdk/connector/logger/log.go|44 col 1| exported method DefaultLogger.Infof should have comment or be unexported
pkg/sdk/connector/logger/log.go|48 col 1| exported method DefaultLogger.Warn should have comment or be unexported
pkg/sdk/connector/logger/log.go|52 col 1| exported method DefaultLogger.Warnf should have comment or be unexported
pkg/sdk/connector/logger/log.go|60 col 1| exported method DefaultLogger.Errorf should have comment or be unexported
pkg/sdk/connector/logger/log.go|64 col 1| exported method DefaultLogger.Fatal should have comment or be unexported
pkg/sdk/connector/logger/log.go|68 col 1| exported method DefaultLogger.Fatalf should have comment or be unexported
pkg/sdk/connector/nats/nats.go|18 col 2| exported const EnvVarNatsURL should have comment (or a comment on this block) or be unexported
pkg/sdk/connector/nats/nats.go|23 col 6| exported type NATS should have comment or be unexported
pkg/sdk/connector/nats/nats.go|34 col 2| exported var ErrSubAlreadySubscribed should have comment or be unexported
pkg/sdk/connector/nats/nats.go|45 col 6| type name will be used as nats.NatsConnector by other packages, and that stutters; consider calling this Connector
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|15 col 6| exported type SubscriptionSource should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|33 col 1| exported method UniformSubscriptionSource.Register should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|92 col 1| exported method UniformSubscriptionSource.Stop should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|97 col 42| method parameter registrationId should be registrationID
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|132 col 1| exported method FixedSubscriptionSource.Start should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|141 col 1| exported method FixedSubscriptionSource.Register should have comment or be unexported
pkg/sdk/connector/subscriptionsource/subscriptionsource.go|145 col 1| exported method FixedSubscriptionSource.Stop should have comment or be unexported
pkg/sdk/connector/types/types.go|7 col 6| exported type RegistrationData should have comment or be unexported
pkg/sdk/connector/types/types.go|9 col 6| exported type AdditionalSubscriptionData should have comment or be unexported
pkg/sdk/connector/types/types.go|13 col 6| exported type EventUpdate should have comment or be unexported
pkg/sdk/connector/types/types.go|18 col 6| exported type EventUpdateMetaData should have comment or be unexported
pkg/sdk/connector/types/types.go|22 col 6| exported type EventSenderKeyType should have comment or be unexported
pkg/sdk/connector/types/types.go|24 col 5| exported var EventSenderKey should have comment or be unexported
pkg/sdk/connector/types/types.go|26 col 6| exported type EventSender should have comment or be unexported
pkg/sdk/example/handler.go|10 col 6| exported type GreetingsHandler should have comment or be unexported
pkg/sdk/example/handler.go|13 col 6| exported type GreetingTriggeredData should have comment or be unexported
pkg/sdk/example/handler.go|18 col 6| exported type GreetingFinishedData should have comment or be unexported
pkg/sdk/example/handler.go|23 col 1| exported function NewGreetingsHandler should have comment or be unexported
pkg/sdk/example/handler.go|27 col 1| exported method GreetingsHandler.Execute should have comment or be unexported
pkg/sdk/internal/api/client.go|48 col 1| exported method OAuthClientGetter.Get should have comment or be unexported
pkg/sdk/internal/api/client.go|98 col 1| exported method SimpleClientGetter.Get should have comment or be unexported
pkg/sdk/internal/api/initializer.go|18 col 1| exported function CreateKeptnAPI should have comment or be unexported
pkg/sdk/internal/config/config.go|10 col 6| exported type EnvConfig should have comment or be unexported
pkg/sdk/internal/config/config.go|33 col 6| exported type ConnectionType should have comment or be unexported
pkg/sdk/internal/config/config.go|36 col 2| exported const DefaultAPIProxyHTTPTimeout should have comment (or a comment on this block) or be unexported
pkg/sdk/internal/config/config.go|41 col 1| exported function NewEnvConfig should have comment or be unexported
pkg/sdk/internal/config/config.go|49 col 1| exported method EnvConfig.OAuthEnabled should have comment or be unexported
pkg/sdk/internal/config/config.go|56 col 1| exported method EnvConfig.GetAPIProxyHTTPTimeout should have comment or be unexported
pkg/sdk/internal/config/config.go|64 col 1| exported method EnvConfig.PubSubConnectionType should have comment or be unexported
return a | ||
} | ||
|
||
func (ea *HTTPEventAPI) Send(e models.KeptnContextExtendedCE) 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 method HTTPEventAPI.Send should have comment or be unexported
return err | ||
} | ||
|
||
func (ea *HTTPEventAPI) Get(filter api.EventFilter) (events []*models.KeptnContextExtendedCE, err 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 method HTTPEventAPI.Get should have comment or be unexported
"time" | ||
) | ||
|
||
var ErrMaxPollRetriesExceeded = errors.New("maximum retries for polling event api exceeded") |
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 var ErrMaxPollRetriesExceeded should have comment or be unexported
return e | ||
} | ||
|
||
type HTTPEventSource struct { |
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 type HTTPEventSource should have comment or be unexported
return e | ||
} | ||
|
||
type HTTPEventSource struct { |
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 🐶
type name will be used as http.HTTPEventSource by other packages, and that stutters; consider calling this EventSource
|
||
import "github.com/keptn/go-utils/pkg/api/models" | ||
|
||
type UniformAPIMock struct { |
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 type UniformAPIMock should have comment or be unexported
PingFn func(string) (*models.Integration, error) | ||
} | ||
|
||
func (m *UniformAPIMock) Ping(integrationID string) (*models.Integration, 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 method UniformAPIMock.Ping should have comment or be unexported
} | ||
panic("Ping() not implemented") | ||
} | ||
func (m *UniformAPIMock) RegisterIntegration(integration models.Integration) (string, 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 method UniformAPIMock.RegisterIntegration should have comment or be unexported
panic("RegisterIntegraiton() not imiplemented") | ||
} | ||
|
||
func (m *UniformAPIMock) CreateSubscription(integrationID string, subscription models.EventSubscription) (string, 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 method UniformAPIMock.CreateSubscription should have comment or be unexported
panic("implement me") | ||
} | ||
|
||
func (m *UniformAPIMock) UnregisterIntegration(integrationID string) 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 method UniformAPIMock.UnregisterIntegration should have comment or be unexported
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golint
pkg/sdk/connector/types/types.go|18 col 6| exported type EventUpdateMetaData should have comment or be unexported
pkg/sdk/connector/types/types.go|22 col 6| exported type EventSenderKeyType should have comment or be unexported
pkg/sdk/connector/types/types.go|24 col 5| exported var EventSenderKey should have comment or be unexported
pkg/sdk/connector/types/types.go|26 col 6| exported type EventSender should have comment or be unexported
pkg/sdk/example/handler.go|10 col 6| exported type GreetingsHandler should have comment or be unexported
pkg/sdk/example/handler.go|13 col 6| exported type GreetingTriggeredData should have comment or be unexported
pkg/sdk/example/handler.go|18 col 6| exported type GreetingFinishedData should have comment or be unexported
pkg/sdk/example/handler.go|23 col 1| exported function NewGreetingsHandler should have comment or be unexported
pkg/sdk/example/handler.go|27 col 1| exported method GreetingsHandler.Execute should have comment or be unexported
pkg/sdk/internal/api/client.go|48 col 1| exported method OAuthClientGetter.Get should have comment or be unexported
pkg/sdk/internal/api/client.go|98 col 1| exported method SimpleClientGetter.Get should have comment or be unexported
pkg/sdk/internal/api/initializer.go|18 col 1| exported function CreateKeptnAPI should have comment or be unexported
pkg/sdk/internal/config/config.go|10 col 6| exported type EnvConfig should have comment or be unexported
pkg/sdk/internal/config/config.go|33 col 6| exported type ConnectionType should have comment or be unexported
pkg/sdk/internal/config/config.go|36 col 2| exported const DefaultAPIProxyHTTPTimeout should have comment (or a comment on this block) or be unexported
pkg/sdk/internal/config/config.go|41 col 1| exported function NewEnvConfig should have comment or be unexported
pkg/sdk/internal/config/config.go|49 col 1| exported method EnvConfig.OAuthEnabled should have comment or be unexported
pkg/sdk/internal/config/config.go|56 col 1| exported method EnvConfig.GetAPIProxyHTTPTimeout should have comment or be unexported
pkg/sdk/internal/config/config.go|64 col 1| exported method EnvConfig.PubSubConnectionType should have comment or be unexported
panic("implement me") | ||
} | ||
|
||
func (m *UniformAPIMock) GetRegistrations() ([]*models.Integration, 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 method UniformAPIMock.GetRegistrations should have comment or be unexported
//go:generate moq -pkg fake -skip-ensure -out ./fake/logapi.go . logAPI:LogAPIMock | ||
type logAPI api.LogsV1Interface | ||
|
||
type LogForwarder interface { |
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 type LogForwarder should have comment or be unexported
|
||
var _ LogForwarder = LogForwardingHandler{} | ||
|
||
type LogForwardingHandler struct { |
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 type LogForwardingHandler should have comment or be unexported
var _ LogForwarder = LogForwardingHandler{} | ||
|
||
type LogForwardingHandler struct { | ||
logApi api.LogsV1Interface |
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 🐶
struct field logApi should be logAPI
logger logger.Logger | ||
} | ||
|
||
func New(logApi api.LogsV1Interface, opts ...func(handler *LogForwardingHandler)) *LogForwardingHandler { |
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 New should have comment or be unexported
return nil | ||
} | ||
|
||
func (s FixedSubscriptionSource) Register(integration models.Integration) (string, 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 method FixedSubscriptionSource.Register should have comment or be unexported
return "", nil | ||
} | ||
|
||
func (s FixedSubscriptionSource) Stop() 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 method FixedSubscriptionSource.Stop should have comment or be unexported
"github.com/keptn/go-utils/pkg/api/models" | ||
) | ||
|
||
type RegistrationData models.Integration |
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 type RegistrationData should have comment or be unexported
|
||
type RegistrationData models.Integration | ||
|
||
type AdditionalSubscriptionData struct { |
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 type AdditionalSubscriptionData should have comment or be unexported
SubscriptionID string `json:"subscriptionID"` | ||
} | ||
|
||
type EventUpdate struct { |
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 type EventUpdate should have comment or be unexported
No description provided.