provider

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildGitProvider

func BuildGitProvider(config Config) (gitprovider.Client, error)

BuildGitProvider builds a gitprovider.Client for the provided Config. It returns an error if the Config.Provider is not supported, or if the construction of the client fails.

Types

type Config

type Config struct {
	// Provider defines the GitProvider.
	Provider GitProvider

	// Hostname is the HTTP/S hostname of the Provider,
	// e.g. github.example.com.
	Hostname string

	// Token contains the token used to authenticate with the
	// Provider.
	Token string
}

Config defines the configuration for connecting to a GitProvider.

type GitProvider

type GitProvider string

GitProvider holds a Git provider definition.

const (
	GitProviderGitHub GitProvider = "github"
	GitProviderGitLab GitProvider = "gitlab"
)

Jump to

Keyboard shortcuts

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