http

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 9 Imported by: 0

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

func Background() http.Context

Types

type Context

type Context struct {
	Ctx
}

func NewContext

func NewContext() *Context

func (*Context) Context

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

func (*Context) Request

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

func (*Context) Response

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

func (*Context) WithValue

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

type Ctx

type Ctx context.Context

type RateLimiter

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

func NewRateLimiter

func NewRateLimiter() *RateLimiter

func (*RateLimiter) For

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

func (*RateLimiter) ForWithLimits

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

func (*RateLimiter) Limiter

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

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

func NewView

func NewView() *View

func (*View) Exists

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

func (*View) GetShared

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

func (*View) Share

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

func (*View) Shared

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