fronted + nats

nats
Paulo Simão 2021-11-13 16:30:02 -03:00
parent 581b4def8a
commit c79c476473
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,29 @@
package frontend
import "go.digitalcircle.com.br/open/replaycli-go/api"
type Cli struct {
}
type HttpRes struct {
Headers map[string]string
Body []byte
}
type HttpReq struct {
Url string
Headers map[string]string
Body []byte
}
func (c *Cli) Get(req *HttpReq, copts ...*api.CallOpts) (*HttpRes, error) {
res := &HttpRes{}
//err := c.HttpCli().JsonPost("/ipc/ocr/", opts, res)
err := api.Call("ocr.ocr", req, &res, copts...)
return res, err
}
func NewCli() *Cli {
ret := &Cli{}
return ret
}

12
api/http/lib.go 100644
View File

@ -0,0 +1,12 @@
package http
type HttpRes struct {
Headers map[string]string
Body []byte
}
type HttpReq struct {
Url string
Headers map[string]string
Body []byte
}