Documentation ¶
Index ¶
- Variables
- type API
- type AuthMetadataConnector
- type Connector
- type DeleteConnector
- type DeleteParams
- type DeleteResult
- type ErrorWithStatus
- type ListObjectMetadataResult
- type ObjectMetadataConnector
- type ReadConnector
- type ReadParams
- type ReadResult
- type WriteConnector
- type WriteParams
- type WriteResult
Constants ¶
This section is empty.
Variables ¶
var ( // ErrAccessToken represents a token which isn't valid. ErrAccessToken = common.ErrAccessToken // ErrApiDisabled means a customer didn't enable this API on their SaaS instance. ErrApiDisabled = common.ErrApiDisabled // ErrRetryable represents a temporary error. Can retry. ErrRetryable = common.ErrRetryable // ErrCaller represents non-retryable errors caused by bad input from the caller. ErrCaller = common.ErrCaller // ErrServer represents non-retryable errors caused by something on the server. ErrServer = common.ErrServer // ErrUnknownConnector represents an unknown connector. ErrUnknownConnector = errors.New("unknown connector") )
We re-export the following errors so that they can be handled by consumers of this library.
Functions ¶
This section is empty.
Types ¶
type API ¶
API is a function that returns a Connector. It's used as a factory.
var Hubspot API[*hubspot.Connector, hubspot.Option] = hubspot.NewConnector //nolint:gochecknoglobals
Hubspot is an API that returns a new Hubspot Connector.
var Intercom API[*intercom.Connector, intercom.Option] = intercom.NewConnector //nolint:gochecknoglobals
Intercom is an API that returns a new Intercom Connector.
var MSDynamicsCRM API[*microsoftdynamicscrm.Connector, microsoftdynamicscrm.Option] = microsoftdynamicscrm.NewConnector //nolint:gochecknoglobals,lll
MSDynamicsCRM is an API that returns a new MS Dynamics 365 Sales Connector.
Mock is an API that returns a new Mock Connector.
var Outreach API[*outreach.Connector, outreach.Option] = outreach.NewConnector //nolint:gochecknoglobals
Outreach is an API that returns a new Outreach Connector.
var Salesforce API[*salesforce.Connector, salesforce.Option] = salesforce.NewConnector //nolint:gochecknoglobals
Salesforce is an API that returns a new Salesforce Connector.
type AuthMetadataConnector ¶
type Connector ¶
type Connector interface { fmt.Stringer io.Closer // JSONHTTPClient returns the underlying JSON HTTP client. This is useful for // testing, or for calling methods that aren't exposed by the Connector // interface directly. Authentication and token refreshes will be handled automatically. JSONHTTPClient() *common.JSONHTTPClient // HTTPClient returns the underlying HTTP client. This is useful for proxy requests. HTTPClient() *common.HTTPClient // Provider returns the connector provider. Provider() providers.Provider }
Connector is an interface that can be used to implement a connector with basic configuration about the provider.
func New ¶
New returns a new Connector. The signature is generic to facilitate more flexible caller setup (e.g. constructing a new connector based on parsing a config file, whose exact params aren't known until runtime). However, if you can use the API.New form, it's preferred, since you get type safety and more readable code.
type DeleteConnector ¶
type DeleteConnector interface { Connector Delete(ctx context.Context, params DeleteParams) (*DeleteResult, error) }
DeleteConnector is an interface that extends the Connector interface with delete capabilities.
type DeleteParams ¶
type DeleteParams = common.DeleteParams
We re-export the following types so that they can be used by consumers of this library.
type DeleteResult ¶
type DeleteResult = common.DeleteResult
We re-export the following types so that they can be used by consumers of this library.
type ErrorWithStatus ¶
type ErrorWithStatus = common.HTTPStatusError
We re-export the following types so that they can be used by consumers of this library.
type ListObjectMetadataResult ¶
type ListObjectMetadataResult = common.ListObjectMetadataResult
We re-export the following types so that they can be used by consumers of this library.
type ObjectMetadataConnector ¶
type ObjectMetadataConnector interface { Connector ListObjectMetadata(ctx context.Context, objectNames []string) (*ListObjectMetadataResult, error) }
ObjectMetadataConnector is an interface that extends the Connector interface with the ability to list object metadata.
type ReadConnector ¶
type ReadConnector interface { Connector // Read reads a page of data from the connector. This can be called multiple // times to read all the data. The caller is responsible for paging, by // passing the NextPage value correctly, and by terminating the loop when // Done is true. The caller is also responsible for handling errors. // Authentication corner cases are handled internally, but all other errors // are returned to the caller. Read(ctx context.Context, params ReadParams) (*ReadResult, error) }
ReadConnector is an interface that extends the Connector interface with read capabilities.
type ReadParams ¶
type ReadParams = common.ReadParams
We re-export the following types so that they can be used by consumers of this library.
type ReadResult ¶
type ReadResult = common.ReadResult
We re-export the following types so that they can be used by consumers of this library.
type WriteConnector ¶
type WriteConnector interface { Connector Write(ctx context.Context, params WriteParams) (*WriteResult, error) }
WriteConnector is an interface that extends the Connector interface with write capabilities.
type WriteParams ¶
type WriteParams = common.WriteParams
We re-export the following types so that they can be used by consumers of this library.
type WriteResult ¶
type WriteResult = common.WriteResult
We re-export the following types so that they can be used by consumers of this library.