git

package
v0.0.0-...-7c3836c Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProjectTemplateGet  = errors.New("项目基础模版获取错误")
	ErrProjectTagsGet      = errors.New("项目的Tags获取错误")
	ErrProjectTagsBranches = errors.New("项目的Branches获取错误")
)

Functions

func MakeHandler

func MakeHandler(svc Service, logger log.Logger, repository repository.Repository) http.Handler

Types

type Service

type Service interface {
	// git tags 列表
	// desc: 需要区分是gitlab还是github
	Tags(ctx context.Context) (res []string, err error)

	// 获取git的分支
	Branches(ctx context.Context) (res []string, err error)

	// 获取项目的Dockerfile
	GetDockerfile(ctx context.Context, fileName string) (res string, err error)

	// 根据Git地址 获取tag列表
	TagsByGitPath(ctx context.Context, gitPath string) (res []string, err error)

	// 根据Git地址 获取branch列表
	BranchesByGitPath(ctx context.Context, gitPath string) (res []string, err error)
}

func NewLoggingService

func NewLoggingService(logger log.Logger, s Service) Service

func NewService

func NewService(logger log.Logger, config *config.Config,
	gitClient git_repo.Repo,
	store repository.Repository) Service

Jump to

Keyboard shortcuts

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