storage

package
v0.0.0-...-783fd98 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 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 Storer

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

Storer stores users in-memory.

func New

func New() *Storer

func (*Storer) Login

func (s *Storer) Login(name, password string) (*model.User, error)

Login with a given name and password. The password is cleartext and hashed here. Returns the user if succesful, without the password.

func (*Storer) Signup

func (s *Storer) Signup(name, password string) error

Signup a user. Note that the given password is in cleartext and hashed here.

Jump to

Keyboard shortcuts

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