package ginctx import ( "time" "github.com/gin-gonic/gin" ) const ( // timestamp of the request TIMESTAMP_KEY = "timestamp" // JWT validation parameters JWT_TOKEN_KEY = "jwt-token" JWT_CLAIMS_KEY = "jwt-claims" JWT_KEYFUNC_KEY = "jwt-keyfunc" JWT_PARSE_OPTIONS_KEY = "jwt-parse-options" SERVER_JWT_SECRET_KEY = "server-jwt-secret" // JWT issue parameters JWT_SIGNING_METHOD = "jwt-signing-method" // Gorm connection GORM_CONNECTION_KEY = "gorm-connection" // Repo object REPO_KEY = "repo" // S3 connection S3_CONNECTION_KEY = "s3-connection" S3_INTERNAL_CONNECTION_KEY = "s3-internal-connection" // Caller CALLER_KEY = "caller" ) func GetServerJwtSecret(c *gin.Context) (any, error) { return Get[any](c, SERVER_JWT_SECRET_KEY) } func GetTimestamp(c *gin.Context) (time.Time, error) { return Get[time.Time](c, TIMESTAMP_KEY) }