bcr_utils

package
v0.0.0-...-e5d1f74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckErrorFatal

func CheckErrorFatal(err error)

func CheckErrorNonFatal

func CheckErrorNonFatal(err error) bool

func CheckHttpResponses

func CheckHttpResponses(responses chan HttpResponse, numCalls int)

func GetAllApps

func GetAllApps(cliConnection plugin.CliConnection) ([]string, error)

func GetAllDatabases

func GetAllDatabases(httpClient *http.Client, cloudantAccounts []cam.CloudantAccount) []string

* Requests all databases for a given Cloudant account * and returns them as a string array

func GetCurrentTarget

func GetCurrentTarget(cliConnection plugin.CliConnection) (string, string, string, string)

func GetDatabases

func GetDatabases(httpClient *http.Client, account cam.CloudantAccount) []string

func HandleFlags

func HandleFlags(args []string) (string, []string, string, bool, bool)

func IsValid

func IsValid(el string, elements []string) bool

func MakeRequest

func MakeRequest(httpClient *http.Client, rType string, url string, body string, headers map[string]string) (*http.Response, error)

* Creates a new http request based on the params and sends it, returning the response.

Types

type HttpResponse

type HttpResponse struct {
	RequestType string
	Status      string
	Body        string
	Err         error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL