Documentation
¶
Index ¶
- func Activate(c echo.Context, r *model.Repo, link string) error
- func Hook(c echo.Context, r *http.Request) (*model.Repo, *model.Build, error)
- func Netrc(c echo.Context, account *model.ScmAccount) (*model.Netrc, error)
- func Repo(c echo.Context, owner, repo string) (*model.Repo, error)
- func Repos(c echo.Context) ([]*model.RepoLite, error)
- func ToContext(c Setter, r Remote)
- type Remote
- type Setter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Hook ¶
Hook parses the post-commit hook from the Request body and returns the required data in a standard format.
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 ¶
FromContext returns the Remote associated with this context.
Click to show internal directories.
Click to hide internal directories.