repository

package
v0.0.0-...-2068963 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderRepository

type OrderRepository interface {
	CreateOrder(context.Context, *pb.Order) (*pb.Order, error)
	GetOrderDetails(context.Context, *pb.GetOrderFilter) (*pb.GetOrderResponse, error)
	GetAllOrders(context.Context, *pb.GetOrdersRequest) (*pb.GetOrderResponse, error)
	SendOrder(context.Context, *pb.SendOrderRequest) (*stripe.PaymentLink, error)
}

func NewOrderRepository

func NewOrderRepository(db Store, ordQuery query.OrderQuery) OrderRepository

type Store

type Store interface {
	WithTx(ctx context.Context, fn func(pgx.Tx) error) error
	WithoutTx(ctx context.Context, fn func(*pgxpool.Pool) error) error
}

func NewStore

func NewStore(db *pgxpool.Pool) Store

type StoreImpl

type StoreImpl struct {
	Db *pgxpool.Pool
	// contains filtered or unexported fields
}

func (*StoreImpl) WithTx

func (s *StoreImpl) WithTx(ctx context.Context, fn func(pgx.Tx) error) error

func (*StoreImpl) WithoutTx

func (s *StoreImpl) WithoutTx(ctx context.Context, fn func(*pgxpool.Pool) error) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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