user

package
v0.0.0-...-ee475d0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(accountName string) bool

Exists checks if an account with the specified name exists in the database.

Types

type Account

type Account struct {
	Id           int64
	Name         string
	PasswordHash string
}

func Create

func Create(accountName string, password string, createdFromIp string) (*Account, bool)

Create creates a new account with the specified name and password.

func Load

func Load(accountName string) *Account

Load loads the account with the specified name from the database.

func (*Account) IsPasswordCorrect

func (account *Account) IsPasswordCorrect(password string) bool

IsPasswordCorrect checks if the specified password is correct for the account.

func (*Account) Save

func (account *Account) Save() bool

Save saves the account to the database.

Jump to

Keyboard shortcuts

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