Documentation
¶
Overview ¶
Package salesforce provides a comprehensive Go SDK for Salesforce.
Index ¶
- type Client
- func (c *Client) APIVersion() string
- func (c *Client) Analytics() *analytics.Service
- func (c *Client) Apex() *apex.Service
- func (c *Client) Bulk() *bulk.Service
- func (c *Client) Chatter() *connect.Service
- func (c *Client) Composite() *composite.Service
- func (c *Client) Connect(ctx context.Context) error
- func (c *Client) GetToken() *types.Token
- func (c *Client) InstanceURL() string
- func (c *Client) Limits() *limits.Service
- func (c *Client) Query() *query.Service
- func (c *Client) RefreshToken(ctx context.Context) error
- func (c *Client) SObjects() *sobjects.Service
- func (c *Client) Search() *search.Service
- func (c *Client) SetAccessToken(token, instanceURL string)
- func (c *Client) Tooling() *tooling.Service
- func (c *Client) UIAPI() *uiapi.Service
- type Config
- type Option
- func WithAPIVersion(version string) Option
- func WithAccessToken(accessToken, instanceURL string) Option
- func WithCredentials(clientID, clientSecret string) Option
- func WithCustomDomain(domain string) Option
- func WithHTTPClient(client *http.Client) Option
- func WithInstanceURL(url string) Option
- func WithLogger(logger types.Logger) Option
- func WithMaxRetries(retries int) Option
- func WithOAuthRefresh(clientID, clientSecret, refreshToken string) Option
- func WithPasswordAuth(username, password, securityToken string) Option
- func WithSandbox() Option
- func WithTimeout(timeout time.Duration) Option
- func WithTokenURL(url string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the main Salesforce API client.
func (*Client) APIVersion ¶
APIVersion returns the configured API version.
func (*Client) InstanceURL ¶
InstanceURL returns the Salesforce instance URL.
func (*Client) RefreshToken ¶
RefreshToken refreshes the access token.
func (*Client) SetAccessToken ¶
SetAccessToken sets the access token directly.
type Config ¶
type Config struct {
// Authentication
ClientID string
ClientSecret string
Username string
Password string
SecurityToken string
RefreshToken string
AccessToken string
TokenURL string
InstanceURL string
// Connection
APIVersion string
Timeout time.Duration
MaxRetries int
HTTPClient *http.Client
Logger types.Logger
}
Config holds the configuration for the Salesforce client.
type Option ¶
Option configures the Salesforce client.
func WithAPIVersion ¶
WithAPIVersion sets the API version.
func WithAccessToken ¶
WithAccessToken sets a direct access token.
func WithCredentials ¶
WithCredentials sets OAuth client credentials.
func WithCustomDomain ¶
WithCustomDomain configures for a custom My Domain.
func WithHTTPClient ¶
WithHTTPClient sets a custom HTTP client.
func WithInstanceURL ¶
WithInstanceURL sets the Salesforce instance URL.
func WithMaxRetries ¶
WithMaxRetries sets maximum retry attempts.
func WithOAuthRefresh ¶
WithOAuthRefresh configures OAuth 2.0 refresh token authentication.
func WithPasswordAuth ¶
WithPasswordAuth configures username-password authentication.
func WithTimeout ¶
WithTimeout sets the HTTP timeout.
func WithTokenURL ¶
WithTokenURL sets the OAuth token endpoint URL.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package analytics provides Reports and Dashboards API operations.
|
Package analytics provides Reports and Dashboards API operations. |
|
Package apex provides Apex REST endpoint operations.
|
Package apex provides Apex REST endpoint operations. |
|
Package auth provides authentication strategies for Salesforce.
|
Package auth provides authentication strategies for Salesforce. |
|
Package bulk provides Bulk API 2.0 operations.
|
Package bulk provides Bulk API 2.0 operations. |
|
Package composite provides Composite API operations.
|
Package composite provides Composite API operations. |
|
Package connect provides Connect REST API (Chatter) operations.
|
Package connect provides Connect REST API (Chatter) operations. |
|
Package http provides HTTP client functionality.
|
Package http provides HTTP client functionality. |
|
Package limits provides API Limits operations.
|
Package limits provides API Limits operations. |
|
Package query provides SOQL query execution and building.
|
Package query provides SOQL query execution and building. |
|
Package search provides SOSL search operations.
|
Package search provides SOSL search operations. |
|
Package sobjects provides SObject CRUD operations for Salesforce.
|
Package sobjects provides SObject CRUD operations for Salesforce. |
|
Package tooling provides Tooling API operations.
|
Package tooling provides Tooling API operations. |
|
Package types provides shared types for the Salesforce SDK.
|
Package types provides shared types for the Salesforce SDK. |
|
Package uiapi provides User Interface API operations.
|
Package uiapi provides User Interface API operations. |