redose

package module
v0.0.0-...-b39d66c Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: MIT Imports: 13 Imported by: 0

README

redose

Redis Protocol Gateway

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidCredentials = errors.New("invalid credentials")

Functions

This section is empty.

Types

type Auth

type Auth struct {
	DB *sql.DB
	// contains filtered or unexported fields
}

Auth use sql database for retrieve user

func (*Auth) Validate

func (a *Auth) Validate(user, password string) error

type Server

type Server struct {
	Addr        string
	TLSConfig   *tls.Config
	EnableAuth  bool
	AuthService *Auth
	RedisClient *redis.Client
	// contains filtered or unexported fields
}

Server is the redose server

func (*Server) Auth

func (h *Server) Auth(conn redcon.Conn, cmd redcon.Command)

func (*Server) DBSize

func (h *Server) DBSize(conn redcon.Conn, cmd redcon.Command)

func (*Server) Del

func (h *Server) Del(conn redcon.Conn, cmd redcon.Command)

func (*Server) Expire

func (h *Server) Expire(conn redcon.Conn, cmd redcon.Command)

func (*Server) Get

func (h *Server) Get(conn redcon.Conn, cmd redcon.Command)

func (*Server) Info

func (h *Server) Info(conn redcon.Conn, cmd redcon.Command)

func (*Server) ListenAndServe

func (h *Server) ListenAndServe() error

func (*Server) ListenAndServeTLS

func (h *Server) ListenAndServeTLS(certFile, keyFile string) error

func (*Server) MGet

func (h *Server) MGet(conn redcon.Conn, cmd redcon.Command)

func (*Server) PExpire

func (h *Server) PExpire(conn redcon.Conn, cmd redcon.Command)

func (*Server) PTTL

func (h *Server) PTTL(conn redcon.Conn, cmd redcon.Command)

func (*Server) Ping

func (h *Server) Ping(conn redcon.Conn, cmd redcon.Command)

func (*Server) Quit

func (h *Server) Quit(conn redcon.Conn, cmd redcon.Command)

func (*Server) Scan

func (h *Server) Scan(conn redcon.Conn, cmd redcon.Command)

func (*Server) Select

func (h *Server) Select(conn redcon.Conn, cmd redcon.Command)

func (*Server) Set

func (h *Server) Set(conn redcon.Conn, cmd redcon.Command)

func (*Server) SetEX

func (h *Server) SetEX(conn redcon.Conn, cmd redcon.Command)

func (*Server) SetNX

func (h *Server) SetNX(conn redcon.Conn, cmd redcon.Command)

func (*Server) TTL

func (h *Server) TTL(conn redcon.Conn, cmd redcon.Command)

func (*Server) Type

func (h *Server) Type(conn redcon.Conn, cmd redcon.Command)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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