git

package
v0.0.0-...-09780b5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const InternalDefaultBranch = "$DEFAULTBRANCH"

Variables

This section is empty.

Functions

func ComponentRepoToBranchesMap

func ComponentRepoToBranchesMap(components []*ScmComponent) map[string][]string

func ComponentUrlToBranchesMap

func ComponentUrlToBranchesMap(components []*ScmComponent) map[string][]string

func HostToComponentMap

func HostToComponentMap(components []*ScmComponent) map[string][]*ScmComponent

func NamespaceToComponentMap

func NamespaceToComponentMap(components []*ScmComponent) map[string][]*ScmComponent

func PlatformToComponentMap

func PlatformToComponentMap(components []*ScmComponent) map[string][]*ScmComponent

Types

type APIEndpoint

type APIEndpoint interface {
	APIEndpoint(host string) string
}

APIEndpoint interface defines the method to get the API endpoint url for the source code providers.

func BuildAPIEndpoint

func BuildAPIEndpoint(endpointType string) APIEndpoint

BuildAPIEndpoint constructs and returns an endpoint object based on the type provided type.

type GithubAPIEndpoint

type GithubAPIEndpoint struct {
}

GithubAPIEndpoint represents an API endpoint for GitHub.

func (*GithubAPIEndpoint) APIEndpoint

func (g *GithubAPIEndpoint) APIEndpoint(host string) string

APIEndpoint returns the GitHub API endpoint.

type GitlabAPIEndpoint

type GitlabAPIEndpoint struct {
}

GitlabAPIEndpoint represents an API endpoint for GitLab.

func (*GitlabAPIEndpoint) APIEndpoint

func (g *GitlabAPIEndpoint) APIEndpoint(host string) string

APIEndpoint returns the API GitLab endpoint.

type ScmComponent

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

func NewScmComponent

func NewScmComponent(platform string, repositoryUrl string, revision string, componentName string, namespaceName string) (*ScmComponent, error)

func (ScmComponent) Branch

func (s ScmComponent) Branch() string

func (ScmComponent) ComponentName

func (s ScmComponent) ComponentName() string

func (ScmComponent) NamespaceName

func (s ScmComponent) NamespaceName() string

func (ScmComponent) Platform

func (s ScmComponent) Platform() string

func (ScmComponent) Repository

func (s ScmComponent) Repository() string

func (ScmComponent) RepositoryHost

func (s ScmComponent) RepositoryHost() string

func (ScmComponent) RepositoryUrl

func (s ScmComponent) RepositoryUrl() *url.URL

func (ScmComponent) RepositoryUrlString

func (s ScmComponent) RepositoryUrlString() string

type UnknownAPIEndpoint

type UnknownAPIEndpoint struct {
}

UnknownAPIEndpoint represents an endpoint for unknown or non existed provider. It returns empty string for api endpoint.

func (*UnknownAPIEndpoint) APIEndpoint

func (g *UnknownAPIEndpoint) APIEndpoint(host string) string

APIEndpoint returns the GitLab endpoint.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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