Documentation
¶
Index ¶
- Variables
- func Attachment(ID string) ([]byte, error)
- func Count(objectName string) (int, error)
- func Create(objectName string, fields map[string]interface{}) (ID string, err error)
- func DeleteByID(objectName string, ID string) error
- func Describe(objectName string) (describe *metadata.Describe, err error)
- func Document(req requests.Builder, ID string) ([]byte, error)
- func DownloadFile(contentVersionID string) ([]byte, error)
- func Find(query string, dst interface{}) error
- func FindAll(query string, dst interface{}) error
- func FindByID(objectName string, objectID string, fields []string, dst interface{}) error
- func SObjects() (results *metadata.Sobjects, err error)
- func Services() (services map[string]string, err error)
- func Types(structName string, endpoint string) (codegen.Structs, error)
- func UpdateByID(objectName string, ID string, fields map[string]interface{}) error
- func Versions() ([]*client.APIVersion, error)
Constants ¶
This section is empty.
Variables ¶
var DefaultClient = client.Must( client.WithLoginFailover( client.WithPasswordBearer( os.Getenv("SALESFORCE_SDK_CLIENT_ID"), os.Getenv("SALESFORCE_SDK_CLIENT_SECRET"), os.Getenv("SALESFORCE_SDK_USERNAME"), os.Getenv("SALESFORCE_SDK_PASSWORD"), os.Getenv("SALESFORCE_SDK_SECURITY_TOKEN"), ), client.WithJWTBearer( os.Getenv("SALESFORCE_SDK_CLIENT_ID"), os.Getenv("SALESFORCE_SDK_USERNAME"), "../private.pem", ), ), client.WithLimiter(ratelimit.New(5, time.Second, 5, memory.New())), )
DefaultClient ...
Functions ¶
func Attachment ¶
Attachment returns the given Attachment by ID
func Create ¶
Create created the given objectName
This SDK goes out of its way to not be an ORM which is why the method signature doesnt use a generated type like those derived from the codegen package.
func DeleteByID ¶
DeleteByID deletes the given objectName with the given ID
func DownloadFile ¶
DownloadFile returns the given file via its ContentVersion ID
func Find ¶
Find returns all paginated resources for a given query. If there are many results and/or many fields this method will take longer to execute and use more of your org's API limit.
The parameter dst should be a pointer value to a slice of types matching the expected query records.
func FindAll ¶
FindAll is akin to the queryAll resource which returns soft deleted resources in addition to regular records.
The parameter dst should be a pointer value to a slice of types matching the expected query records.
func FindByID ¶
FindByID returns a single result filtered by Id.
The parameter dst should be a pointer to a type matching the expected query record.
func UpdateByID ¶
UpdateByID updates the given objectName with the given ID.
Salesforce update responses return empty response bodies and statusCode 204 upon success.
func Versions ¶
func Versions() ([]*client.APIVersion, error)
Versions returns data on available API versions for the Salesforce REST API
This method is used during authentication so that we may default to the latest REST API endpoint.
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
Package apex contains helpers for executing anonymous Apex code
|
Package apex contains helpers for executing anonymous Apex code |
Package client wraps http.Client and handles request authentication and other session state
|
Package client wraps http.Client and handles request authentication and other session state |
cmd
|
|
go-salesforce-sdk
Package chromedp renders javascript web pages for the Salesforce documentation website using the chromedp/chromedp and PuerkitoBio/goquery libraries.
|
Package chromedp renders javascript web pages for the Salesforce documentation website using the chromedp/chromedp and PuerkitoBio/goquery libraries. |
examples
|
|
Package tree implements the Salesforce Tree resource allowing users to save nested objects in a single API operation https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobject_tree.htm
|
Package tree implements the Salesforce Tree resource allowing users to save nested objects in a single API operation https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobject_tree.htm |