ingredient

package
v0.0.0-...-dae269f Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	*liquid.Liquid // the underlying liquid
	// 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.

func Init

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

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

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