database

package
v0.0.0-...-540b577 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataAccessInterface

type DataAccessInterface interface {
	SetupDatabase() error
	LookupUserByEmail(id string) *models.User
	LookupUserByID(email string) *models.User
}

DataAccessInterface data access interface

数据访问接口

func NewDatabase

func NewDatabase() (*DataAccessInterface, error)

type Database

type Database struct{}

func (*Database) LookupUserByEmail

func (db *Database) LookupUserByEmail(email string) *models.User

LookupUserByEmail get user by email 通过email查找用户

func (*Database) LookupUserByID

func (db *Database) LookupUserByID(id string) *models.User

LookupUserByID get user by id 通过ID查找用户

func (*Database) SetupDatabase

func (db *Database) SetupDatabase() error

Jump to

Keyboard shortcuts

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