This commit is contained in:
2024-05-13 04:07:25 +07:00
commit 00f28e3f7b
6 changed files with 191 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
package storage
import "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 {
GetAllProducts(ctx context.Context) ([]Product, error)
GetProductByID(ctx context.Context, id int) (Product, error)
GetBreadcrumbs(ctx context.Context, id int) ([]Breadcrumb, error)
}