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 ¶
- func Library() *runtime.Library
- type Configuration
- type PhraseResource
- func (r *PhraseResource) Create(_ context.Context, _ any) (*PhraseResourceOutput, error)
- func (r *PhraseResource) Delete(_ context.Context, _ any, _ *PhraseResourceOutput) error
- func (r *PhraseResource) Read(_ context.Context, _ any, prior *PhraseResourceOutput) (*PhraseResourceOutput, error)
- func (r *PhraseResource) ReplaceFields() []string
- func (r *PhraseResource) SchemaVersion() int
- func (r *PhraseResource) Update(_ context.Context, _ any, ...) (*PhraseResourceOutput, error)
- type PhraseResourceOutput
- type SayAction
- type SayActionOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
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 (r *PhraseResource) Create(_ context.Context, _ any) (*PhraseResourceOutput, error)
func (*PhraseResource) Delete ¶ added in v0.6.0
func (r *PhraseResource) Delete(_ context.Context, _ any, _ *PhraseResourceOutput) error
func (*PhraseResource) Read ¶ added in v0.6.0
func (r *PhraseResource) Read( _ context.Context, _ any, prior *PhraseResourceOutput, ) (*PhraseResourceOutput, error)
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
func (r *PhraseResource) Update( _ context.Context, _ any, _ runtime.Prior[PhraseResource, *PhraseResourceOutput], ) (*PhraseResourceOutput, error)
type PhraseResourceOutput ¶ added in v0.6.0
PhraseResourceOutput is the resource's stored result.
type SayAction ¶
type SayAction struct {
Message string
}
SayAction prepends the configured prefix to a message.
type SayActionOutput ¶
type SayActionOutput struct {
Output string
}
SayActionOutput is the action's output.
Click to show internal directories.
Click to hide internal directories.