Versions in this module Expand all Collapse all v1 v1.20.0 Apr 26, 2023 v1.6.3 Apr 17, 2023 Changes in this version + const BatchStateCompleted + const BatchStateFailed + const BatchStateInProgress + const BatchStateNotProcessed + const BatchStateQueued + var ClientId string = "3MVG9QBLg8QGkFeoxS81gotuAQnbfy4bLU7HErU2yl5I8hFgEP42qQHtJRZelb_rogsKrSfLz_gE5uFRquYwf" + var CustomEndpoint string = "" + var DeleteRecordResourceNotExistsError = errors.New("The requested resource does not exist") + var EntityIsDeleted = errors.New("Entity is deleted") + var InvalidBulkObject = errors.New("Object Does Not Support Bulk API") + var SalesforceError = errors.New("Salesforce internal error") + var SessionExpiredError = errors.New("Session expired") + var SessionFailRefresh = errors.New("Failed to refresh session") + var Timeout int64 = 0 + func ApiVersion() string + func ApiVersionNumber() string + func GetEndpointURL(endpoint ForceEndpoint) (endpointURL string, err error) + func SetApiVersion(version string) + func ValidateSFID(input string) bool + type AuraDefinition struct + AuraDefinitionBundleId string + CreatedById string + CreatedDate string + DefType string + Format string + Id string + IsDeleted bool + LastModifiedById string + LastModifiedDate string + Source string + SystemModstamp string + type AuraDefinitionBundle struct + ApiVersion int + CreatedById string + CreatedDate string + Description string + DeveloperName string + Id string + IsDeleted bool + Language string + LastModifiedById string + LastModifiedDate string + MasterLabel string + NamespacePrefix string + SystemModstamp string + type AuraDefinitionBundleResult struct + Done bool + EntityTypeName string + NextRecordsUrl string + QueryLocator string + Records []ForceRecord + Size int + TotalSize int + type BatchInfo struct + ApexProcessingTime int64 + ApiActiveProcessingTime int64 + CreatedDate string + Id string + JobId string + NumberRecordsFailed int64 + NumberRecordsProcessed int64 + State string + StateMessage interface{} + SystemModstamp string + TotalProcessingTime int64 + type BatchResult struct + Results []string + type BundleManifest struct + Files []ComponentFile + Id string + Name string + type CodeCoverageWarning struct + Message string + Name string + type ComponentDetails struct + ComponentFailures []ComponentFailure + ComponentSuccesses []ComponentSuccess + RunTestResult RunTestResult + type ComponentFailure struct + Changed bool + Created bool + Deleted bool + FileName string + FullName string + LineNumber int + Problem string + ProblemType string + Success bool + type ComponentFile struct + ComponentId string + FileName string + type ComponentSuccess struct + Changed bool + Created bool + Deleted bool + FileName string + FullName string + Id string + Success bool + type DescribeMetadataObject struct + ChildXmlNames []string + DirectoryName string + InFolder bool + MetaFile bool + Suffix string + XmlName string + type FieldName struct + FieldName string + IsObject bool + type Force struct + Credentials *ForceSession + Metadata *ForceMetadata + Partner *ForcePartner + func NewForce(creds *ForceSession) (force *Force) + func (f *Force) AbortBulkJob(jobId string) (result JobInfo, err error) + func (f *Force) AbortBulkJobV2(jobId string) (result JobInfoV2, err error) + func (f *Force) AddBatchToJob(content string, job JobInfo) (result BatchInfo, err error) + func (f *Force) AddBatchToJobV2(job JobInfoV2, content string) (result BatchInfo, err error) + func (f *Force) BulkQuery(soql string, jobId string, contenttype string) (result BatchInfo, err error) + func (f *Force) ChangePassword(id string, attrs map[string]string) (result string, err error, emessages []ForceError) + func (f *Force) CloseBulkJob(jobId string) (result JobInfo, err error) + func (f *Force) CloseBulkJobV2(jobId string) (result JobInfoV2, err error) + func (f *Force) CompactLayoutsSObject(name string) (result string, err error) + func (f *Force) Count(sobject string) (result int, err error) + func (f *Force) CreateBulkJob(jobInfo JobInfo) (result JobInfo, err error) + func (f *Force) CreateBulkJobV2(jobInfo JobInfoV2) (result JobInfoV2, err error) + func (f *Force) CreateDataPipeline(name string, masterLabel string, apiVersionNumber string, scriptContent string, ...) (result ForceCreateRecordResult, err error, emessages []ForceError) + func (f *Force) CreateDataPipelineJob(id string) (result ForceCreateRecordResult, err error, emessages []ForceError) + func (f *Force) CreateRecord(sobject string, attrs map[string]string) (id string, err error, emessages []ForceError) + func (f *Force) CreateRecordJSON(sobject, data string) (id string, err error) + func (f *Force) CreateToolingRecord(objecttype string, attrs map[string]string) (result ForceCreateRecordResult, err error) + func (f *Force) DefaultDebugLevel() (id string, err error, emessages []ForceError) + func (f *Force) DeleteDataPipeline(id string) (err error) + func (f *Force) DeleteRecord(sobject, id string) (err error) + func (f *Force) DeleteRecordExternalID(sobject, field, id string) (err error) + func (f *Force) DeleteToolingRecord(objecttype string, id string) (err error) + func (f *Force) DescribeSObject(name string) (result string, err error) + func (f *Force) DumpListStack(l *list.List) + func (f *Force) Get(url string) (object ForceRecord, err error) + func (f *Force) GetBase64(sobject, id, field string) (object []byte, err error) + func (f *Force) GetBase64Stream(sobject, id, field string) (response *http.Response, err error) + func (f *Force) GetBatchInfo(jobId string, batchId string, contenttype string) (result BatchInfo, err error) + func (f *Force) GetBatches(jobId string) (result []BatchInfo, err error) + func (f *Force) GetBulkJobs() (result []JobInfo, err error) + func (f *Force) GetBulkJobsV2() (result []JobInfoV2, err error) + func (f *Force) GetCodeCoverage(classId string, className string) (err error) + func (f *Force) GetCommunities() (result ForceCommunitiesResult, err error) + func (f *Force) GetCommunity(id string) (result ForceCommunity, err error) + func (f *Force) GetCompactLayoutsAsBytes(name string) (sobject []byte, err error) + func (f *Force) GetConsoleLogLevelId() (result string, err error) + func (f *Force) GetDataPipeline(name string) (results ForceQueryResult, err error) + func (f *Force) GetIDs(sobject string, pkField string, where map[string]interface{}, ...) (result []string, totalSize int, err error) + func (f *Force) GetIDsStream(sobject string, pkField string, where map[string]interface{}, ...) (files []string, err error) + func (f *Force) GetIdentify() (result ForceRecord, err error) + func (f *Force) GetIdentifyAsBytes() (result []byte, err error) + func (f *Force) GetJobInfo(jobId string) (result JobInfo, err error) + func (f *Force) GetJobInfoV2(jobId string) (result JobInfoV2, err error) + func (f *Force) GetLayoutsAsBytes(name string) (sobject []byte, err error) + func (f *Force) GetLimits() (result map[string]ForceLimit, err error) + func (f *Force) GetListviewDescribeAsBytes(name, id string) (sobject []byte, err error) + func (f *Force) GetListviewsAsBytes(name string) (sobject []byte, err error) + func (f *Force) GetObjectSpec(objectName string, l *list.List) (result *SelectStruct) + func (f *Force) GetPasswordStatus(id string) (result ForcePasswordStatusResult, err error) + func (f *Force) GetPrevObjectSpec(objectName string, l *list.List) (foundItem *SelectStruct) + func (f *Force) GetRecord(sobject, id string) (object ForceRecord, err error) + func (f *Force) GetResources() (result ForceRecord, err error) + func (f *Force) GetSobject(name string) (sobject ForceSobject, err error) + func (f *Force) GetSobjectAsBytes(name string) (sobject []byte, err error) + func (f *Force) GetToolingRecord(sobject, id string) (object ForceRecord, err error) + func (f *Force) GetToolingRecordAsBytes(sobject, id string) ([]byte, error) + func (f *Force) HasObject(objectName string, l *list.List) (result bool, foundItem *SelectStruct) + func (f *Force) LayoutsSObject(name string) (result string, err error) + func (f *Force) ListSObjectName() (sobjects []string, err error) + func (f *Force) ListSObjects() (sobjects []ForceSobject, err error) + func (f *Force) ListSObjectsAsByte() (sobjects []byte, err error) + func (f *Force) ListViewDescribeSObject(name, id string) (result string, err error) + func (f *Force) ListViewsSObject(name string) (result string, err error) + func (f *Force) PushFieldName(fieldName string, spec *SelectStruct, IsObject bool) + func (f *Force) Query(query string, queryAll, tooling bool) (result ForceQueryResult, err error) + func (f *Force) QueryAndSend(query string, processor chan<- ForceRecord, options ...func(*QueryOptions)) (err error) + func (f *Force) QueryDataPipeline(soql string) (results ForceQueryResult, err error) + func (f *Force) QueryDataPipelineAsBytes(soql string) (sobject []byte, err error) + func (f *Force) QueryDefaultDebugLevel() (id string, err error) + func (f *Force) QueryLogs() (results ForceQueryResult, err error) + func (f *Force) QueryProfile(fields ...string) (results ForceQueryResult, err error) + func (f *Force) QueryTraceFlags() (results ForceQueryResult, err error) + func (f *Force) RefreshSession() (err error) + func (f *Force) ResetPassword(id string) (result ForcePasswordResetResult, err error) + func (f *Force) RetrieveBulkBatchResults(job JobInfo, batchId string) (results []string, err error) + func (f *Force) RetrieveBulkJobQueryResults(job JobInfo, batchId string, resultId string) ([]byte, error) + func (f *Force) RetrieveBulkQuery(jobId string, batchId string) (result []byte, err error) + func (f *Force) RetrieveBulkQueryResults(jobId string, batchId string, resultId string) (result []byte, err error) + func (f *Force) RetrieveBulkResultStream(job JobInfo, batchId string, resultId string) (*http.Response, error) + func (f *Force) RetrieveEventLogFile(elfId string) (result string, err error) + func (f *Force) RetrieveLog(logId string) (result string, err error) + func (f *Force) Select(sobject string, fields []string, where map[string]interface{}, ...) (results []ForceRecord, totalSize int, err error) + func (f *Force) SelectByID(sobject string, fields []string, id string) (result ForceRecord, totalSize int, err error) + func (f *Force) SetHTTPTrace(trace bool) + func (f *Force) SetHTTPTraceDetail(trace bool) + func (f *Force) StartTrace(userId ...string) (result ForceCreateRecordResult, err error, emessages []ForceError) + func (f *Force) Tooling(sobject string, fields []string, where map[string]interface{}, ...) (results []ForceRecord, totalSize int, err error) + func (f *Force) UpdateApiVersion(version string) (err error) + func (f *Force) UpdateAuraComponent(source map[string]string, id string) (err error) + func (f *Force) UpdateCredentials(creds ForceSession) + func (f *Force) UpdateDataPipeline(id string, masterLabel string, scriptContent string) (err error) + func (f *Force) UpdateRecord(sobject, id string, attrs map[string]string) (err error) + func (f *Force) UpdateRecordJSON(sobject, id, data string) (err error) + func (f *Force) UpsertRecordJSON(sobject, extidname, extid, data string) (id string, err error) + func (f *Force) Whoami() (me ForceRecord, err error) + type ForceCheckDeploymentStatusResult struct + CheckOnly bool + CompletedDate time.Time + CreatedDate time.Time + Details ComponentDetails + Done bool + Id string + NumberComponentErrors int + NumberComponentsDeployed int + NumberComponentsTotal int + NumberTestErrors int + NumberTestsCompleted int + NumberTestsTotal int + RollbackOnError bool + StateDetail string + Status string + Success bool + func (results ForceCheckDeploymentStatusResult) String() string + type ForceCommunitiesResult struct + Communities []ForceCommunity + Total int + type ForceCommunity struct + AllowChatterAccessWithoutLogin bool + AllowMembersToFlag bool + Description interface{} + ID string + InvitationsEnabled bool + KnowledgeableEnabled bool + LoginURL string + Name string + NicknameDisplayEnabled bool + PrivateMessagesEnabled bool + ReputationEnabled bool + SendWelcomeEmail bool + SiteAsContainerEnabled bool + SiteURL string + Status string + URL string + URLPathPrefix string + type ForceConnectedApp struct + Id string + Name string + Type string + type ForceConnectedApps []ForceConnectedApp + func (apps ForceConnectedApps) Len() int + func (apps ForceConnectedApps) Less(i, j int) bool + func (apps ForceConnectedApps) Swap(i, j int) + type ForceCreateRecordResult struct + Errors []string + Id string + Success bool + type ForceEndpoint int + const EndpointCustom + const EndpointInstace + const EndpointMobile1 + const EndpointPrerelease + const EndpointProduction + const EndpointTest + type ForceError struct + ErrorCode string + Fields []string + Message string + func (e *ForceError) Error() string + type ForceLimit struct + Max int64 + Name string + Remaining int64 + type ForceLimits map[string]ForceLimit + type ForceMetadata struct + ApiVersion string + Force *Force + func NewForceMetadata(force *Force) (fm *ForceMetadata) + func (fm *ForceMetadata) CheckStatus(id string) (err error) + func (fm *ForceMetadata) DescribeMetadata() (describe MetadataDescribeResult, err error) + type ForcePartner struct + Force *Force + func NewForcePartner(force *Force) (partner *ForcePartner) + func (partner *ForcePartner) CheckStatus(id string) (err error) + type ForcePasswordResetResult struct + NewPassword string + type ForcePasswordStatusResult struct + IsExpired bool + type ForceQueryResult struct + Done bool + NextRecordsUrl string + Records []ForceRecord + TotalSize int + func (result *ForceQueryResult) Update(other ForceQueryResult, force *Force) + type ForceRecord map[string]interface + type ForceSession struct + AccessToken string + ClientId string + ForceEndpoint ForceEndpoint + InstanceUrl string + IssuedAt string + RefreshToken string + Scope string + SessionOptions *SessionOptions + SessionRefreshed bool + UserId string + UserInfo *UserInfo + func ForceSoapLogin(endpoint ForceEndpoint, username string, password string) (creds ForceSession, err error) + func GetAccessAuthorization(code, redirect_uri, client_id, client_secret, endpointURL string) (result ForceSession, err error) + func GetServerAuthorization(orgID, clientID, userMail, authURL, endpointURL string) (result ForceSession, err error) + func (creds *ForceSession) SessionName() string + type ForceSobject map[string]interface + type ForceSobjectFields []interface + func (f ForceSobjectFields) Len() int + func (f ForceSobjectFields) Less(i, j int) bool + func (f ForceSobjectFields) Swap(i, j int) + type ForceSobjectsResult struct + Encoding string + MaxBatchSize int + Sobjects []ForceSobject + type GenericForceError struct + Error string + Error_Description string + type JobInfo struct + ApexProcessingTime int + ApiActiveProcessingTime int + ApiVersion string + ConcurrencyMode string + ContentType string + CreatedById string + CreatedDate string + ExternalIdFieldName string + Id string + NumberBatchesCompleted int + NumberBatchesFailed int + NumberBatchesInProgress int + NumberBatchesQueued int + NumberBatchesTotal int + NumberRecordsFailed int + NumberRecordsProcessed int + NumberRetries int + Object string + Operation string + State string + SystemModStamp string + TotalProcessingTime int + XMLName xml.Name + type JobInfoV2 struct + ApiVersion float32 + ColumnDelimiter string + ConcurrencyMode string + ContentType string + ContentUrl string + CreatedById string + CreatedDate string + ErrorMessage string + ExternalIdFieldName string + ID string + JobType string + LineEnding string + NumberRecordsFailed int64 + NumberRecordsProcessed int64 + Object string + Operation string + State string + StateMessage interface{} + SystemModStamp string + type LoginFault struct + ExceptionCode string + ExceptionMessage string + type MetadataDescribeResult struct + MetadataObjects []DescribeMetadataObject + NamespacePrefix string + PartialSaveAllowed bool + TestRequired bool + type OAuthError struct + Error string + ErrorDescription string + type QueryOptions struct + IsTooling bool + QueryAll bool + type RefreshMethod int + const RefreshOauth + const RefreshUnavailable + type Result struct + Created bool + Id string + Message string + Success bool + type RunTestResult struct + CodeCoverageWarnings []CodeCoverageWarning + NumberOfFailures int + NumberOfTestsRun int + TestFailures []TestFailure + TestSuccesses []TestSuccess + TotalTime float32 + type SelectStruct struct + FieldNames []FieldName + ObjectName string + type SessionOptions struct + Alias string + ApiVersion string + RefreshMethod RefreshMethod + type Soap struct + AccessToken string + Endpoint string + Header string + Namespace string + func NewSoap(endpoint, namespace, accessToken string) (s *Soap) + func (s *Soap) Execute(action, query string) (response []byte, err error) + func (s *Soap) ExecuteLogin(username, password string) (response []byte, err error) + type SoapError struct + FaultCode string + FaultString string + type SoapFault struct + Detail LoginFault + FaultCode string + FaultString string + type TestFailure struct + Message string + MethodName string + Name string + StackTrace string + Time float32 + type TestSuccess struct + MethodName string + Name string + Time float32 + type UserInfo struct + OrgId string + OrgNamespace string + ProfileId string + UserId string + UserName string