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

Modularize API token management in GRAPPA drivers #1562

Closed
ishank011 opened this issue Mar 17, 2021 · 4 comments · Fixed by #1574
Closed

Modularize API token management in GRAPPA drivers #1562

ishank011 opened this issue Mar 17, 2021 · 4 comments · Fixed by #1574
Assignees
Labels
junior-job Easy issues

Comments

@ishank011
Copy link
Contributor

https://github.com/cs3org/reva/tree/master/pkg/cbox/group/rest and https://github.com/cs3org/reva/tree/master/pkg/cbox/user/rest have a lot of overlapping code which can be reused.

@ishank011 ishank011 added the junior-job Easy issues label Mar 17, 2021
@jimil749
Copy link
Contributor

Hi @ishank011! I would like to work on this, if that's fine. So I suppose, we are to move out duplicated methods out of user/rest.go and group/rest.go into a separate file to prevent duplication?

@ishank011
Copy link
Contributor Author

Hi @jimil749! Yep, that's precisely it. cbox has a utils package so you can move these there or create a separate one.

@jimil749
Copy link
Contributor

@ishank011 I had a question. Since we have the manager struct and its methods repeated in the user and group package, do I need to move the entire manager struct (which will then implement both user.Manager and group.Manager interface) and its methods into the utils package and then call those methods from the respective packages i.e user/rest and group/rest?

@ishank011
Copy link
Contributor Author

Having the same struct implement both the interfaces won't be a good idea as the interface methods are totally different. Let's keep them separate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
junior-job Easy issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants