Documentation ¶
Overview ¶
Package salesforce is based on the Python "Simple-Salesforce" library. It provides the basic CRUD operations for Salesforce. Currently only OAuth2 authentication is supported
Index ¶
- Constants
- type SalesforceClient
- func (s *SalesforceClient) Create(objectName string, data interface{}) (interface{}, error)
- func (s *SalesforceClient) Delete(objectName string, recordID string) error
- func (s *SalesforceClient) Describe() (interface{}, error)
- func (s *SalesforceClient) Get(objectName string, recordID string) (interface{}, error)
- func (s *SalesforceClient) Search(query string) (interface{}, error)
- func (s *SalesforceClient) Update(objectName string, recordID string, data interface{}) (interface{}, error)
- func (s *SalesforceClient) Upsert(objectName string, recordID string, data interface{}) (interface{}, error)
Constants ¶
const Version = "31.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SalesforceClient ¶
type SalesforceClient struct { InstanceURL string SessionID string BaseURL string ObjectName string Header map[string]string HttpClient *http.Client }
SalesforceClient struct contains information about a salesforce OAuth 2 session
func NewSalesforceClient ¶
func NewSalesforceClient(instanceURL string, sessionID string) *SalesforceClient
NewSalesforceClient returns an instance of SalesforceClient initialied with the required fields
func (*SalesforceClient) Create ¶
func (s *SalesforceClient) Create(objectName string, data interface{}) (interface{}, error)
Create will create an object and it's corresponding data with the POST method
func (*SalesforceClient) Delete ¶
func (s *SalesforceClient) Delete(objectName string, recordID string) error
Delete will delete an object's metadata with the DELETE method
func (*SalesforceClient) Describe ¶
func (s *SalesforceClient) Describe() (interface{}, error)
Describe returns all the objects present for the Salesforce instance
func (*SalesforceClient) Get ¶
func (s *SalesforceClient) Get(objectName string, recordID string) (interface{}, error)
Get will retrieve the data for an object using the GET method
func (*SalesforceClient) Search ¶
func (s *SalesforceClient) Search(query string) (interface{}, error)
Search returns the result from a raw SOQL query string