gin

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultIPExtractor

func DefaultIPExtractor(c *gin.Context) string

DefaultIPExtractor menggunakan fungsi bawaan ClientIP() dari Gin

func New

func New(limiter *distlimit.Limiter, opts ...Option) gin.HandlerFunc

New mengembalikan gin.HandlerFunc yang dapat langsung dipasang via router.Use()

Types

type KeyExtractor

type KeyExtractor func(c *gin.Context) string

KeyExtractor adalah fungsi untuk mengekstrak key dari gin.Context

type Option

type Option func(*config)

Option adalah fungsi konfigurasi untuk Gin middleware.

func WithKeyExtractor

func WithKeyExtractor(fn KeyExtractor) Option

WithKeyExtractor mengganti strategi ekstraksi key pada Gin.

func WithOnExceeded

func WithOnExceeded(handler gin.HandlerFunc) Option

WithOnExceeded mengganti handler kustom saat rate limit Gin terlampaui.

Jump to

Keyboard shortcuts

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