ingredient

package
v0.0.0-...-b197db6 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLiquid

func GetLiquid(i Ingredient) *liquid.Liquid

GetLiquid gets the liquid of this Ingredient

func GetStill

func GetStill(i Ingredient) component.Still

GetStill returns the still of the distillery associated with the provided ingredient.

func Init

func Init(ingredient Ingredient, liquid *liquid.Liquid)

Init initializes a new Ingredient. Init is only intended to be used within a lifetime.Lifetime[Ingredient,*Liquid].

Types

type Base

type Base struct {
	// contains filtered or unexported fields
}

Base is embedded into every Ingredient

func (Base) Name

func (cb Base) Name() string

type FetcherFlags

type FetcherFlags struct {
	Context context.Context
	Quick   bool
	Server  *phpx.Server
}

FetcherFlags describes options for a WissKIFetcher

type Ingredient

type Ingredient interface {
	// Name returns the name of this ingredient
	// Name should be implemented by the [Base] struct.
	Name() string
	// contains filtered or unexported methods
}

Ingredients represent a part of a WissKI instance. An Ingredient should be implemented as a pointer to a struct. Every ingredient must embed Base and should be initialized using Init inside a [lifetime.Lifetime].

By convention these are defined within their corresponding subpackage. This subpackage also contains all required resources.

type WissKIFetcher

type WissKIFetcher interface {
	Ingredient

	// Fetch fetches information from this ingredient and writes it into target.
	// Distinct WissKIFetchers must write into distinct fields.
	Fetch(flags FetcherFlags, target *status.WissKI) error
}

Directories

Path Synopsis
ssh
php

Jump to

Keyboard shortcuts

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