ShortRequestID

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2025 License: MIT Imports: 4 Imported by: 0

README

ShortRequestID

ShortRequestID is a simple Request ID generator
This project is only active on GitHub (https://github.com/ghinknet/ShortRequestID)
Repositories on any other platform are mirrors
We will not process PRs or Issues outside of GitHub
ShortRequestID is suitable for a low QPS environment
And can make sure a low repeat, while keeping the Request ID easy to read

Usage

import "github.com/ghinknet/ShortRequestID"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRequestID

func GenerateRequestID() string

GenerateRequestID generates a BASE32 based Request ID

func GinMiddleware

func GinMiddleware(opts ...Option) gin.HandlerFunc

GinMiddleware is a middleware for Gin framework

Types

type Option

type Option func(*ginConfig)

Option for queue system

func GinWithCustomHeaderStrKey

func GinWithCustomHeaderStrKey(s string) Option

GinWithCustomHeaderStrKey set custom header key for request id

func GinWithCustomParamStrKey

func GinWithCustomParamStrKey(s string) Option

GinWithCustomParamStrKey set custom param key for request id

Jump to

Keyboard shortcuts

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