Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

pkg/assets: cleanup exported API #936

Merged
merged 6 commits into from
Oct 12, 2020
Merged

Conversation

invidian
Copy link
Member

@invidian invidian commented Sep 10, 2020

Includes commits from #935

This PR finishes cleaning up API of pkg/assets package, so end result is, that only exported function we have is Extract().

See commit messages for more details.

Closes #796

@invidian invidian force-pushed the invidian/simplify-assets-handling branch 3 times, most recently from 79dc14e to 61e80dd Compare September 14, 2020 04:28
@invidian invidian added the kind/cleanup Cleanup issues label Sep 14, 2020
@invidian invidian force-pushed the invidian/simplify-assets-handling branch from 61e80dd to 2db4d4d Compare September 15, 2020 14:33
@invidian
Copy link
Member Author

ping @surajssd @johananl

@invidian invidian requested review from iaguis and removed request for surajssd September 21, 2020 07:32
surajssd
surajssd previously approved these changes Sep 23, 2020
Copy link
Member

@surajssd surajssd left a comment

Choose a reason for hiding this comment

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

LGTM, can you rebase on latest master and trigger the CI again before merging?

So API of pkg/assets can be simplified.

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
To ensure, that all files are only readable by the active user, as they
may contain secrets.

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
This function is an internal detail of assets package and should not be
part of the API for other packages. As it is not used externally
anymore, we can unexport this function.

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
As Extract() function is the only one which accesses Assets variable, we
can convert it to unexported function.

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
FLUO component was the last user of it and it is not used anymore, so it
can be removed.

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
This commit revamps pkg/assets to use unexported types where possible,
so now exported API of assets package is just Extract() function.

Closes #796

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
@invidian
Copy link
Member Author

Ping @johananl

Copy link
Member

@surajssd surajssd left a comment

Choose a reason for hiding this comment

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

looks ok

@invidian invidian merged commit 79f13f7 into master Oct 12, 2020
@invidian invidian deleted the invidian/simplify-assets-handling branch October 12, 2020 19:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/cleanup Cleanup issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Revamp assets API
3 participants