model

package
v0.0.0-...-a6fa6aa Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT 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 {
	Username string
	Password string
	Role     string
}

User represents request auth info

func NewUser

func NewUser(username, password, role string) (*User, error)

NewUser creates a new User instance with username and password

func (*User) Authed

func (u *User) Authed(password string) bool

Authed check whether the password is correct

func (*User) Clone

func (u *User) Clone() *User

Clone returns a clone of this user

Jump to

Keyboard shortcuts

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