repositories

package
v0.0.0-...-9c5febd Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Customer

type Customer interface {
	StoreCustomer(customer core.Customer) (int, error)
	FindCustomerByID(id int) (core.Customer, bool)
}

Customer repository

type Item

type Item interface {
	StoreItem(item core.Item) (int, error)
	FindItemByID(id int) (core.Item, bool)
	DeleteItem(item core.Item) bool
}

Item repository

type Messenger

type Messenger interface {
	StoreCustomerMessenger(customer core.Customer, messengerName string, chatID int) error
	FindCustomerChatID(customer core.Customer, messengerName string) (int, bool)
	IsRegisteredChatID(chatID int, messengerName string) (int, bool)
}

Messenger repository

type Order

type Order interface {
	StoreOrder(order core.Order) (int, error)
	FindOrderByID(id int) (core.Order, bool)
	FindOrderByLink(link string) (core.Order, bool)
	GetOrders(strategy func() string) ([]core.Order, error)
	GetOrderedItems(order core.Order) ([]core.Item, bool)
	DeleteOrder(order core.Order) bool
}

Order repository

Jump to

Keyboard shortcuts

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