maria

package
v0.0.0-...-7a9e484 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package maria provides storage implementations for MariaDB.

Package maria provides storage implementations for MariaDB.

Package maria provides storage implementations for MariaDB.

Package maria provides storage implementations for MariaDB.

Package maria provides storage implementations for MariaDB.

Package maria provides storage implementations for MariaDB.

Package maria provides storage implementations for MariaDB.

Package maria provides storage implementations for MariaDB.

Package maria provides storage implementations for MariaDB.

Package maria provides storage implementations for MariaDB.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	DB *sqlx.DB
}

func NewCategory

func NewCategory(db *sqlx.DB) *Category

func (*Category) Create

func (c *Category) Create() error

func (*Category) Drop

func (c *Category) Drop() error

func (*Category) FindByRestaurant

func (c *Category) FindByRestaurant(restaurantID uint64) ([]model.Category, error)

type Characteristic

type Characteristic struct {
	DB *sqlx.DB
}

func NewCharacteristic

func NewCharacteristic(db *sqlx.DB) *Characteristic

func (*Characteristic) Create

func (c *Characteristic) Create() error

func (*Characteristic) Drop

func (c *Characteristic) Drop() error

func (*Characteristic) FindByDish

func (c *Characteristic) FindByDish(dishID uint64) ([]model.Characteristic, error)

type Configuration

type Configuration struct {
	DB *sqlx.DB
}

func NewConfiguration

func NewConfiguration(db *sqlx.DB) *Configuration

func (*Configuration) Create

func (c *Configuration) Create() error

func (*Configuration) Drop

func (c *Configuration) Drop() error

func (*Configuration) FindByPosition

func (c *Configuration) FindByPosition(positionID uint64) ([]model.Configuration, error)

func (*Configuration) FindVariants

func (c *Configuration) FindVariants(id uint64) ([]model.Variant, error)

func (*Configuration) Store

func (c *Configuration) Store(positionID uint64, configuration *model.Configuration) (uint64, error)

func (*Configuration) StoreVariant

func (c *Configuration) StoreVariant(configurationID uint64, variant *model.Variant) (uint64, error)

type Dish

type Dish struct {
	DB *sqlx.DB
}

func NewDish

func NewDish(db *sqlx.DB) *Dish

func (*Dish) Create

func (d *Dish) Create() error

func (*Dish) Drop

func (d *Dish) Drop() error

func (*Dish) Find

func (d *Dish) Find(id uint64) (model.Dish, error)

func (*Dish) FindByCategory

func (d *Dish) FindByCategory(categoryID uint64) ([]model.Dish, error)

type Offer

type Offer struct {
	DB *sqlx.DB
}

func NewOffer

func NewOffer(db *sqlx.DB) *Offer

func (*Offer) Cancel

func (o *Offer) Cancel(id uint64) error

func (*Offer) Create

func (o *Offer) Create() error

func (*Offer) Drop

func (o *Offer) Drop() error

func (*Offer) Find

func (o *Offer) Find(id uint64) (model.Offer, error)

func (*Offer) FindValid

func (o *Offer) FindValid(now time.Time) ([]model.Offer, error)

func (*Offer) FindValidTill

func (o *Offer) FindValidTill(to time.Time) ([]model.Offer, error)

func (*Offer) OrderingUsers

func (o *Offer) OrderingUsers(id uint64) ([]model.User, error)

func (*Offer) OwnerID

func (o *Offer) OwnerID(id uint64) (uint64, error)

func (*Offer) SetReadyAt

func (o *Offer) SetReadyAt(id uint64, readyAt time.Time) error

func (*Offer) Store

func (o *Offer) Store(offer *model.Offer) error

type Order

type Order struct {
	DB *sqlx.DB
}

func NewOrder

func NewOrder(db *sqlx.DB) *Order

func (*Order) Create

func (o *Order) Create() error

func (*Order) Drop

func (o *Order) Drop() error

func (*Order) FindByOffer

func (o *Order) FindByOffer(offerID uint64) ([]model.Order, error)

func (*Order) FindByOfferAndUser

func (o *Order) FindByOfferAndUser(offerID, userID uint64) (model.Order, error)

func (*Order) MarkAsPaid

func (o *Order) MarkAsPaid(id uint64) error

func (*Order) Store

func (o *Order) Store(offerID uint64, order *model.Order) (uint64, error)

type Position

type Position struct {
	DB *sqlx.DB
}

func NewPosition

func NewPosition(db *sqlx.DB) *Position

func (*Position) Create

func (p *Position) Create() error

func (*Position) Drop

func (p *Position) Drop() error

func (*Position) FindByOrder

func (p *Position) FindByOrder(orderID uint64) ([]model.Position, error)

func (*Position) Store

func (p *Position) Store(orderID uint64, position *model.Position) (uint64, error)

type Restaurant

type Restaurant struct {
	DB *sqlx.DB
}

func NewRestaurant

func NewRestaurant(db *sqlx.DB) *Restaurant

func (*Restaurant) Create

func (r *Restaurant) Create() error

func (*Restaurant) Drop

func (r *Restaurant) Drop() error

func (*Restaurant) Exists

func (r *Restaurant) Exists(id uint64) (bool, error)

func (*Restaurant) Find

func (r *Restaurant) Find(id uint64) (model.Restaurant, error)

type User

type User struct {
	DB *sqlx.DB
}

func NewUser

func NewUser(db *sqlx.DB) *User

func (*User) ConfirmUser

func (u *User) ConfirmUser(token string) error

func (*User) Create

func (u *User) Create() error

func (*User) Drop

func (u *User) Drop() error

func (*User) Find

func (u *User) Find(id uint64) (model.User, error)

func (*User) FindByMailAddr

func (u *User) FindByMailAddr(mailAddr string) (model.User, error)

func (*User) MailExists

func (u *User) MailExists(mailAddr string) (bool, error)

func (*User) SetPaypalMailAddr

func (u *User) SetPaypalMailAddr(id uint64, paypalMailAddr string) error

func (*User) Store

func (u *User) Store(user *model.User) (uint64, error)

func (*User) StoreConfirmationToken

func (u *User) StoreConfirmationToken(userID uint64, token string) error

type Variant

type Variant struct {
	DB *sqlx.DB
}

func NewVariant

func NewVariant(db *sqlx.DB) *Variant

func (*Variant) Create

func (v *Variant) Create() error

func (*Variant) Drop

func (v *Variant) Drop() error

func (*Variant) FindByCharacteristic

func (v *Variant) FindByCharacteristic(characteristicID uint64) ([]model.Variant, error)

Jump to

Keyboard shortcuts

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