pulsar

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2025 License: MIT Imports: 10 Imported by: 0

README

stellar

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

func (*Context) BindJSON

func (c *Context) BindJSON(v interface{}) error

func (*Context) Cookie

func (c *Context) Cookie(name string) (*http.Cookie, error)

func (*Context) File

func (c *Context) File(status int, filepath string) error

func (*Context) GetHeader

func (c *Context) GetHeader(key string) string

func (*Context) GetValue

func (c *Context) GetValue(key interface{}) interface{}

func (*Context) HTML

func (c *Context) HTML(status int, html string) error

func (*Context) JSON

func (c *Context) JSON(status int, v interface{}) error

func (*Context) Param

func (c *Context) Param(name string) string

func (*Context) QueryParam

func (c *Context) QueryParam(name string) string

func (*Context) Request

func (c *Context) Request() *http.Request

func (*Context) Response added in v1.0.1

func (c *Context) Response() http.ResponseWriter

func (*Context) SetCookie

func (c *Context) SetCookie(cookie *http.Cookie)

func (*Context) SetHeader

func (c *Context) SetHeader(key, value string)

func (*Context) SetValue

func (c *Context) SetValue(key, value interface{})

func (*Context) Status

func (c *Context) Status(status int)

func (*Context) Text

func (c *Context) Text(status int, text string) error

func (*Context) XML

func (c *Context) XML(status int, v interface{}) error

type ErrorHandler

type ErrorHandler func(err error, ctx *Context) error

type Group

type Group struct {
	// contains filtered or unexported fields
}

func (*Group) DELETE

func (g *Group) DELETE(path string, h Handler, middlewares ...Middleware)

func (*Group) GET

func (g *Group) GET(path string, h Handler, middlewares ...Middleware)

func (*Group) Group

func (g *Group) Group(prefix string) *Group

func (*Group) HEAD

func (g *Group) HEAD(path string, h Handler, middlewares ...Middleware)

func (*Group) OPTIONS

func (g *Group) OPTIONS(path string, h Handler, middlewares ...Middleware)

func (*Group) PATCH

func (g *Group) PATCH(path string, h Handler, middlewares ...Middleware)

func (*Group) POST

func (g *Group) POST(path string, h Handler, middlewares ...Middleware)

func (*Group) PUT

func (g *Group) PUT(path string, h Handler, middlewares ...Middleware)

func (*Group) Use

func (g *Group) Use(middlewares ...Middleware)

type Handler

type Handler func(ctx *Context) error

type Json

type Json map[string]interface{}

type Middleware

type Middleware func(next Handler) Handler

type Pulsar

type Pulsar struct {
	// contains filtered or unexported fields
}

func New

func New() *Pulsar

func (*Pulsar) DELETE

func (p *Pulsar) DELETE(path string, h Handler, middlewares ...Middleware)

func (*Pulsar) GET

func (p *Pulsar) GET(path string, h Handler, middlewares ...Middleware)

func (*Pulsar) Group

func (p *Pulsar) Group(prefix string) *Group

func (*Pulsar) HEAD

func (p *Pulsar) HEAD(path string, h Handler, middlewares ...Middleware)

func (*Pulsar) OPTIONS

func (p *Pulsar) OPTIONS(path string, h Handler, middlewares ...Middleware)

func (*Pulsar) PATCH

func (p *Pulsar) PATCH(path string, h Handler, middlewares ...Middleware)

func (*Pulsar) POST

func (p *Pulsar) POST(path string, h Handler, middlewares ...Middleware)

func (*Pulsar) PUT

func (p *Pulsar) PUT(path string, h Handler, middlewares ...Middleware)

func (*Pulsar) Start

func (p *Pulsar) Start(listenAddr string) error

func (*Pulsar) Use

func (p *Pulsar) Use(middlewares ...Middleware)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL