github.com/wangyougui/gf/v2@v2.6.5/database/gredis/gredis_redis_group_set.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/wangyougui/gf.
     6  
     7  package gredis
     8  
     9  import (
    10  	"context"
    11  
    12  	"github.com/wangyougui/gf/v2/container/gvar"
    13  )
    14  
    15  // IGroupSet manages redis set operations.
    16  // Implements see redis.GroupSet.
    17  type IGroupSet interface {
    18  	SAdd(ctx context.Context, key string, member interface{}, members ...interface{}) (int64, error)
    19  	SIsMember(ctx context.Context, key string, member interface{}) (int64, error)
    20  	SPop(ctx context.Context, key string, count ...int) (*gvar.Var, error)
    21  	SRandMember(ctx context.Context, key string, count ...int) (*gvar.Var, error)
    22  	SRem(ctx context.Context, key string, member interface{}, members ...interface{}) (int64, error)
    23  	SMove(ctx context.Context, source, destination string, member interface{}) (int64, error)
    24  	SCard(ctx context.Context, key string) (int64, error)
    25  	SMembers(ctx context.Context, key string) (gvar.Vars, error)
    26  	SMIsMember(ctx context.Context, key, member interface{}, members ...interface{}) ([]int, error)
    27  	SInter(ctx context.Context, key string, keys ...string) (gvar.Vars, error)
    28  	SInterStore(ctx context.Context, destination string, key string, keys ...string) (int64, error)
    29  	SUnion(ctx context.Context, key string, keys ...string) (gvar.Vars, error)
    30  	SUnionStore(ctx context.Context, destination, key string, keys ...string) (int64, error)
    31  	SDiff(ctx context.Context, key string, keys ...string) (gvar.Vars, error)
    32  	SDiffStore(ctx context.Context, destination string, key string, keys ...string) (int64, error)
    33  }