Documentation
¶
Index ¶
- type EmptyResponse
- type JsonResponse
- type RedirectResponse
- type Response
- type StringResponse
- type ViewResponse
- func (r *ViewResponse) AsBytes() []byte
- func (r *ViewResponse) AsString() string
- func (r *ViewResponse) Code() int
- func (r *ViewResponse) GetAllData() any
- func (r *ViewResponse) GetEngine() *view.Engine
- func (r *ViewResponse) Headers() *use.Collection[string, string]
- func (r *ViewResponse) WithCode(code int) *ViewResponse
- func (r *ViewResponse) WithData(data map[string]interface{}) *ViewResponse
- func (r *ViewResponse) WithHeader(key string, value string) *ViewResponse
- func (r *ViewResponse) WithLayout(layout string) *ViewResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmptyResponse ¶
type EmptyResponse struct {
// contains filtered or unexported fields
}
func Empty ¶
func Empty() *EmptyResponse
func (*EmptyResponse) AsBytes ¶
func (r *EmptyResponse) AsBytes() []byte
func (*EmptyResponse) WithCode ¶
func (r *EmptyResponse) WithCode(code int) *EmptyResponse
func (*EmptyResponse) WithHeader ¶
func (r *EmptyResponse) WithHeader(key string, value string) *EmptyResponse
type JsonResponse ¶
type JsonResponse struct {
// contains filtered or unexported fields
}
func Json ¶
func Json(obj interface{}) *JsonResponse
func (*JsonResponse) AsBytes ¶
func (r *JsonResponse) AsBytes() []byte
func (*JsonResponse) WithCode ¶
func (r *JsonResponse) WithCode(code int) *JsonResponse
func (*JsonResponse) WithHeader ¶
func (r *JsonResponse) WithHeader(key string, value string) *JsonResponse
type RedirectResponse ¶
type RedirectResponse struct { To string // contains filtered or unexported fields }
func Redirect ¶
func Redirect(to string) *RedirectResponse
func (*RedirectResponse) AsBytes ¶
func (r *RedirectResponse) AsBytes() []byte
func (*RedirectResponse) Headers ¶
func (r *RedirectResponse) Headers() *use.Collection[string, string]
func (*RedirectResponse) WithCode ¶
func (r *RedirectResponse) WithCode(code int) *RedirectResponse
type Response ¶
func NewResponse ¶
func NewResponse(arg interface{}) Response
type StringResponse ¶
type StringResponse struct {
// contains filtered or unexported fields
}
func String ¶
func String(body string) *StringResponse
func (*StringResponse) AsBytes ¶
func (r *StringResponse) AsBytes() []byte
func (*StringResponse) Headers ¶
func (r *StringResponse) Headers() *use.Collection[string, string]
func (*StringResponse) WithCode ¶
func (r *StringResponse) WithCode(code int) *StringResponse
type ViewResponse ¶
type ViewResponse struct {
// contains filtered or unexported fields
}
func View ¶
func View(template string) *ViewResponse
func (*ViewResponse) AsBytes ¶
func (r *ViewResponse) AsBytes() []byte
func (*ViewResponse) AsString ¶
func (r *ViewResponse) AsString() string
func (*ViewResponse) GetAllData ¶
func (r *ViewResponse) GetAllData() any
func (*ViewResponse) GetEngine ¶
func (r *ViewResponse) GetEngine() *view.Engine
func (*ViewResponse) WithCode ¶
func (r *ViewResponse) WithCode(code int) *ViewResponse
func (*ViewResponse) WithData ¶
func (r *ViewResponse) WithData(data map[string]interface{}) *ViewResponse
func (*ViewResponse) WithHeader ¶
func (r *ViewResponse) WithHeader(key string, value string) *ViewResponse
func (*ViewResponse) WithLayout ¶
func (r *ViewResponse) WithLayout(layout string) *ViewResponse
Click to show internal directories.
Click to hide internal directories.