Documentation ¶
Index ¶
- Constants
- func CheckDockerHostConnection() (string, error)
- func CopyDirectory(w io.Writer, scrDir, dest string) error
- func CopyFile(srcFile, dstFile string) error
- func CreateDir(opt CreateDirOption) error
- func CreateDirInContainer(workDir, folderName string) error
- func CreateIfNotExists(dir string, perm os.FileMode) error
- func DeleteDir(option DeleteDirOption) error
- func DeleteDirOnContainer(workDir, folderName string) error
- func Exists(filePath string) bool
- func IsEmptyString(s string) bool
- func PrintLog(msg string, v ...interface{})
- func PrintLogW(w io.Writer, msg string, v ...interface{})
- func SetDockerHost(hosts []string)
- func SetGitClient(cli GitClient)
- func SumContentMD5(file string) (string, error)
- func ValidateDockerHostConnection() error
- type CreateDirOption
- type DeleteDirOption
- type DockerAuth
- type DockerClient
- func (c *DockerClient) BuildImage(ctx context.Context, file string, tags []string, auths []DockerAuth) (types.ImageBuildResponse, error)
- func (c *DockerClient) BuildImageWithSpecificDockerFile(ctx context.Context, tarFile, dockerFile string, tags []string) (types.ImageBuildResponse, error)
- func (c *DockerClient) DeployImage(ctx context.Context, username, password, image string) (io.ReadCloser, error)
- func (c *DockerClient) PullImage(ctx context.Context, username, password, image string) (io.ReadCloser, error)
- func (c *DockerClient) RemoveImage(ctx context.Context, image string) ([]types.ImageDelete, error)
- func (c *DockerClient) TagImage(ctx context.Context, src, dest string) error
- type GitClient
- func (c *GitClient) Add(path string) error
- func (cli *GitClient) Close()
- func (c *GitClient) Commit(msg string) error
- func (c *GitClient) CreateNewBranch(branchName string) error
- func (cli *GitClient) OpenCurrentRepo() (err error)
- func (c *GitClient) Push() error
- func (c *GitClient) Tag(version string) error
- func (c *GitClient) Validate() error
- type POM
- type PackageJson
- type ParentPOM
- type Version
Constants ¶
View Source
const AlpineImage = "alpine:3.12.0"
Variables ¶
This section is empty.
Functions ¶
func CreateDir ¶
func CreateDir(opt CreateDirOption) error
func CreateDirInContainer ¶
func DeleteDir ¶
func DeleteDir(option DeleteDirOption) error
func DeleteDirOnContainer ¶
func IsEmptyString ¶
func SetDockerHost ¶
func SetDockerHost(hosts []string)
func SetGitClient ¶
func SetGitClient(cli GitClient)
func SumContentMD5 ¶
func ValidateDockerHostConnection ¶
func ValidateDockerHostConnection() error
Types ¶
type CreateDirOption ¶
type DeleteDirOption ¶
type DockerAuth ¶
type DockerClient ¶
func NewClient ¶
func NewClient() (DockerClient, error)
func (*DockerClient) BuildImage ¶
func (c *DockerClient) BuildImage(ctx context.Context, file string, tags []string, auths []DockerAuth) (types.ImageBuildResponse, error)
func (*DockerClient) BuildImageWithSpecificDockerFile ¶
func (c *DockerClient) BuildImageWithSpecificDockerFile(ctx context.Context, tarFile, dockerFile string, tags []string) (types.ImageBuildResponse, error)
func (*DockerClient) DeployImage ¶
func (c *DockerClient) DeployImage(ctx context.Context, username, password, image string) (io.ReadCloser, error)
func (*DockerClient) PullImage ¶
func (c *DockerClient) PullImage(ctx context.Context, username, password, image string) (io.ReadCloser, error)
func (*DockerClient) RemoveImage ¶
func (c *DockerClient) RemoveImage(ctx context.Context, image string) ([]types.ImageDelete, error)
type GitClient ¶
type GitClient struct { WorkDir string AccessToken string Name string Email string Repo *git.Repository CurrentBranch *plumbing.Reference Remote *git.Remote }
func GetGitClient ¶
func GetGitClient() GitClient
func (*GitClient) CreateNewBranch ¶
func (*GitClient) OpenCurrentRepo ¶
type POM ¶
type PackageJson ¶
func ReadNodeJSPackageJson ¶
func ReadNodeJSPackageJson(file string) (pj PackageJson, err error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.