http

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChiContext added in v1.0.5

func NewChiContext(request *http.Request, response http.ResponseWriter, config ChiConfig, n ...http.Handler) contracthttp.Context

func NewFiberContext added in v1.0.1

func NewFiberContext(ctx *fiber.Ctx) contracthttp.Context

func NewGinContext

func NewGinContext(ctx *gin.Context, config GinConfig) contracthttp.Context

Types

type Application

type Application struct {
}

func (*Application) Init

func (app *Application) Init()

type ChiConfig added in v1.0.8

type ChiConfig struct {
	NotFoundHandler         http.HandlerFunc
	MethodNotAllowedHandler http.HandlerFunc
	View                    *view.Engine
}

type ChiContext added in v1.0.5

type ChiContext struct {
	Req *http.Request
	Res http.ResponseWriter
	// contains filtered or unexported fields
}

func (*ChiContext) AbortWithStatus added in v1.0.5

func (c *ChiContext) AbortWithStatus(code int)

func (*ChiContext) Append added in v1.0.8

func (c *ChiContext) Append(field string, values ...string)

func (*ChiContext) Bind added in v1.0.5

func (c *ChiContext) Bind(obj interface{}) error

func (*ChiContext) Cookie added in v1.0.5

func (c *ChiContext) Cookie(co *contracthttp.Cookie)

func (*ChiContext) Cookies added in v1.0.5

func (c *ChiContext) Cookies(key string, defaultValue ...string) string

func (*ChiContext) Deadline added in v1.0.5

func (c *ChiContext) Deadline() (deadline time.Time, ok bool)

func (*ChiContext) Done added in v1.0.5

func (c *ChiContext) Done() <-chan struct{}

func (*ChiContext) Download added in v1.0.8

func (c *ChiContext) Download(filepath, filename string) error

func (*ChiContext) EngineContext added in v1.0.6

func (c *ChiContext) EngineContext() any

func (*ChiContext) Err added in v1.0.5

func (c *ChiContext) Err() error

func (*ChiContext) File added in v1.0.5

func (c *ChiContext) File(name string) (*multipart.FileHeader, error)

func (*ChiContext) Form added in v1.0.5

func (c *ChiContext) Form(key, defaultValue string) string

func (*ChiContext) FullUrl added in v1.0.5

func (c *ChiContext) FullUrl() string

func (*ChiContext) Header added in v1.0.5

func (c *ChiContext) Header(key, defaultValue string) string

func (*ChiContext) Headers added in v1.0.5

func (c *ChiContext) Headers() http.Header

func (*ChiContext) Ip added in v1.0.5

func (c *ChiContext) Ip() string

func (*ChiContext) Json added in v1.0.8

func (c *ChiContext) Json(code int, obj interface{}) error

func (*ChiContext) Method added in v1.0.5

func (c *ChiContext) Method() string

func (*ChiContext) Next added in v1.0.5

func (c *ChiContext) Next() error

func (*ChiContext) Origin added in v1.0.8

func (c *ChiContext) Origin() *http.Request

func (*ChiContext) Params added in v1.0.5

func (c *ChiContext) Params(key string) string

func (*ChiContext) Path added in v1.0.5

func (c *ChiContext) Path() string

func (*ChiContext) Query added in v1.0.5

func (c *ChiContext) Query(key, defaultValue string) string

func (*ChiContext) Render added in v1.0.8

func (c *ChiContext) Render(name string, bind any, layouts ...string) error

func (*ChiContext) SaveFile added in v1.0.8

func (c *ChiContext) SaveFile(name string, dst string) error

func (*ChiContext) Secure added in v1.0.5

func (c *ChiContext) Secure() bool

func (*ChiContext) SendFile added in v1.0.8

func (c *ChiContext) SendFile(filepath string, compress ...bool) error

func (*ChiContext) SetHeader added in v1.0.8

func (c *ChiContext) SetHeader(key, value string) contracthttp.Context

func (*ChiContext) StatusCode added in v1.0.8

func (c *ChiContext) StatusCode() int

