githosts

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCredentials

func GetCredentials(service string) (string, error)

GetCredentials will retrieve the credentials for a specific Git Tool service from the system keychain, if they are present. It will return an error only if there is a problem accessing the system keychain.

func RegisterHost

func RegisterHost(host Host)

RegisterHost registers a new git hosting service with the service registry.

Types

type Host

type Host interface {
	// Handles tells Git Tool whether this host type is able to handle
	// requests for a specific repository service.
	Handles(s models.Service) bool

	// HasRepo tells Git Tool whether a specific repository exists
	// on the remote git hosting service.
	HasRepo(r models.Repo) (bool, error)

	// CreateRepo attempts to create a repository on the remote
	// git hosting service.
	CreateRepo(r models.Repo) error
}

A Host is responsible for interacting with a specific git service provider to create and manage repositories on that service.

func GetHost

func GetHost(s models.Service) Host

GetHost fetches the Host instance responsible for handling a specific repository service type.

Jump to

Keyboard shortcuts

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