redis

package
v0.0.0-...-b28dd9f Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Redis

type Redis struct {
	RC *redis.Client
}

Redis :

func (*Redis) Connect

func (rd *Redis) Connect(config *core.Config)

Connect :

func (*Redis) Delete

func (rd *Redis) Delete(w http.ResponseWriter, r *http.Request)

Delete : delete the passed id

func (*Redis) Exists

func (rd *Redis) Exists(w http.ResponseWriter, r *http.Request)

Exists : do an exists on the id passed in the url and return an http response code

func (*Redis) Read

func (rd *Redis) Read(w http.ResponseWriter, r *http.Request)

Read : do a hget with a json array passed in the body on the id passed in the url an return a json array

func (*Redis) Register

func (rd *Redis) Register(handlers *core.Handlers)

Register : register the functions to handler map

func (*Redis) Set

func (rd *Redis) Set(w http.ResponseWriter, r *http.Request)

Set : use the hmset cmd from redis with a json passed as body and with {type}:{id} as the id of the entry

Jump to

Keyboard shortcuts

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