database

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2022 License: MIT Imports: 8 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 Connection added in v0.4.0

type Connection interface {
	AddPost(request models.SendPostRequest) error
	GetPosts(pageNum int, postsPerPage int) ([]models.PostDisplay, error)
	GetPostsSince(max int, since time.Time) ([]models.PostDisplay, int, 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 GetConnection added in v0.4.0

func GetConnection(ctx context.Context) (Connection, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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