scm

package
v0.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDriverName

func GetDriverName(rawURL string) (string, error)

GetDriverName gets the driver to be used for this repo url, using the go-scm default identifier.

func HostnameFromURL

func HostnameFromURL(rawURL string) (string, error)

HostnameFromURL returns the host from a URL.

Types

type Repository

type Repository interface {
	// Get Push TriggerBinding name for this repository provider
	PushBindingName() string

	// Create a TriggerBinding for Push Request hooks
	CreatePushBinding(namespace string) (triggersv1.TriggerBinding, string)

	// Create an eventlistener trigger for Push event
	CreatePushTrigger(name, secretName, secretNs, template string, bindings []string) triggersv1.EventListenerTrigger

	// Git Repository URL
	URL() string
}

Repository interface exposes generic functions that will be implemented by repositories (Github,Gitlab,Bitbucket,etc)

func NewRepository

func NewRepository(url string) (Repository, error)

NewRepository returns a suitable Repository instance based on the driver name (github,gitlab,etc)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL