app

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RedisServerHandler

func RedisServerHandler(redisConnection *RedisClient, authClientes *AuthClient) func(redcon.Conn, redcon.Command)

Types

type AuthClient

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

func GetAuthClient

func GetAuthClient() *AuthClient

func (*AuthClient) SetClient

func (a *AuthClient) SetClient(ip string, password string) bool

func (*AuthClient) VerifyClient

func (a *AuthClient) VerifyClient(ip string) bool

type RedisClient

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

func NewRedisClient

func NewRedisClient() *RedisClient

func (*RedisClient) Delete

func (r *RedisClient) Delete(chave string) (sucesso bool)

func (RedisClient) GetFuncionando

func (r RedisClient) GetFuncionando() bool

func (*RedisClient) NewRedisReader

func (r *RedisClient) NewRedisReader()

func (*RedisClient) NewRedisWrite

func (r *RedisClient) NewRedisWrite()

func (RedisClient) Read

func (r RedisClient) Read(chave string) (valor string, sucesso bool)

func (*RedisClient) Write

func (r *RedisClient) Write(chave string, valor string, expiration int) (sucesso bool)

Write Write a key value in redis and set its expiration in milliseconds (set 0 for no expiration)

Jump to

Keyboard shortcuts

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