salesforcefsdb

package
v0.2.40 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FsdbClient

type FsdbClient struct {
	Config     SalesforceClientConfig
	RestClient RestClient
}

func NewFsdbClient

func NewFsdbClient(cfg SalesforceClientConfig) FsdbClient

func (*FsdbClient) GetDirForType

func (fc *FsdbClient) GetDirForType(sType string) (string, error)

func (*FsdbClient) GetFilenameForSfidAndType

func (fc *FsdbClient) GetFilenameForSfidAndType(sSfid string, sType string) string

func (*FsdbClient) GetPathForSfidAndType

func (fc *FsdbClient) GetPathForSfidAndType(sSfid string, sType string) (string, error)

func (*FsdbClient) GetSobjectForSfidAndType

func (fc *FsdbClient) GetSobjectForSfidAndType(sSfidTry string, sType string) (SobjectFsdb, error)

func (*FsdbClient) GetSobjectForSfidAndTypeFromLocal

func (fc *FsdbClient) GetSobjectForSfidAndTypeFromLocal(sSfidTry string, sType string) (SobjectFsdb, error)

func (*FsdbClient) GetSobjectForSfidAndTypeFromRemote

func (fc *FsdbClient) GetSobjectForSfidAndTypeFromRemote(sSfidTry string, sType string) (SobjectFsdb, error)

func (*FsdbClient) WriteSobjectFsdb

func (fc *FsdbClient) WriteSobjectFsdb(sSfid string, sType string, sobjectFsdb SobjectFsdb) error

type FsdbPathUtil

type FsdbPathUtil struct {
	BaseDir      string
	SObjectsInfo sobjects.SObjectsInfo
}

func NewFsdbPathUtil

func NewFsdbPathUtil(baseDir string) FsdbPathUtil

func (*FsdbPathUtil) GetDirForID added in v0.2.0

func (fsdb *FsdbPathUtil) GetDirForID(id string, source string, format string) (string, error)

func (*FsdbPathUtil) GetFileForID added in v0.2.0

func (fsdb *FsdbPathUtil) GetFileForID(id string, format string) string

func (*FsdbPathUtil) GetPathForID added in v0.2.0

func (fsdb *FsdbPathUtil) GetPathForID(id string, source string, format string) (string, error)

func (*FsdbPathUtil) GetValidPathForID added in v0.2.0

func (fsdb *FsdbPathUtil) GetValidPathForID(id string, source string, format string) (string, error)

type RestClient

type RestClient struct {
	Config        SalesforceClientConfig
	HTTPHeaders   map[string]string
	TokenResponse SalesforceTokenResponse
}

func NewRestClient

func NewRestClient(cfg SalesforceClientConfig) RestClient

func (*RestClient) GetAccessToken

func (cl *RestClient) GetAccessToken() (string, error)

func (*RestClient) GetSobjectResponseForSfidAndType

func (cl *RestClient) GetSobjectResponseForSfidAndType(sSfid string, sType string) (*http.Response, error)

func (*RestClient) GetSobjectURLForSfidAndType added in v0.2.0

func (cl *RestClient) GetSobjectURLForSfidAndType(sSfid string, sType string) string

func (*RestClient) GetSoqlResponse

func (cl *RestClient) GetSoqlResponse(sSoql string) (string, error)

func (*RestClient) LoadToken

func (cl *RestClient) LoadToken() error

type SalesforceClientConfig

type SalesforceClientConfig struct {
	ConfigGeneral SalesforceClientConfigGeneral
	ConfigToken   SalesforceClientConfigToken
}

type SalesforceClientConfigGeneral

type SalesforceClientConfigGeneral struct {
	APIFqdn           string
	APIVersion        string
	DataDir           string
	MaxAgeSec         int64
	FlagDisableRemote bool
	FlagVerbose       bool
	FlagSaveFs        bool
}

type SalesforceClientConfigToken

type SalesforceClientConfigToken struct {
	TokenURL     string
	GrantType    string
	ClientID     string
	ClientSecret string
	Username     string
	Password     string
	URLValues    url.Values
}

func (*SalesforceClientConfigToken) Inflate

func (ct *SalesforceClientConfigToken) Inflate()

type SalesforceTokenResponse

type SalesforceTokenResponse struct {
	ID          string `json:"id"`
	IssuedAt    int64  `json:"issued_at"`
	TokenType   string `json:"token_type"`
	InstanceURL string `json:"instance_url"`
	AccessToken string `json:"access_token"`
	Signature   string `json:"signature"`
}

type SobjectFsdb

type SobjectFsdb struct {
	Meta SobjectFsdbMeta
	Data map[string]interface{}
}

func NewSobjectFsdb

func NewSobjectFsdb() SobjectFsdb

func NewSobjectFsdbForResponse

func NewSobjectFsdbForResponse(res *http.Response) (SobjectFsdb, error)

func (*SobjectFsdb) LoadResponse

func (so *SobjectFsdb) LoadResponse(res *http.Response) error

func (*SobjectFsdb) SetEpochRetrievedSource

func (so *SobjectFsdb) SetEpochRetrievedSource()

type SobjectFsdbMeta

type SobjectFsdbMeta struct {
	EpochRetrievedSourceI64 int64
	HTTPStatusCodeI32       int32
	RedirectSfidS           string
}

Jump to

Keyboard shortcuts

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