Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
Binding *bindingHandler
Middleware *middlewareHandler
Rendering *renderingHandler
TLS *tlsHandler
Server *serverHandler
Validator *validatorHandler
// contains filtered or unexported fields
}
Client is the client object for httphelpers
type DefaultValidator ¶
DefaultValidator is the default validator for httphelpers
func (*DefaultValidator) Engine ¶
func (v *DefaultValidator) Engine() any
Engine satisfy the binding.Validator interface
func (*DefaultValidator) ValidateStruct ¶
func (v *DefaultValidator) ValidateStruct(obj any) error
ValidateStruct satisfies the binding.StructValidator interface
type JWKSCache ¶
type JWKSCache interface {
Get(ctx context.Context, key string) ([]byte, bool)
Set(ctx context.Context, key string, value []byte)
}
JWKSCache is the generic cache interface used to store raw JWKS JSON. It is satisfied by both MemoryCache and MongoCache from pkg/cache.
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
RateLimiter implements a token bucket rate limiter using gin-ratelimit
func (*RateLimiter) Middleware ¶
func (rl *RateLimiter) Middleware() gin.HandlerFunc
Middleware returns a Gin middleware handler that enforces rate limiting by IP
type SafeEngine ¶
type SafeEngine struct {
// contains filtered or unexported fields
}
SafeEngine wraps a SPOCP AdaptiveEngine with a sync.RWMutex so that concurrent request handlers can safely call QueryElement while still allowing future rule hot-reloading under a write lock.
func (*SafeEngine) QueryElement ¶
func (s *SafeEngine) QueryElement(q sexp.Element) bool
QueryElement checks if the query is authorized (read-locked).
func (*SafeEngine) RuleCount ¶
func (s *SafeEngine) RuleCount() int
RuleCount returns the number of loaded rules (read-locked).