storage

package
v0.0.0-...-532783a Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresStore

type PostgresStore struct {
	DB *sqlx.DB
}

func NewPostgresStore

func NewPostgresStore() (*PostgresStore, error)

func (*PostgresStore) CreateUser

func (s *PostgresStore) CreateUser(user *models.User) error

func (*PostgresStore) GetUserByID

func (s *PostgresStore) GetUserByID(id string) (*models.User, error)

func (*PostgresStore) GetUserByUsername

func (s *PostgresStore) GetUserByUsername(username string) (*models.User, error)

type Storage

type Storage interface {
	CreateUser(user *models.User) error
	GetUserByUsername(username string) (*models.User, error)
	GetUserByID(ID string) (*models.User, error)
}

Jump to

Keyboard shortcuts

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