gitlabs

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFoundRepository = errors.New("未找到公开的仓库")

ErrNotFoundRepository 未找到公开的仓库

Functions

This section is empty.

Types

type Repository

type Repository struct {
	Name     string `json:"name"`
	Desc     string `json:"description"`
	Path     string `json:"relative_path"`
	Type     string `json:"type"`
	FullPath string `json:"-"`
}

Repository 仓库信息

func GetRepositories

func GetRepositories(url string) ([]*Repository, error)

GetRepositories 获取所有项目仓库

func NewRepository

func NewRepository(fullPath string) *Repository

NewRepository 创建分组/仓库信息

func (*Repository) Clone

func (r *Repository) Clone() error

Clone 克隆项目

func (*Repository) Exists

func (r *Repository) Exists() bool

Exists 本地仓库是否是存在

func (*Repository) GetLocalPath

func (r *Repository) GetLocalPath() string

GetLocalPath 获取本地路径

func (*Repository) Pull

func (r *Repository) Pull(branch ...string) error

Pull 拉取项目

func (*Repository) Reset

func (r *Repository) Reset(branch ...string) error

Reset 拉取项目

func (*Repository) String

func (r *Repository) String() string

String 输出内容

func (*Repository) Update

func (r *Repository) Update() error

Update 更新项目

Jump to

Keyboard shortcuts

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