listing

package
v0.0.0-...-de8529d Latest Latest
Warning

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

Go to latest
Published: Dec 22, 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 Handler

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

func NewHandler

func NewHandler(listingStore types.ListingStore, userStore types.UserStore,
	currencyStore types.CurrencyStore, reviewStore types.ReviewStore,
	bankDetailStore types.BankDetailStore, orderStore types.OrderStore,
	fcmHistoryStore types.FCMHistoryStore) *Handler

func (*Handler) RegisterRoutes

func (h *Handler) RegisterRoutes(router *mux.Router)

type Store

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

func NewStore

func NewStore(db *sql.DB) *Store

func (*Store) AddWeightAvailable

func (s *Store) AddWeightAvailable(listingId int, addValue float64) error

func (*Store) CreateListing

func (s *Store) CreateListing(listing types.Listing) error

func (*Store) DeleteListing

func (s *Store) DeleteListing(id int) error

func (*Store) GetAllListings

func (s *Store) GetAllListings(carrierId int) ([]types.ListingReturnFromDB, error)

func (*Store) GetListingByID

func (s *Store) GetListingByID(id int) (*types.ListingReturnFromDB, error)

func (*Store) GetListingByPayload

func (s *Store) GetListingByPayload(carrierName string, destination string, weightAvailable float64, pricePerKg float64, departureDate time.Time) (*types.ListingReturnFromDB, error)

func (*Store) GetListingsByCarrierID

func (s *Store) GetListingsByCarrierID(carrierId int) ([]types.ListingReturnFromDB, error)

func (*Store) IsListingDuplicate

func (s *Store) IsListingDuplicate(carrierId int, destination string, weightAvailable float64, departureDate time.Time) (bool, error)

func (*Store) ModifyListing

func (s *Store) ModifyListing(id int, listing types.Listing) error

func (*Store) SubtractWeightAvailable

func (s *Store) SubtractWeightAvailable(listingId int, minusValue float64) error

func (*Store) UpdateListingExpStatus

func (s *Store) UpdateListingExpStatus() error

Jump to

Keyboard shortcuts

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