Documentation ¶
Index ¶
- type CarShareStorage
- func (s *CarShareStorage) Delete(id string, context api2go.APIContexter) error
- func (s CarShareStorage) GetAll(userID string, context api2go.APIContexter) ([]model.CarShare, error)
- func (s CarShareStorage) GetOne(id string, context api2go.APIContexter) (model.CarShare, error)
- func (s *CarShareStorage) Insert(c model.CarShare, context api2go.APIContexter) (string, error)
- func (s *CarShareStorage) Update(c model.CarShare, context api2go.APIContexter) error
- type TripStorage
- func (s *TripStorage) Delete(id string, context api2go.APIContexter) error
- func (s TripStorage) GetAll(context api2go.APIContexter) ([]model.Trip, error)
- func (s *TripStorage) GetLatest(carShareID string, context api2go.APIContexter) (model.Trip, error)
- func (s TripStorage) GetOne(id string, context api2go.APIContexter) (model.Trip, error)
- func (s *TripStorage) Insert(t model.Trip, context api2go.APIContexter) (string, error)
- func (s *TripStorage) Update(t model.Trip, context api2go.APIContexter) error
- type UserStorage
- func (s *UserStorage) Delete(id string, context api2go.APIContexter) error
- func (s UserStorage) GetAll(context api2go.APIContexter) ([]model.User, error)
- func (s UserStorage) GetByFirebaseUID(firebaseUID string, context api2go.APIContexter) (model.User, error)
- func (s UserStorage) GetOne(id string, context api2go.APIContexter) (model.User, error)
- func (s *UserStorage) Insert(u model.User, context api2go.APIContexter) (string, error)
- func (s *UserStorage) Update(u model.User, context api2go.APIContexter) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CarShareStorage ¶
type CarShareStorage struct {
// contains filtered or unexported fields
}
CarShareStorage stores all car shares
func NewCarShareStorage ¶
func NewCarShareStorage() *CarShareStorage
NewCarShareStorage initializes the storage
func (*CarShareStorage) Delete ¶
func (s *CarShareStorage) Delete(id string, context api2go.APIContexter) error
Delete to satisfy storage.CarShareStoreage interface
func (CarShareStorage) GetAll ¶
func (s CarShareStorage) GetAll(userID string, context api2go.APIContexter) ([]model.CarShare, error)
GetAll to satisfy storage.CarShareStoreage interface
func (CarShareStorage) GetOne ¶
func (s CarShareStorage) GetOne(id string, context api2go.APIContexter) (model.CarShare, error)
GetOne to satisfy storage.CarShareStoreage interface
func (*CarShareStorage) Insert ¶
func (s *CarShareStorage) Insert(c model.CarShare, context api2go.APIContexter) (string, error)
Insert to satisfy storage.CarShareStoreage interface
func (*CarShareStorage) Update ¶
func (s *CarShareStorage) Update(c model.CarShare, context api2go.APIContexter) error
Update to satisfy storage.CarShareStoreage interface
type TripStorage ¶
type TripStorage struct {
// contains filtered or unexported fields
}
TripStorage in memory trip store
func (*TripStorage) Delete ¶
func (s *TripStorage) Delete(id string, context api2go.APIContexter) error
Delete to satisfy storage.TripStorage interface
func (TripStorage) GetAll ¶
func (s TripStorage) GetAll(context api2go.APIContexter) ([]model.Trip, error)
GetAll to satisfy storage.TripStorage interface
func (*TripStorage) GetLatest ¶
func (s *TripStorage) GetLatest(carShareID string, context api2go.APIContexter) (model.Trip, error)
GetLatest to satisfy storage.TripStorage interface
func (TripStorage) GetOne ¶
func (s TripStorage) GetOne(id string, context api2go.APIContexter) (model.Trip, error)
GetOne to satisfy storage.TripStorage interface
func (*TripStorage) Insert ¶
func (s *TripStorage) Insert(t model.Trip, context api2go.APIContexter) (string, error)
Insert to satisfy storage.TripStorage interface
func (*TripStorage) Update ¶
func (s *TripStorage) Update(t model.Trip, context api2go.APIContexter) error
Update to satisfy storage.TripStorage interface
type UserStorage ¶
type UserStorage struct {
// contains filtered or unexported fields
}
UserStorage stores all users
func (*UserStorage) Delete ¶
func (s *UserStorage) Delete(id string, context api2go.APIContexter) error
Delete one :(
func (UserStorage) GetAll ¶
func (s UserStorage) GetAll(context api2go.APIContexter) ([]model.User, error)
GetAll of the users
func (UserStorage) GetByFirebaseUID ¶
func (s UserStorage) GetByFirebaseUID(firebaseUID string, context api2go.APIContexter) (model.User, error)
GetByFirebaseUID get user by firebaseUID
func (UserStorage) GetOne ¶
func (s UserStorage) GetOne(id string, context api2go.APIContexter) (model.User, error)
GetOne user
func (*UserStorage) Insert ¶
func (s *UserStorage) Insert(u model.User, context api2go.APIContexter) (string, error)
Insert a user
func (*UserStorage) Update ¶
func (s *UserStorage) Update(u model.User, context api2go.APIContexter) error
Update a user