Documentation
¶
Index ¶
- Variables
- type Connector
- func (c *Connector) Asset(ctx context.Context, asset *v2.AssetRef) (string, io.ReadCloser, error)
- func (c *Connector) Close() error
- func (c *Connector) Config() *bsql.Config
- func (c *Connector) GlobalActions(ctx context.Context, registry actions.ActionRegistry) error
- func (c *Connector) Metadata(ctx context.Context) (*v2.ConnectorMetadata, error)
- func (c *Connector) ResourceSyncers(ctx context.Context) []connectorbuilder.ResourceSyncer
- func (c *Connector) Validate(ctx context.Context) (annotations.Annotations, error)
- type LookupFunc
Constants ¶
This section is empty.
Variables ¶
var ActionTypeMap = map[string]v2.ActionType{ "unspecified": v2.ActionType_ACTION_TYPE_UNSPECIFIED, "dynamic": v2.ActionType_ACTION_TYPE_DYNAMIC, "account": v2.ActionType_ACTION_TYPE_ACCOUNT, "account_update_profile": v2.ActionType_ACTION_TYPE_ACCOUNT_UPDATE_PROFILE, "account_disable": v2.ActionType_ACTION_TYPE_ACCOUNT_DISABLE, "account_enable": v2.ActionType_ACTION_TYPE_ACCOUNT_ENABLE, }
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func NewFromYAML ¶ added in v0.5.12
NewFromYAML parses YAML config bytes, expands ${KEY} via lookup (or env when nil), and opens the connector. Library embeds must pass a non-nil lookup over map values and must not mutate process environment.
func NewWithConfig ¶ added in v0.5.12
NewWithConfig constructs a connector from an already-parsed config. Placeholder expansion uses process environment (nil LookupFunc).
func (*Connector) Asset ¶
Asset takes an input AssetRef and attempts to fetch it using the connector's authenticated http client It streams a response, always starting with a metadata object, following by chunked payloads for the asset.
func (*Connector) GlobalActions ¶ added in v0.5.0
GlobalActions implements the GlobalActionProvider interface to expose custom actions.
func (*Connector) ResourceSyncers ¶
func (c *Connector) ResourceSyncers(ctx context.Context) []connectorbuilder.ResourceSyncer
ResourceSyncers returns a ResourceSyncer for each resource type that should be synced from the upstream service.
func (*Connector) Validate ¶
func (c *Connector) Validate(ctx context.Context) (annotations.Annotations, error)
Validate is called to ensure that the connector is properly configured. It should exercise any API credentials to be sure that they are valid.
type LookupFunc ¶ added in v0.5.12
type LookupFunc = database.LookupFunc
LookupFunc resolves ${KEY} placeholders for library embeds (same shape as baton-http). Prefer database.LookupFunc; this alias keeps the connector package self-documenting.