24 lines
449 B
Go
24 lines
449 B
Go
package storage
|
|
|
|
import (
|
|
crm "cake_crm/proto"
|
|
"context"
|
|
)
|
|
|
|
type Product struct {
|
|
ID int `json:"id"`
|
|
Name string `json:"name"`
|
|
// todo
|
|
}
|
|
|
|
type Breadcrumb struct {
|
|
Name string `json:"name"`
|
|
URL string `json:"url"`
|
|
}
|
|
|
|
type IStorage interface {
|
|
GetCatalog(ctx context.Context) ([]*crm.Category, error)
|
|
GetPositions(ctx context.Context, id int64) ([]*crm.Product, error)
|
|
GetProduct(ctx context.Context, id int64) (*crm.Product, error)
|
|
}
|