Documentation ¶
Index ¶
- Constants
- Variables
- type Connector
- func (c *Connector) Close() error
- func (c *Connector) Delete(ctx context.Context, config common.DeleteParams) (*common.DeleteResult, error)
- 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 Option
- type ResponseError
Constants ¶
View Source
const ( // ModuleV1 is a grouping of V1 API endpoints. // https://developer.keap.com/docs/rest/ ModuleV1 common.ModuleID = "version1" // ModuleV2 is a grouping of V2 API endpoints. // https://developer.keap.com/docs/restv2/ ModuleV2 common.ModuleID = "version2" )
View Source
const ApiPathPrefix = "crm/rest"
View Source
const DefaultPageSize = 50
DefaultPageSize is number of elements per page.
Variables ¶
View Source
var ErrResolvingCustomFields = errors.New("cannot resolve custom fields")
View Source
var SupportedModules = metadata.Schemas.ModuleRegistry() // nolint: gochecknoglobals
SupportedModules represents currently working and supported modules within the Keap connector. Modules are added to schema.json file using OpenAPI script.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct { BaseURL string Client *common.JSONHTTPClient Module common.Module }
func NewConnector ¶
func (*Connector) Delete ¶
func (c *Connector) Delete(ctx context.Context, config common.DeleteParams) (*common.DeleteResult, error)
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 (*Connector) Read ¶
func (c *Connector) Read(ctx context.Context, config common.ReadParams) (*common.ReadResult, error)
func (*Connector) Write ¶
func (c *Connector) Write(ctx context.Context, config common.WriteParams) (*common.WriteResult, error)
type Option ¶
type Option = func(params *parameters)
Option is a function which mutates the connector configuration.
func WithAuthenticatedClient ¶
func WithAuthenticatedClient(client common.AuthenticatedHTTPClient) Option
func WithClient ¶
func WithModule ¶
type ResponseError ¶
type ResponseError struct {
Detail string `json:"message"`
}
func (ResponseError) CombineErr ¶
func (r ResponseError) CombineErr(base error) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.