github.com/gogf/gf/v2@v2.7.4/database/gredis/gredis_redis_group_hash.go (about)

     1  // Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
     2  //
     3  // This Source Code Form is subject to the terms of the MIT License.
     4  // If a copy of the MIT was not distributed with this file,
     5  // You can obtain one at https://github.com/gogf/gf.
     6  
     7  package gredis
     8  
     9  import (
    10  	"context"
    11  
    12  	"github.com/gogf/gf/v2/container/gvar"
    13  )
    14  
    15  // IGroupHash manages redis hash operations.
    16  // Implements see redis.GroupHash.
    17  type IGroupHash interface {
    18  	HSet(ctx context.Context, key string, fields map[string]interface{}) (int64, error)
    19  	HSetNX(ctx context.Context, key, field string, value interface{}) (int64, error)
    20  	HGet(ctx context.Context, key, field string) (*gvar.Var, error)
    21  	HStrLen(ctx context.Context, key, field string) (int64, error)
    22  	HExists(ctx context.Context, key, field string) (int64, error)
    23  	HDel(ctx context.Context, key string, fields ...string) (int64, error)
    24  	HLen(ctx context.Context, key string) (int64, error)
    25  	HIncrBy(ctx context.Context, key, field string, increment int64) (int64, error)
    26  	HIncrByFloat(ctx context.Context, key, field string, increment float64) (float64, error)
    27  	HMSet(ctx context.Context, key string, fields map[string]interface{}) error
    28  	HMGet(ctx context.Context, key string, fields ...string) (gvar.Vars, error)
    29  	HKeys(ctx context.Context, key string) ([]string, error)
    30  	HVals(ctx context.Context, key string) (gvar.Vars, error)
    31  	HGetAll(ctx context.Context, key string) (*gvar.Var, error)
    32  }