Documentation ¶
Index ¶
- type Storage
- func (s Storage) Close()
- func (s Storage) DeleteItem(item core.Item) bool
- func (s Storage) DeleteOrder(order core.Order) bool
- func (s Storage) FindCustomerByID(id int) (core.Customer, bool)
- func (s Storage) FindCustomerChatID(customer core.Customer, messengerName string) (int, bool)
- func (s Storage) FindItemByID(id int) (core.Item, bool)
- func (s Storage) FindOrderByID(id int) (core.Order, bool)
- func (s Storage) FindOrderByLink(link string) (core.Order, bool)
- func (s Storage) GetOrderedItems(order core.Order) ([]core.Item, bool)
- func (s Storage) GetOrders(strategy func() string) ([]core.Order, error)
- func (s *Storage) Init(args ...string)
- func (s Storage) IsRegisteredChatID(chatID int, messengerName string) (int, bool)
- func (s Storage) StoreCustomer(customer core.Customer) (int, error)
- func (s Storage) StoreCustomerMessenger(customer core.Customer, messengerName string, chatID int) error
- func (s Storage) StoreItem(item core.Item) (int, error)
- func (s Storage) StoreOrder(order core.Order) (int, error)
- func (s Storage) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage object for file db
func (Storage) DeleteItem ¶
DeleteItem remove file from storage
func (Storage) DeleteOrder ¶
DeleteOrder remove order from storage
func (Storage) FindCustomerByID ¶
FindCustomerByID get client from storage
func (Storage) FindCustomerChatID ¶
FindCustomerChatID get customer's chat id
func (Storage) FindItemByID ¶
FindItemByID get file from storage
func (Storage) FindOrderByID ¶
FindOrderByID get bucket from storage
func (Storage) FindOrderByLink ¶
FindOrderByLink get bucket from storage by link
func (Storage) GetOrderedItems ¶
GetOrderedItems takes all ordered items by selected order
func (Storage) IsRegisteredChatID ¶
IsRegisteredChatID get customer's id if chat already registered
func (Storage) StoreCustomer ¶
StoreCustomer save client to storage
func (Storage) StoreCustomerMessenger ¶
func (s Storage) StoreCustomerMessenger(customer core.Customer, messengerName string, chatID int) error
StoreCustomerMessenger save chat id to storage by customer
func (Storage) StoreOrder ¶
StoreOrder save bucket to storage
Click to show internal directories.
Click to hide internal directories.