git

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BITBUCKET_CLOUD_DOMAIN               = "bitbucket.org"
	BITBUCKET_REST_ENDPOINT              = "/api/2.0"
	BITBUCKET               ProviderType = "bitbucket"
)
View Source
const (
	GITHUB_CLOUD_DOMAIN                = "github.com"
	GITHUB_CLOUD_BASE_URL              = "https://github.com/"
	GITHUB_CLOUD_API_URL               = "https://api.github.com"
	GITHUB_REST_ENDPOINT               = "/api/v3"
	GITHUB                ProviderType = "github"
	GITHUB_ENT            ProviderType = "github-enterpeise" // for backward compatability
)
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 {
	BaseURL() string
	SupportsMarketplace() bool
	Type() ProviderType
	VerifyRuntimeToken(ctx context.Context, auth apgit.Auth) error
	VerifyUserToken(ctx context.Context, auth apgit.Auth) error
}

Provider represents a git provider

func GetProvider added in v0.0.441

func GetProvider(providerType ProviderType, baseURL, certFile string) (Provider, error)

func NewBitbucketProvider added in v0.0.493

func NewBitbucketProvider(baseURL string, client *http.Client) (Provider, error)

func NewBitbucketServerProvider added in v0.0.441

func NewBitbucketServerProvider(baseURL string, client *http.Client) (Provider, error)

func NewGithubProvider added in v0.0.458

func NewGithubProvider(baseURL string, client *http.Client) (Provider, error)

func NewGitlabProvider added in v0.0.441

func NewGitlabProvider(baseURL string, client *http.Client) (Provider, error)

type ProviderType added in v0.0.441

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

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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