# README
go-sfdc
This is a golang
library for interfacing with Salesforce
APIs.
Getting Started
Installing
To start using GO-SFDC, install GO and run go get
go get -u github.com/cx-learning-platform/go-sfdc
This will retrieve the library.
Usage
To use this library, the following will need to be done.
- Create
Salesforce
credentials to properly authenticate with theSalesforce org
- Configure
- Open a session
- Use the
APIs
Configuration
The configuration defines several parameters that can be used by the library. The configuration is used per session.
Credentials
- this is an implementation of thecredentials.Provider
interfaceClient
- the HTTP client used by theAPIs
Version
- is theSalesforce
version. Please refer toSalesforce
documentation to make sure thatAPIs
are supported in the version that is specified.
Example
config := sfdc.Configuration{
Credentials: credentials.NewPasswordCredentials(creds),
Client: salesforceHTTPClient,
Version: 44,
}
License
GO-SFDC source code is available under the MIT License
# Functions
ParseTime attempts to parse a JSON time string from Salesforce.
RecordFromJSONMap creates a recrod from a JSON map.
# Constants
RecordAttributes is the attribute map from the record JSON.
SalesforceDate is the format returned by the Salesforce Date field type.
SalesforceDateTime is the format returned by Salesforce TimeDate field type.
# Structs
Configuration is the structure for goforce sessions.
Error is the error structure defined by the Salesforce API.
Record is a representation of a Salesforce record.