user

package
v0.0.0-...-3301e3d Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	Email      string
	HashedPass string
	KeyID      string
	Projects   []string
}

User represents a padl user

func NewUser

func NewUser(email, pass, keyID string) (*User, error)

NewUser takes in user email, password, and public key id and returns a populated User with the hashed password

func (*User) AddProject

func (u *User) AddProject(name string)

AddProject adds to the user

func (*User) CheckPassword

func (u *User) CheckPassword(pw string) error

CheckPassword verifies that a password matches the hash on the user

func (*User) RemoveProject

func (u *User) RemoveProject(name string)

RemoveProject removes a project from the user

Jump to

Keyboard shortcuts

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