logins

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func DropUnusedColumns added in v1.2.0

func DropUnusedColumns(DB *gorm.DB, values ...interface{})

func Init_database added in v1.2.0

func Init_database(dsn string) (*gorm.DB, error)

Types

type RequestLogin

type RequestLogin struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

RequestLogin model info

type ResponseLogin

type ResponseLogin struct {
	Token     string `json:"token"`
	PublicKey string `json:"publickey"`
}

ResponseLogin model info

func CreateLogin

func CreateLogin(db *gorm.DB, request RequestLogin) (ResponseLogin, error)

type Users added in v1.2.0

type Users struct {
	Username string `gorm:"primaryKey"`
	Email    string `gorm:"unique:users_email_key"`
	Password string `gorm:""`
}

Jump to

Keyboard shortcuts

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