flamingo.me/flamingo-commerce/v3@v3.11.0/category/domain/service.go (about)

     1  package domain
     2  
     3  import (
     4  	"context"
     5  	"errors"
     6  )
     7  
     8  var (
     9  	// ErrNotFound error
    10  	ErrNotFound = errors.New("category not found")
    11  )
    12  
    13  //go:generate go run github.com/vektra/mockery/v2@v2.42.3 --name CategoryService --case snake
    14  
    15  type (
    16  	// CategoryService interface
    17  	CategoryService interface {
    18  		// Tree a category
    19  		Tree(ctx context.Context, activeCategoryCode string) (Tree, error)
    20  
    21  		// Get a category with more data
    22  		Get(ctx context.Context, categoryCode string) (Category, error)
    23  	}
    24  )