trip

package
v0.0.0-...-43a8b31 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareTripBasic

func CompareTripBasic(t1 wings.TripBasic, t2 wings.TripBasic) (bool, []string)

func CompareTripObj

func CompareTripObj(t1 TripObj, t2 TripObj) (bool, []string)

func DeleteTripObj

func DeleteTripObj(toDelete TripObj, self wings.UserBasic) bool

Types

type TripObj

type TripObj struct {
	ID          int             `json:"id"`
	Details     wings.TripBasic `json:"details"`
	User        wings.UserBasic `json:"user"`
	TimeCreated time.Time       `json:"time_created"`
	LastUpdated time.Time       `json:"last_updated"`
}

TripObj - All information of a single trip.

func DummyTripObj

func DummyTripObj() TripObj

func GetTripObj

func GetTripObj(id int, self wings.UserBasic) TripObj

func NewTrip

func NewTrip(newTrip wings.TripBasic, self wings.UserBasic) TripObj

func UpdateTripObj

func UpdateTripObj(toUpdate TripObj, self wings.UserBasic) TripObj

func (TripObj) GetID

func (trip TripObj) GetID() int

GetID (istruct) - Returns the trip ID.

func (*TripObj) SetID

func (trip *TripObj) SetID(id int)

SetID (istruct) - Sets the trip ID.

type TripObjs

type TripObjs []TripObj

TripObjs - An array of TripObj

func GetLatestTrips

func GetLatestTrips() TripObjs

func SearchTrips

func SearchTrips(query TripsSearchQuery, self wings.UserBasic) TripObjs

type TripsSearchQuery

type TripsSearchQuery struct {
	Cities []wings.City `json:"cities"`
	Length int          `json:"length"`
	Query  string       `json:"query"`
}

TripsSearchQuery - Search query for trips

type TripsSearchQuerys

type TripsSearchQuerys []TripsSearchQuery

TripsSearchQuerys - An array of TripsSearchQuery

Jump to

Keyboard shortcuts

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