Adding sample auth code that will most likely change and api implementation
Signed-off-by: Kris Nóva <kris@nivenly.com>
This commit is contained in:
parent
ef15a0ac15
commit
95794522e0
7 changed files with 279 additions and 278 deletions
|
@ -0,0 +1,21 @@
|
|||
package api
|
||||
|
||||
import "net/http"
|
||||
|
||||
type Meta struct {
|
||||
requested bool
|
||||
response *http.Response
|
||||
}
|
||||
|
||||
// TODO We need an http.Client and an object interface{}
|
||||
func (m *Meta) Request() error {
|
||||
m.requested = true
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Meta) Response() *http.Response {
|
||||
if !m.requested {
|
||||
return nil
|
||||
}
|
||||
return m.response
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue