remote

package
v0.0.0-...-cdc9c58 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 {
	// Login authenticates the session and returns the remoter user
	// details.
	Login(res http.ResponseWriter, req *http.Request) (*model.User, error)

	// Repo fetches the named repository from the remote system.
	Repo(u *model.User, owner, name string) (*model.Repo, error)

	// Perm fetches the named repository permissions from the remote system
	// for the specified user.
	Perm(u *model.User, owner, name string) (*model.Perm, error)

	// EmptyCommit creates/adds a new empty commit to a branch of a repo.
	// if srcBranch and dstBranch are different then the commit will
	// include the state of srcbranch effectively rebasing dstBranch onto
	// srcBranch.
	EmptyCommit(u *model.User, owner, repo, srcBranch, dstBranch, msg string) error

	// SetupBranch sets up a new branch based on srcBranch. If the branch
	// already exists nothing happens.
	SetupBranch(u *model.User, owner, repo, srcBranch, dstBranch string) error

	// GetConfig gets and parses the package.yml config file.
	GetConfig(u *model.User, owner, repo, path string) (*pkgconfig.PkgConfig, error)
}

func FromContext

func FromContext(c context.Context) Remote

FromContext returns the Remote associated with this context.

func Load

func Load() Remote

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