Documentation ¶
Overview ¶
Package git contains functions for interacting with git repositories.
Package git contains functions for interacting with git repositories.
Package git contains functions for interacting with git repositories.
Package git contains functions for interacting with git repositories.
Package git contains functions for interacting with git repositories.
Package git contains functions for interacting with git repositories.
Package git contains functions for interacting with git repositories.
Index ¶
- type Git
- func (g *Git) CheckoutTag(tag string) error
- func (g *Git) CreateReadOnlyUser() error
- func (g *Git) DoHTTPThings(request *netHttp.Request, username, secret string) ([]byte, error)
- func (g *Git) DownloadRepoToTemp(gitURL string) error
- func (g *Git) MutateGitURLsInText(text string) string
- func (g *Git) Pull(gitURL, targetFolder string) error
- func (g *Git) PushRepo(srcUrl, targetFolder string) error
- func (g *Git) TransformURL(url string) (string, error)
- func (g *Git) TransformURLtoRepoName(url string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Git ¶
type Git struct { // Server is the git server configuration. Server types.GitServerInfo // Spinner is an optional spinner to use for long running operations. Spinner *message.Spinner // Target working directory for the git repository. GitPath string }
Git is the main struct for managing git repositories.
func New ¶
func New(server types.GitServerInfo) *Git
New creates a new git instance with the provided server config.
func NewWithSpinner ¶
func NewWithSpinner(server types.GitServerInfo, spinner *message.Spinner) *Git
NewWithSpinner creates a new git instance with the provided server config and spinner.
func (*Git) CheckoutTag ¶
CheckoutTag performs a `git checkout` of the provided tag to a detached HEAD.
func (*Git) CreateReadOnlyUser ¶
CreateReadOnlyUser uses the Gitea API to create a non-admin Zarf user.
func (*Git) DoHTTPThings ¶ added in v0.23.2
DoHTTPThings adds http request boilerplate and perform the request, checking for a successful response.
func (*Git) DownloadRepoToTemp ¶
DownloadRepoToTemp clones or updates a repo into a temp folder to perform ephemeral actions (i.e. process chart repos).
func (*Git) MutateGitURLsInText ¶ added in v0.23.2
MutateGitURLsInText changes the gitURL hostname to use the repository Zarf is configured to use.
func (*Git) PushRepo ¶
PushRepo pushes a git repository from the local path to the configured git server.
func (*Git) TransformURL ¶ added in v0.23.5
TransformURL takes a git url and returns a Zarf-compatible url.