service

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: GPL-3.0 Imports: 4 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 interface {
	Get(key string) (string, error)
	Set(key string, value string, expiration time.Duration) error
	Del(key string) error
	Exists(key string) bool
	Close() error
	Ping(ctx context.Context) error
	SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) (bool, error)
}

type RedisService

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

func NewRedisService

func NewRedisService(config util.Config) *RedisService

func (*RedisService) Close

func (r *RedisService) Close() error

func (*RedisService) Del

func (r *RedisService) Del(key string) error

func (*RedisService) Exists

func (r *RedisService) Exists(key string) bool

func (*RedisService) Get

func (r *RedisService) Get(key string) (string, error)

func (*RedisService) Ping

func (r *RedisService) Ping(ctx context.Context) error

func (*RedisService) Set

func (r *RedisService) Set(key string, value string, expiration time.Duration) error

func (*RedisService) SetNX

func (r *RedisService) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) (bool, error)

Directories

Path Synopsis
Package mockservice is a generated GoMock package.
Package mockservice is a generated GoMock package.

Jump to

Keyboard shortcuts

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