git

package
v0.0.0-...-c30c706 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const GitRepoPath = "/var/run/git/cli-manager"

Variables

This section is empty.

Functions

func HandleDownloadPlugin

func HandleDownloadPlugin(w http.ResponseWriter, r *http.Request)

func HandleGitAdversitement

func HandleGitAdversitement(w http.ResponseWriter, r *http.Request)

HandleGitAdversitement handles the git advertisement requests done by client tools relying on git compatibility. This function only supports upload-pack requests to limit the supported functionality only to git fetch and git clone.

func HandleGitUploadPack

func HandleGitUploadPack(w http.ResponseWriter, r *http.Request)

func PrepareGitServer

func PrepareGitServer() *http.ServeMux

PrepareGitServer creates a http server mux to support git compatible endpoints in addition to plugin download mechanism.

Types

type Repo

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

func PrepareLocalGit

func PrepareLocalGit() (*Repo, error)

PrepareLocalGit creates a git directory and applies first commit to make it ready consumed by Krew.

func (*Repo) Delete

func (r *Repo) Delete(name string) error

Delete deletes the plugin yaml from the git repository and commits.

func (*Repo) Upsert

func (r *Repo) Upsert(name string, plugin *krew.Plugin) error

Upsert adds new plugin yaml if currently it doesn't exist, updates if it does and commits this to git repository.

Jump to

Keyboard shortcuts

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