Documentation ¶
Index ¶
Constants ¶
View Source
const (
Root = "root"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CandidateAnswer ¶
type QNode ¶
type QNode struct { Name string `yaml:"name"` Questions []Question `yaml:"questions,omitempty"` Transitions []Transition `yaml:"transitions"` }
QNode sample: name: root questions:
- var_name: kind description: "Which kind of artifacts do you want?" candidates:
- value: infrastructure description: "To deployment the infrastructures, like: kubernetes..."
- value: application description: "To deploy your application with code, like: php, java..."
transitions:
- name: infrastructure condition: "kind == 'infrastructure'"
- name: application condition: "kind == 'application'"
type Question ¶
type Question struct { VarName string `yaml:"var_name"` Type string `yaml:"type"` Description string `yaml:"description"` Candidates []CandidateAnswer `yaml:"candidates,omitempty"` Default string `yaml:"default"` DefaultEnv string `yaml:"default_env"` Persistent bool `yaml:"persistent"` ConstantValue string `yaml:"constant_value"` }
type QuizBuilder ¶
type QuizBuilder struct { }
func (QuizBuilder) BuildQGraph ¶
func (qb QuizBuilder) BuildQGraph(content []byte) (QGraph, error)
type QuizExecutor ¶
type QuizExecutor struct {
// contains filtered or unexported fields
}
func NewQuizExecutor ¶
func NewQuizExecutor(ui UI, qr QResult) *QuizExecutor
func (*QuizExecutor) HandleNode ¶
func (qe *QuizExecutor) HandleNode(qNode *QNode) (string, error)
HandleNode will return the next node name.
func (*QuizExecutor) HandleQuestion ¶
func (qe *QuizExecutor) HandleQuestion(q *Question) (string, error)
type Transition ¶
Click to show internal directories.
Click to hide internal directories.