Documentation ¶
Overview ¶
Package question is used to create questions for the initialize command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientAnswers ¶
type ClientAnswers struct { ServerURL string `survey:"server-url"` Username string `survey:"username"` Password string `survey:"password"` }
ClientAnswers are answers to the default client survey.
type Question ¶
type Question struct { BeforeText string survey.Question }
Question is a question to ask the user during initialization.
func CreatePasswordQuestion ¶
CreatePasswordQuestion returns the default password question.
type RelevantClientQuestion ¶
type RelevantClientQuestion func(*ClientAnswers, *config.Config) (*Question, bool)
RelevantClientQuestion is a function that returns a question and a bool indicating if the question is relevant.
func CreateClientQuestions ¶
func CreateClientQuestions() []RelevantClientQuestion
CreateClientQuestions creates the default set of client questions.
type RelevantServerQuestion ¶
type RelevantServerQuestion func(*ServerAnswers, *config.Config) (*Question, bool)
RelevantServerQuestion is a function that returns a question and a bool indicating if the question is relevant.
func CreateServerQuestions ¶
func CreateServerQuestions() []RelevantServerQuestion
CreateServerQuestions creates the default set of server questions.
type ServerAnswers ¶
type ServerAnswers struct { Host string `survey:"host"` Port string `survey:"port"` RemoteURL string `survey:"remote-url"` SecretKey string `survey:"secret-key"` SessionsSecret string `survey:"sessions-secret"` Username string `survey:"username"` Password string `survey:"password"` }
ServerAnswers are answers to the default server survey