data

package
v0.0.0-...-23016c8 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserService

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

UserService holds users

func NewUserService

func NewUserService() *UserService

NewUserService creates a ready to use user service.

func (*UserService) Add

func (us *UserService) Add(name, password string) error

Add validates a user password and creates a new user.

func (*UserService) ValidatePassword

func (us *UserService) ValidatePassword(name, providedPwd string) error

ValidatePassword checks the provided password of an existing user.

func (*UserService) ValidateUser

func (us *UserService) ValidateUser(name string) error

ValidateUser checks the provided username belongs to an existing user.

Jump to

Keyboard shortcuts

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