git

package
v0.0.449 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GITHUB_CLOUD_DOMAIN               = "github.com"
	GITHUB_CLOUD_URL                  = "https://api.github.com"
	GITHUB_REST_ENDPOINT              = "/api/v3"
	GITHUB_CLOUD         ProviderType = "github"
	GITHUB_ENT           ProviderType = "github-enterprise"
)
View Source
const (
	GITLAB_CLOUD_DOMAIN               = "gitlab.com"
	GITLAB_REST_ENDPOINT              = "/api/v4"
	GITLAB               ProviderType = "gitlab"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider added in v0.0.441

type Provider interface {
	Type() ProviderType
	ApiUrl() string
	VerifyToken(ctx context.Context, tokenType TokenType, token string) error
	SupportsMarketplace() bool
}

Provider represents a git provider

func GetProvider added in v0.0.441

func GetProvider(providerType ProviderType, cloneURL string) (Provider, error)

func NewBitbucketServerProvider added in v0.0.441

func NewBitbucketServerProvider(cloneURL string) (Provider, error)

func NewGithubCloudProvider added in v0.0.441

func NewGithubCloudProvider(_ string) (Provider, error)

func NewGithubEnterpriseProvider added in v0.0.441

func NewGithubEnterpriseProvider(cloneURL string) (Provider, error)

func NewGitlabProvider added in v0.0.441

func NewGitlabProvider(cloneURL string) (Provider, error)

type ProviderType added in v0.0.441

type ProviderType string
const (
	BITBUCKET_REST_ENDPOINT              = "/rest/api/1.0"
	BITBUCKET_SERVER        ProviderType = "bitbucket-server"
)

type TokenType added in v0.0.441

type TokenType string
const (
	RuntimeToken  TokenType = "runtime token"
	PersonalToken TokenType = "personal token"
)

Jump to

Keyboard shortcuts

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