Documentation ¶
Index ¶
- type Record
- type Set
- func (s *Set) SAdd(key string, member []byte) int
- func (s *Set) SCard(key string) int
- func (s *Set) SClear(key string)
- func (s *Set) SDiff(keys ...string) (val [][]byte)
- func (s *Set) SIsMember(key string, member []byte) bool
- func (s *Set) SKeyExists(key string) (ok bool)
- func (s *Set) SMembers(key string) (val [][]byte)
- func (s *Set) SMove(src, dst string, member []byte) bool
- func (s *Set) SPop(key string, count int) [][]byte
- func (s *Set) SRandMember(key string, count int) [][]byte
- func (s *Set) SRem(key string, member []byte) bool
- func (s *Set) SUnion(keys ...string) (val [][]byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set defines the structure of set.
func (*Set) SAdd ¶
SAdd adds the specified members to the set stored at key. Specified members that ar already a member of this set are ignored. If key does not exist, a new set is created before adding the specified members.
func (*Set) SCard ¶
SCard returns the set cardinality (number of elements) of the set stored at key.
func (*Set) SDiff ¶
SDiff returns the members of the set resulting from the difference between the first set and all the successive sets.
func (*Set) SKeyExists ¶
SKeyExists returns if the key exists.
func (*Set) SMove ¶
SMove moves member from the set at source to the set at destination. If the source set does not exist or does not contain the specified element, no operation is performed and return false.
func (*Set) SPop ¶
SPop removes and returns one or more random members from the set value stored at key.
func (*Set) SRandMember ¶
SRandMember when called with just the key argument, returns a random element from the set valued stored at key.