postgres

package
v0.0.0-...-49120e8 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PinModel

type PinModel struct {
	DB *sql.DB
}

func (*PinModel) Create

func (m *PinModel) Create(imageURL string, username string) error

func (*PinModel) Delete

func (m *PinModel) Delete(id int) error

func (*PinModel) Get

func (m *PinModel) Get(id int) (*models.Pin, error)

func (*PinModel) GetAll

func (m *PinModel) GetAll() ([]*models.Pin, error)

func (*PinModel) GetAllByUsername

func (m *PinModel) GetAllByUsername(username string) ([]*models.Pin, error)

type UserModel

type UserModel struct {
	DB *sql.DB
}

func (*UserModel) Create

func (m *UserModel) Create(username string, password string) error

func (*UserModel) GetByUsername

func (m *UserModel) GetByUsername(username string) (*models.User, error)

func (*UserModel) ValidatePassword

func (m *UserModel) ValidatePassword(username string, password string) error

Jump to

Keyboard shortcuts

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