model

package
v0.0.0-...-846346c Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: LGPL-2.1 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func CreateUser

func CreateUser(user *User) (tx *gorm.DB, ok bool)

func UpdateUser

func UpdateUser(id uint, user *User) (tx *gorm.DB, ok bool)

Types

type User

type User struct {
	Username string `json:"username" gorm:"unique;not null"`
	Password string `json:"password" gorm:"unique;not null"`
	Model    gorm.Model
}

func SelectUserById

func SelectUserById(id uint) (user User, ok bool)

func SelectUserByUsername

func SelectUserByUsername(username string) (user User, ok bool)

func (User) TableName

func (User) TableName() string

Jump to

Keyboard shortcuts

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