salesforce

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package salesforce provides an exported Salesforce client provider backed by the PramithaMJ Salesforce Go SDK v2. Other plugins (e.g. workflow-plugin-crm) can import this package to interact with Salesforce without duplicating authentication or HTTP logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateClientCredentials

func AuthenticateClientCredentials(loginURL, clientID, clientSecret string) (instanceURL, accessToken string, err error)

AuthenticateClientCredentials performs the OAuth 2.0 client_credentials grant flow and returns the instance URL and access token.

Types

type Config

type Config struct {
	AuthType      string // "oauth_refresh", "password", "client_credentials", "access_token" (or empty to auto-detect)
	ClientID      string
	ClientSecret  string
	RefreshToken  string
	Username      string
	Password      string
	SecurityToken string
	AccessToken   string
	InstanceURL   string
	LoginURL      string
	APIVersion    string
	Sandbox       bool
}

Config holds the configuration for creating a Provider.

type Provider

type Provider struct {
	Client *sf.Client
}

Provider wraps the PramithaMJ Salesforce SDK client.

func NewProvider

func NewProvider(ctx context.Context, cfg Config) (*Provider, error)

NewProvider creates and connects a Salesforce SDK client from the given configuration. The returned Provider exposes the fully- initialised *sf.Client for typed API operations.

Jump to

Keyboard shortcuts

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