user

package
v0.0.16-beta Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteUser

func DeleteUser(username string) error

Removes a user, also removes everything that depends on the user (permissions, switchPermissions)

func InitLogger

func InitLogger(logger *logrus.Logger)

func Notify

func Notify(username string, title string, description string, level NotificationLevel) error

func RemoveAvatar

func RemoveAvatar(username string) error

Will remove the current avatar of a user unless it is set to `default`

func UploadAvatar

func UploadAvatar(username string, filename string, file multipart.File) error

Accepts a username, filename and multipart file and creates and processes the file

func ValidateCredentials

func ValidateCredentials(username string, password string) (bool, error)

Will return <true / false> based on authentication validity <true> means valid authentication Can return an error if the database fails to return a valid result, meaning service downtime

Types

type NotificationLevel

type NotificationLevel uint8
const (
	NotificationLevelInfo  NotificationLevel = 1
	NotificationLevelWarn  NotificationLevel = 2
	NotificationLevelError NotificationLevel = 3
)

Jump to

Keyboard shortcuts

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