repo

package
v0.0.0-...-c001fcf Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareFilter

func PrepareFilter(filters []entity.Filter) squirrel.And

func PrepareGetListQuery

func PrepareGetListQuery(selectQuery squirrel.SelectBuilder, filterRequest entity.GetListFilter) (query squirrel.SelectBuilder, where squirrel.And)

Types

type BannerRepo

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

func NewBannerRepo

func NewBannerRepo(pg *postgres.Postgres, config *config.Config, logger *logger.Logger) *BannerRepo

New -.

func (*BannerRepo) Create

func (r *BannerRepo) Create(ctx context.Context, req entity.Banner) (entity.Banner, error)

func (*BannerRepo) Delete

func (r *BannerRepo) Delete(ctx context.Context, req entity.Id) error

func (*BannerRepo) GetList

func (*BannerRepo) GetSingle

func (r *BannerRepo) GetSingle(ctx context.Context, req entity.Id) (entity.Banner, error)

func (*BannerRepo) Update

func (r *BannerRepo) Update(ctx context.Context, req entity.Banner) (entity.Banner, error)

type BranchRepo

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

func NewBranchRepo

func NewBranchRepo(pg *postgres.Postgres, config *config.Config, logger *logger.Logger) *BranchRepo

New -.

func (*BranchRepo) Create

func (r *BranchRepo) Create(ctx context.Context, req entity.Branch) (entity.Branch, error)

func (*BranchRepo) Delete

func (r *BranchRepo) Delete(ctx context.Context, req entity.Id) error

func (*BranchRepo) GetList

func (*BranchRepo) GetNearestBranch

func (r *BranchRepo) GetNearestBranch(ctx context.Context, lat, lon float64) (entity.Branch, error)

func (*BranchRepo) GetSingle

func (r *BranchRepo) GetSingle(ctx context.Context, req entity.Id) (entity.Branch, error)

func (*BranchRepo) Update

func (r *BranchRepo) Update(ctx context.Context, req entity.Branch) (entity.Branch, error)

func (*BranchRepo) UpdateField

type CategoryRepo

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

func NewCategoryRepo

func NewCategoryRepo(pg *postgres.Postgres, config *config.Config, logger *logger.Logger) *CategoryRepo

New -.

func (*CategoryRepo) Create

func (*CategoryRepo) Delete

func (r *CategoryRepo) Delete(ctx context.Context, req entity.Id) error

func (*CategoryRepo) GetList

func (*CategoryRepo) GetSingle

func (*CategoryRepo) Update

func (*CategoryRepo) UpdateField

type CourierRepo

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

func NewCourierRepo

func NewCourierRepo(pg *postgres.Postgres, config *config.Config, logger *logger.Logger) *CourierRepo

New -.

func (*CourierRepo) AssignOrderToCourier

func (r *CourierRepo) AssignOrderToCourier(ctx context.Context, orderID, courierID string) error

func (*CourierRepo) GetNearbyCouriers

func (r *CourierRepo) GetNearbyCouriers(ctx context.Context, lat, lng float64, radius float64) ([]entity.Courier, error)

type NotificationRepo

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

func NewNotificationRepo

func NewNotificationRepo(pg *postgres.Postgres, config *config.Config, logger *logger.Logger) *NotificationRepo

func (*NotificationRepo) Create

func (*NotificationRepo) Delete

func (r *NotificationRepo) Delete(ctx context.Context, req entity.Id) error

func (*NotificationRepo) GetList

func (*NotificationRepo) GetSingle

func (r *NotificationRepo) GetSingle(ctx context.Context, req entity.Id) (entity.Notification, error)

func (*NotificationRepo) Update

func (*NotificationRepo) UpdateStatus

type OrderRepo

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

func NewOrderRepo

func NewOrderRepo(pg *postgres.Postgres, config *config.Config, logger *logger.Logger) *OrderRepo

New -.

func (*OrderRepo) Create

func (r *OrderRepo) Create(ctx context.Context, order entity.Order) (entity.Order, error)

func (*OrderRepo) Delete

func (r *OrderRepo) Delete(ctx context.Context, req entity.Id) error

func (*OrderRepo) GetList

func (*OrderRepo) GetOrdersByBranch

