Documentation
¶
Index ¶
- Constants
- type Cookie
- type Ctx
- func (ctx *Ctx) Accepts(offers ...string) string
- func (ctx *Ctx) AcceptsCharsets(offers ...string) string
- func (ctx *Ctx) AcceptsEncodings(offers ...string) string
- func (ctx *Ctx) AcceptsLanguages(offers ...string) string
- func (ctx *Ctx) Append(field string, values ...string)
- func (ctx *Ctx) Attachment(name ...string)
- func (ctx *Ctx) BaseURL() string
- func (ctx *Ctx) BasicAuth() (user, pass string, ok bool)
- func (ctx *Ctx) Body(args ...interface{}) string
- func (ctx *Ctx) ClearCookie(name ...string)
- func (ctx *Ctx) Cookie(key, value string, options ...interface{})
- func (ctx *Ctx) Cookies(args ...interface{}) string
- func (ctx *Ctx) Download(file string, name ...string)
- func (ctx *Ctx) End()
- func (ctx *Ctx) FormFile(key string) (*multipart.FileHeader, error)
- func (ctx *Ctx) FormValue(key string) string
- func (ctx *Ctx) Format(args ...interface{})
- func (ctx *Ctx) Fresh() bool
- func (ctx *Ctx) Get(key string) string
- func (ctx *Ctx) HeadersSent()
- func (ctx *Ctx) Hostname() string
- func (ctx *Ctx) IP() string
- func (ctx *Ctx) IPs() []string
- func (ctx *Ctx) Ip() string
- func (ctx *Ctx) Ips() []string
- func (ctx *Ctx) Is(ext string) bool
- func (ctx *Ctx) JSON(v interface{}) error
- func (ctx *Ctx) JSONBytes(raw []byte)
- func (ctx *Ctx) JSONP(v interface{}, cb ...string) error
- func (ctx *Ctx) JSONString(raw string)
- func (ctx *Ctx) Json(v interface{}) error
- func (ctx *Ctx) JsonBytes(raw []byte)
- func (ctx *Ctx) JsonString(raw string)
- func (ctx *Ctx) Jsonp(v interface{}, cb ...string) error
- func (ctx *Ctx) Links(link ...string)
- func (ctx *Ctx) Locals(key string, val ...interface{}) interface{}
- func (ctx *Ctx) Location(path string)
- func (ctx *Ctx) Method() string
- func (ctx *Ctx) MultipartForm() (*multipart.Form, error)
- func (ctx *Ctx) Next()
- func (ctx *Ctx) OriginalURL() string
- func (ctx *Ctx) OriginalUrl() string
- func (ctx *Ctx) Params(key string) string
- func (ctx *Ctx) Path() string
- func (ctx *Ctx) Protocol() string
- func (ctx *Ctx) Query(key string) string
- func (ctx *Ctx) Range()
- func (ctx *Ctx) Redirect(path string, status ...int)
- func (ctx *Ctx) Render()
- func (ctx *Ctx) Route() *Route
- func (ctx *Ctx) SaveFile(fh *multipart.FileHeader, path string) error
- func (ctx *Ctx) Secure() bool
- func (ctx *Ctx) Send(args ...interface{})
- func (ctx *Ctx) SendBytes(body []byte)
- func (ctx *Ctx) SendFile(file string, gzip ...bool)
- func (ctx *Ctx) SendStatus(status int)
- func (ctx *Ctx) SendString(body string)
- func (ctx *Ctx) Set(key string, val string)
- func (ctx *Ctx) SignedCookies()
- func (ctx *Ctx) Stale() bool
- func (ctx *Ctx) Status(status int) *Ctx
- func (ctx *Ctx) Subdomains() (subs []string)
- func (ctx *Ctx) Type(ext string) *Ctx
- func (ctx *Ctx) Vary(fields ...string)
- func (ctx *Ctx) Write(args ...interface{})
- func (ctx *Ctx) XHR() bool
- func (ctx *Ctx) XML(v interface{}) error
- func (ctx *Ctx) Xhr() bool
- func (ctx *Ctx) Xml(v interface{}) error
- type Fiber
- func (r *Fiber) All(args ...interface{})
- func (r *Fiber) Connect(args ...interface{})
- func (r *Fiber) Delete(args ...interface{})
- func (r *Fiber) FakeRequest(raw string) (string, error)
- func (r *Fiber) Get(args ...interface{})
- func (r *Fiber) Head(args ...interface{})
- func (r *Fiber) Listen(address interface{}, tls ...string)
- func (r *Fiber) Options(args ...interface{})
- func (r *Fiber) Patch(args ...interface{})
- func (r *Fiber) Post(args ...interface{})
- func (r *Fiber) Put(args ...interface{})
- func (r *Fiber) Static(args ...string)
- func (r *Fiber) Trace(args ...interface{})
- func (r *Fiber) Use(args ...interface{})
- type Route
Constants ¶
const (
// Version : Fiber version
Version = "1.3.3"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cookie ¶
type Cookie struct { Expire int // time.Unix(1578981376, 0) MaxAge int Domain string Path string HTTPOnly bool Secure bool SameSite string }
Cookie : struct
type Ctx ¶
type Ctx struct { Fasthttp *fasthttp.RequestCtx // contains filtered or unexported fields }
Ctx : struct
func (*Ctx) Accepts ¶
Accepts : https://gofiber.github.io/fiber/#/context?id=accepts
func (*Ctx) AcceptsCharsets ¶
AcceptsCharsets : https://gofiber.github.io/fiber/#/context?id=acceptscharsets
func (*Ctx) AcceptsEncodings ¶
AcceptsEncodings : https://gofiber.github.io/fiber/#/context?id=acceptsencodings
func (*Ctx) AcceptsLanguages ¶
AcceptsLanguages : https://gofiber.github.io/fiber/#/context?id=acceptslanguages
func (*Ctx) Append ¶
Append : https://gofiber.github.io/fiber/#/context?id=append
func (*Ctx) Attachment ¶
Attachment : https://gofiber.github.io/fiber/#/context?id=attachment
func (*Ctx) BaseURL ¶ added in v1.0.0
BaseURL : https://gofiber.github.io/fiber/#/context?id=baseurl
func (*Ctx) BasicAuth ¶
BasicAuth : https://gofiber.github.io/fiber/#/context?id=basicauth
func (*Ctx) ClearCookie ¶
ClearCookie : https://gofiber.github.io/fiber/#/context?id=clearcookie
func (*Ctx) Cookie ¶
Cookie : https://gofiber.github.io/fiber/#/context?id=cookie
func (*Ctx) Cookies ¶
Cookies : https://gofiber.github.io/fiber/#/context?id=cookies
func (*Ctx) Download ¶
Download : https://gofiber.github.io/fiber/#/context?id=download
func (*Ctx) FormFile ¶
func (ctx *Ctx) FormFile(key string) (*multipart.FileHeader, error)
FormFile : https://gofiber.github.io/fiber/#/context?id=formfile
func (*Ctx) FormValue ¶
FormValue : https://gofiber.github.io/fiber/#/context?id=formvalue
func (*Ctx) Format ¶
func (ctx *Ctx) Format(args ...interface{})
Format : https://gofiber.github.io/fiber/#/context?id=format
func (*Ctx) HeadersSent ¶
func (ctx *Ctx) HeadersSent()
HeadersSent : https://gofiber.github.io/fiber/#/context?id=headerssent
func (*Ctx) Hostname ¶
Hostname : https://gofiber.github.io/fiber/#/context?id=hostname
func (*Ctx) JSONBytes ¶ added in v1.3.1
JSONBytes : https://gofiber.github.io/fiber/#/context?id=jsonbytes
func (*Ctx) JSONString ¶ added in v1.3.1
JSONString : https://gofiber.github.io/fiber/#/context?id=jsonstring
func (*Ctx) JsonBytes ¶ added in v1.2.3
JsonBytes is deprecated, this will be removed in v2: Use c.JSONBytes() instead
func (*Ctx) JsonString ¶ added in v1.2.3
JsonString is deprecated, this will be removed in v2: Use c.JSONString() instead
func (*Ctx) Locals ¶
Locals : https://gofiber.github.io/fiber/#/context?id=locals
func (*Ctx) Location ¶
Location : https://gofiber.github.io/fiber/#/context?id=location
func (*Ctx) Method ¶
Method : https://gofiber.github.io/fiber/#/context?id=method
func (*Ctx) MultipartForm ¶
MultipartForm : https://gofiber.github.io/fiber/#/context?id=multipartform
func (*Ctx) OriginalURL ¶ added in v1.0.0
OriginalURL : https://gofiber.github.io/fiber/#/context?id=originalurl
func (*Ctx) OriginalUrl ¶
OriginalUrl is deprecated, this will be removed in v2: Use c.OriginalURL() instead
func (*Ctx) Params ¶
Params : https://gofiber.github.io/fiber/#/context?id=params
func (*Ctx) Protocol ¶
Protocol : https://gofiber.github.io/fiber/#/context?id=protocol
func (*Ctx) Redirect ¶
Redirect : https://gofiber.github.io/fiber/#/context?id=redirect
func (*Ctx) Render ¶
func (ctx *Ctx) Render()
Render : https://gofiber.github.io/fiber/#/context?id=render
func (*Ctx) SaveFile ¶ added in v1.0.0
func (ctx *Ctx) SaveFile(fh *multipart.FileHeader, path string) error
SaveFile : https://gofiber.github.io/fiber/#/context?id=secure
func (*Ctx) Secure ¶
Secure : https://gofiber.github.io/fiber/#/context?id=secure
func (*Ctx) SendBytes ¶
SendBytes : https://gofiber.github.io/fiber/#/context?id=sendbytes
func (*Ctx) SendFile ¶
SendFile : https://gofiber.github.io/fiber/#/context?id=sendfile
func (*Ctx) SendStatus ¶
SendStatus : https://gofiber.github.io/fiber/#/context?id=sendstatus
func (*Ctx) SendString ¶
SendString : https://gofiber.github.io/fiber/#/context?id=sendstring
func (*Ctx) SignedCookies ¶
func (ctx *Ctx) SignedCookies()
SignedCookies : https://gofiber.github.io/fiber/#/context?id=signedcookies
func (*Ctx) Status ¶
Status : https://gofiber.github.io/fiber/#/context?id=status
func (*Ctx) Subdomains ¶
Subdomains : https://gofiber.github.io/fiber/#/context?id=subdomains
type Fiber ¶
type Fiber struct { // Server name header Server string // Show fiber banner Banner bool // https://github.com/valyala/fasthttp/blob/master/server.go#L150 Engine *engine // https://www.nginx.com/blog/socket-sharding-nginx-release-1-9-1/ Prefork bool // contains filtered or unexported fields }
Fiber structure
func (*Fiber) Connect ¶
func (r *Fiber) Connect(args ...interface{})
Connect establishes a tunnel to the server identified by the target resource.
func (*Fiber) Delete ¶
func (r *Fiber) Delete(args ...interface{})
Delete deletes the specified resource.
func (*Fiber) FakeRequest ¶ added in v1.3.4
FakeRequest creates a readWriter and calls ServeConn on local servver
func (*Fiber) Get ¶
func (r *Fiber) Get(args ...interface{})
Get requests a representation of the specified resource. Requests using GET should only retrieve data.
func (*Fiber) Head ¶
func (r *Fiber) Head(args ...interface{})
Head asks for a response identical to that of a GET request, but without the response body.
func (*Fiber) Listen ¶
Listen : https://gofiber.github.io/fiber/#/application?id=listen
func (*Fiber) Options ¶
func (r *Fiber) Options(args ...interface{})
Options is used to describe the communication options for the target resource.
func (*Fiber) Patch ¶
func (r *Fiber) Patch(args ...interface{})
Patch is used to apply partial modifications to a resource.
func (*Fiber) Post ¶
func (r *Fiber) Post(args ...interface{})
Post is used to submit an entity to the specified resource, often causing a change in state or side effects on the server.
func (*Fiber) Put ¶
func (r *Fiber) Put(args ...interface{})
Put replaces all current representations of the target resource with the request payload.
func (*Fiber) Static ¶
Static https://gofiber.github.io/fiber/#/application?id=static
type Route ¶ added in v1.0.0
type Route struct { // HTTP method in uppercase, can be a * for Use() & All() Method string // Stores the original path Path string // Bool that defines if the route is a Use() middleware Midware bool // wildcard bool is for routes without a path, * and /* Wildcard bool // Stores compiled regex special routes :params, *wildcards, optionals? Regex *regexp.Regexp // Store params if special routes :params, *wildcards, optionals? Params []string // Callback function for specific route Handler func(*Ctx) }
Route : struct