gforce

package module
v1.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 28 Imported by: 1

Documentation

Index

Constants

View Source
const (
	BatchStateQueued       string = "Queued"
	BatchStateInProgress   string = "InProgress"
	BatchStateCompleted    string = "Completed"
	BatchStateFailed       string = "Failed"
	BatchStateNotProcessed string = "Not Processed"
)

Variables

View Source
var (
	ClientId       string = "3MVG9QBLg8QGkFeoxS81gotuAQnbfy4bLU7HErU2yl5I8hFgEP42qQHtJRZelb_rogsKrSfLz_gE5uFRquYwf"
	Timeout        int64  = 0
	CustomEndpoint string = ""
)

CONFIGS

View Source
var (
	SalesforceError                    = errors.New("Salesforce internal error")
	SessionExpiredError                = errors.New("Session expired")
	SessionFailRefresh                 = errors.New("Failed to refresh session")
	DeleteRecordResourceNotExistsError = errors.New("The requested resource does not exist")
	EntityIsDeleted                    = errors.New("Entity is deleted")
)

ERRORS

View Source
var InvalidBulkObject = errors.New("Object Does Not Support Bulk API")

Functions

func ApiVersion

func ApiVersion() string

func ApiVersionNumber

func ApiVersionNumber() string

func GetEndpointURL

func GetEndpointURL(endpoint ForceEndpoint) (endpointURL string, err error)

func SetApiVersion

func SetApiVersion(version string)

func ValidateSFID

func ValidateSFID(input string) bool

ValidateSFID validate a Salesforce ID Stackoverflow: https://stackoverflow.com/a/29299786/1333724 Gist: https://gist.github.com/maxmcd/a32a35c0eebcfb77cd005f9dd8958815 Post about SF unique ID: https://astadiaemea.wordpress.com/2010/06/21/15-or-18-character-ids-in-salesforce-com-–-do-you-know-how-useful-unique-ids-are-to-your-development-effort/

Types

type AuraDefinition

type AuraDefinition struct {
	Id                     string
	IsDeleted              bool
	CreatedDate            string
	CreatedById            string
	LastModifiedDate       string
	LastModifiedById       string
	SystemModstamp         string
	AuraDefinitionBundleId string
	DefType                string
	Format                 string
	Source                 string
}

type AuraDefinitionBundle

type AuraDefinitionBundle struct {
	Id               string
	IsDeleted        bool
	DeveloperName    string
	Language         string
	MasterLabel      string
	NamespacePrefix  string
	CreatedDate      string
	CreatedById      string
	LastModifiedDate string
	LastModifiedById string
	SystemModstamp   string
	ApiVersion       int
	Description      string
}

type AuraDefinitionBundleResult

type AuraDefinitionBundleResult struct {
	Done           bool
	Records        []ForceRecord
	TotalSize      int
	QueryLocator   string
	Size           int
	EntityTypeName string
	NextRecordsUrl string
}

type BatchInfo

type BatchInfo struct {
	Id                      string      `xml:"id,omitempty" json:"id,omitempty"`
	JobId                   string      `xml:"jobId,omitempty" json:"jobId,omitempty"`
	State                   string      `xml:"state,omitempty" json:"state,omitempty"`
	StateMessage            interface{} `xml:"stateMessage,omitempty" json:"stateMessage,omitempty"`
	CreatedDate             string      `xml:"createdDate,omitempty" json:"createdDate,omitempty"`
	NumberRecordsProcessed  int64       `xml:"numberRecordsProcessed,omitempty" json:"numberRecordsProcessed,omitempty"`
	NumberRecordsFailed     int64       `xml:"numberRecordsFailed,omitempty" json:"numberRecordsFailed,omitempty"`
	SystemModstamp          string      `xml:"systemModstamp,omitempty" json:"systemModstamp,omitempty"`
	TotalProcessingTime     int64       `xml:"totalProcessingTime,omitempty" json:"totalProcessingTime,omitempty"`
	ApexProcessingTime      int64       `xml:"apexProcessingTime,omitempty" json:"apexProcessingTime,omitempty"`
	ApiActiveProcessingTime int64       `xml:"apiActiveProcessingTime,omitempty" json:"apiActiveProcessingTime,omitempty"`
}

