Documentation ¶
Index ¶
- func BuildURL(salesforceInstance string, resource int) string
- func CraftPayload(...) io.Reader
- func CraftRequest(m string, u string, t string, p io.Reader) *http.Request
- func EnvHandler() (sfi, user, pass, clid, clse, seck string)
- func ExtractAuthToken(r string) string
- func PrettyPrintBacklog(output map[int][]string)
- func SendRequest(r *http.Request) string
- func UnmarshalSF(cr string) map[int][]string
- type Columns
- type Records
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildURL ¶
buildURL builds any URL resource (API resource). No need of duplicate functions per each resource.
func CraftPayload ¶
func CraftPayload(userValue, passwordValue, clientIDvalue, clientSecretvalue, securityKeyvalue string, purpose string) io.Reader
craftPayload prepares the payload used in the http requests.
func CraftRequest ¶
craftRequest crafts a valid HTTP request with the passed http.Method, url(u), token(t) and payload(p).
func EnvHandler ¶
func EnvHandler() (sfi, user, pass, clid, clse, seck string)
envHandler gets the needed environment variables: EMAIL, PASS, SF, CLID, CLSE, SECK.
func ExtractAuthToken ¶
extractAuthToken extracts the access_token value from the response sent by the server
func PrettyPrintBacklog ¶
func SendRequest ¶
sendRequest executes the so far crafted Request.
func UnmarshalSF ¶
unmarshalSF unmarshals the listview response from Salesforce and returns a map.
Types ¶
Click to show internal directories.
Click to hide internal directories.