provider

package
v0.40.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 5 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

	// Username contains the username used to authenticate with
	// the Provider.
	Username string

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

	// CABunle contains the CA bundle to use for the client.
	CaBundle []byte
}

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"
	GitProviderStash  GitProvider = "stash"
)

Jump to

Keyboard shortcuts

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