type BatchResult

type BatchResult struct {
	Results []string
}

type BundleManifest

type BundleManifest struct {
	Name  string
	Id    string
	Files []ComponentFile
}

type CodeCoverageWarning

type CodeCoverageWarning struct {
	Name    string `xml:"name"`
	Message string `xml:"message"`
}

type ComponentDetails

type ComponentDetails struct {
	ComponentSuccesses []ComponentSuccess `xml:"componentSuccesses"`
	ComponentFailures  []ComponentFailure `xml:"componentFailures"`
	RunTestResult      RunTestResult      `xml:"runTestResult"`
}

type ComponentFailure

type ComponentFailure struct {
	Changed     bool   `xml:"changed"`
	Created     bool   `xml:"created"`
	Deleted     bool   `xml:"deleted"`
	FileName    string `xml:"fileName"`
	FullName    string `xml:"fullName"`
	LineNumber  int    `xml:"lineNumber"`
	Problem     string `xml:"problem"`
	ProblemType string `xml:"problemType"`
	Success     bool   `xml:"success"`
}

type ComponentFile

type ComponentFile struct {
	FileName    string
	ComponentId string
}

type ComponentSuccess

type ComponentSuccess struct {
	Changed  bool   `xml:"changed"`
	Created  bool   `xml:"created"`
	Deleted  bool   `xml:"deleted"`
	FileName string `xml:"fileName"`
	FullName string `xml:"fullName"`
	Id       string `xml:"id"`
	Success  bool   `xml:"success"`
}

type DescribeMetadataObject

type DescribeMetadataObject struct {
	ChildXmlNames []string `xml:"childXmlNames"`
	DirectoryName string   `xml:"directoryName"`
	InFolder      bool     `xml:"inFolder"`
	MetaFile      bool     `xml:"metaFile"`
	Suffix        string   `xml:"suffix"`
	XmlName       string   `xml:"xmlName"`
}

type FieldName

type FieldName struct {
	FieldName string
	IsObject  bool
}

type Force

type Force struct {
	Credentials *ForceSession
	Metadata    *ForceMetadata
	Partner     *ForcePartner
}

func NewForce

func NewForce(creds *ForceSession) (force *Force)

func (*Force) AbortBulkJob

func (f *Force) AbortBulkJob(jobId string) (result JobInfo, err error)

func (*Force) AbortBulkJobV2

func (f *Force) AbortBulkJobV2(jobId string) (result JobInfoV2, err error)

func (*Force) AddBatchToJob

func (f *Force) AddBatchToJob(content string, job JobInfo) (result BatchInfo, err error)

func (*Force) AddBatchToJobV2

func (f *Force) AddBatchToJobV2(job JobInfoV2, content string) (result BatchInfo, err error)

func (*Force) BulkQuery

func (f *Force) BulkQuery(soql string, jobId string, contenttype string) (result BatchInfo, err error)

func (*Force) ChangePassword

func (f *Force) ChangePassword(id string, attrs map[string]string) (result string, err error, emessages []ForceError)

func (*Force) CloseBulkJob

func (f *Force) CloseBulkJob(jobId string) (result JobInfo, err error)

func (*Force) CloseBulkJobV2

func (f *Force) CloseBulkJobV2(jobId string) (result JobInfoV2, err error)

func (*Force) CompactLayoutsSObject

func (f *Force) CompactLayoutsSObject(name string) (result string, err error)

func (*Force) Count

func (f *Force) Count(sobject string) (result int, err error)

Count func

func (*Force) CreateBulkJob

func (f *Force) CreateBulkJob(jobInfo JobInfo) (result JobInfo, err error)

func (*Force) CreateBulkJobV2

func (f *Force) CreateBulkJobV2(jobInfo JobInfoV2) (result JobInfoV2, err error)

func (*Force) CreateDataPipeline

