Documentation
¶
Index ¶
- Constants
- Variables
- func GenericJSONGet(section, command string) (*resty.Response, error)
- func GenericJSONGetTimeout(section, command string, timeout time.Duration) (*resty.Response, error)
- func GenericJSONPost(section, command string, body map[string]interface{}) (*resty.Response, error)
- func GenericJSONPostTimeout(section, command string, body map[string]interface{}, timeout time.Duration) (*resty.Response, error)
- func GetJSONRequest() *resty.Request
- func GetJSONRequestTimeout(timeout time.Duration) *resty.Request
- func GetRequest() *resty.Request
- func GetRequestTimeout(timeout time.Duration) *resty.Request
- func ShowJSONResponse(resp *resty.Response) (success bool)
- func StreamTextResponse(resp *resty.Response) (success bool)
- func URLHelper(section, command string) (string, error)
- type Response
Constants ¶
View Source
const BackupTimeout = 3 * time.Hour
View Source
const ContainerDownloadTimeout = 1 * time.Hour
View Source
const ContainerOperationTimeout = 10 * time.Minute
View Source
const DefaultTimeout = 30 * time.Second
View Source
const OsDownloadTimeout = 1 * time.Hour
Variables ¶
View Source
var RawJSON = false
RawJSON controls if the client does json handling or outputs it raw
Functions ¶
func GenericJSONGet ¶
GenericJSONGet is a helper for generic empty post request
func GenericJSONGetTimeout ¶
func GenericJSONPost ¶
GenericJSONPost is a helper for generic empty post request
func GenericJSONPostTimeout ¶
func GetJSONRequest ¶
func GetJSONRequestTimeout ¶
GetJSONRequest returns a request prepared for default JSON resposes
func GetRequest ¶
func GetRequestTimeout ¶
GetRequest returns a resty.Request object prepared for an API call
func ShowJSONResponse ¶
ShowJSONResponse formats a JSON response for human readers
func StreamTextResponse ¶
Streams out a text response, like ones from /host/logs
Types ¶
Click to show internal directories.
Click to hide internal directories.