repo

package
v0.0.0-...-820b428 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadAuthorizedKeys

func LoadAuthorizedKeys(data []byte) (rv []ssh.PublicKey, err error)

func RunExec

func RunExec(cmd *exec.Cmd) (exit_status uint32, err error)

RunExec will return a 0 exit status if err is nil

Types

type AuthHandler

type AuthHandler func(meta ssh.ConnMetadata, key ssh.PublicKey) (
	unique_user_id *string, err error)

type NewRepoHandler

type NewRepoHandler func(
	repo_path string,
	output io.Writer,
	meta ssh.ConnMetadata,
	key ssh.PublicKey,
	repo_name string) error

type PresubmissionHandler

type PresubmissionHandler func(
	repo_path string,
	output io.Writer,
	meta ssh.ConnMetadata,
	key ssh.PublicKey,
	repo_name string) (
	err error)

type Ref

type Ref string

type RepoHosting

type RepoHosting struct {
	ShellError string
	MOTD       string

	// if unset, one will be generated
	PrivateKey ssh.Signer

	// path to the directory containing repos to serve.
	RepoBase string
	// if set, overrides RepoBase + user-supplied repo name. if neither
	// RepoBase or Repo are set, Repo defaults to "."
	Repo string

	// if empty, *all* users will be allowed.
	AuthorizedKeys []ssh.PublicKey

	// If set, these commands override the default git-receive-pack and
	// git-upload-pack
	GitReceivePack string
	GitUploadPack  string
}

func (*RepoHosting) ListenAndServe

func (rh *RepoHosting) ListenAndServe(network, address string) (err error)

type RepoSubmissions

type RepoSubmissions struct {
	PrivateKey           ssh.Signer
	ShellError           string
	MOTD                 string
	StoragePath          func(user_id, repo_name string) string
	Clean                bool
	PresubmissionHandler PresubmissionHandler
	SubmissionHandler    SubmissionHandler
	AuthHandler          AuthHandler
	NewRepoHandler       NewRepoHandler
	MaxPushSize          int64

	// If set, these commands override the default git-receive-pack and
	// git-upload-pack
	GitReceivePack string
	GitUploadPack  string
	// contains filtered or unexported fields
}

func (*RepoSubmissions) ListenAndServe

func (rs *RepoSubmissions) ListenAndServe(network, address string) (
	err error)

type SubmissionHandler

type SubmissionHandler func(
	repo_path string,
	output io.Writer,
	meta ssh.ConnMetadata,
	key ssh.PublicKey,
	repo_name string, tags map[Ref][]Tag) (
	exit_status uint32,
	err error)

type Tag

type Tag string

Jump to

Keyboard shortcuts

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