func (r *OrderRepo) GetOrdersByBranch(ctx context.Context, req entity.GetListFilter) (entity.OrderList, error)

func (*OrderRepo) GetSingle

func (r *OrderRepo) GetSingle(ctx context.Context, req entity.Id) (entity.Order, error)

func (*OrderRepo) Update

func (r *OrderRepo) Update(ctx context.Context, req entity.Order) (entity.Order, error)

func (*OrderRepo) UpdateField

type ProductRepo

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

func NewProductRepo

func NewProductRepo(pg *postgres.Postgres, config *config.Config, logger *logger.Logger) *ProductRepo

New -.

func (*ProductRepo) Create

func (r *ProductRepo) Create(ctx context.Context, req entity.Product) (entity.Product, error)

func (*ProductRepo) Delete

func (r *ProductRepo) Delete(ctx context.Context, req entity.Id) error

func (*ProductRepo) GetList

func (*ProductRepo) GetSingle

func (r *ProductRepo) GetSingle(ctx context.Context, req entity.Id) (entity.Product, error)

func (*ProductRepo) Update

func (r *ProductRepo) Update(ctx context.Context, req entity.Product) (entity.Product, error)

func (*ProductRepo) UpdateField

type ReportRepo

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

func NewReportRepo

func NewReportRepo(pg *postgres.Postgres, config *config.Config, logger *logger.Logger) *ReportRepo

func (*ReportRepo) Create

func (r *ReportRepo) Create(ctx context.Context, req entity.Report) (entity.Report, error)

func (*ReportRepo) Delete

func (r *ReportRepo) Delete(ctx context.Context, req entity.Id) error

func (*ReportRepo) GetList

func (*ReportRepo) GetSingle

func (r *ReportRepo) GetSingle(ctx context.Context, req entity.Id) (entity.Report, error)

func (*ReportRepo) Update

func (r *ReportRepo) Update(ctx context.Context, req entity.Report) (entity.Report, error)

type SessionRepo

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

func NewSessionRepo

func NewSessionRepo(pg *postgres.Postgres, config *config.Config, logger *logger.Logger) *SessionRepo

New -.

func (*SessionRepo) Create

func (r *SessionRepo) Create(ctx context.Context, req entity.Session) (entity.Session, error)

func (*SessionRepo) Delete

func (r *SessionRepo) Delete(ctx context.Context, req entity.Id) error

func (*SessionRepo) GetList

func (*SessionRepo) GetSingle

func (r *SessionRepo) GetSingle(ctx context.Context, req entity.Id) (entity.Session, error)

func (*SessionRepo) Update

func (r *SessionRepo) Update(ctx context.Context, req entity.Session) (entity.Session, error)

func (*SessionRepo) UpdateField

type UserLocationRepo

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

func NewUserLocationRepo

func NewUserLocationRepo(pg *postgres.Postgres, config *config.Config, logger *logger.Logger) *UserLocationRepo

New -.

func (*UserLocationRepo) Create

func (*UserLocationRepo) Delete

func (r *UserLocationRepo) Delete(ctx context.Context, req entity.Id) error

func (*UserLocationRepo) GetList

func (*UserLocationRepo) GetSingle

func (r *UserLocationRepo) GetSingle(ctx context.Context, req entity.Id) (entity.UserLocation, error)

func (*UserLocationRepo) Update

type UserRepo

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

func NewUserRepo

func NewUserRepo(pg *postgres.Postgres, config *config.Config, logger *logger.Logger) *UserRepo

New -.

func (*UserRepo) Create

func (r *UserRepo) Create(ctx context.Context, req entity.User) (entity.User, error)

func (*UserRepo) Delete

func (r *UserRepo) Delete(ctx context.Context, req entity.Id) error

func (*UserRepo) GetList

func (r *UserRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.UserList, error)

func (*UserRepo) GetSingle

func (r *UserRepo) GetSingle(ctx context.Context, req entity.UserSingleRequest) (entity.User, error)

func (*UserRepo) Update

func (r *UserRepo) Update(ctx context.Context, req entity.User) (entity.User, error)

func (*UserRepo) UpdateField

Jump to

Keyboard shortcuts

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