cache

package
v0.0.0-...-7842574 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	Set(key string, user *domain.User) error
	Get(key string) (*domain.User, error)
	SetSession(tokenString string, val int) error
	GetSession(tokenString string) (int, error)
}

Define Cache interface

func NewRedis

func NewRedis(host string, db int, keyExpiration, sessionExpiration time.Duration) Repository

Define constructor to inject redis properties

Jump to

Keyboard shortcuts

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