func (*ChiContext) String added in v1.0.8

func (c *ChiContext) String(code int, format string, values ...interface{}) error

func (*ChiContext) Url added in v1.0.5

func (c *ChiContext) Url() string

func (*ChiContext) Value added in v1.0.5

func (c *ChiContext) Value(key interface{}) interface{}

func (*ChiContext) Vary added in v1.0.8

func (c *ChiContext) Vary(key string, value ...string)

func (*ChiContext) WithValue added in v1.0.5

func (c *ChiContext) WithValue(key string, value interface{})

type FiberContext added in v1.0.1

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

func (*FiberContext) AbortWithStatus added in v1.0.2

func (c *FiberContext) AbortWithStatus(code int)

func (*FiberContext) Bind added in v1.0.2

func (c *FiberContext) Bind(obj any) error

func (*FiberContext) Cookie added in v1.0.3

func (c *FiberContext) Cookie(co *contracthttp.Cookie)

func (*FiberContext) Cookies added in v1.0.3

func (c *FiberContext) Cookies(key string, defaultValue ...string) string

func (*FiberContext) Deadline added in v1.0.1

func (c *FiberContext) Deadline() (deadline time.Time, ok bool)

func (*FiberContext) Done added in v1.0.1

func (c *FiberContext) Done() <-chan struct{}

func (*FiberContext) Download added in v1.0.8

func (c *FiberContext) Download(filepath, filename string) error

func (*FiberContext) EngineContext added in v1.0.6

func (c *FiberContext) EngineContext() any

func (*FiberContext) Err added in v1.0.1

func (c *FiberContext) Err() error

func (*FiberContext) File added in v1.0.2

func (c *FiberContext) File(name string) (*multipart.FileHeader, error)

func (*FiberContext) Form added in v1.0.2

func (c *FiberContext) Form(key, defaultValue string) string

func (*FiberContext) FullUrl added in v1.0.2

func (c *FiberContext) FullUrl() string

func (*FiberContext) Header added in v1.0.2

func (c *FiberContext) Header(key, defaultValue string) string

func (*FiberContext) Headers added in v1.0.2

func (c *FiberContext) Headers() http.Header

func (*FiberContext) Ip added in v1.0.2

func (c *FiberContext) Ip() string

func (*FiberContext) Json added in v1.0.8

func (c *FiberContext) Json(code int, obj any) error

func (*FiberContext) Method added in v1.0.2

func (c *FiberContext) Method() string

func (*FiberContext) Next added in v1.0.2

func (c *FiberContext) Next() error

func (*FiberContext) Origin added in v1.0.8

func (c *FiberContext) Origin() *http.Request

func (*FiberContext) Params added in v1.0.2

func (c *FiberContext) Params(key string) string

func (*FiberContext) Path added in v1.0.2

func (c *FiberContext) Path() string

func (*FiberContext) Query added in v1.0.2

func (c *FiberContext) Query(key, defaultValue string) string

func (*FiberContext) Render added in v1.0.8

func (c *FiberContext) Render(name string, bind any, layouts ...string) error

func (*FiberContext) SaveFile added in v1.0.8

func (c *FiberContext) SaveFile(name string, dst string) error

func (*FiberContext) Secure added in v1.0.3

func (c *FiberContext) Secure() bool

func (*FiberContext) SendFile added in v1.0.8

func (c *FiberContext) SendFile(filepath string, compress ...bool) error

func (*FiberContext) SetHeader added in v1.0.8

func (c *FiberContext) SetHeader(key, value string) contracthttp.Context

func (*FiberContext) StatusCode added in v1.0.8

func (c *FiberContext) StatusCode() int

func (*FiberContext) String added in v1.0.8

func (c *FiberContext) String(code int, format string, values ...any) error

func (*FiberContext) Url added in v1.0.2

func (c *FiberContext) Url() string

func (*FiberContext) Value added in v1.0.1

func (c *FiberContext) Value(key any) any

func (*FiberContext) Vary added in v1.0.8

func (c *FiberContext) Vary(key string, value ...string)

