utils

package
v0.0.0-...-ac59665 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(files []*os.File, dest string) error

压缩 使用gzip压缩成tar.gz

func CopyDir

func CopyDir(srcPath string, destPath string) error

*

  • 拷贝文件夹,同时拷贝文件夹中的文件
  • @param srcPath 需要拷贝的文件夹路径: D:/test
  • @param destPath 拷贝到的位置: D:/backup/

func CopyFile

func CopyFile(src, dst string) (int64, error)

func DeCompress

func DeCompress(tarFile, dest string) error

解压 tar.gz

func DockerList

func DockerList() []string

func DockerLoad

func DockerLoad(tarName string)

func DockerLogin

func DockerLogin(userName, password string) bool

func DockerPull

func DockerPull(imageName string)

func DockerPush

func DockerPush(imageName, loginToken string)

func DockerRmi

func DockerRmi(imageName string)

func DockerSave

func DockerSave(tarName string, images []string)

func DockerTag

func DockerTag(sourceImageName, targetImageName string)

func IsHubDocker

func IsHubDocker(imageName string) string

func LoadIni

func LoadIni(data interface{}, path string)

func Tar

func Tar(src []string, dst string) error

Types

type Config

type Config struct {
	Path string `key:"config.path"`
	//app
	AppEnable    bool   `key:"app.enable"`
	AppName      string `key:"app.name"`
	AppVersion   string `key:"app.version"`
	AppKustomize bool   `key:"app.kustomize",default:"false"`
	AppManifests string `key:"app.manifests"`
	AppImages    string `key:"app.images"`
	AppFiles     string `key:"app.files"`
}
var VarsConfig *Config

type IniFile

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

type Oss

type Oss struct {
	Endpoint   string
	AkId       string
	AkSk       string
	Bucket     string
	Object     string
	UploadFile string
}

对象存储结构

func (*Oss) OssUpload

func (o *Oss) OssUpload()

type OssProgressListener

type OssProgressListener struct {
}

定义进度条监听器。

func (*OssProgressListener) ProgressChanged

func (listener *OssProgressListener) ProgressChanged(event *oss.ProgressEvent)

定义进度变更事件处理函数。

Jump to

Keyboard shortcuts

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