Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Create(ctx context.Context, sObjectName string, v interface{}) (string, error)
- func (c *Client) Delete(ctx context.Context, sObjectName, id string) error
- func (c *Client) Login(ctx context.Context, cred *Credential) error
- func (c *Client) Query(ctx context.Context, soql string, out interface{}) (string, error)
- func (c *Client) Read(ctx context.Context, sObjectName, id string, out interface{}) error
- func (c *Client) Session(session *SessionID)
- func (c *Client) Update(ctx context.Context, sObjectName, id string, v interface{}) error
- type Credential
- type Env
- type SessionID
Constants ¶
View Source
const DefaultVersion = "40.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Version string Env Env HttpClient *http.Client Logger *log.Logger // contains filtered or unexported fields }
func (*Client) Login ¶
func (c *Client) Login(ctx context.Context, cred *Credential) error
Login authenticates the credential.
type Credential ¶
type SessionID ¶
type SessionID struct { AccessToken string `json:"access_token"` InstanceURL string `json:"instance_url"` ID string `json:"id"` TokenType string `json:"token_type"` IssuedAt string `json:"issued_at"` Signature string `json:"signature"` Error string `json:"error"` ErrorDesc string `json:"error_description"` }
Click to show internal directories.
Click to hide internal directories.