postgres

package
v0.0.0-...-a4ecc4f Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrDuplicateKeyValue

func IsErrDuplicateKeyValue(err error) bool

func IsErrNotFound

func IsErrNotFound(err error) bool

func Setup

func Setup(db *Database) error

Types

type Database

type Database struct {
	Gorm *gorm.DB
}

func New

func New(url string, log bool) (*Database, error)

func (*Database) CreateUser

func (d *Database) CreateUser(ctx context.Context, user *models.User) error

func (*Database) GetUserByUsername

func (d *Database) GetUserByUsername(ctx context.Context, username string) (*models.User, error)

Jump to

Keyboard shortcuts

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