pg

package
v0.0.0-...-f15602e Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package pg contains implementations for cart repositories

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CartRepository

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

CartRepository pg repository implementation.

func NewCartRepository

func NewCartRepository(client *ent.Client, logger *zap.Logger) *CartRepository

NewCartRepository create instance of CartRepository.

func (CartRepository) Delete

func (r CartRepository) Delete(ctx context.Context, filter *cart.Filter) error

Delete carts from db.

func (CartRepository) Get

func (r CartRepository) Get(ctx context.Context, filter *cart.Filter) (*cart.Cart, error)

Get cart from db.

func (CartRepository) Query

func (r CartRepository) Query(
	ctx context.Context,
	criteria *cart.QueryCriteria,
) (*cart.QueryResult, error)

Query carts from db based on criteria.

func (CartRepository) Save

func (r CartRepository) Save(ctx context.Context, props *cart.Props) (*cart.Cart, error)

Save cart in db.

Jump to

Keyboard shortcuts

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