redis

package
v0.0.0-...-966004a Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 17 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 {
	// contains filtered or unexported fields
}

func MakeDB

func MakeDB(host, port, pass string, logger logging.Logger, tracer trace.Tracer) (Redis, error)

func (Redis) Close

func (db Redis) Close() error

func (Redis) Create

func (db Redis) Create(ctx context.Context, article entity.Article) (err error)

func (Redis) Delete

func (db Redis) Delete(ctx context.Context, id string) (err error)

func (Redis) EventHandlers

func (db Redis) EventHandlers() map[event.EventType][]event.Handler

func (Redis) Get

func (db Redis) Get(ctx context.Context, id string) (_ entity.Article, err error)

func (Redis) GetMultiple

func (db Redis) GetMultiple(ctx context.Context, offset, limit string) (_ []entity.Article, err error)

func (Redis) Ping

func (db Redis) Ping(ctx context.Context) error

func (Redis) Update

func (db Redis) Update(ctx context.Context, article entity.Article) (err error)

Jump to

Keyboard shortcuts

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