user

package
v0.0.0-...-cc0f04f Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegister

func NewRegister(storage Storage, l *logg.Logger) handlers.Handler

Types

type Storage

type Storage interface {
	UserCreate(ctx context.Context, data User) error
	UserFind(ctx context.Context, login string) (User, error)
	UserUpdate(ctx context.Context, logins User) error
	UserDelete(ctx context.Context, id int) error
}

type Token

type Token struct {
	TokenString string `json:"token"`
}

type User

type User struct {
	Id                 string `json:"id"`
	Login              string `json:"login"`
	CategoryOfUser     string `json:"category-of-user"`
	DateOfRegistration string `json:"date-of-registration"`
	Password           string `json:"password"`
	PasswordHash       string `json:"-"`
	Salt               string `json:"-"`
	Algorithm          string `json:"-"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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