http

package
v1.13.9 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const BindingRateLimiter = "goravel.rate_limiter"
View Source
const BindingView = "goravel.view"

Variables

View Source
var (
	CacheFacade       cache.Cache
	ConfigFacade      config.Config
	RateLimiterFacade http.RateLimiter
)

Functions

func Background added in v1.2.0

func Background() http.Context

Types

type Context added in v1.13.1

type Context struct {
	Ctx
}

func NewContext added in v1.13.1

func NewContext() *Context

func (*Context) Context added in v1.13.1

func (r *Context) Context() context.Context

func (*Context) Request added in v1.13.1

func (r *Context) Request() http.ContextRequest

func (*Context) Response added in v1.13.1

func (r *Context) Response() http.ContextResponse

func (*Context) WithValue added in v1.13.1

func (r *Context) WithValue(key string, value any)

type Ctx added in v1.13.1

type Ctx context.Context

type RateLimiter added in v1.10.0

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

func NewRateLimiter added in v1.10.0

func NewRateLimiter() *RateLimiter

func (*RateLimiter) For added in v1.10.0

func (r *RateLimiter) For(name string, callback func(ctx http.Context) http.Limit)

func (*RateLimiter) ForWithLimits added in v1.10.0

func (r *RateLimiter) ForWithLimits(name string, callback func(ctx http.Context) []http.Limit)

func (*RateLimiter) Limiter added in v1.10.0

func (r *RateLimiter) Limiter(name string) func(ctx http.Context) []http.Limit

type ServiceProvider

type ServiceProvider struct{}

func (*ServiceProvider) Boot

func (http *ServiceProvider) Boot(app foundation.Application)

func (*ServiceProvider) Register

func (http *ServiceProvider) Register(app foundation.Application)

type View added in v1.13.1

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

func NewView added in v1.13.1

func NewView() *View

func (*View) Exists added in v1.13.1

func (r *View) Exists(view string) bool

func (*View) GetShared added in v1.13.1

func (r *View) GetShared() map[string]any

func (*View) Share added in v1.13.1

func (r *View) Share(key string, value any)

func (*View) Shared added in v1.13.1

func (r *View) Shared(key string, def ...any) any

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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