Checking in cmd files | first attempt at linking up item service

This commit is contained in:
Brandon Watson
2023-08-13 19:26:45 -05:00
parent fd45b9e0f2
commit 98796d96fd
26 changed files with 1448 additions and 66 deletions

View File

@ -0,0 +1,39 @@
package main
import (
cli "crossnokaye-interview-assignment/services/front/gen/http/cli/front"
"net/http"
"time"
goahttp "goa.design/goa/v3/http"
goa "goa.design/goa/v3/pkg"
)
func doHTTP(scheme, host string, timeout int, debug bool) (goa.Endpoint, any, error) {
var (
doer goahttp.Doer
)
{
doer = &http.Client{Timeout: time.Duration(timeout) * time.Second}
if debug {
doer = goahttp.NewDebugDoer(doer)
}
}
return cli.ParseEndpoint(
scheme,
host,
doer,
goahttp.RequestEncoder,
goahttp.ResponseDecoder,
debug,
)
}
func httpUsageCommands() string {
return cli.UsageCommands()
}
func httpUsageExamples() string {
return cli.UsageExamples()
}