libraries

package
v0.0.0-...-56cf101 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2018 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitTools

type GitTools struct {
	// contains filtered or unexported fields
}

func NewGitTools

func NewGitTools() *GitTools

func (*GitTools) Clone

func (this *GitTools) Clone(git, wwwroot string)

func (*GitTools) Cp

func (this *GitTools) Cp(from, to string) (err error)

func (*GitTools) DelBranch

func (this *GitTools) DelBranch(wwwroot, branch string)

func (*GitTools) GetCommitId

func (this *GitTools) GetCommitId(wwwroot string, branch string) (commitid, msg string, err error)

func (*GitTools) Lock

func (this *GitTools) Lock()

func (*GitTools) Merge

func (this *GitTools) Merge(wwwroot, src, des, start, end, msg, author string) (err error)

开发分支合并到测试分支或开发分支合并到预发布分支,需要精简commit

func (*GitTools) NewBranch

func (this *GitTools) NewBranch(wwwroot, branch string)

func (*GitTools) Patch

func (this *GitTools) Patch(wwwroot, src, des, start, end string) (err error)

合并src 代码到 des 预发布分支合并到master,不需要精简commit

func (*GitTools) ReBranch

func (this *GitTools) ReBranch(wwwroot string, branches ...string)

重建分支

func (*GitTools) Unlock

func (this *GitTools) Unlock()

type Ssh

type Ssh struct {
	// contains filtered or unexported fields
}

func NewSsh

func NewSsh(s, r SshConfig) (ssh *Ssh, err error)

s 外网服务器 r 内网服务器,可以为空

func (*Ssh) Close

func (this *Ssh) Close()

func (*Ssh) Dial

func (this *Ssh) Dial() (err error)

func (*Ssh) Exec

func (this *Ssh) Exec(cmd string) ([]byte, error)

一个Session只能执行一次

func (*Ssh) Scp

func (this *Ssh) Scp(src, des, exclude string) (err error)

实现了目录的上传,未限速 可以实现过滤,不支持正则过滤,不过滤最外层

type SshConfig

type SshConfig struct {
	Username string
	Ip       string
	Port     string
	Auth     string
}

Jump to

Keyboard shortcuts

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