sobjects

package
v0.2.37 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContactEmailOrID added in v0.2.0

func ContactEmailOrID(contact Contact) string

func ContactIDOrEmail added in v0.2.0

func ContactIDOrEmail(contact Contact) string

func ContactsEmailOrID added in v0.2.0

func ContactsEmailOrID(contacts []Contact) []string

func ContactsEmailOrIDString added in v0.2.0

func ContactsEmailOrIDString(contacts []Contact, sep string) string

func ContactsIDOrEmail added in v0.2.0

func ContactsIDOrEmail(contacts []Contact) []string

func ContactsIDOrEmailString added in v0.2.0

func ContactsIDOrEmailString(contacts []Contact, sep string) string

Types

type Account

type Account struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type AccountSet

type AccountSet struct {
	IDSet   IDSet     `xml:"-"`
	Records []Account `json:"records,omitempty" xml:"records"`
}

func NewAccountSetFromJSONResponse

func NewAccountSetFromJSONResponse(resp *http.Response) (AccountSet, error)

func (*AccountSet) GetAccountByID added in v0.2.0

func (set *AccountSet) GetAccountByID(id string) (Account, error)

func (*AccountSet) GetAccountByName

func (set *AccountSet) GetAccountByName(name string) (Account, error)

type CampaignMember

type CampaignMember struct {
	ID                 string
	CampaignID         string
	ContactID          string
	CreatedDate        string
	CurrencyIsoCode    string
	FirstRespondedDate string
	HasResponded       bool
	LeadID             string
	Name               string
	Status             string
}

func NewCampaignMemberFromJSON added in v0.2.0

func NewCampaignMemberFromJSON(bytes []byte) (CampaignMember, error)

func NewCampaignMemberFromJSONFile added in v0.2.0

func NewCampaignMemberFromJSONFile(filepath string) (CampaignMember, error)

type CampaignMemberSet

type CampaignMemberSet struct {
	IDSet      IDSet                     `xml:"-"`
	Records    []CampaignMember          `xml:"records"`
	RecordsMap map[string]CampaignMember `xml:"-"`
}

func NewCampaignMemberSet

func NewCampaignMemberSet() CampaignMemberSet

func NewCampaignMemberSetFromXML added in v0.2.0

func NewCampaignMemberSetFromXML(bytes []byte) (CampaignMemberSet, error)

func NewCampaignMemberSetFromXMLFile added in v0.2.0

func NewCampaignMemberSetFromXMLFile(filepath string) (CampaignMemberSet, error)

func (*CampaignMemberSet) Inflate

func (set *CampaignMemberSet) Inflate()

type Case

type Case struct {
	Type            string
	Origin          string
	Reason          string
	Status          string
	OwnerID         string
	Subject         string
	ParentID        string
	Priority        string
	AccountID       string
	ContactID       string
	Description     string
	IsEscalated     bool
	SuppliedName    string
	SuppliedEmail   string
	SuppliedPhone   string
	SuppliedCompany string
}

Case as defined at https://developer.salesforce.com/docs/api-explorer/sobject/Case

type Contact

type Contact struct {
	ID         string
	AccountID  string
	Department string
	Email      string
	Fax        string
	FirstName  string
	LastName   string
	Name       string
}

func NewContactFromJSON added in v0.2.0

func NewContactFromJSON(bytes []byte) (Contact, error)

func NewContactFromJSONFile added in v0.2.0

func NewContactFromJSONFile(filepath string) (Contact, error)

type ContactSet

type ContactSet struct {
	IDSet      IDSet              `xml:"-"`
	Records    []Contact          `json:"records,omitempty" xml:"records"`
	RecordsMap map[string]Contact `xml:"-"`
}

func NewContactSet

func NewContactSet() ContactSet

func NewContactSetFromJSONResponse

func NewContactSetFromJSONResponse(resp *http.Response) (ContactSet, error)

func NewContactSetFromXMLFile added in v0.2.0

func NewContactSetFromXMLFile(filepath string) (ContactSet, error)

func NewContactSetSetFromXML added in v0.2.0

func NewContactSetSetFromXML(bytes []byte) (ContactSet, error)

func (*ContactSet) GetContactByID added in v0.2.0

func (set *ContactSet) GetContactByID(id string) (Contact, error)

