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:
Kris Nóva 2021-01-31 00:08:52 -08:00
parent ef15a0ac15
commit 95794522e0
7 changed files with 279 additions and 278 deletions

View file

@ -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
}