Documentation ¶
Index ¶
- type Manager
- func (m *Manager) CreateTrip(c context.Context, trip *base.Trip) (*TripRecord, error)
- func (m *Manager) DeleteTrip(c context.Context, id id.TripID) error
- func (m *Manager) GetTrip(c context.Context, id id.TripID, accountID id.AccountID) (*TripRecord, error)
- func (m *Manager) GetTrips(c context.Context, accountID id.AccountID, status base.TripStatus) ([]*TripRecord, error)
- func (m *Manager) GetTripsByLimit(c context.Context, limit int64) ([]*TripRecord, error)
- func (m *Manager) UpdateTrip(c context.Context, tid id.TripID, aid id.AccountID, updatedAt int64, ...) error
- type TripRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) CreateTrip ¶
CreateTrip creates a trip.
func (*Manager) DeleteTrip ¶
DeleteTrip deletes trip by id.
func (*Manager) GetTrip ¶
func (m *Manager) GetTrip(c context.Context, id id.TripID, accountID id.AccountID) (*TripRecord, error)
GetTrip gets a trip.
func (*Manager) GetTrips ¶
func (m *Manager) GetTrips(c context.Context, accountID id.AccountID, status base.TripStatus) ([]*TripRecord, error)
GetTrips gets trips for the account by status. If status is not specified, gets all trips for the account.
func (*Manager) GetTripsByLimit ¶
GetAllTrips gets trips by limit.
type TripRecord ¶
type TripRecord struct { mgutil.IDField `bson:"inline"` mgutil.UpdatedAtField `bson:"inline"` Trip *base.Trip `bson:"trip"` }
TripRecord defines a trip record in mongo db.
Click to show internal directories.
Click to hide internal directories.