storage

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: 3 Imported by: 0

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 CarShareStorage

type CarShareStorage interface {
	GetAll(userID string, context api2go.APIContexter) ([]model.CarShare, error)
	GetOne(id string, context api2go.APIContexter) (model.CarShare, error)
	Insert(c model.CarShare, context api2go.APIContexter) (string, error)
	Delete(id string, context api2go.APIContexter) error
	Update(c model.CarShare, context api2go.APIContexter) error
}

CarShareStorage stores all car shares

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

type UserInserter interface {
	Insert(u model.User, context api2go.APIContexter) (string, error)
}

UserInserter functions related to inserting users into a data store

type UserStorage

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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