func (f *Force) CreateDataPipeline(name string, masterLabel string, apiVersionNumber string, scriptContent string, scriptType string) (result ForceCreateRecordResult, err error, emessages []ForceError)

func (*Force) CreateDataPipelineJob

func (f *Force) CreateDataPipelineJob(id string) (result ForceCreateRecordResult, err error, emessages []ForceError)

func (*Force) CreateRecord

func (f *Force) CreateRecord(sobject string, attrs map[string]string) (id string, err error, emessages []ForceError)

func (*Force) CreateRecordJSON

func (f *Force) CreateRecordJSON(sobject, data string) (id string, err error)

func (*Force) CreateToolingRecord

func (f *Force) CreateToolingRecord(objecttype string, attrs map[string]string) (result ForceCreateRecordResult, err error)

func (*Force) DefaultDebugLevel

func (f *Force) DefaultDebugLevel() (id string, err error, emessages []ForceError)

func (*Force) DeleteDataPipeline

func (f *Force) DeleteDataPipeline(id string) (err error)

func (*Force) DeleteRecord

func (f *Force) DeleteRecord(sobject, id string) (err error)

func (*Force) DeleteRecordExternalID

func (f *Force) DeleteRecordExternalID(sobject, field, id string) (err error)

func (*Force) DeleteToolingRecord

func (f *Force) DeleteToolingRecord(objecttype string, id string) (err error)

func (*Force) DescribeSObject

func (f *Force) DescribeSObject(name string) (result string, err error)

func (*Force) DumpListStack

func (f *Force) DumpListStack(l *list.List)

func (*Force) Get

func (f *Force) Get(url string) (object ForceRecord, err error)

func (*Force) GetBase64

func (f *Force) GetBase64(sobject, id, field string) (object []byte, err error)

func (*Force) GetBase64Stream

func (f *Force) GetBase64Stream(sobject, id, field string) (response *http.Response, err error)

func (*Force) GetBatchInfo

func (f *Force) GetBatchInfo(jobId string, batchId string, contenttype string) (result BatchInfo, err error)

func (*Force) GetBatches

func (f *Force) GetBatches(jobId string) (result []BatchInfo, err error)

func (*Force) GetBulkJobs

func (f *Force) GetBulkJobs() (result []JobInfo, err error)

func (*Force) GetBulkJobsV2

func (f *Force) GetBulkJobsV2() (result []JobInfoV2, err error)

func (*Force) GetCodeCoverage

func (f *Force) GetCodeCoverage(classId string, className string) (err error)

func (*Force) GetCommunities

func (f *Force) GetCommunities() (result ForceCommunitiesResult, err error)

func (*Force) GetCommunity

func (f *Force) GetCommunity(id string) (result ForceCommunity, err error)

func (*Force) GetCompactLayoutsAsBytes

func (f *Force) GetCompactLayoutsAsBytes(name string) (sobject []byte, err error)

func (*Force) GetConsoleLogLevelId

func (f *Force) GetConsoleLogLevelId() (result string, err error)

func (*Force) GetDataPipeline

func (f *Force) GetDataPipeline(name string) (results ForceQueryResult, err error)

func (*Force) GetIDs

func (f *Force) GetIDs(sobject string, pkField string, where map[string]interface{}, limit, offset int) (result []string, totalSize int, err error)

GetIDs func

func (*Force) GetIDsStream

func (f *Force) GetIDsStream(sobject string, pkField string, where map[string]interface{}, limit, offset int) (files []string, err error)

func (*Force) GetIdentify

func (f *Force) GetIdentify() (result ForceRecord, err error)

func (*Force) GetIdentifyAsBytes

func (f *Force) GetIdentifyAsBytes() (result []byte, err error)

func (*Force) GetJobInfo

func (f *Force) GetJobInfo(jobId string) (result JobInfo, err error)

func (*Force) GetJobInfoV2

func (f *Force) GetJobInfoV2(jobId string) (result JobInfoV2, err error)

func (*Force) GetLayoutsAsBytes

