lib

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	ProviderConfig
}

Provider is an abstraction over a Git provider (Github, Gitlab, etc)

func NewProviderFromConfig

func NewProviderFromConfig(pc ProviderConfig) *Provider

func (*Provider) GithubClient

func (p *Provider) GithubClient(ctx context.Context) (*github.Client, error)

func (*Provider) GitlabClient

func (p *Provider) GitlabClient() (*gitlab.Client, error)

type ProviderConfig

type ProviderConfig struct {
	Backend    string
	BackendURL string
}

ProviderConfig contains the essential parameters that define a provider

func (ProviderConfig) IsEnterprise

func (pc ProviderConfig) IsEnterprise() bool

type Repo

type Repo struct {
	Name     string
	Owner    string
	CloneURL string // consider if we can remove this. ComputedCloneURL is a first step
	ProviderConfig
}

Repo describes a git Repository with a given Provider

func (Repo) ComputedCloneURL

func (r Repo) ComputedCloneURL() (string, error)

func (Repo) IsGithub

func (r Repo) IsGithub() bool

func (Repo) IsGitlab

func (r Repo) IsGitlab() bool

Jump to

Keyboard shortcuts

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