userinput

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package userinput provides typed structures for AskUserQuestion handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Answer

type Answer struct {
	Answers []string
}

Answer contains selected or free-text responses for a single question.

type Callback

type Callback func(ctx context.Context, req *Request) (*Response, error)

Callback handles AskUserQuestion requests and returns answers.

type Question

type Question struct {
	Question    string
	Header      string
	MultiSelect bool
	Options     []QuestionOption
}

Question represents one AskUserQuestion prompt.

type QuestionOption

type QuestionOption struct {
	Label       string
	Description string
}

QuestionOption represents a selectable choice in a user-input question.

type Request

type Request struct {
	Questions []Question
}

Request contains parsed AskUserQuestion payload data.

type Response

type Response struct {
	Answers map[string]*Answer
}

Response contains answers keyed by question text.

Jump to

Keyboard shortcuts

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