database

package
v0.0.0-...-2143ae3 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() *gorm.DB

func DoesUserExistByUsername

func DoesUserExistByUsername(username string) bool

Types

type User

type User struct {
	Id                         int            `json:"id"`
	Username                   string         `json:"username"`
	Password                   string         `json:"password"`
	Permissions                datatypes.JSON `json:"permissions"`
	Name                       string         `json:"name"`
	Email                      string         `json:"email"`
	Enabled                    bool           `json:"enabled"`
	Change_password_next_login bool           `json:"change_password_next_login"`
}

func CreateNewUser

func CreateNewUser(username string, password string, email string, name string, permissions datatypes.JSON) User

func GetUserById

func GetUserById(id int) User

func GetUserByUsername

func GetUserByUsername(username string) User

type UserPermissons

type UserPermissons struct {
	ADMIN bool
}

Jump to

Keyboard shortcuts

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