Documentation
¶
Index ¶
- func PrepareFilter(filters []entity.Filter) squirrel.And
- func PrepareGetListQuery(selectQuery squirrel.SelectBuilder, filterRequest entity.GetListFilter) (query squirrel.SelectBuilder, where squirrel.And)
- type BannerRepo
- func (r *BannerRepo) Create(ctx context.Context, req entity.Banner) (entity.Banner, error)
- func (r *BannerRepo) Delete(ctx context.Context, req entity.Id) error
- func (r *BannerRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.BannerList, error)
- func (r *BannerRepo) GetSingle(ctx context.Context, req entity.Id) (entity.Banner, error)
- func (r *BannerRepo) Update(ctx context.Context, req entity.Banner) (entity.Banner, error)
- type BranchRepo
- func (r *BranchRepo) Create(ctx context.Context, req entity.Branch) (entity.Branch, error)
- func (r *BranchRepo) Delete(ctx context.Context, req entity.Id) error
- func (r *BranchRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.BranchList, error)
- func (r *BranchRepo) GetNearestBranch(ctx context.Context, lat, lon float64) (entity.Branch, error)
- func (r *BranchRepo) GetSingle(ctx context.Context, req entity.Id) (entity.Branch, error)
- func (r *BranchRepo) Update(ctx context.Context, req entity.Branch) (entity.Branch, error)
- func (r *BranchRepo) UpdateField(ctx context.Context, req entity.UpdateFieldRequest) (entity.RowsEffected, error)
- type CategoryRepo
- func (r *CategoryRepo) Create(ctx context.Context, req entity.Category) (entity.Category, error)
- func (r *CategoryRepo) Delete(ctx context.Context, req entity.Id) error
- func (r *CategoryRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.CategoryList, error)
- func (r *CategoryRepo) GetSingle(ctx context.Context, req entity.CategorySingleRequest) (entity.Category, error)
- func (r *CategoryRepo) Update(ctx context.Context, req entity.Category) (entity.Category, error)
- func (r *CategoryRepo) UpdateField(ctx context.Context, req entity.UpdateFieldRequest) (entity.RowsEffected, error)
- type CourierRepo
- type NotificationRepo
- func (r *NotificationRepo) Create(ctx context.Context, req entity.Notification) (entity.Notification, error)
- func (r *NotificationRepo) Delete(ctx context.Context, req entity.Id) error
- func (r *NotificationRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.NotificationList, error)
- func (r *NotificationRepo) GetSingle(ctx context.Context, req entity.Id) (entity.Notification, error)
- func (r *NotificationRepo) Update(ctx context.Context, req entity.Notification) (entity.Notification, error)
- func (r *NotificationRepo) UpdateStatus(ctx context.Context, req entity.Notification) (entity.Notification, error)
- type OrderRepo
- func (r *OrderRepo) Create(ctx context.Context, order entity.Order) (entity.Order, error)
- func (r *OrderRepo) Delete(ctx context.Context, req entity.Id) error
- func (r *OrderRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.OrderList, error)
- func (r *OrderRepo) GetOrdersByBranch(ctx context.Context, req entity.GetListFilter) (entity.OrderList, error)
- func (r *OrderRepo) GetSingle(ctx context.Context, req entity.Id) (entity.Order, error)
- func (r *OrderRepo) Update(ctx context.Context, req entity.Order) (entity.Order, error)
- func (r *OrderRepo) UpdateField(ctx context.Context, req entity.UpdateFieldRequest) (entity.RowsEffected, error)
- type ProductRepo
- func (r *ProductRepo) Create(ctx context.Context, req entity.Product) (entity.Product, error)
- func (r *ProductRepo) Delete(ctx context.Context, req entity.Id) error
- func (r *ProductRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.ProductList, error)
- func (r *ProductRepo) GetSingle(ctx context.Context, req entity.Id) (entity.Product, error)
- func (r *ProductRepo) Update(ctx context.Context, req entity.Product) (entity.Product, error)
- func (r *ProductRepo) UpdateField(ctx context.Context, req entity.UpdateFieldRequest) (entity.RowsEffected, error)
- type ReportRepo
- func (r *ReportRepo) Create(ctx context.Context, req entity.Report) (entity.Report, error)
- func (r *ReportRepo) Delete(ctx context.Context, req entity.Id) error
- func (r *ReportRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.ReportList, error)
- func (r *ReportRepo) GetSingle(ctx context.Context, req entity.Id) (entity.Report, error)
- func (r *ReportRepo) Update(ctx context.Context, req entity.Report) (entity.Report, error)
- type SessionRepo
- func (r *SessionRepo) Create(ctx context.Context, req entity.Session) (entity.Session, error)
- func (r *SessionRepo) Delete(ctx context.Context, req entity.Id) error
- func (r *SessionRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.SessionList, error)
- func (r *SessionRepo) GetSingle(ctx context.Context, req entity.Id) (entity.Session, error)
- func (r *SessionRepo) Update(ctx context.Context, req entity.Session) (entity.Session, error)
- func (r *SessionRepo) UpdateField(ctx context.Context, req entity.UpdateFieldRequest) (entity.RowsEffected, error)
- type UserLocationRepo
- func (r *UserLocationRepo) Create(ctx context.Context, req entity.UserLocation) (entity.UserLocation, error)
- func (r *UserLocationRepo) Delete(ctx context.Context, req entity.Id) error
- func (r *UserLocationRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.ListUserLocation, error)
- func (r *UserLocationRepo) GetSingle(ctx context.Context, req entity.Id) (entity.UserLocation, error)
- func (r *UserLocationRepo) Update(ctx context.Context, req entity.UserLocation) (entity.UserLocation, error)
- type UserRepo
- func (r *UserRepo) Create(ctx context.Context, req entity.User) (entity.User, error)
- func (r *UserRepo) Delete(ctx context.Context, req entity.Id) error
- func (r *UserRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.UserList, error)
- func (r *UserRepo) GetSingle(ctx context.Context, req entity.UserSingleRequest) (entity.User, error)
- func (r *UserRepo) Update(ctx context.Context, req entity.User) (entity.User, error)
- func (r *UserRepo) UpdateField(ctx context.Context, req entity.UpdateFieldRequest) (entity.RowsEffected, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
New -.
func (*BannerRepo) GetList ¶
func (r *BannerRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.BannerList, error)
type BranchRepo ¶
type BranchRepo struct {
// contains filtered or unexported fields
}
func NewBranchRepo ¶
New -.
func (*BranchRepo) GetList ¶
func (r *BranchRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.BranchList, error)
func (*BranchRepo) GetNearestBranch ¶
func (*BranchRepo) UpdateField ¶
func (r *BranchRepo) UpdateField(ctx context.Context, req entity.UpdateFieldRequest) (entity.RowsEffected, error)
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) GetList ¶
func (r *CategoryRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.CategoryList, error)
func (*CategoryRepo) GetSingle ¶
func (r *CategoryRepo) GetSingle(ctx context.Context, req entity.CategorySingleRequest) (entity.Category, error)
func (*CategoryRepo) UpdateField ¶
func (r *CategoryRepo) UpdateField(ctx context.Context, req entity.UpdateFieldRequest) (entity.RowsEffected, error)
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 ¶
type NotificationRepo ¶
type NotificationRepo struct {
// contains filtered or unexported fields
}
func NewNotificationRepo ¶
func (*NotificationRepo) Create ¶
func (r *NotificationRepo) Create(ctx context.Context, req entity.Notification) (entity.Notification, error)
func (*NotificationRepo) GetList ¶
func (r *NotificationRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.NotificationList, error)
func (*NotificationRepo) GetSingle ¶
func (r *NotificationRepo) GetSingle(ctx context.Context, req entity.Id) (entity.Notification, error)
func (*NotificationRepo) Update ¶
func (r *NotificationRepo) Update(ctx context.Context, req entity.Notification) (entity.Notification, error)
func (*NotificationRepo) UpdateStatus ¶
func (r *NotificationRepo) UpdateStatus(ctx context.Context, req entity.Notification) (entity.Notification, error)
type OrderRepo ¶
type OrderRepo struct {
// contains filtered or unexported fields
}
func NewOrderRepo ¶
New -.
func (*OrderRepo) GetOrdersByBranch ¶
func (*OrderRepo) UpdateField ¶
func (r *OrderRepo) UpdateField(ctx context.Context, req entity.UpdateFieldRequest) (entity.RowsEffected, error)
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) GetList ¶
func (r *ProductRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.ProductList, error)
func (*ProductRepo) UpdateField ¶
func (r *ProductRepo) UpdateField(ctx context.Context, req entity.UpdateFieldRequest) (entity.RowsEffected, error)
type ReportRepo ¶
type ReportRepo struct {
// contains filtered or unexported fields
}
func NewReportRepo ¶
func (*ReportRepo) GetList ¶
func (r *ReportRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.ReportList, 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) GetList ¶
func (r *SessionRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.SessionList, error)
func (*SessionRepo) UpdateField ¶
func (r *SessionRepo) UpdateField(ctx context.Context, req entity.UpdateFieldRequest) (entity.RowsEffected, error)
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 (r *UserLocationRepo) Create(ctx context.Context, req entity.UserLocation) (entity.UserLocation, error)
func (*UserLocationRepo) GetList ¶
func (r *UserLocationRepo) GetList(ctx context.Context, req entity.GetListFilter) (entity.ListUserLocation, error)
func (*UserLocationRepo) GetSingle ¶
func (r *UserLocationRepo) GetSingle(ctx context.Context, req entity.Id) (entity.UserLocation, error)
func (*UserLocationRepo) Update ¶
func (r *UserLocationRepo) Update(ctx context.Context, req entity.UserLocation) (entity.UserLocation, error)
type UserRepo ¶
type UserRepo struct {
// contains filtered or unexported fields
}
func NewUserRepo ¶
New -.
func (*UserRepo) UpdateField ¶
func (r *UserRepo) UpdateField(ctx context.Context, req entity.UpdateFieldRequest) (entity.RowsEffected, error)
Click to show internal directories.
Click to hide internal directories.