Documentation ¶
Overview ¶
Package core contains the target-agnostic code to define and run a bridge
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExportNorSupported = errors.New("export is not supported")
View Source
var ErrImportNorSupported = errors.New("import is not supported")
Functions ¶
func ConfiguredBridges ¶
func ConfiguredBridges(repo repository.RepoCommon) ([]string, error)
ConfiguredBridges return the list of bridge that are configured for the given repo
func RemoveBridge ¶
func RemoveBridge(repo repository.RepoCommon, fullName string) error
Remove a configured bridge
Types ¶
type Bridge ¶
type Bridge struct { Name string // contains filtered or unexported fields }
Bridge is a wrapper around a BridgeImpl that will bind low-level implementation with utility code to provide high-level functions.
func DefaultBridge ¶
Attempt to retrieve a default bridge for the given repo. If zero or multiple bridge exist, it fails.
func NewBridgeFullName ¶
Instantiate a new bridge for a repo, from the combined target and name contained in the full name
type BridgeImpl ¶
type BridgeImpl interface { // Target return the target of the bridge (e.g.: "github") Target() string // Configure handle the user interaction and return a key/value configuration // for future use Configure(repo repository.RepoCommon) (Configuration, error) // ValidateConfig check the configuration for error ValidateConfig(conf Configuration) error // Importer return an Importer implementation if the import is supported Importer() Importer // Exporter return an Exporter implementation if the export is supported Exporter() Exporter }
type Configuration ¶
Click to show internal directories.
Click to hide internal directories.