Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion events/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,18 @@ type BasicAuth struct {
APISecret string `json:"apiSecret,omitempty"`
}

type RequestDoer interface {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type RequestDoer interface {
type HTTPDoer interface {

I would recommend naming specific to HTTP since the interface is just in the events package. This will help the developers.

Do(req *http.Request) (*http.Response, error)
}

// Configuration stores the configuration of the API client
type Configuration struct {
BasePath string `json:"basePath,omitempty"`
Host string `json:"host,omitempty"`
Scheme string `json:"scheme,omitempty"`
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
HTTPClient *http.Client
HTTPClient RequestDoer
}

// NewConfiguration returns a new Configuration object
Expand Down