remotes

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchRepositoriesRequest

type FetchRepositoriesRequest struct {
	Context context.Context
}

FetchRepositoriesRequest is a request wrapper that encapsulates request data. Currently unused but may be leveraged for filters later on.

type FetchRepositoriesResponse

type FetchRepositoriesResponse struct {
	Repositories []*Repository
}

FetchRepositoriesResponse is a response wrapper that encapsulates response data.

type Remote

type Remote interface {
	FetchRepositories(request *FetchRepositoriesRequest) (*FetchRepositoriesResponse, error)
}

Remote defines an abstraction for interacting with upstream source control providers.

func NewBitbucketRemote

func NewBitbucketRemote(cfg *config.Bitbucket) (Remote, error)

NewBitbucketRemote constructs a new remote implementation that speaks with Bitbucket for repository related information.

func NewCompositeRemote

func NewCompositeRemote(remotes ...Remote) Remote

NewCompositeRemote wraps the supplied remotes in a composite wrapper which logs errors and continues processing remote endpoints.

func NewGenericRemote

func NewGenericRemote(cfg *config.Generic) Remote

NewGenericRemote constructs a new remote endpoint that

func NewGithubRemote

func NewGithubRemote(cfg *config.Github) (Remote, error)

NewGithubRemote constructs a new remote implementation that speaks with GitHub for repository related information.

func NewGitlabRemote

func NewGitlabRemote(cfg *config.Gitlab) (Remote, error)

NewGitlabRemote constructs a new remote implementation that speaks with Gitlab for repository related information.

func NewStaticRemote

func NewStaticRemote(cfg *config.Static) Remote

NewStaticRemote produces a new remote from static configuration

func ParseConfig

func ParseConfig(configuration *config.Configuration) (Remote, error)

ParseConfig is used to parse the account configuration and construct the necessary remote endpoint based on the configuration object.

type Repository

type Repository struct {
	RepositoryURL string
	Clone         *config.Clone
}

Repository represents the combination of a URL and it's corresponding clone credentials.

Jump to

Keyboard shortcuts

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