Files
inventory-plus-plus/server/response/response.go
T
angel fb2f4255f4
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
Tests / Go tests (push) Failing after 15s
prototyped svg reports
2026-08-20 00:23:54 -06:00

42 lines
984 B
Go

package response
import (
"io"
"net/http"
"ruben/inventory2/server/redirect"
)
type (
Response interface {
Status(int) Response
HXPushURL(string) Response
HXLocation(string) Response
HXPushUrl(string) Response
HXRedirect(string) Response
HXRefresh(string) Response
HXReplaceUrl(string) Response
HXReswap(string) Response
HXRetarget(string) Response
HXReselect(string) Response
HXTrigger(string) Response
HXTriggerAfterSettle(string) Response
HXTriggerAfterSwap(string) Response
Redirect(code redirect.Code, to string) Response
Body(io.ReadCloser) Response
HTML([]byte) Response
HTMLReader(io.Reader) Response
JSON(any) Response
Cookie(http.Cookie) Response
GetStatus() (code int, ok bool)
getBody() (body io.ReadCloser, ok bool, err error)
GetRedirect() (code redirect.Code, to string, ok bool)
getCookies() []http.Cookie
getContentType() (contentType string, ok bool)
getHeaders() [][2]string
wrap(Response) Response
}
)