aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/bridges.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-10-01 21:47:12 +0200
committerMichael Muré <batolettre@gmail.com>2018-10-01 21:47:12 +0200
commita4b218adec59d5c7de564dfeef4729c4615906d6 (patch)
tree7113098f56fbd03ea77d38ea1eba1ef4ae125a63 /bridge/bridges.go
parent97d94948536b119b4825d30c546248f91c41988d (diff)
downloadgit-bug-a4b218adec59d5c7de564dfeef4729c4615906d6.tar.gz
add documentation
Diffstat (limited to 'bridge/bridges.go')
-rw-r--r--bridge/bridges.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/bridge/bridges.go b/bridge/bridges.go
index bfd851aa..1ffa74b6 100644
--- a/bridge/bridges.go
+++ b/bridge/bridges.go
@@ -1,3 +1,4 @@
+// Package bridge contains the high-level public functions to use and manage bridges
package bridge
import (
@@ -12,22 +13,30 @@ func Targets() []string {
return core.Targets()
}
+// Instantiate a new Bridge for a repo, from the given target and name
func NewBridge(repo *cache.RepoCache, target string, name string) (*core.Bridge, error) {
return core.NewBridge(repo, target, name)
}
+// Instantiate a new bridge for a repo, from the combined target and name contained
+// in the full name
func NewBridgeFullName(repo *cache.RepoCache, fullName string) (*core.Bridge, error) {
return core.NewBridgeFullName(repo, fullName)
}
+// Attempt to retrieve a default bridge for the given repo. If zero or multiple
+// bridge exist, it fails.
func DefaultBridge(repo *cache.RepoCache) (*core.Bridge, error) {
return core.DefaultBridge(repo)
}
+// ConfiguredBridges return the list of bridge that are configured for the given
+// repo
func ConfiguredBridges(repo repository.RepoCommon) ([]string, error) {
return core.ConfiguredBridges(repo)
}
+// Remove a configured bridge
func RemoveBridges(repo repository.RepoCommon, fullName string) error {
return core.RemoveBridge(repo, fullName)
}