Files
inventory-plus-plus/internal/site/response/response.go
T

26 lines
484 B
Go

package response
import (
"io"
"net/http"
"ruben/inventory2/internal/site/redirect"
)
type (
Response interface {
Status(int) Response
Redirect(code redirect.Code, to string) Response
Body(io.ReadCloser) 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
wrap(Response) Response
}
)