database

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(wg *sync.WaitGroup) error

func Driver

func Driver() config.DBDriver

func SetDriver

func SetDriver(newDriver config.DBDriver)

Types

type DB

type DB interface {
	AddPost(request models.SendPostRequest) error
	GetPosts(pageNum int, postsPerPage int) ([]models.PostDisplay, error)
	RegisterUser(request models.RegisterRequest) error
	FindUser(filters map[string]string) (models.User, error)
	GetPublicKey(email string) (ssh.PublicKey, error)
	Close(context context.Context) error
}

func GetDB

func GetDB() (DB, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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