http

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 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, n ...http.Handler) contracthttp.Context

func NewChiRequest added in v1.0.5

func NewChiRequest(instance *http.Request, response http.ResponseWriter) contracthttp.Request

func NewChiResponse added in v1.0.5

func NewChiResponse(instance http.ResponseWriter) httpcontract.Response

func NewChiSuccess added in v1.0.5

func NewChiSuccess(instance http.ResponseWriter) httpcontract.ResponseSuccess

func NewFiberContext added in v1.0.1

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

func NewFiberRequest added in v1.0.1

func NewFiberRequest(instance *fiber.Ctx) contracthttp.Request

func NewFiberResponse added in v1.0.1

func NewFiberResponse(instance *fiber.Ctx) httpcontract.Response

func NewFiberSuccess added in v1.0.1

func NewFiberSuccess(instance *fiber.Ctx) httpcontract.ResponseSuccess

func NewGinContext

func NewGinContext(ctx *gin.Context) contracthttp.Context

func NewGinRequest

func NewGinRequest(instance *gin.Context) contracthttp.Request

func NewGinResponse

func NewGinResponse(instance *gin.Context) httpcontract.Response

func NewGinSuccess

func NewGinSuccess(instance *gin.Context) httpcontract.ResponseSuccess

Types

type Application

type Application struct {
}

func (*Application) Init

func (app *Application) Init()

type ChiContext added in v1.0.5

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

func (*ChiContext) AbortWithStatus added in v1.0.5

func (c *ChiContext) AbortWithStatus(code int)

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) 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) (contracthttp.File, 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) 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) 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) Request added in v1.0.5

func (c *ChiContext) Request() contracthttp.Request

func (*ChiContext) Response added in v1.0.5

func (c *ChiContext) Response() contracthttp.Response

func (*ChiContext) Secure added in v1.0.5

func (c *ChiContext) Secure() bool

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) WithValue added in v1.0.5

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

type ChiFile added in v1.0.5

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

func (*ChiFile) File added in v1.0.5

func (f *ChiFile) File() *multipart.FileHeader

func (*ChiFile) Store added in v1.0.5

func (f *ChiFile) Store(dst string) error

type ChiRequest added in v1.0.5

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

func (*ChiRequest) Origin added in v1.0.5

func (r *ChiRequest) Origin() *http.Request

func (*ChiRequest) Response added in v1.0.5

func (r *ChiRequest) Response() contracthttp.Response

type ChiResponse added in v1.0.5

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

func (*ChiResponse) Append added in v1.0.5

func (r *ChiResponse) Append(field string, values ...string)

func (*ChiResponse) Download added in v1.0.5

func (r *ChiResponse) Download(filepath, filename string) error

func (*ChiResponse) File added in v1.0.5

func (r *ChiResponse) File(filepath string, compress ...bool) error

func (*ChiResponse) Header added in v1.0.5

func (r *ChiResponse) Header(key, value string) httpcontract.Response

func (*ChiResponse) Json added in v1.0.5

func (r *ChiResponse) Json(code int, obj interface{}) error

func (*ChiResponse) StatusCode added in v1.0.5

func (r *ChiResponse) StatusCode() int

func (*ChiResponse) String added in v1.0.5

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

func (*ChiResponse) Success added in v1.0.5

func (*ChiResponse) Vary added in v1.0.5

func (r *ChiResponse) Vary(key string, value ...string)

type ChiSuccess added in v1.0.5

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

func (*ChiSuccess) Json added in v1.0.5

func (r *ChiSuccess) Json(obj interface{}) error

func (*ChiSuccess) String added in v1.0.5

func (r *ChiSuccess) String(format string, values ...interface{}) error

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) 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) (contracthttp.File, 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) 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) 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) Request added in v1.0.1

func (c *FiberContext) Request() contracthttp.Request

func (*FiberContext) Response added in v1.0.1

func (c *FiberContext) Response() contracthttp.Response

func (*FiberContext) Secure added in v1.0.3

func (c *FiberContext) Secure() bool

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) WithValue added in v1.0.1

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

type FiberFile added in v1.0.1

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

func (*FiberFile) File added in v1.0.1

func (f *FiberFile) File() *multipart.FileHeader

func (*FiberFile) Store added in v1.0.1

func (f *FiberFile) Store(dst string) error

type FiberRequest added in v1.0.1

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

func (*FiberRequest) Origin added in v1.0.1

func (r *FiberRequest) Origin() *http.Request

func (*FiberRequest) Response added in v1.0.1

func (r *FiberRequest) Response() contracthttp.Response

type FiberResponse added in v1.0.1

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

func (*FiberResponse) Download added in v1.0.1

func (r *FiberResponse) Download(filepath, filename string) error

func (*FiberResponse) File added in v1.0.1

func (r *FiberResponse) File(filepath string, compress ...bool) error

func (*FiberResponse) Header added in v1.0.1

func (r *FiberResponse) Header(key, value string) httpcontract.Response

func (*FiberResponse) Json added in v1.0.1

func (r *FiberResponse) Json(code int, obj any) error

func (*FiberResponse) StatusCode added in v1.0.3

func (r *FiberResponse) StatusCode() int

func (*FiberResponse) String added in v1.0.1

func (r *FiberResponse) String(code int, format string, values ...any) error

func (*FiberResponse) Success added in v1.0.1

func (*FiberResponse) Vary added in v1.0.3

func (r *FiberResponse) Vary(key string, value ...string)

type FiberSuccess added in v1.0.1

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

func (*FiberSuccess) Json added in v1.0.1

func (r *FiberSuccess) Json(obj any) error

func (*FiberSuccess) String added in v1.0.1

func (r *FiberSuccess) String(format string, values ...any) error

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) 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) Err

func (c *GinContext) Err() error

func (*GinContext) File added in v1.0.2

func (c *GinContext) File(name string) (contracthttp.File, 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) 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) 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) Request

func (c *GinContext) Request() contracthttp.Request

func (*GinContext) Response

func (c *GinContext) Response() contracthttp.Response

func (*GinContext) Secure added in v1.0.3

func (c *GinContext) Secure() bool

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) WithValue

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

type GinFile

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

func (*GinFile) File

func (f *GinFile) File() *multipart.FileHeader

func (*GinFile) Store

func (f *GinFile) Store(dst string) error

type GinRequest

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

func (*GinRequest) Origin

func (r *GinRequest) Origin() *http.Request

func (*GinRequest) Response

func (r *GinRequest) Response() contracthttp.Response

type GinResponse

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

func (*GinResponse) Append added in v1.0.3

func (r *GinResponse) Append(field string, values ...string)

func (*GinResponse) Download

func (r *GinResponse) Download(filepath, filename string) error

func (*GinResponse) File

func (r *GinResponse) File(filepath string, compress ...bool) error

func (*GinResponse) Header

func (r *GinResponse) Header(key, value string) httpcontract.Response

func (*GinResponse) Json

func (r *GinResponse) Json(code int, obj any) error

func (*GinResponse) StatusCode added in v1.0.3

func (r *GinResponse) StatusCode() int

func (*GinResponse) String

func (r *GinResponse) String(code int, format string, values ...any) error

func (*GinResponse) Success

func (*GinResponse) Vary added in v1.0.3

func (r *GinResponse) Vary(field string, values ...string)

type GinSuccess

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

func (*GinSuccess) Json

func (r *GinSuccess) Json(obj any) error

func (*GinSuccess) String

func (r *GinSuccess) String(format string, values ...any) error

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