http

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: MIT Imports: 13 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

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(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) Status added in v1.0.13

func (c *ChiContext) Status(code int) 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(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 ChiResponse added in v1.0.5

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

ChiResponse struct for holding response details

type ChiResponseWriter added in v1.0.12

type ChiResponseWriter struct {
	http.ResponseWriter // compose original http.ResponseWriter
	ChiResponse         *ChiResponse
}

ChiResponseWriter our http.ResponseWriter implementation

func (*ChiResponseWriter) Write added in v1.0.12

func (r *ChiResponseWriter) Write(b []byte) (int, error)

func (*ChiResponseWriter) WriteHeader added in v1.0.12

func (r *ChiResponseWriter) WriteHeader(statusCode int)

type ServiceProvider

type ServiceProvider struct {
}

func (*ServiceProvider) Boot

func (database *ServiceProvider) Boot()

func (*ServiceProvider) Register

func (database *ServiceProvider) Register()

Jump to

Keyboard shortcuts

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