Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cab ¶
type Cab struct { ID string `json:"id" pg:"type:uuid,default:gen_random_uuid()"` Type model.CabType `json:"type" pg:",notnull"` Model string `json:"model" pg:",notnull"` WorkingAc bool `json:"workingAC" pg:",notnull"` Number int `json:"number" pg:",notnull"` NamePlate string `json:"namePlate" pg:",unique,notnull"` Pic string `json:"pic" pg:",notnull"` DriverID string `json:"driver" pg:"type:uuid,unique,notnull"` Available bool `json:"available" pg:",use_zero,notnull"` }
Cab model
type Repo ¶
type Repo struct {
DB *pg.DB
}
Repo contains all Cab related functions
func (*Repo) GetCabByID ¶
GetCabByID gets cab by id
func (*Repo) NearbyCabsSub ¶
func (cr *Repo) NearbyCabsSub(ctx context.Context, input model.NearbyCabInput) (chan []*model.NearbyCab, error)
NearbyCabsSub returns a channel which sends nearby cabs
Click to show internal directories.
Click to hide internal directories.