refactor: added more implementation details
This commit is contained in:
parent
50e6b53091
commit
a1a9c6407f
6 changed files with 86 additions and 4 deletions
27
pkg/client/client.go
Normal file
27
pkg/client/client.go
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package client
|
||||
|
||||
import "net/http"
|
||||
|
||||
type HTTPBody []byte
|
||||
type HTTPHeader map[string]string
|
||||
type HTTPEnvelope struct {
|
||||
Path string
|
||||
Method string
|
||||
Header HTTPHeader
|
||||
Body HTTPBody
|
||||
CACert string
|
||||
}
|
||||
|
||||
type Client struct {
|
||||
BaseURI string
|
||||
}
|
||||
|
||||
func New(uri string) Client {
|
||||
return Client{
|
||||
BaseURI: uri,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Client) MakeRequest(env HTTPEnvelope) (*http.Response, []byte, error) {
|
||||
http.DefaultTransport.(*http.Transport)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue