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

[Stash] Implement user service operations #101

Merged
merged 1 commit into from
Sep 13, 2021

Conversation

souleb
Copy link
Member

@souleb souleb commented Sep 10, 2021

UserService permits retrieving indivudual users and listing them.

Signed-off-by: Soule BA soule@weave.works

Description

This add the client service UserService to communicate with the following rest endpoints:
/rest/api/1.0/users
/rest/api/1.0/users/{userSlug}

It is used here, in the current implementation to list and get users

A small change to http client as well to hide the dependency to retryablehttp.

Test results

https://github.com/souleb/go-git-providers/actions/runs/1220830834
https://github.com/souleb/go-git-providers/runs/3564757557?check_suite_focus=true

@souleb souleb force-pushed the go-stash-user-service branch 2 times, most recently from 9f0d422 to 75b64aa Compare September 10, 2021 13:28
go-stash/resources.go Outdated Show resolved Hide resolved
go-stash/client.go Show resolved Hide resolved
go-stash/users_test.go Show resolved Hide resolved
go-stash/users.go Outdated Show resolved Hide resolved
@souleb souleb force-pushed the go-stash-user-service branch 4 times, most recently from 87a1a02 to 9485b71 Compare September 13, 2021 09:07
@souleb souleb mentioned this pull request Sep 13, 2021
13 tasks
@stefanprodan stefanprodan changed the title adds first service to the gostash client [stash] Implement user service operations Sep 13, 2021
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @souleb 🥇

Copy link
Collaborator

@yiannistri yiannistri left a comment

Choose a reason for hiding this comment

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

Just a couple of typos but overall looks good, thanks @souleb 👌

go-stash/client.go Show resolved Hide resolved
go-stash/client.go Outdated Show resolved Hide resolved
go-stash/client.go Outdated Show resolved Hide resolved
UserService permits retrieving indivudual users and listing them.

Signed-off-by: Soule BA <soule@weave.works>
@stefanprodan stefanprodan merged commit bc27240 into fluxcd:main Sep 13, 2021
@souleb souleb changed the title [stash] Implement user service operations [Stash] Implement user service operations Sep 13, 2021
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.

None yet

3 participants