sobjects

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContactEmailOrId

func ContactEmailOrId(contact Contact) string

func ContactIdOrEmail

func ContactIdOrEmail(contact Contact) string

func ContactsEmailOrId

func ContactsEmailOrId(contacts []Contact) []string

func ContactsEmailOrIdString

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

func ContactsIdOrEmail

func ContactsIdOrEmail(contacts []Contact) []string

func ContactsIdOrEmailString

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

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

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

func NewCampaignMemberFromJsonFile

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

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

func NewCampaignMemberSetFromXmlFile

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

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

func NewContactFromJsonFile

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

func NewContactSetFromXmlFile(filepath string) (ContactSet, error)

func NewContactSetSetFromXml

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

func (*ContactSet) GetContactById

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

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

type IdSet struct {
	SObjectsInfo SObjectsInfo `json:"-"`
	IdMap        map[string]int
	IdMapByType  map[string]map[string]int
}

func NewIdSet

func NewIdSet() IdSet

func (*IdSet) AddId

func (set *IdSet) AddId(id string)

func (*IdSet) GetIdsByType

func (set *IdSet) GetIdsByType(sobjectType string) map[string]int

func (*IdSet) Merge

func (set *IdSet) Merge(newSet IdSet)

func (*IdSet) MergeTypes

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

type IdSetMulti

type IdSetMulti struct {
	Sets map[string]IdSet
}

func NewIdSetMulti

func NewIdSetMulti() IdSetMulti

func (*IdSetMulti) MergeTypes

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

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

func (*SObjectsInfo) GetPrefixForId

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

func (*SObjectsInfo) GetPrefixForType

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

func (*SObjectsInfo) GetTypeForId

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