go-sfdc: github.com/g8rswimmer/go-sfdc/session Index | Files

package session

import "github.com/g8rswimmer/go-sfdc/session"

Package session provides handles creation of a Salesforce session

Index

Package Files

session.go

type Clienter Uses

type Clienter interface {
    Client() *http.Client
}

Clienter interface provides the HTTP client used by the the resources.

type InstanceFormatter Uses

type InstanceFormatter interface {
    InstanceURL() string
    AuthorizationHeader(*http.Request)
    Clienter
}

InstanceFormatter is the session interface that formaters the session instance information used by the resources.

InstanceURL will return the Salesforce instance.

AuthorizationHeader will add the authorization to the HTTP request's header.

type ServiceFormatter Uses

type ServiceFormatter interface {
    InstanceFormatter
    ServiceURL() string
}

ServiceFormatter is the session interface that formats the session for service resources.

ServiceURL provides the service URL for resources to user.

type Session Uses

type Session struct {
    // contains filtered or unexported fields
}

Session is the authentication response. This is used to generate the authroization header for the Salesforce API calls.

func Open Uses

func Open(config sfdc.Configuration) (*Session, error)

Open is used to authenticate with Salesforce and open a session. The user will need to supply the proper credentials and a HTTP client.

func (*Session) AuthorizationHeader Uses

func (session *Session) AuthorizationHeader(request *http.Request)

AuthorizationHeader will add the authorization to the HTTP request's header.

func (*Session) Client Uses

func (session *Session) Client() *http.Client

Client returns the HTTP client to be used in APIs calls.

func (*Session) InstanceURL Uses

func (session *Session) InstanceURL() string

InstanceURL will retuern the Salesforce instance from the session authentication.

func (*Session) ServiceURL Uses

func (session *Session) ServiceURL() string

ServiceURL will return the Salesforce instance for the service URL.

Package session imports 6 packages (graph) and is imported by 7 packages. Updated 2019-09-12. Refresh now. Tools for package owners.