func (*FiberContext) WithValue added in v1.0.1

func (c *FiberContext) WithValue(key string, value any)

type GinConfig added in v1.0.8

type GinConfig struct {
	Mode        string `json:"mode"`
	ViewsLayout string `json:"views_layout"`
	Extension   string `json:"extension"`
	Path        string `json:"path"`
	View        *view.Engine
}

type GinContext

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

func (*GinContext) AbortWithStatus added in v1.0.2

func (c *GinContext) AbortWithStatus(code int)

func (*GinContext) Append added in v1.0.8

func (c *GinContext) Append(field string, values ...string)

func (*GinContext) Bind added in v1.0.2

func (c *GinContext) Bind(obj any) error

func (*GinContext) Cookie added in v1.0.3

func (c *GinContext) Cookie(co *contracthttp.Cookie)

func (*GinContext) Cookies added in v1.0.3

func (c *GinContext) Cookies(key string, defaultValue ...string) string

func (*GinContext) Deadline

func (c *GinContext) Deadline() (deadline time.Time, ok bool)

func (*GinContext) Done

func (c *GinContext) Done() <-chan struct{}

func (*GinContext) Download added in v1.0.8

func (c *GinContext) Download(filepath, filename string) error

func (*GinContext) EngineContext added in v1.0.6

func (c *GinContext) EngineContext() any

func (*GinContext) Err

func (c *GinContext) Err() error

func (*GinContext) File added in v1.0.2

func (c *GinContext) File(name string) (*multipart.FileHeader, error)

func (*GinContext) Form added in v1.0.2

func (c *GinContext) Form(key, defaultValue string) string

func (*GinContext) FullUrl added in v1.0.2

func (c *GinContext) FullUrl() string

func (*GinContext) Header added in v1.0.2

func (c *GinContext) Header(key, defaultValue string) string

func (*GinContext) Headers added in v1.0.2

func (c *GinContext) Headers() http.Header

func (*GinContext) Ip added in v1.0.2

func (c *GinContext) Ip() string

func (*GinContext) Json added in v1.0.8

func (c *GinContext) Json(code int, obj any) error

func (*GinContext) Method added in v1.0.2

func (c *GinContext) Method() string

func (*GinContext) Next added in v1.0.2

func (c *GinContext) Next() error

func (*GinContext) Origin added in v1.0.8

func (c *GinContext) Origin() *http.Request

func (*GinContext) Params added in v1.0.2

func (c *GinContext) Params(key string) string

func (*GinContext) Path added in v1.0.2

func (c *GinContext) Path() string

func (*GinContext) Query added in v1.0.2

func (c *GinContext) Query(key, defaultValue string) string

func (*GinContext) Render added in v1.0.8

func (c *GinContext) Render(name string, bind any, layouts ...string) error

func (*GinContext) SaveFile added in v1.0.8

func (c *GinContext) SaveFile(name string, dst string) error

func (*GinContext) Secure added in v1.0.3

func (c *GinContext) Secure() bool

func (*GinContext) SendFile added in v1.0.8

func (c *GinContext) SendFile(filepath string, compress ...bool) error

func (*GinContext) SetHeader added in v1.0.8

func (c *GinContext) SetHeader(key, value string) contracthttp.Context

func (*GinContext) StatusCode added in v1.0.8

func (c *GinContext) StatusCode() int

func (*GinContext) String added in v1.0.8

func (c *GinContext) String(code int, format string, values ...any) error

func (*GinContext) Url added in v1.0.2

func (c *GinContext) Url() string

func (*GinContext) Value

func (c *GinContext) Value(key any) any

func (*GinContext) Vary added in v1.0.8

func (c *GinContext) Vary(field string, values ...string)

func (*GinContext) WithValue

func (c *GinContext) WithValue(key string, value any)

type ServiceProvider

type ServiceProvider struct {
}

func (*ServiceProvider) Boot

func (database *ServiceProvider) Boot()

func (*ServiceProvider) Register

func (database *ServiceProvider) Register()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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