gitmap

package
v0.0.0-...-6f60689 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package gitmap provides mapping functions to convert https git sources to SSH git sources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapCoreState

func MapCoreState(state *core.State, m Mapper)

MapCoreState maps all the git source in state.

Types

type BitbucketPrivate

type BitbucketPrivate struct {
	// contains filtered or unexported fields
}

BitbucketPrivate maps bitbucket private repositories from https to git.

func NewBitbucketPrivate

func NewBitbucketPrivate(org string) *BitbucketPrivate

NewBitbucketPrivate creates a new Bitbucket private mapper.

func (*BitbucketPrivate) Map

func (p *BitbucketPrivate) Map(src string) string

Map maps a bitbucket https source to git private source if it matches organization.

type GitHubPrivate

type GitHubPrivate struct {
	// contains filtered or unexported fields
}

GitHubPrivate maps GitHub private repositories from https to git.

func NewGitHubPrivate

func NewGitHubPrivate(org string) *GitHubPrivate

NewGitHubPrivate creates a new GitHub private mapper.

func (*GitHubPrivate) Map

func (p *GitHubPrivate) Map(src string) string

Map maps a GitHub https source to git private source if matches the username or organization.

type Mapper

type Mapper interface {
	Map(src string) string
}

Mapper maps a git source.

Jump to

Keyboard shortcuts

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