pgcrypto

package
v0.0.0-...-3259c9a Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 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 DBQuerier

type DBQuerier struct {
	// contains filtered or unexported fields
}

func NewQuerier

func NewQuerier(conn genericConn) *DBQuerier

NewQuerier creates a DBQuerier that implements Querier.

func (*DBQuerier) CreateUser

func (q *DBQuerier) CreateUser(ctx context.Context, email string, password string) (pgconn.CommandTag, error)

CreateUser implements Querier.CreateUser.

func (*DBQuerier) FindUser

func (q *DBQuerier) FindUser(ctx context.Context, email string) (FindUserRow, error)

FindUser implements Querier.FindUser.

type FindUserRow

type FindUserRow struct {
	Email string `json:"email"`
	Pass  string `json:"pass"`
}

type Querier

type Querier interface {
	CreateUser(ctx context.Context, email string, password string) (pgconn.CommandTag, error)

	FindUser(ctx context.Context, email string) (FindUserRow, error)
}

Querier is a typesafe Go interface backed by SQL queries.

Jump to

Keyboard shortcuts

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