git

package
v0.0.0-...-078a86d Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchesGitRepositoryURL

func MatchesGitRepositoryURL(str string) bool

MatchesGitRepositoryURL returns true if a string matches a git repository URL.

Types

type GitRepository

type GitRepository struct {
	// URL is the URL of the git repository.
	URL string

	// Branch is the branch of the git repository.
	Branch string

	// Tag is the tag of the git repository.
	Tag string

	// Auth is the authentication method to use when cloning the repository.
	Auth transport.AuthMethod
}

GitRepository is a struct that represents a git repository.

func (*GitRepository) AuthenticateWithToken

func (r *GitRepository) AuthenticateWithToken(token string)

AuthenticateWithToken authenticates to the git repository with a token.

func (*GitRepository) Clone

func (r *GitRepository) Clone(path string) error

Clone clones the git repository.

func (*GitRepository) GetFileContent

func (r *GitRepository) GetFileContent(filePath string) (string, error)

GetFileContent returns the content of a raw file in the git repository.

func (*GitRepository) GetName

func (r *GitRepository) GetName() string

GetName returns the name of a git repository.

func (*GitRepository) Validate

func (r *GitRepository) Validate() error

Validate validates if a git repository is valid.

Jump to

Keyboard shortcuts

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