remote

package
v0.0.0-...-ddc8f8a Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2017 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Activate

func Activate(c echo.Context, r *model.Repo, link string) error

Repo fetches the named repository from the remote system.

func Hook

func Hook(c echo.Context, r *http.Request) (*model.Repo, *model.Build, error)

Hook parses the post-commit hook from the Request body and returns the required data in a standard format.

func Netrc

func Netrc(c echo.Context, account *model.ScmAccount) (*model.Netrc, error)

Repo fetches the named repository from the remote system.

func Repo

func Repo(c echo.Context, owner, repo string) (*model.Repo, error)

Repo fetches the named repository from the remote system.

func Repos

func Repos(c echo.Context) ([]*model.RepoLite, error)

Repo fetches the named repository from the remote system.

func ToContext

func ToContext(c Setter, r Remote)

ToContext adds the Remote to this context if it supports the Setter interface.

Types

type Remote

type Remote interface {
	// Repo fetches the named repository from the remote system.
	Repo(owner, repo string) (*model.Repo, error)

	// Repos fetches a list of repos from the remote system.
	Repos() ([]*model.RepoLite, error)

	// private repositories from a remote system.
	Netrc(r *model.ScmAccount) (*model.Netrc, error)

	// Activate activates a repository by creating the post-commit hook.
	Activate(r *model.Repo, link string) error

	// Deactivate deactivates a repository by removing all previously created
	// post-commit hooks matching the given link.
	Deactivate(r *model.Repo, link string) error

	// Hook parses the post-commit hook from the Request body and returns the
	// required data in a standard format.
	Hook(r *http.Request) (*model.Repo, *model.Build, error)
}

func FromContext

func FromContext(c echo.Context) Remote

FromContext returns the Remote associated with this context.

type Setter

type Setter interface {
	Set(string, interface{})
}

Setter defines a context that enables setting values.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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