@@ -225,7 +225,9 @@ type HExpireArgs struct {
225
225
// HExpire - Sets the expiration time for specified fields in a hash in seconds.
226
226
// The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields.
227
227
// Available since Redis 7.4 CE.
228
- // For more information - https://redis.io/commands/hexpire/
228
+ // For more information refer to [HEXPIRE Documentation].
229
+ //
230
+ // [HEXPIRE Documentation]: https://redis.io/commands/hexpire/
229
231
func (c cmdable ) HExpire (ctx context.Context , key string , expiration time.Duration , fields ... string ) * IntSliceCmd {
230
232
args := []interface {}{"HEXPIRE" , key , formatSec (ctx , expiration ), "FIELDS" , len (fields )}
231
233
@@ -241,7 +243,9 @@ func (c cmdable) HExpire(ctx context.Context, key string, expiration time.Durati
241
243
// It requires a key, an expiration duration, a struct with boolean flags for conditional expiration settings (NX, XX, GT, LT), and a list of fields.
242
244
// The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields.
243
245
// Available since Redis 7.4 CE.
244
- // For more information - https://redis.io/commands/hexpire/
246
+ // For more information refer to [HEXPIRE Documentation].
247
+ //
248
+ // [HEXPIRE Documentation]: https://redis.io/commands/hexpire/
245
249
func (c cmdable ) HExpireWithArgs (ctx context.Context , key string , expiration time.Duration , expirationArgs HExpireArgs , fields ... string ) * IntSliceCmd {
246
250
args := []interface {}{"HEXPIRE" , key , formatSec (ctx , expiration )}
247
251
@@ -271,7 +275,9 @@ func (c cmdable) HExpireWithArgs(ctx context.Context, key string, expiration tim
271
275
// Similar to HExpire, it accepts a key, an expiration duration in milliseconds, a struct with expiration condition flags, and a list of fields.
272
276
// The command modifies the standard time.Duration to milliseconds for the Redis command.
273
277
// Available since Redis 7.4 CE.
274
- // For more information - https://redis.io/commands/hpexpire/
278
+ // For more information refer to [HPEXPIRE Documentation].
279
+ //
280
+ // [HPEXPIRE Documentation]: https://redis.io/commands/hpexpire/
275
281
func (c cmdable ) HPExpire (ctx context.Context , key string , expiration time.Duration , fields ... string ) * IntSliceCmd {
276
282
args := []interface {}{"HPEXPIRE" , key , formatMs (ctx , expiration ), "FIELDS" , len (fields )}
277
283
@@ -283,7 +289,13 @@ func (c cmdable) HPExpire(ctx context.Context, key string, expiration time.Durat
283
289
return cmd
284
290
}
285
291
292
+ // HPExpireWithArgs - Sets the expiration time for specified fields in a hash in milliseconds.
293
+ // It requires a key, an expiration duration, a struct with boolean flags for conditional expiration settings (NX, XX, GT, LT), and a list of fields.
294
+ // The command constructs an argument list starting with "HPEXPIRE", followed by the key, duration, any conditional flags, and the specified fields.
286
295
// Available since Redis 7.4 CE.
296
+ // For more information refer to [HPEXPIRE Documentation].
297
+ //
298
+ // [HPEXPIRE Documentation]: https://redis.io/commands/hpexpire/
287
299
func (c cmdable ) HPExpireWithArgs (ctx context.Context , key string , expiration time.Duration , expirationArgs HExpireArgs , fields ... string ) * IntSliceCmd {
288
300
args := []interface {}{"HPEXPIRE" , key , formatMs (ctx , expiration )}
289
301
@@ -313,7 +325,9 @@ func (c cmdable) HPExpireWithArgs(ctx context.Context, key string, expiration ti
313
325
// Takes a key, a UNIX timestamp, a struct of conditional flags, and a list of fields.
314
326
// The command sets absolute expiration times based on the UNIX timestamp provided.
315
327
// Available since Redis 7.4 CE.
316
- // For more information - https://redis.io/commands/hexpireat/
328
+ // For more information refer to [HExpireAt Documentation].
329
+ //
330
+ // [HExpireAt Documentation]: https://redis.io/commands/hexpireat/
317
331
func (c cmdable ) HExpireAt (ctx context.Context , key string , tm time.Time , fields ... string ) * IntSliceCmd {
318
332
319
333
args := []interface {}{"HEXPIREAT" , key , tm .Unix (), "FIELDS" , len (fields )}
@@ -353,8 +367,10 @@ func (c cmdable) HExpireAtWithArgs(ctx context.Context, key string, tm time.Time
353
367
354
368
// HPExpireAt - Sets the expiration time for specified fields in a hash to a UNIX timestamp in milliseconds.
355
369
// Similar to HExpireAt but for timestamps in milliseconds. It accepts the same parameters and adjusts the UNIX time to milliseconds.
356
- // Available since Redis 7.4 CE.
357
- // For more information - https://redis.io/commands/hpexpireat/
370
+ // Available since Redis 7.4 CE.
371
+ // For more information refer to [HExpireAt Documentation].
372
+ //
373
+ // [HExpireAt Documentation]: https://redis.io/commands/hexpireat/
358
374
func (c cmdable ) HPExpireAt (ctx context.Context , key string , tm time.Time , fields ... string ) * IntSliceCmd {
359
375
args := []interface {}{"HPEXPIREAT" , key , tm .UnixNano () / int64 (time .Millisecond ), "FIELDS" , len (fields )}
360
376
@@ -395,7 +411,9 @@ func (c cmdable) HPExpireAtWithArgs(ctx context.Context, key string, tm time.Tim
395
411
// Accepts a key and the fields themselves.
396
412
// This command ensures that each field specified will have its expiration removed if present.
397
413
// Available since Redis 7.4 CE.
398
- // For more information - https://redis.io/commands/hpersist/
414
+ // For more information refer to [HPersist Documentation].
415
+ //
416
+ // [HPersist Documentation]: https://redis.io/commands/hpersist/
399
417
func (c cmdable ) HPersist (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
400
418
args := []interface {}{"HPERSIST" , key , "FIELDS" , len (fields )}
401
419
@@ -411,6 +429,9 @@ func (c cmdable) HPersist(ctx context.Context, key string, fields ...string) *In
411
429
// Requires a key and the fields themselves to fetch their expiration timestamps.
412
430
// This command returns the expiration times for each field or error/status codes for each field as specified.
413
431
// Available since Redis 7.4 CE.
432
+ // For more information refer to [HExpireTime Documentation].
433
+ //
434
+ // [HExpireTime Documentation]: https://redis.io/commands/hexpiretime/
414
435
// For more information - https://redis.io/commands/hexpiretime/
415
436
func (c cmdable ) HExpireTime (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
416
437
args := []interface {}{"HEXPIRETIME" , key , "FIELDS" , len (fields )}
@@ -427,6 +448,9 @@ func (c cmdable) HExpireTime(ctx context.Context, key string, fields ...string)
427
448
// Similar to HExpireTime, adjusted for timestamps in milliseconds. It requires the same parameters.
428
449
// Provides the expiration timestamp for each field in milliseconds.
429
450
// Available since Redis 7.4 CE.
451
+ // For more information refer to [HExpireTime Documentation].
452
+ //
453
+ // [HExpireTime Documentation]: https://redis.io/commands/hexpiretime/
430
454
// For more information - https://redis.io/commands/hexpiretime/
431
455
func (c cmdable ) HPExpireTime (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
432
456
args := []interface {}{"HPEXPIRETIME" , key , "FIELDS" , len (fields )}
@@ -443,7 +467,9 @@ func (c cmdable) HPExpireTime(ctx context.Context, key string, fields ...string)
443
467
// Requires a key and the fields themselves. It returns the TTL for each specified field.
444
468
// This command fetches the TTL in seconds for each field or returns error/status codes as appropriate.
445
469
// Available since Redis 7.4 CE.
446
- // For more information - https://redis.io/commands/httl/
470
+ // For more information refer to [HTTL Documentation].
471
+ //
472
+ // [HTTL Documentation]: https://redis.io/commands/httl/
447
473
func (c cmdable ) HTTL (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
448
474
args := []interface {}{"HTTL" , key , "FIELDS" , len (fields )}
449
475
@@ -459,6 +485,9 @@ func (c cmdable) HTTL(ctx context.Context, key string, fields ...string) *IntSli
459
485
// Similar to HTTL, but returns the TTL in milliseconds. It requires a key and the specified fields.
460
486
// This command provides the TTL in milliseconds for each field or returns error/status codes as needed.
461
487
// Available since Redis 7.4 CE.
488
+ // For more information refer to [HPTTL Documentation].
489
+ //
490
+ // [HPTTL Documentation]: https://redis.io/commands/hpttl/
462
491
// For more information - https://redis.io/commands/hpttl/
463
492
func (c cmdable ) HPTTL (ctx context.Context , key string , fields ... string ) * IntSliceCmd {
464
493
args := []interface {}{"HPTTL" , key , "FIELDS" , len (fields )}
0 commit comments