Documentation
¶
Index ¶
- type Connector
- func (c *Connector) FetchAll(ctx context.Context, ds *types.DataSourceConfig, _ []string) ([]types.FetchedItem, error)
- func (c *Connector) FetchIncremental(ctx context.Context, ds *types.DataSourceConfig, old *types.SyncCursor) ([]types.FetchedItem, *types.SyncCursor, error)
- func (c *Connector) FetchStream(ctx context.Context, ds *types.DataSourceConfig, old *types.SyncCursor, ...) (*types.SyncCursor, error)
- func (c *Connector) ListResources(ctx context.Context, ds *types.DataSourceConfig, parent string) ([]types.Resource, error)
- func (c *Connector) ResolveResourceAncestors(context.Context, *types.DataSourceConfig, []string) ([]string, error)
- func (c *Connector) Type() string
- func (c *Connector) Validate(ctx context.Context, ds *types.DataSourceConfig) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func NewConnector ¶
func NewConnector() *Connector
NewConnector creates a stateless connector. Each data source provides its own GitLab URL and access token in its encrypted credentials.
func (*Connector) FetchAll ¶
func (c *Connector) FetchAll(ctx context.Context, ds *types.DataSourceConfig, _ []string) ([]types.FetchedItem, error)
func (*Connector) FetchIncremental ¶
func (c *Connector) FetchIncremental(ctx context.Context, ds *types.DataSourceConfig, old *types.SyncCursor) ([]types.FetchedItem, *types.SyncCursor, error)
func (*Connector) FetchStream ¶
func (c *Connector) FetchStream( ctx context.Context, ds *types.DataSourceConfig, old *types.SyncCursor, h datasource.StreamHandler, ) (*types.SyncCursor, error)
FetchStream is the production sync path. It emits each supported repository file as soon as it is read, so large GitLab projects do not accumulate their contents in memory. The service prefers this method for StreamingConnector implementations; FetchAll and FetchIncremental remain compatibility methods required by the base Connector interface.
func (*Connector) ListResources ¶
func (*Connector) ResolveResourceAncestors ¶
Click to show internal directories.
Click to hide internal directories.