pg

package
v0.0.0-...-824ed62 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCodeUniqueViolation     = "unique_violation"
	ErrCodeNoData              = "no_data"
	ErrCodeForeignKeyViolation = "foreign_key_violation"
	ErrCodeUndefinedColumn     = "undefined_column"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

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

func NewRepository

func NewRepository(cfg config.Config) (Repo, error)

Returns an object of the Ropository.

func (Repo) CheckUserIDWithPasword

func (r Repo) CheckUserIDWithPasword(ctx context.Context, userID, password string) error

func (Repo) Close

func (r Repo) Close() error

func (Repo) CountRowsTable

func (r Repo) CountRowsTable(ctx context.Context, table string) (int, error)

func (Repo) DelCardByID

func (r Repo) DelCardByID(ctx context.Context, id string) error

func (Repo) DelPartnerByID

func (r Repo) DelPartnerByID(ctx context.Context, ID string) (string, error)

func (Repo) DelSlideByID

func (r Repo) DelSlideByID(ctx context.Context, ID string) (string, error)

func (Repo) FindEmailWithPasword

func (r Repo) FindEmailWithPasword(ctx context.Context, identity structs.IdentityData) (string, error)

func (Repo) InsertCard

func (r Repo) InsertCard(ctx context.Context, card structs.Card) error

func (Repo) InsertPartner

func (r Repo) InsertPartner(ctx context.Context, partner structs.Partner, chWell chan struct{}) error

func (Repo) InsertSlider

func (r Repo) InsertSlider(ctx context.Context, slider structs.Slide, chWell chan struct{}) error

func (Repo) SelectAllCards

func (r Repo) SelectAllCards(ctx context.Context, params structs.CardQueryParameters) ([]structs.Card, error)

func (Repo) SelectAllPartners

func (r Repo) SelectAllPartners(ctx context.Context, params structs.PartnerQueryParameters) ([]structs.Partner, error)

func (Repo) SelectCardByID

func (r Repo) SelectCardByID(ctx context.Context, id string) (structs.Card, error)

func (Repo) SelectContact

func (r Repo) SelectContact(ctx context.Context) (structs.Contact, error)

func (Repo) SelectSlider

func (r Repo) SelectSlider(ctx context.Context) ([]structs.Slide, error)

func (Repo) UpdateContact

func (r Repo) UpdateContact(ctx context.Context, contact structs.Contact) error

func (Repo) UpdatePassord

func (r Repo) UpdatePassord(ctx context.Context, userID, password string) error

Jump to

Keyboard shortcuts

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