cake_crm/internal/models/storage/interface.go

21 lines
415 B
Go
Raw Normal View History

2024-05-12 21:07:25 +00:00
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)
}