Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidID = errors.New("invalid ID")
ErrInvalidID indicates that the provided ID is not valid
View Source
var ErrNotFound = errors.New("not found")
ErrNotFound indicates that an entity has not been found
Functions ¶
This section is empty.
Types ¶
type FirebaseUserGetter ¶ added in v0.3.0
type FirebaseUserGetter interface {
GetByFirebaseUID(firebaseUID string, context api2go.APIContexter) (model.User, error)
}
FirebaseUserGetter functions related to users linked for firebase users
type TripStorage ¶
type TripStorage interface {
// Get all trips
GetAll(context api2go.APIContexter) ([]model.Trip, error)
// Get a trip
GetOne(id string, context api2go.APIContexter) (model.Trip, error)
// Insert a trip
Insert(t model.Trip, context api2go.APIContexter) (string, error)
// Delete a trip
Delete(id string, context api2go.APIContexter) error
// Update a trip
Update(t model.Trip, context api2go.APIContexter) error
// Get latest trip in a car share
GetLatest(carShareID string, context api2go.APIContexter) (model.Trip, error)
}
TripStorage interface for trip stores. All trips must be tied to a car share.
type UserDeleter ¶ added in v0.3.0
type UserDeleter interface {
Delete(id string, context api2go.APIContexter) error
}
UserDeleter functions related to deleting users from a data store
type UserGetter ¶ added in v0.3.0
type UserGetter interface {
GetAll(context api2go.APIContexter) ([]model.User, error)
GetOne(id string, context api2go.APIContexter) (model.User, error)
}
UserGetter functions related to retrieving users from a data store
type UserInserter ¶ added in v0.3.0
UserInserter functions related to inserting users into a data store
type UserStorage ¶
type UserStorage interface {
UserInserter
UserGetter
UserUpdater
UserDeleter
FirebaseUserGetter
}
UserStorage functions for interacting with users in a data store
type UserUpdater ¶ added in v0.3.0
type UserUpdater interface {
Update(u model.User, context api2go.APIContexter) error
}
UserUpdater functions related to updating users in a data store
Click to show internal directories.
Click to hide internal directories.