Documentation ¶
Index ¶
- func ServiceFromFile(ctx context.Context, fn string, tc auth.TokenCache) (*salesforce.Service, error)
- func ServiceFromJSON(ctx context.Context, buff []byte, tc auth.TokenCache) (*salesforce.Service, error)
- func ServiceFromReader(ctx context.Context, rdr io.Reader, tc auth.TokenCache) (*salesforce.Service, error)
- type Config
- type FileCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServiceFromFile ¶
func ServiceFromFile(ctx context.Context, fn string, tc auth.TokenCache) (*salesforce.Service, error)
ServiceFromFile uses the passed file to create a Service
func ServiceFromJSON ¶
func ServiceFromJSON(ctx context.Context, buff []byte, tc auth.TokenCache) (*salesforce.Service, error)
ServiceFromJSON uses the passed byte array to create a Service
func ServiceFromReader ¶
func ServiceFromReader(ctx context.Context, rdr io.Reader, tc auth.TokenCache) (*salesforce.Service, error)
ServiceFromReader uses the passed file to create a Service
Types ¶
type Config ¶
type Config struct { Host string `json:"host,omitempty"` /// salesforce host for instance ConsumerKey string `json:"consumer_key,omitempty"` // sf consumer key for application IsTest bool `json:"is_test,omitempty"` // set to yes if using sandox UserID string `json:"user_id,omitempty"` // salesforce login for user impersonation Key string `json:"key,omitempty"` // private key pem KeyID string `json:"keyid,omitempty"` // optional APIVersion string `json:"version,omitempty"` // vXX.X, leave blank for salesforce default TokenDuration int `json:"tokenDuration,omitempty"` // in minutes CacheFile string `json:"file_cache_loc,omitempty"` // path of file for use with a filecache. ClientFunc ctxclient.Func `json:"-"` // used for testing }
Config contains sufficient info for JWT Login
func (*Config) Service ¶
func (c *Config) Service(ctx context.Context, tc auth.TokenCache) (*salesforce.Service, error)
Service returns api service authorizing api calls via jwt token gen
Click to show internal directories.
Click to hide internal directories.