memory

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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 NewTripStorage

func NewTripStorage() *TripStorage

NewTripStorage initializes the storage

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 NewUserStorage

func NewUserStorage() *UserStorage

NewUserStorage initializes the storage

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

Jump to

Keyboard shortcuts

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