greet

package
v0.7.0-8a Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package greet is a small demonstration library that exists so examples and tests can exercise configuration routing. The library carries a single configuration field (Prefix) and a single action (say) that prepends the prefix to a caller-supplied message.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Library

func Library() *runtime.Library

Library returns the registration record for the `greet` library.

Types

type Configuration

type Configuration struct {
	Prefix cfg.String
}

Configuration is the per-alias body operators fill out in `configurations.greet.<alias>` in config.ub.

type PhraseResource added in v0.6.0

type PhraseResource struct {
	Text string
}

PhraseResource stores a phrase and computes a decorated form of it, the value the example's internal configuration derives a prefix from.

func (*PhraseResource) Create added in v0.6.0

func (*PhraseResource) Delete added in v0.6.0

func (*PhraseResource) Read added in v0.6.0

func (*PhraseResource) ReplaceFields added in v0.6.0

func (r *PhraseResource) ReplaceFields() []string

func (*PhraseResource) SchemaVersion added in v0.6.0

func (r *PhraseResource) SchemaVersion() int

func (*PhraseResource) Update added in v0.6.0

type PhraseResourceOutput added in v0.6.0

type PhraseResourceOutput struct {
	Text      string
	Decorated string
}

PhraseResourceOutput is the resource's stored result.

type SayAction

type SayAction struct {
	Message string
}

SayAction prepends the configured prefix to a message.

func (*SayAction) Run

func (a *SayAction) Run(_ context.Context, rawCfg any) (*SayActionOutput, error)

type SayActionOutput

type SayActionOutput struct {
	Output string
}

SayActionOutput is the action's output.

Jump to

Keyboard shortcuts

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