crawler

package
v0.0.0-...-40ddc17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean

func Clean()

func ExtractRecipe

func ExtractRecipe(input chan RecipeUrl, output chan Recipe, wg *sync.WaitGroup)

func FindAllCategories

func FindAllCategories(output chan string, wg *sync.WaitGroup)

func FindAllRecipes

func FindAllRecipes(input chan string, output chan RecipeUrl, wg *sync.WaitGroup)

func Save

func Save(input chan Recipe, wg *sync.WaitGroup)

Types

type Ingredient

type Ingredient struct {
	Name        string `json:"name"`
	Quantity    string `json:"quantity"`
	Unit        string `json:"unit"`
	IsOptional  bool   `json:"is_optional"`
	Description string `json:"description"`
}

type Recipe

type Recipe struct {
	Category    string       `json:"category"`
	Link        string       `json:"link"`
	Ingredients []Ingredient `json:"ingredients"`
}

type RecipeUrl

type RecipeUrl struct {
	Category string
	Link     string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL