traces

package
v0.0.0-...-4382370 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindByVehicleLicense

func FindByVehicleLicense(license string, offset int64, limit int64) (*[]Trace, error)

FindByVehicleLicense -> find by vehicle

Types

type Trace

type Trace struct {
	mgm.DefaultModel `bson:",inline"`
	License          string    `json:"license,omitempty" bson:"license" validate:"licenseplate"`
	Latitude         float64   `json:"latitude" bson:"latitude" validate:"required,latitude"`
	Longitude        float64   `json:"longitude" bson:"longitude" validate:"required,longitude"`
	DateTime         time.Time `json:"date_time" bson:"date_time"`
}

Trace -> represent a vehicle trace

func (*Trace) Remove

func (t *Trace) Remove(license string) (int64, error)

Remove -> delete model

func (*Trace) Save

func (t *Trace) Save() (primitive.ObjectID, error)

Save -> create or update model

Jump to

Keyboard shortcuts

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