repository

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitInfo

type CommitInfo struct {
	Branch    string `json:"branch"`
	Commit    string `json:"commit"`
	Author    string `json:"author"`
	Timestamp int64  `json:"timestamp"`
	Message   string `json:"message"`
	Tag       string `json:"tag"`
	Diff      string `json:"diff"`
}

type FtpRepo added in v1.4.7

type FtpRepo struct{}

func (FtpRepo) BranchList added in v1.4.7

func (FtpRepo) BranchList(projectID int64) ([]string, error)

func (FtpRepo) BranchLog added in v1.4.7

func (ftpRepo FtpRepo) BranchLog(projectID int64, branch string, rows int) ([]CommitInfo, error)

func (FtpRepo) CanRollback added in v1.8.0

func (FtpRepo) CanRollback() bool

func (FtpRepo) CommitLog added in v1.4.7

func (FtpRepo) CommitLog(projectID int64, rows int) ([]CommitInfo, error)

func (FtpRepo) Create added in v1.4.7

func (ftpRepo FtpRepo) Create(projectID int64) error

Create -

func (FtpRepo) Follow added in v1.4.7

func (ftpRepo FtpRepo) Follow(project model.Project, _ string) error

func (FtpRepo) Ping added in v1.4.7

func (ftpRepo FtpRepo) Ping(url string) error

func (FtpRepo) RemoteBranchList added in v1.4.7

func (FtpRepo) RemoteBranchList(url string) ([]string, error)

func (FtpRepo) TagLog added in v1.4.7

func (ftpRepo FtpRepo) TagLog(projectID int64, rows int) ([]CommitInfo, error)

type GitRepo

type GitRepo struct{}

func (GitRepo) BranchList

func (GitRepo) BranchList(projectID int64) ([]string, error)

func (GitRepo) BranchLog

func (GitRepo) BranchLog(projectID int64, branch string, rows int) ([]CommitInfo, error)

func (GitRepo) CanRollback added in v1.8.0

func (GitRepo) CanRollback() bool

func (GitRepo) CommitLog

func (GitRepo) CommitLog(projectID int64, rows int) ([]CommitInfo, error)

func (GitRepo) Create

func (GitRepo) Create(projectID int64) error

Create -

func (GitRepo) Follow

func (gitRepo GitRepo) Follow(project model.Project, target string) error

func (GitRepo) Ping added in v1.4.0

func (GitRepo) Ping(url string) error

Ping -

func (GitRepo) RemoteBranchList

func (GitRepo) RemoteBranchList(url string) ([]string, error)

func (GitRepo) TagLog

func (GitRepo) TagLog(projectID int64, rows int) ([]CommitInfo, error)

type Repo

type Repo interface {
	Ping(url string) error
	// Create one repository
	Create(projectID int64) error
	// Follow the repository code and update to latest
	Follow(project model.Project, target string) error
	// RemoteBranchList list remote branches in the url
	RemoteBranchList(url string) ([]string, error)
	// BranchList list the local repository's branches
	BranchList(projectID int64) ([]string, error)
	// CommitLog list the local commit log
	CommitLog(projectID int64, rows int) ([]CommitInfo, error)
	// BranchLog list the local commit log from specific branch
	BranchLog(projectID int64, branch string, rows int) ([]CommitInfo, error)
	// TagLog list the local commit log from all tag
	TagLog(projectID int64, rows int) ([]CommitInfo, error)
	// CanRollback detect repo can rollback or not
	CanRollback() bool
}

func GetRepo

func GetRepo(repoType string) (Repo, error)

type SftpRepo added in v1.4.7

type SftpRepo struct{}

func (SftpRepo) BranchList added in v1.4.7

func (SftpRepo) BranchList(projectID int64) ([]string, error)

func (SftpRepo) BranchLog added in v1.4.7

func (sftpRepo SftpRepo) BranchLog(projectID int64, branch string, rows int) ([]CommitInfo, error)

func (SftpRepo) CanRollback added in v1.8.0

func (SftpRepo) CanRollback() bool

func (SftpRepo) CommitLog added in v1.4.7

func (SftpRepo) CommitLog(projectID int64, rows int) ([]CommitInfo, error)

func (SftpRepo) Create added in v1.4.7

func (sftpRepo SftpRepo) Create(projectID int64) error

func (SftpRepo) Follow added in v1.4.7

func (sftpRepo SftpRepo) Follow(project model.Project, _ string) error

func (SftpRepo) Ping added in v1.4.7

func (sftpRepo SftpRepo) Ping(url string) error

func (SftpRepo) RemoteBranchList added in v1.4.7

func (SftpRepo) RemoteBranchList(url string) ([]string, error)

func (SftpRepo) TagLog added in v1.4.7

func (sftpRepo SftpRepo) TagLog(projectID int64, rows int) ([]CommitInfo, error)

type SvnRepo

type SvnRepo struct{}

func (SvnRepo) BranchList

func (SvnRepo) BranchList(projectID int64) ([]string, error)

func (SvnRepo) BranchLog

func (SvnRepo) BranchLog(projectID int64, branch string, rows int) ([]CommitInfo, error)

func (SvnRepo) CanRollback added in v1.8.0

func (SvnRepo) CanRollback() bool

func (SvnRepo) CommitLog

func (SvnRepo) CommitLog(projectID int64, rows int) ([]CommitInfo, error)

func (SvnRepo) Create

func (SvnRepo) Create(projectID int64) error

Create -

func (SvnRepo) Follow

func (svnRepo SvnRepo) Follow(project model.Project, target string) error

func (SvnRepo) Ping added in v1.4.0

func (SvnRepo) Ping(url string) error

Ping -

func (SvnRepo) RemoteBranchList

func (SvnRepo) RemoteBranchList(url string) ([]string, error)

func (SvnRepo) TagLog

func (SvnRepo) TagLog(projectID int64, rows int) ([]CommitInfo, error)

Jump to

Keyboard shortcuts

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