func (f *Force) GetLayoutsAsBytes(name string) (sobject []byte, err error)

func (*Force) GetLimits

func (f *Force) GetLimits() (result map[string]ForceLimit, err error)

func (*Force) GetListviewDescribeAsBytes

func (f *Force) GetListviewDescribeAsBytes(name, id string) (sobject []byte, err error)

func (*Force) GetListviewsAsBytes

func (f *Force) GetListviewsAsBytes(name string) (sobject []byte, err error)

func (*Force) GetObjectSpec

func (f *Force) GetObjectSpec(objectName string, l *list.List) (result *SelectStruct)

func (*Force) GetPasswordStatus

func (f *Force) GetPasswordStatus(id string) (result ForcePasswordStatusResult, err error)

func (*Force) GetPrevObjectSpec

func (f *Force) GetPrevObjectSpec(objectName string, l *list.List) (foundItem *SelectStruct)

func (*Force) GetRecord

func (f *Force) GetRecord(sobject, id string) (object ForceRecord, err error)

func (*Force) GetResources

func (f *Force) GetResources() (result ForceRecord, err error)

func (*Force) GetSobject

func (f *Force) GetSobject(name string) (sobject ForceSobject, err error)

func (*Force) GetSobjectAsBytes

func (f *Force) GetSobjectAsBytes(name string) (sobject []byte, err error)

func (*Force) GetToolingRecord

func (f *Force) GetToolingRecord(sobject, id string) (object ForceRecord, err error)

func (*Force) GetToolingRecordAsBytes

func (f *Force) GetToolingRecordAsBytes(sobject, id string) ([]byte, error)

func (*Force) HasObject

func (f *Force) HasObject(objectName string, l *list.List) (result bool, foundItem *SelectStruct)

func (*Force) LayoutsSObject

func (f *Force) LayoutsSObject(name string) (result string, err error)

func (*Force) ListSObjectName

func (f *Force) ListSObjectName() (sobjects []string, err error)

func (*Force) ListSObjects

func (f *Force) ListSObjects() (sobjects []ForceSobject, err error)

func (*Force) ListSObjectsAsByte

func (f *Force) ListSObjectsAsByte() (sobjects []byte, err error)

func (*Force) ListViewDescribeSObject

func (f *Force) ListViewDescribeSObject(name, id string) (result string, err error)

func (*Force) ListViewsSObject

func (f *Force) ListViewsSObject(name string) (result string, err error)

func (*Force) PushFieldName

func (f *Force) PushFieldName(fieldName string, spec *SelectStruct, IsObject bool)

func (*Force) Query

func (f *Force) Query(query string, queryAll, tooling bool) (result ForceQueryResult, err error)

func (*Force) QueryAndSend

func (f *Force) QueryAndSend(query string, processor chan<- ForceRecord, options ...func(*QueryOptions)) (err error)

func (*Force) QueryDataPipeline

func (f *Force) QueryDataPipeline(soql string) (results ForceQueryResult, err error)

func (*Force) QueryDataPipelineAsBytes

func (f *Force) QueryDataPipelineAsBytes(soql string) (sobject []byte, err error)

func (*Force) QueryDefaultDebugLevel

func (f *Force) QueryDefaultDebugLevel() (id string, err error)

func (*Force) QueryLogs

func (f *Force) QueryLogs() (results ForceQueryResult, err error)

func (*Force) QueryProfile

func (f *Force) QueryProfile(fields ...string) (results ForceQueryResult, err error)

func (*Force) QueryTraceFlags

func (f *Force) QueryTraceFlags() (results ForceQueryResult, err error)

func (*Force) RefreshSession

func (f *Force) RefreshSession() (err error)

RefreshSession method

func (*Force) ResetPassword

func (f *Force) ResetPassword(id string) (result ForcePasswordResetResult, err error)

func (*Force) RetrieveBulkBatchResults

func (f *Force) RetrieveBulkBatchResults(job JobInfo, batchId string) (results []string, err error)

func (*Force) RetrieveBulkJobQueryResults

func (f *Force) RetrieveBulkJobQueryResults(job JobInfo, batchId string, resultId string) ([]byte, error)

func (*Force) RetrieveBulkQuery

func (f *Force) RetrieveBulkQuery(jobId string, batchId string) (result []byte, err error)

func (*Force) RetrieveBulkQueryResults

func (f *Force) RetrieveBulkQueryResults(jobId string, batchId string, resultId string) (result []byte, err error)

func (*Force) RetrieveBulkResultStream

func (f *Force) RetrieveBulkResultStream(job JobInfo, batchId string, resultId string) (*http.Response, error)

func (*Force) RetrieveEventLogFile

func (f *Force) RetrieveEventLogFile(elfId string) (result string, err error)

func (*Force) RetrieveLog

func (f *Force) RetrieveLog(logId string) (result string, err error)

func (*Force) Select

func (f *Force) Select(sobject string, fields []string, where map[string]interface{}, limit, offset int, customQuery string) (results []ForceRecord, totalSize int, err error)

Select func

func (*Force) SelectByID

func (f *Force) SelectByID(sobject string, fields []string, id string) (result ForceRecord, totalSize int, err error)

SelectByID func

func (*Force) SetHTTPTrace

func (f *Force) SetHTTPTrace(trace bool)

func (*Force) SetHTTPTraceDetail

func (f *Force) SetHTTPTraceDetail(trace bool)

func (*Force) StartTrace

func (f *Force) StartTrace(userId ...string) (result ForceCreateRecordResult, err error, emessages []ForceError)

func (*Force) Tooling

func (f *Force) Tooling(sobject string, fields []string, where map[string]interface{}, limit, offset int) (results []ForceRecord, totalSize int, err error)

Tooling func

func (*Force) UpdateApiVersion

func (f *Force) UpdateApiVersion(version string) (err error)

func (*Force) UpdateAuraComponent

func (f *Force) UpdateAuraComponent(source map[string]string, id string) (err error)

func (*Force) UpdateCredentials

func (f *Force) UpdateCredentials(creds ForceSession)

func (*Force) UpdateDataPipeline

func (f *Force) UpdateDataPipeline(id string, masterLabel string, scriptContent string) (err error)

func (*Force) UpdateRecord

func (f *Force) UpdateRecord(sobject, id string, attrs map[string]string) (err error)

func (*Force) UpdateRecordJSON

func (f *Force) UpdateRecordJSON(sobject, id, data string) (err error)

func (*Force) UpsertRecordJSON

func (f *Force) UpsertRecordJSON(sobject, extidname, extid, data string) (id string, err error)

func (*Force) Whoami

func (f *Force) Whoami() (me ForceRecord, err error)

type ForceCheckDeploymentStatusResult

type ForceCheckDeploymentStatusResult struct {
	CheckOnly                bool             `xml:"checkOnly"`
	CompletedDate            time.Time        `xml:"completedDate"`
	CreatedDate              time.Time        `xml:"createdDate"`
	Details                  ComponentDetails `xml:"details"`
	Done                     bool             `xml:"done"`
	Id                       string           `xml:"id"`
	NumberComponentErrors    int              `xml:"numberComponentErrors"`
	NumberComponentsDeployed int              `xml:"numberComponentsDeployed"`
	NumberComponentsTotal    int              `xml:"numberComponentsTotal"`
	NumberTestErrors         int              `xml:"numberTestErrors"`
	NumberTestsCompleted     int              `xml:"numberTestsCompleted"`
	NumberTestsTotal         int              `xml:"numberTestsTotal"`
	RollbackOnError          bool             `xml:"rollbackOnError"`
	Status                   string           `xml:"status"`
	StateDetail              string           `xml:"stateDetail"`
	Success                  bool             `xml:"success"`
}

func (ForceCheckDeploymentStatusResult) String

func (results ForceCheckDeploymentStatusResult) String() string

type ForceCommunitiesResult

type ForceCommunitiesResult struct {
	Communities []ForceCommunity `json:"communities"`
	Total       int              `json:"total"`
}

type ForceCommunity

type ForceCommunity struct {
	AllowChatterAccessWithoutLogin bool        `json:"allowChatterAccessWithoutLogin"`
	AllowMembersToFlag             bool        `json:"allowMembersToFlag"`
	Description                    interface{} `json:"description"`
	ID                             string      `json:"id"`
	InvitationsEnabled             bool        `json:"invitationsEnabled"`
	KnowledgeableEnabled           bool        `json:"knowledgeableEnabled"`
	LoginURL                       string      `json:"loginUrl"`
	Name                           string      `json:"name"`
	NicknameDisplayEnabled         bool        `json:"nicknameDisplayEnabled"`
	PrivateMessagesEnabled         bool        `json:"privateMessagesEnabled"`
	ReputationEnabled              bool        `json:"reputationEnabled"`
	SendWelcomeEmail               bool        `json:"sendWelcomeEmail"`
	SiteAsContainerEnabled         bool        `json:"siteAsContainerEnabled"`
	SiteURL                        string      `json:"siteUrl"`
	Status                         string      `json:"status"`
	URL                            string      `json:"url"`
	URLPathPrefix                  string      `json:"urlPathPrefix"`
}

type ForceConnectedApp

type ForceConnectedApp struct {
	Name string `xml:"fullName"`
	Id   string `xml:"id"`
	Type string `xml:"type"`
}

type ForceConnectedApps

type ForceConnectedApps []ForceConnectedApp

func (ForceConnectedApps) Len

func (apps ForceConnectedApps) Len() int

func (ForceConnectedApps) Less

func (apps ForceConnectedApps) Less(i, j int) bool

func (ForceConnectedApps) Swap

func (apps ForceConnectedApps) Swap(i, j int)

type ForceCreateRecordResult

type ForceCreateRecordResult struct {
	Errors  []string
	Id      string
	Success bool
}

type ForceEndpoint

type ForceEndpoint int
const (
	EndpointProduction ForceEndpoint = iota
	EndpointTest
	EndpointPrerelease
	EndpointMobile1
	EndpointCustom
	EndpointInstace
)

type ForceError

type ForceError struct {
	Message   string   `json:"message"`
	ErrorCode string   `json:"errorCode"`
	Fields    []string `json:"fields"`
}

func (*ForceError) Error

func (e *ForceError) Error() string

type ForceLimit

type ForceLimit struct {
	Name      string
	Remaining int64
	Max       int64
}

type ForceLimits

type ForceLimits map[string]ForceLimit

type ForceMetadata

type ForceMetadata struct {
	ApiVersion string
	Force      *Force
}

func NewForceMetadata

func NewForceMetadata(force *Force) (fm *ForceMetadata)

func (*ForceMetadata) CheckStatus

func (fm *ForceMetadata) CheckStatus(id string) (err error)

func (*ForceMetadata) DescribeMetadata

func (fm *ForceMetadata) DescribeMetadata() (describe MetadataDescribeResult, err error)

type ForcePartner

type ForcePartner struct {
	Force *Force
}

func NewForcePartner

func NewForcePartner(force *Force) (partner *ForcePartner)

func (*ForcePartner) CheckStatus

func (partner *ForcePartner) CheckStatus(id string) (err error)

type ForcePasswordResetResult

type ForcePasswordResetResult struct {
	NewPassword string
}

type ForcePasswordStatusResult

type ForcePasswordStatusResult struct {
	IsExpired bool
}

type ForceQueryResult

type ForceQueryResult struct {
	Done           bool          `json:"done"`
	Records        []ForceRecord `json:"records"`
	TotalSize      int           `json:"totalSize"`
	NextRecordsUrl string        `json:"nextRecordsUrl"`
}

func (*ForceQueryResult) Update

func (result *ForceQueryResult) Update(other ForceQueryResult, force *Force)

type ForceRecord

type ForceRecord map[string]interface{}

type ForceSession

type ForceSession struct {
	AccessToken      string `json:"access_token"`
	InstanceUrl      string `json:"instance_url"`
	IssuedAt         string `json:"issued_at"`
	Scope            string `json:"scope"`
	ClientId         string
	RefreshToken     string `json:"refresh_token"`
	ForceEndpoint    ForceEndpoint
	UserInfo         *UserInfo
	UserId           string `json:"id"`
	SessionOptions   *SessionOptions
	SessionRefreshed bool
}

func ForceSoapLogin

func ForceSoapLogin(endpoint ForceEndpoint, username string, password string) (creds ForceSession, err error)

func GetAccessAuthorization

func GetAccessAuthorization(code, redirect_uri, client_id, client_secret, endpointURL string) (result ForceSession, err error)

func GetServerAuthorization

func GetServerAuthorization(orgID, clientID, userMail, authURL, endpointURL string) (result ForceSession, err error)

GetServerAuthorization func

func (*ForceSession) SessionName

func (creds *ForceSession) SessionName() string

type ForceSobject

type ForceSobject map[string]interface{}

type ForceSobjectFields

type ForceSobjectFields []interface{}

func (ForceSobjectFields) Len

func (f ForceSobjectFields) Len() int

func (ForceSobjectFields) Less

func (f ForceSobjectFields) Less(i, j int) bool

func (ForceSobjectFields) Swap

func (f ForceSobjectFields) Swap(i, j int)

type ForceSobjectsResult

type ForceSobjectsResult struct {
	Encoding     string
	MaxBatchSize int
	Sobjects     []ForceSobject
}

type GenericForceError

type GenericForceError struct {
	Error_Description string
	Error             string
}

type JobInfo

type JobInfo struct {
	XMLName                 xml.Name `xml:"http://www.force.com/2009/06/asyncapi/dataload jobInfo"`
	Id                      string   `xml:"id,omitempty"`
	Operation               string   `xml:"operation,omitempty"`
	Object                  string   `xml:"object,omitempty"`
	ExternalIdFieldName     string   `xml:"externalIdFieldName,omitempty"`
	CreatedById             string   `xml:"createdById,omitempty"`
	CreatedDate             string   `xml:"createdDate,omitempty"`
	SystemModStamp          string   `xml:"systemModstamp,omitempty"`
	State                   string   `xml:"state,omitempty"`
	ConcurrencyMode         string   `xml:"concurrencyMode,omitempty"`
	ContentType             string   `xml:"contentType,omitempty"`
	NumberBatchesQueued     int      `xml:"numberBatchesQueued,omitempty"`
	NumberBatchesInProgress int      `xml:"numberBatchesInProgress,omitempty"`
	NumberBatchesCompleted  int      `xml:"numberBatchesCompleted,omitempty"`
	NumberBatchesFailed     int      `xml:"numberBatchesFailed,omitempty"`
	NumberBatchesTotal      int      `xml:"numberBatchesTotal,omitempty"`
	NumberRecordsProcessed  int      `xml:"numberRecordsProcessed,omitempty"`
	NumberRetries           int      `xml:"numberRetries,omitempty"`
	ApiVersion              string   `xml:"apiVersion,omitempty"`
	NumberRecordsFailed     int      `xml:"numberRecordsFailed,omitempty"`
	TotalProcessingTime     int      `xml:"totalProcessingTime,omitempty"`
	ApiActiveProcessingTime int      `xml:"apiActiveProcessingTime,omitempty"`
	ApexProcessingTime      int      `xml:"apexProcessingTime,omitempty"`
}

type JobInfoV2