func (*ContactSet) GetContactByName

func (set *ContactSet) GetContactByName(name string) (Contact, error)

func (*ContactSet) Inflate

func (set *ContactSet) Inflate()

func (*ContactSet) ReadJSONFilesFromDir added in v0.2.0

func (set *ContactSet) ReadJSONFilesFromDir(dir string) error

type FieldDefinition

type FieldDefinition struct {
	Aggregatable        bool   `json:"aggregatable,omitempty"`
	AutoNumber          bool   `json:"autoNumber,omitempty"`
	ByteLength          int    `json:"byteLength,omitempty"`
	Calculated          bool   `json:"calculated,omitempty"`
	CaseSensitive       bool   `json:"caseSensitive,omitempty"`
	Createable          bool   `json:"createable,omitempty"`
	Custom              bool   `json:"custom,omitempty"`
	DefaultedOnCreate   bool   `json:"defaultedOnCreate,omitempty"`
	DeprecatedAndHidden bool   `json:"deprecatedAndHidden,omitempty"`
	Digits              int    `json:"digits,omitempty"`
	Filterable          bool   `json:"filterable,omitempty"`
	Groupable           bool   `json:"groupable,omitempty"`
	IDLookup            bool   `json:"idLookup,omitempty"`
	Label               string `json:"label,omitempty"`
	Length              int    `json:"length,omitempty"`
	Name                string `json:"name,omitempty"`
	NameField           bool   `json:"nameField,omitempty"`
	NamePointing        bool   `json:"namePointing,omitempty"`
	Nillable            bool   `json:"nillable,omitempty"`
	Permissionable      bool   `json:"permissionable,omitempty"`
	Precision           int    `json:"precision,omitempty"`
	QueryByDistance     bool   `json:"queryByDistance,omitempty"`
	RestrictedPicklist  bool   `json:"restrictedPicklist,omitempty"`
	Scale               int    `json:"scale,omitempty"`
	SoapType            string `json:"soapType,omitempty"`
	Sortable            bool   `json:"sortable,omitempty"`
	Type                string `json:"type,omitempty"`
	Unique              bool   `json:"unique,omitempty"`
	Updateable          bool   `json:"updateable,omitempty"`
}

type IDSet added in v0.2.0

type IDSet struct {
	SObjectsInfo SObjectsInfo `json:"-"`
	IDMap        map[string]int
	IDMapByType  map[string]map[string]int
}

func NewIDSet added in v0.2.0

func NewIDSet() IDSet

func (*IDSet) AddID added in v0.2.0

func (set *IDSet) AddID(id string)

func (*IDSet) GetIDsByType added in v0.2.0

func (set *IDSet) GetIDsByType(sobjectType string) map[string]int

func (*IDSet) Merge added in v0.2.0

func (set *IDSet) Merge(newSet IDSet)

func (*IDSet) MergeTypes added in v0.2.0

func (set *IDSet) MergeTypes(newSet IDSet, types []string)

type IDSetMulti added in v0.2.0

type IDSetMulti struct {
	Sets map[string]IDSet
}

func NewIDSetMulti added in v0.2.0

func NewIDSetMulti() IDSetMulti

func (*IDSetMulti) MergeTypes added in v0.2.0

func (sets *IDSetMulti) MergeTypes(setName string, newSet IDSet, types []string)

type SObjectsInfo

type SObjectsInfo struct {
	Type2Prefix map[string]string
	Prefix2Type map[string]string
	// contains filtered or unexported fields
}

func NewSObjectsInfo

func NewSObjectsInfo() SObjectsInfo

func (*SObjectsInfo) GetID15ForID added in v0.2.0

func (types *SObjectsInfo) GetID15ForID(id string) (string, error)

func (*SObjectsInfo) GetPrefixForID added in v0.2.0

func (types *SObjectsInfo) GetPrefixForID(id string) (string, error)

func (*SObjectsInfo) GetPrefixForType

func (types *SObjectsInfo) GetPrefixForType(sobjectType string) (string, error)

func (*SObjectsInfo) GetTypeForID added in v0.2.0

func (types *SObjectsInfo) GetTypeForID(id string) (string, error)

func (*SObjectsInfo) GetTypeForPrefix

func (types *SObjectsInfo) GetTypeForPrefix(prefix string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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