Documentation
¶
Index ¶
- func AsyncRequest(endpoint string, body interface{}) (map[string]interface{}, error)
- func SimpleRequest(endpoint string, body interface{}) error
- func SyncRequest(endpoint string, body interface{}) (interface{}, error)
- type CheckboxPromptBody
- type ConfirmPromptBody
- type DatetimePromptBody
- type EditorPromptBody
- type EventsBody
- type GetSecretBody
- type InputPromptBody
- type ListPromptBody
- type NumberPromptBody
- type PasswordPromptBody
- type PrintBody
- type ProgressBarAdvanceBody
- type ProgressBarStartBody
- type ProgressBarStopBody
- type PromptEnvelope
- type SecretPromptBody
- type SetSecretBody
- type SpinnerStartBody
- type SpinnerStopBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsyncRequest ¶
func SimpleRequest ¶
func SyncRequest ¶
Types ¶
type CheckboxPromptBody ¶
type CheckboxPromptBody struct { PromptEnvelope Choices []string DefaultSet bool DefaultIndex []int DefaultValue []string DefaultIsValue bool }
CheckboxPromptBody is the JSON body for a checkbox prompt
func (CheckboxPromptBody) MarshalJSON ¶
func (n CheckboxPromptBody) MarshalJSON() ([]byte, error)
MarshalJSON marshals the correct set of fields for the CheckboxPromptBody
type ConfirmPromptBody ¶
type ConfirmPromptBody struct { PromptEnvelope Default bool `json:"default"` }
ConfirmPromptBody is the JSON body for a confirm prompt
type DatetimePromptBody ¶
type DatetimePromptBody struct { PromptEnvelope Variant string `json:"variant"` Default string `json:"default,omitempty"` Maximum string `json:"maximum,omitempty"` Minimum string `json:"minimum,omitempty"` }
DatetimePromptBody is the JSON body for a datetime prompt
type EditorPromptBody ¶
type EditorPromptBody struct { PromptEnvelope Default string `json:"default"` }
EditorPromptBody is the JSON body for a editor prompt
type EventsBody ¶
type GetSecretBody ¶
GetSecretBody is the JSON body expected by the /secret/get endpoint
type InputPromptBody ¶
type InputPromptBody struct { PromptEnvelope Default string `json:"default,omitempty"` AllowEmpty bool `json:"allowEmpty"` }
InputPromptBody is the JSON body for an input prompt
type ListPromptBody ¶
type ListPromptBody struct { PromptEnvelope Choices []string DefaultSet bool DefaultIndex int DefaultValue string DefaultIsValue bool }
ListPromptBody is the JSON body for a list or autocomplete prompt
func (ListPromptBody) MarshalJSON ¶
func (n ListPromptBody) MarshalJSON() ([]byte, error)
MarshalJSON marshals the correct set of fields for the ListPromptBody
type NumberPromptBody ¶
type NumberPromptBody struct { PromptEnvelope DefaultValue int DefaultSet bool MaximumValue int MaximumSet bool MinimumValue int MinimumSet bool }
NumberPromptBody is the JSON body for a number prompt
func (NumberPromptBody) MarshalJSON ¶
func (n NumberPromptBody) MarshalJSON() ([]byte, error)
MarshalJSON marshals the correct set of fields for the NumberPromptBody
type PasswordPromptBody ¶
type PasswordPromptBody struct { PromptEnvelope Confirm bool `json:"confirm"` }
PasswordPromptBody is the JSON body for a password prompt
type ProgressBarAdvanceBody ¶
type ProgressBarAdvanceBody struct {
Increment int `json:"increment,omitempty"`
}
type ProgressBarStartBody ¶
type ProgressBarStopBody ¶
type ProgressBarStopBody = SpinnerStopBody
type PromptEnvelope ¶
type PromptEnvelope struct { Name string `json:"name"` PromptType string `json:"type"` Message string `json:"message"` Flag string `json:"flag,omitempty"` }
PromptEnvelope is the common fields for all prompt type JSON bodies
type SecretPromptBody ¶
type SecretPromptBody = PromptEnvelope
SecretPromptBody is the JSON body for a secret prompt
type SetSecretBody ¶
type SpinnerStartBody ¶
type SpinnerStartBody = PrintBody
type SpinnerStopBody ¶
type SpinnerStopBody struct {
Text string `json:"text,omitempty"`
}