Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

chore: enhance configuration of APISet #378

Merged
merged 2 commits into from
Jan 24, 2022
Merged

Conversation

warber
Copy link
Contributor

@warber warber commented Jan 21, 2022

This PR enhances the configuration of an APISet.
Previously the constructor method for an APISet had quite some arguments which all needed to be passed by the user:

apiutils.NewAPISet(baseURL, authToken, authHeader, client, scheme)

Now, the only required argument to pass is baseURL. Additionally the constructor method was renamed to just New()

apiutils.New(baseURL)

The equivalent way of creating a APISet like above would be:

apiutils.New(baseURL, WithAuthToken(authToken),WithClient(client))

❗ Note that this API is not yet released and is only used in CLI so far, for which a follow-up PR will be made.

bacherfl
bacherfl previously approved these changes Jan 21, 2022
Signed-off-by: warber <[email protected]>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@warber
Copy link
Contributor Author

warber commented Jan 21, 2022

PR for adaptations in the CLI: keptn/keptn#6655

@warber warber merged commit d68990e into master Jan 24, 2022
@warber warber deleted the feature/enhance-api-set branch January 24, 2022 08:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants