go4redis

package module
v0.0.0-...-3357bc6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2015 License: MIT Imports: 8 Imported by: 0

README

go4redis

Redis client library in pure go

Installation

Usage

Documentation

Index

Constants

View Source
const (
	NEWLINE      = "\r\n"
	EMPTY_STRING = ""
)

Variables

This section is empty.

Functions

func ReadLine

func ReadLine(r *bufio.Reader) (string, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func Dial

func Dial(addr string) (*Client, error)

func (*Client) AddToPipeline

func (c *Client) AddToPipeline(command string) error

func (*Client) Append

func (c *Client) Append(key string, value string) (int, error)

func (*Client) BitCount

func (c *Client) BitCount(key string) (int, error)

func (*Client) BitCountWithIndex

func (c *Client) BitCountWithIndex(key string, start int, end int) (int, error)

func (*Client) BitOp

func (c *Client) BitOp(operation string, destkey string, keys []string) (int, error)

func (*Client) BitPos

func (c *Client) BitPos(key string, bit uint8) (int, error)

func (*Client) BitPosWithRange

func (c *Client) BitPosWithRange(key string, bit uint8, start int, end int) (int, error)

func (*Client) BitPosWithStartRange

func (c *Client) BitPosWithStartRange(key string, bit uint8, start int) (int, error)

func (*Client) Channels

func (c *Client) Channels(pattern string) ([]string, error)

func (*Client) Decr

func (c *Client) Decr(key string) (int, error)

func (*Client) DecrBy

func (c *Client) DecrBy(key string, decrement int) (int, error)

func (*Client) Del

func (c *Client) Del(keys ...string) (int, error)

func (*Client) EndPipeline

func (c *Client) EndPipeline()

func (*Client) ExecPipeline

func (c *Client) ExecPipeline() <-chan *Response

func (*Client) Exists

func (c *Client) Exists(keys ...string) (int, error)

Returns if key exists The number of keys existing among the ones specified as arguments. Keys mentioned multiple times and existing are counted multiple times.

func (*Client) FlushDB

func (c *Client) FlushDB() error

func (*Client) Get

func (c *Client) Get(key string) (string, error)

func (*Client) GetBit

func (c *Client) GetBit(key string, offset int) (int, error)

func (*Client) GetRange

func (c *Client) GetRange(key string, start int, end int) (int, error)

func (*Client) GetSet

func (c *Client) GetSet(key string, value string) (int, error)

func (*Client) HDel

func (c *Client) HDel(key string, fields ...string) (int, error)

func (*Client) HExists

func (c *Client) HExists(key string, field string) (int, error)

func (*Client) HGet

func (c *Client) HGet(key string, field string) (string, error)

func (*Client) HGetAll

func (c *Client) HGetAll(key string) ([]string, error)

func (*Client) HIncrBy

func (c *Client) HIncrBy(key string, field string, value int) (int, error)

func (*Client) HIncrByFloat

func (c *Client) HIncrByFloat(key string, field string, value string) (string, error)

func (*Client) HKeys

func (c *Client) HKeys(key string) ([]string, error)

func (*Client) HLen

func (c *Client) HLen(key string) (int, error)

func (*Client) HMGet

func (c *Client) HMGet(key string, fields ...string) ([]string, error)

func (*Client) HMSet

func (c *Client) HMSet(key string, fieldvalue ...string) (string, error)

func (*Client) HSet

func (c *Client) HSet(key string, field string, value string) (int, error)

func (*Client) HSetNx

func (c *Client) HSetNx(key string, field string, value string) (int, error)

func (*Client) HVals

func (c *Client) HVals(key string) ([]string, error)

func (*Client) Incr

func (c *Client) Incr(key string) (int, error)

func (*Client) IncrBy

func (c *Client) IncrBy(key string, increment int) (int, error)

func (*Client) IncrByFloat

func (c *Client) IncrByFloat(key string, increment float64) (int, error)

func (*Client) Keys

func (c *Client) Keys(pattern string) ([]string, error)

func (*Client) Mget

func (c *Client) Mget(keys []string) ([]string, error)

func (*Client) Mset

func (c *Client) Mset(key_values map[string]string) (bool, error)

func (*Client) MsetNX

func (c *Client) MsetNX(key_values map[string]string) (int, error)

func (*Client) Psetx

func (c *Client) Psetx(key string, milliseconds uint, value string) (string, error)

func (*Client) Publish

func (c *Client) Publish(channel string, message string) (int, error)

func (*Client) SAdd

func (c *Client) SAdd(key string, member ...string) (int, error)

func (*Client) SCard

func (c *Client) SCard(key string) (int, error)

func (*Client) SDIFFSTORE

func (c *Client) SDIFFSTORE(destination string, key ...string) (int, error)

func (*Client) SDiff

func (c *Client) SDiff(key ...string) (int, error)

func (*Client) SINTER

func (c *Client) SINTER(key ...string) (int, error)

func (*Client) SINTERSTORE

func (c *Client) SINTERSTORE(destination string, key ...string) (int, error)

func (*Client) SISMEMBER

func (c *Client) SISMEMBER(key string, member string) (int, error)

func (*Client) SMEMBERS

func (c *Client) SMEMBERS(key string) (int, error)

func (*Client) SMOVE

func (c *Client) SMOVE(source string, destination string, member string) (int, error)

func (*Client) SPOP

func (c *Client) SPOP(key string, count string) (int, error)

func (*Client) SRANDMEMBER

func (c *Client) SRANDMEMBER(key string, count string) (int, error)

func (*Client) SREM

func (c *Client) SREM(key string, member ...string) (int, error)

func (*Client) SUNION

func (c *Client) SUNION(key ...string) (int, error)

func (*Client) SUNIONSTORE

func (c *Client) SUNIONSTORE(destination string, key ...string) (int, error)

func (*Client) Set

func (c *Client) Set(key string, value string) (string, error)

func (*Client) SetEX

func (c *Client) SetEX(key string, seconds int, value string) (string, error)

func (*Client) SetNX

func (c *Client) SetNX(key string, value string) (int, error)

func (*Client) SetRange

func (c *Client) SetRange(key string, offset int, value string) (int, error)

func (*Client) Setbit

func (c *Client) Setbit(key string, offset int, value int) (int, error)

func (*Client) StartPipeline

func (c *Client) StartPipeline()

func (*Client) Strlen

func (c *Client) Strlen(key string) (int, error)

func (*Client) Subscribe

func (c *Client) Subscribe(channels ...string) (int, error, chan string)

func (*Client) UnSubscribe

func (c *Client) UnSubscribe(channels ...string) (int, error)

type Response

type Response struct {
	// contains filtered or unexported fields
}

type SimpleString

type SimpleString struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL