redis

package
v0.0.0-...-fd8d5be Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSession

func CreateSession(conn redis.Conn, userID string) (string, error)

CreateSession creates a new session.

func DeleteUser

func DeleteUser(conn redis.Conn, u entity.User) error

DeleteUser deletes from Redis.

func ExistUser

func ExistUser(conn redis.Conn, userID string) (bool, error)

ExistUser returns given user exists in Redis or not.

func FindUser

func FindUser(conn redis.Conn, userID string) (entity.User, error)

FindUser finds by given user id from Redis.

func UpdateUser

func UpdateUser(conn redis.Conn, u entity.User) error

UpdateUser updates the user on Redis.

Types

type Error

type Error string

Error is package-specific error type.

const (
	ErrUserNotFound Error = "user not found"
)

error constants

func (Error) Error

func (e Error) Error() string

Error implements error interface.

Jump to

Keyboard shortcuts

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