Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(exp): add actionutil.AllForResource #522

Closed
wants to merge 1 commit into from

Conversation

jooola
Copy link
Member

@jooola jooola commented Aug 28, 2024

Allow the users to fetch actions related to a specific resource.

This may be used as follows:

actions, err := actionutil.AllForResource(ctx,
	client.Firewall.Action,
	hcloud.ActionListOpts{Status: []hcloud.ActionStatus{hcloud.ActionStatusRunning}},
	hcloud.ActionResourceTypeServer, server.ID,
)
if err != nil {
	return err
}
if err := client.Action.WaitFor(ctx, actions...); err != nil {
	return err
}

Allow the users to fetch actions related to a specific resource.
Copy link

codecov bot commented Aug 28, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 71.47%. Comparing base (743eabb) to head (824cb91).
Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
hcloud/exp/actionutil/actions.go 77.77% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #522      +/-   ##
==========================================
+ Coverage   71.46%   71.47%   +0.01%     
==========================================
  Files          46       46              
  Lines        3935     3944       +9     
==========================================
+ Hits         2812     2819       +7     
- Misses        710      711       +1     
- Partials      413      414       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@jooola
Copy link
Member Author

jooola commented Aug 28, 2024

@jooola jooola closed this Nov 22, 2024
@jooola jooola deleted the exp-add-ActionsForResource-to-actionutil branch November 22, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant