postgres

package
v0.0.0-...-0a9cbe0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(conf map[string]string) (drivers.DataStore, error)

Types

type Postgres

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

func (*Postgres) Close

func (p *Postgres) Close() error

func (*Postgres) Connect

func (p *Postgres) Connect() error

func (*Postgres) CreateUser

func (ur *Postgres) CreateUser(ctx context.Context, user *entity.User) (int, error)

func (*Postgres) GetUserByEmail

func (ur *Postgres) GetUserByEmail(ctx context.Context, email string) (user *entity.User, err error)

func (*Postgres) GetUserByID

func (ur *Postgres) GetUserByID(ctx context.Context, id int) (user *entity.User, err error)

func (*Postgres) GetUsers

func (ur *Postgres) GetUsers(ctx context.Context) (users []*entity.User, err error)

func (*Postgres) Name

func (p *Postgres) Name() string

type SearchQuery

type SearchQuery struct {
	Limit     int
	Offset    int
	SortBy    string
	SortOrder string
}

Jump to

Keyboard shortcuts

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