Documentation ¶
Index ¶
- Constants
- Variables
- type Connector
- func (c *Connector) HTTPClient() *common.HTTPClient
- func (c *Connector) JSONHTTPClient() *common.JSONHTTPClient
- func (c *Connector) ListObjectMetadata(ctx context.Context, objectNames []string) (*common.ListObjectMetadataResult, error)
- func (c *Connector) Provider() providers.Provider
- func (c *Connector) Read(ctx context.Context, config common.ReadParams) (*common.ReadResult, error)
- func (c *Connector) String() string
- func (c *Connector) Write(ctx context.Context, config common.WriteParams) (*common.WriteResult, error)
- type Error
- type Option
- type Response
Constants ¶
const ( // ModuleEmpty is used for proxying requests through. ModuleEmpty common.ModuleID = "" // ModuleAssets is the module/API used for accessing assets objects. ModuleAssets common.ModuleID = "assets" // ModuleLeads is the module/API used for accessing leads objects. ModuleLeads common.ModuleID = "leads" )
Variables ¶
var IdResponseObjects = []string{"leads", "companies", "salespersons"} //nolint:gochecknoglobals
IdResponseObjects represents a list of objects that uses `id` as a unique field in the response.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct { BaseURL string Client *common.JSONHTTPClient Module common.Module }
func NewConnector ¶
func (*Connector) HTTPClient ¶
func (c *Connector) HTTPClient() *common.HTTPClient
func (*Connector) JSONHTTPClient ¶
func (c *Connector) JSONHTTPClient() *common.JSONHTTPClient
JSONHTTPClient returns the underlying JSON HTTP client.
func (*Connector) ListObjectMetadata ¶
func (c *Connector) ListObjectMetadata(ctx context.Context, objectNames []string, ) (*common.ListObjectMetadataResult, error)
ListObjectMetadata returns metadata for an object by sampling an object from Marketo's API. If that fails, it generates object metadata by parsing Marketo's OpenAPI files.
func (*Connector) Read ¶
func (c *Connector) Read(ctx context.Context, config common.ReadParams) (*common.ReadResult, error)
Read retrieves data based on the provided common.ReadParams configuration parameters.
func (*Connector) Write ¶
func (c *Connector) Write(ctx context.Context, config common.WriteParams) (*common.WriteResult, error)
Write creates/updates records in marketo. Write currently supports operations to the leads API only.
type Option ¶
type Option = func(params *parameters)
func WithAuthenticatedClient ¶
func WithAuthenticatedClient(client common.AuthenticatedHTTPClient) Option
func WithClient ¶
func WithModule ¶
WithModule sets the marketo API module to use for the connector. It's required.
func WithWorkspace ¶
WithWorkspace sets the marketo API instance to use for the connector. It's required.