Documentation ¶
Index ¶
- Constants
- func BuildEnvVariable(name string) string
- func BuildEnvVariablePrefix(name string) (ret string)
- type ChatOptions
- type ChatRequest
- type Configurable
- func (o *Configurable) AddSetting(name string, required bool) (ret *Setting)
- func (o *Configurable) AddSetupQuestion(name string, required bool) (ret *SetupQuestion)
- func (o *Configurable) AddSetupQuestionCustom(name string, required bool, question string) (ret *SetupQuestion)
- func (o *Configurable) Configure() (err error)
- func (o *Configurable) GetName() string
- func (o *Configurable) Setup() (err error)
- func (o *Configurable) SetupFillEnvFileContent(fileEnvFileContent *bytes.Buffer)
- func (o *Configurable) SetupOrSkip() (err error)
- type Message
- type Setting
- type Settings
- type SetupQuestion
- type SetupQuestions
Constants ¶
View Source
const AnswerReset = "reset"
Variables ¶
This section is empty.
Functions ¶
func BuildEnvVariable ¶
func BuildEnvVariablePrefix ¶
Types ¶
type ChatOptions ¶
type ChatRequest ¶
type Configurable ¶
type Configurable struct { Settings SetupQuestions Label string EnvNamePrefix string ConfigureCustom func() error }
func (*Configurable) AddSetting ¶
func (o *Configurable) AddSetting(name string, required bool) (ret *Setting)
func (*Configurable) AddSetupQuestion ¶
func (o *Configurable) AddSetupQuestion(name string, required bool) (ret *SetupQuestion)
func (*Configurable) AddSetupQuestionCustom ¶
func (o *Configurable) AddSetupQuestionCustom(name string, required bool, question string) (ret *SetupQuestion)
func (*Configurable) Configure ¶
func (o *Configurable) Configure() (err error)
func (*Configurable) GetName ¶
func (o *Configurable) GetName() string
func (*Configurable) Setup ¶
func (o *Configurable) Setup() (err error)
func (*Configurable) SetupFillEnvFileContent ¶
func (o *Configurable) SetupFillEnvFileContent(fileEnvFileContent *bytes.Buffer)
func (*Configurable) SetupOrSkip ¶
func (o *Configurable) SetupOrSkip() (err error)
type Message ¶
func NormalizeMessages ¶
NormalizeMessages remove empty messages and ensure messages order user-assist-user
type Settings ¶
type Settings []*Setting
func (Settings) FillEnvFileContent ¶
func (Settings) IsConfigured ¶
type SetupQuestion ¶
func (*SetupQuestion) Ask ¶
func (o *SetupQuestion) Ask(label string) (err error)
func (*SetupQuestion) OnAnswer ¶
func (o *SetupQuestion) OnAnswer(answer string) (err error)
type SetupQuestions ¶
type SetupQuestions []*SetupQuestion
func (SetupQuestions) Ask ¶
func (o SetupQuestions) Ask(label string) (err error)
Click to show internal directories.
Click to hide internal directories.