postgres

package
v0.0.0-...-bb88bec Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyMigrations

func ApplyMigrations(db *sql.DB) error

func RollbackMigrations

func RollbackMigrations(db *sql.DB) error

Types

type ProfilesProvider

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

func NewProfilesProvider

func NewProfilesProvider(querier pgxscan.Querier) ProfilesProvider

func (ProfilesProvider) Add

func (p ProfilesProvider) Add(ctx context.Context, profile *models.Profile) (string, error)

func (ProfilesProvider) Get

func (p ProfilesProvider) Get(ctx context.Context, profileID string) (*models.Profile, error)

func (ProfilesProvider) GetAll

func (p ProfilesProvider) GetAll(ctx context.Context) ([]*models.Profile, error)

TODO : add pagination

func (ProfilesProvider) Search

func (p ProfilesProvider) Search(ctx context.Context, params *models.SearchParams) ([]*models.Profile, error)

type UsersProvider

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

func NewUsersProvider

func NewUsersProvider(querier pgxscan.Querier) UsersProvider

func (UsersProvider) Add

func (p UsersProvider) Add(ctx context.Context, user *models.User) (string, error)

func (UsersProvider) Exists

func (p UsersProvider) Exists(ctx context.Context, user *models.User) (bool, error)

func (UsersProvider) Get

func (p UsersProvider) Get(ctx context.Context, login string) (*models.User, error)

Jump to

Keyboard shortcuts

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