Skip to content
New issue

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

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

Already on GitHub? # to your account

REST Client shoud implement an client interface #447

Closed
2 of 4 tasks
hsanjuan opened this issue Jun 1, 2018 · 5 comments
Closed
2 of 4 tasks

REST Client shoud implement an client interface #447

hsanjuan opened this issue Jun 1, 2018 · 5 comments
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up

Comments

@hsanjuan
Copy link
Collaborator

hsanjuan commented Jun 1, 2018

Basic information

  • Type (mark as appropiate):
    • Bug
    • Feature request
    • Enhancement

Description

Our api/rest/ module should provide an interface to be implemented by API Clients (perhaps as separate api/rest/client_interface module. The api/rest/client client should be an implementation of that interface.

@hsanjuan hsanjuan added help wanted Seeking public contribution on this issue exp/novice Someone with a little familiarity can pick up status/ready Ready to be worked P2 Medium: Good to have, but can wait until someone steps up labels Jun 1, 2018
@hsanjuan hsanjuan added the kind/enhancement A net-new feature or improvement to an existing feature label Jun 1, 2018
@AT1452
Copy link

AT1452 commented Jul 19, 2018

How can I help? Any specifications I should follow?

@hsanjuan
Copy link
Collaborator Author

The spec is the current api/rest/client module. It should implement an interface (which matches the methods it exposes). We just need to write that interface (which is just made from the public methods of the client).

@AT1452
Copy link

AT1452 commented Jul 20, 2018

@hsanjuan I'm thinking of starting with a simple HTTP wireframe, is that alright?

@hsanjuan
Copy link
Collaborator Author

hsanjuan commented Jul 20, 2018

@AT1452 I think you are misunderstanding.

Currently there is a Client, which just has some methods but is not implementing any interface. I just want to have an interface which is fulfilled by this Client. For example, the Client has:

func (c *Client) ID() (api.ID, error) { .. }

So we want an interface:

type ClientIface interface {
...
ID() (api.ID, error)
...
}

This issue is about just writing that interface (and then using it in a couple of places, instead of the concrete Client implementation).

@hsanjuan
Copy link
Collaborator Author

Fixed by #523

@ghost ghost removed the status/ready Ready to be worked label Sep 28, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up
Projects
None yet
Development

No branches or pull requests

2 participants