driver

package
v0.0.0-...-c435964 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DummyDrivers

func DummyDrivers(db *pg.DB)

DummyDrivers creates dummy drivers

Types

type Driver

type Driver struct {
	ID        string       `json:"id" pg:"type:uuid,default:gen_random_uuid()"`
	FirstName string       `json:"firstName" pg:",notnull"`
	LastName  *string      `json:"lastName"`
	PhoneNo   string       `json:"phoneNo" pg:",unique,notnull"`
	Gender    model.Gender `json:"gender" pg:",notnull"`
	Rating    float64      `json:"rating" pg:",notnull"`
	Pic       string       `json:"pic" pg:",notnull"`
}

Driver model

type Repo

type Repo struct {
	DB *pg.DB
}

Repo contains all Driver related functions

func (*Repo) GetDriverByID

func (dr *Repo) GetDriverByID(ID string) (*Driver, error)

GetDriverByID gets driver by id

Jump to

Keyboard shortcuts

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