type JobInfoV2 struct {
	ID                     string      `json:"id,omitempty"`
	ApiVersion             float32     `json:"apiVersion,omitempty"`
	ColumnDelimiter        string      `json:"columnDelimiter,omitempty"`
	ConcurrencyMode        string      `json:"concurrencyMode,omitempty"`
	ContentType            string      `json:"contentType,omitempty"`
	ContentUrl             string      `json:"contentUrl,omitempty"`
	CreatedById            string      `json:"createdById,omitempty"`
	CreatedDate            string      `json:"createdDate,omitempty"`
	ErrorMessage           string      `json:"errorMessage,omitempty"`
	ExternalIdFieldName    string      `json:"externalIdFieldName,omitempty"`
	JobType                string      `json:"jobType,omitempty"`
	LineEnding             string      `json:"lineEnding,omitempty"`
	NumberRecordsProcessed int64       `json:"numberRecordsProcessed,omitempty"`
	NumberRecordsFailed    int64       `json:"numberRecordsFailed,omitempty"`
	Object                 string      `json:"object,omitempty"`
	Operation              string      `json:"operation,omitempty"`
	State                  string      `json:"state,omitempty"`
	StateMessage           interface{} `json:"stateMessage,omitempty"`
	SystemModStamp         string      `json:"systemModstamp,omitempty"`
}

type LoginFault

type LoginFault struct {
	ExceptionCode    string `xml:"exceptionCode" json:"exceptionCode"`
	ExceptionMessage string `xml:"exceptionMessage" json:"exceptionMessage"`
}

type MetadataDescribeResult

type MetadataDescribeResult struct {
	NamespacePrefix    string                   `xml:"organizationNamespace"`
	PartialSaveAllowed bool                     `xml:"partialSaveAllowed"`
	TestRequired       bool                     `xml:"testRequired"`
	MetadataObjects    []DescribeMetadataObject `xml:"metadataObjects"`
}

type OAuthError

type OAuthError struct {
	Error            string `json:"error"`
	ErrorDescription string `json:"error_description"`
}

type QueryOptions

type QueryOptions struct {
	IsTooling bool
	QueryAll  bool
}

type RefreshMethod

type RefreshMethod int
const (
	RefreshUnavailable RefreshMethod = iota
	RefreshOauth
)

type Result

type Result struct {
	Id      string
	Success bool
	Created bool
	Message string
}

type RunTestResult

type RunTestResult struct {
	NumberOfFailures     int                   `xml:"numFailures"`
	NumberOfTestsRun     int                   `xml:"numTestsRun"`
	TotalTime            float32               `xml:"totalTime"`
	TestFailures         []TestFailure         `xml:"failures"`
	TestSuccesses        []TestSuccess         `xml:"successes"`
	CodeCoverageWarnings []CodeCoverageWarning `xml:"codeCoverageWarnings"`
}

type SelectStruct

type SelectStruct struct {
	ObjectName string
	FieldNames []FieldName
}

type SessionOptions

type SessionOptions struct {
	ApiVersion    string
	Alias         string
	RefreshMethod RefreshMethod
}

type Soap

type Soap struct {
	AccessToken string
	Endpoint    string
	Header      string
	Namespace   string
}

func NewSoap

func NewSoap(endpoint, namespace, accessToken string) (s *Soap)

func (*Soap) Execute

func (s *Soap) Execute(action, query string) (response []byte, err error)

func (*Soap) ExecuteLogin

func (s *Soap) ExecuteLogin(username, password string) (response []byte, err error)

type SoapError

type SoapError struct {
	FaultCode   string `xml:"Body>Fault>faultcode"`
	FaultString string `xml:"Body>Fault>faultstring"`
}

type SoapFault

type SoapFault struct {
	FaultCode   string     `xml:"Body>Fault>faultcode"`
	FaultString string     `xml:"Body>Fault>faultstring"`
	Detail      LoginFault `xml:"Body>Fault>detail>LoginFault"`
}

type TestFailure

type TestFailure struct {
	Message    string  `xml:"message"`
	Name       string  `xml:"name"`
	MethodName string  `xml:"methodName"`
	StackTrace string  `xml:"stackTrace"`
	Time       float32 `xml:"time"`
}

type TestSuccess

type TestSuccess struct {
	Name       string  `xml:"name"`
	MethodName string  `xml:"methodName"`
	Time       float32 `xml:"time"`
}

type UserInfo

type UserInfo struct {
	UserName     string `json:"preferred_username"`
	OrgId        string `json:"organization_id"`
	UserId       string `json:"user_id"`
	ProfileId    string
	OrgNamespace string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL