user

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Error list.

Index

Constants

This section is empty.

Variables

View Source
var (

	// Empty login. Error code ...
	ErrEmptyLogin = err.New(1, "Empty login")

	// Login length is short. Error сode ...
	ErrShortLogin = err.New(2, "Login length is short")

	// Login length is long. Error code ...
	ErrLongLogin = err.New(3, "Login length is long")

	// Login is incorrect. Error code ...
	ErrIncorrectLogin = err.New(4, "Login is incorrect")

	// Login exists in the database. Error code ...
	ErrLoginExists = err.New(5, "Login exists")

	// Login not exists in the database. Error code ...
	ErrLoginNotExists = err.New(6, "Login not exists")

	// Empty password. Error code ...
	ErrEmptyPassword = err.New(7, "Empty password")

	// Password length is short. Error code ...
	ErrShortPassword = err.New(8, "Password length is short")

	// Password length is long. Error code ...
	ErrLongPassword = err.New(9, "Password length is long")

	// Password is incorrect. Error code ...
	ErrIncorrectPassword = err.New(10, "Password is incorrect")

	// Entered password is not equal. Error code ...
	ErrPasswordIsNotEqual = err.New(11, "Password is not equal")
)

User struct errors.

Functions

This section is empty.

Types

type User

type User struct {
	Login    string `json:"login"`
	Password string `json:"password"`
}

User struct.

func NewUser

func NewUser(login string, password string) (*User, *service_error.ServiceError)

func (*User) GetLogin

func (u *User) GetLogin() string

func (*User) GetPassword

func (u *User) GetPassword() string

func (*User) SetLogin

func (u *User) SetLogin(login string) *service_error.ServiceError

func (*User) SetPassword

func (u *User) SetPassword(password string) *service_error.ServiceError

Jump to

Keyboard shortcuts

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