user

package
v0.0.0-...-08e0fe9 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: BSD-3-Clause Imports: 8 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 {
	// contains filtered or unexported fields
}

func Init

func Init(driver *mongo.Database) (*User, error)

func (*User) ChangeUserSettings

func (u *User) ChangeUserSettings(id string, settings map[string]string) error

func (*User) CreateUser

func (u *User) CreateUser(user models.User) (models.User, error)

func (*User) GetUserById

func (u *User) GetUserById(id string) (models.User, error)

GetUserById(id string) (models.User, error)

func (*User) GetUserByUsername

func (u *User) GetUserByUsername(username string) (models.User, error)

GetUser(username string) (models.User, error)

type UserScheme

type UserScheme struct {
	UserName     string             `bson:"user_name"`
	FullName     string             `bson:"full_name"`
	Password     string             `bson:"passwd"`
	Email        string             `bson:"email"`
	IsAdmin      bool               `bson:"is_admin"`
	Id           primitive.ObjectID `bson:"_id"`
	LastLogin    time.Time          `bson:"last_login"`
	CreationDate time.Time          `bson:"creation_date"`
	Settings     map[string]string  `bson:"settings"`
}

Jump to

Keyboard shortcuts

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