store

package
v0.0.0-...-b76b2b2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MenuStore struct {
	// contains filtered or unexported fields
}

func NewMenuStore

func NewMenuStore(db *gorm.DB) *MenuStore
func (ms MenuStore) AddFoodToMenu(menu *model.Menu, food *model.Food) error
func (ms MenuStore) GetMenu(menuId uuid.UUID) (*model.Menu, error)
func (ms MenuStore) RemoveFoodFromMenu(menuId uuid.UUID, foodId uuid.UUID) error

type RestaurantStore

type RestaurantStore struct {
	// contains filtered or unexported fields
}

func NewRestaurantStore

func NewRestaurantStore(db *gorm.DB) *RestaurantStore

func (RestaurantStore) AddAddressToRestaurant

func (rs RestaurantStore) AddAddressToRestaurant(userId, restaurantId uuid.UUID, addr *model.Address) (*model.Address, error)

func (RestaurantStore) AddRestaurantToUser

func (rs RestaurantStore) AddRestaurantToUser(userId uuid.UUID, restaurant model.Restaurant) error

func (RestaurantStore) DeleteRestaurantFromUser

func (rs RestaurantStore) DeleteRestaurantFromUser(userId, restaurantId uuid.UUID) error

func (RestaurantStore) GetAll

func (rs RestaurantStore) GetAll(userId uuid.UUID) ([]model.Restaurant, error)

func (RestaurantStore) GetByID

func (rs RestaurantStore) GetByID(userId, restaurantId uuid.UUID) (*model.Restaurant, error)

func (RestaurantStore) Update

func (rs RestaurantStore) Update(userId uuid.UUID, restaurant *model.Restaurant) (*model.Restaurant, error)

type UserStore

type UserStore struct {
	// contains filtered or unexported fields
}

func NewUserStore

func NewUserStore(db *gorm.DB) *UserStore

func (*UserStore) Create

func (us *UserStore) Create(u *model.User) (err error)

func (*UserStore) Delete

func (us *UserStore) Delete(u *model.User) error

func (*UserStore) GetByEmail

func (us *UserStore) GetByEmail(e string) (*model.User, error)

func (*UserStore) GetByID

func (us *UserStore) GetByID(id uuid.UUID) (*model.User, error)

func (*UserStore) Update

func (us *UserStore) Update(u *model.User) error

Jump to

Keyboard shortcuts

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