storage

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 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 RedisStorage

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

func NewStorage

func NewStorage(cfg *config.Redis) *RedisStorage

func (*RedisStorage) Get

func (r *RedisStorage) Get(key string) (interface{}, error)

func (*RedisStorage) GetUserByEmail

func (r *RedisStorage) GetUserByEmail(email string) (*User, error)

func (*RedisStorage) Store

func (r *RedisStorage) Store(key string, val interface{}) error

type Storage

type Storage interface {
	Store(key string, val interface{}) error
	Get(key string) (interface{}, error)
	GetUserByEmail(email string) (*User, error)
}

type User

type User struct {
	ID       string
	Name     string
	Company  string
	Email    string
	Password string
}

Jump to

Keyboard shortcuts

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