Documentation
¶
Overview ¶
Package sol Copyright 2025 wantnotshould. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.
Package sol Copyright 2025 wantnotshould. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.
Package sol Copyright 2025 wantnotshould. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.
Package sol Copyright 2025 wantnotshould. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.
Package sol Copyright 2025 wantnotshould. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.
Package sol Copyright 2025 wantnotshould. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.
Index ¶
- func ClientIP(r *http.Request) string
- type Context
- func (c *Context) Abort()
- func (c *Context) Context() context.Context
- func (c *Context) Cookie(name string) (string, error)
- func (c *Context) Delete(key string)
- func (c *Context) DeleteCookie(name string)
- func (c *Context) Get(key string) (any, bool)
- func (c *Context) GetString(key string) (string, bool)
- func (c *Context) HTML(status int, html string)
- func (c *Context) Header(key string) string
- func (c *Context) Host() string
- func (c *Context) IsAborted() bool
- func (c *Context) JSON(status int, obj any)
- func (c *Context) Method() string
- func (c *Context) Next()
- func (c *Context) Param(key string) string
- func (c *Context) Params() map[string]string
- func (c *Context) Path() string
- func (c *Context) QueryAll() url.Values
- func (c *Context) QueryParam(key string) string
- func (c *Context) Scheme() string
- func (c *Context) Set(key string, value any)
- func (c *Context) SetCookie(cookie *http.Cookie)
- func (c *Context) SetHeader(key, value string)
- func (c *Context) Status(code int)
- func (c *Context) String(status int, format string, values ...any)
- func (c *Context) URL() string
- func (c *Context) XML(status int, data map[string]string)
- type HandlerFunc
- type Sol
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
Request *http.Request
Writer http.ResponseWriter
// contains filtered or unexported fields
}
func (*Context) Cookie ¶
Cookie gets the value of a named cookie from the request. Returns empty string and error if not found.
func (*Context) DeleteCookie ¶
DeleteCookie removes a cookie by setting it to expired.
func (*Context) GetString ¶
GetString is a convenience wrapper to retrieve and assert a string value.
func (*Context) QueryParam ¶
QueryParam returns the first value for the named query parameter.
type HandlerFunc ¶
type HandlerFunc func(*Context)
func Logger ¶
func Logger() HandlerFunc
func Recover ¶
func Recover() HandlerFunc