aicra/api/context.go

18 lines
441 B
Go
Raw Permalink Normal View History

2021-04-18 16:14:30 +00:00
package api
import (
"net/http"
)
// Ctx contains additional information for handlers
//
// usually input/output arguments built by aicra are sufficient
// but the Ctx lets you manage your request from scratch if required
//
// If required, set api.Ctx as the first argument of your handler; if you
// don't need it, only use standard input arguments and it will be ignored
type Ctx struct {
2021-04-18 17:31:40 +00:00
Res http.ResponseWriter
Req *http.Request
2021-04-18 16:14:30 +00:00
}