bash

package
v0.0.0-...-59e287b Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPluginUpgradeSqlFile

func BuildPluginUpgradeSqlFile(initSqlFile, upgradeSqlFile, currentVersion string) (outputFile string, err error)

func CopyTmpFile

func CopyTmpFile(sourceFilePath string) (filePath, fileDir string, err error)

func CreatePluginDatabase

func CreatePluginDatabase(ctx context.Context, username string, mysqlResource *models.PluginPackageRuntimeResourcesMysql, mysqlServer *models.ResourceServer) (password string, err error)

func DecompressFile

func DecompressFile(filePath, targetDir string) (localDir string, err error)

func DownloadPackageFile

func DownloadPackageFile(bucket, key string) (tmpPath string, err error)

func ExecPluginUpgradeSql

func ExecPluginUpgradeSql(ctx context.Context, mysqlInstance *models.PluginMysqlInstances, mysqlServer *models.ResourceServer, sqlFilePath string) (err error)

func GetDirIndexPath

func GetDirIndexPath(targetDir string) (subPath string, matchFlag bool, err error)

func GetHostSerialNum

func GetHostSerialNum(hostIp string)

func GetRemoteHostAvailablePort

func GetRemoteHostAvailablePort(resourceServer *models.ResourceServer) (port int, err error)

func InitPluginDockerHostSSH

func InitPluginDockerHostSSH()

func ListContains

func ListContains(inputList []string, target string) bool

func ListDirAllFiles

func ListDirAllFiles(targetDir string) (resultPaths []string, err error)

func ListDirFiles

func ListDirFiles(dirPath string) (result []string, err error)

func MakeBucket

func MakeBucket(bucket string) (err error)

func RemoteSCP

func RemoteSCP(targetIp, user, pwd, port, localFile, targetPath string) (err error)

func RemoteSSHCommand

func RemoteSSHCommand(targetIp, user, pwd, port, command string) (err error)

func RemoteSSHCommandWithOutput

func RemoteSSHCommandWithOutput(targetIp, user, pwd, port, command string) (stdout []byte, err error)

func RemoveTmpFile

func RemoveTmpFile(tmpFile string)

func SaveTmpFile

func SaveTmpFile(fileName string, fileContent []byte) (filePath, fileDir string, err error)

func UploadPluginPackage

func UploadPluginPackage(address, accessKey, secretKey, bucket string, fileMap map[string]string) (err error)

fileMap -> k = localFilePath, v = targetS3Path

Types

type PlatformObjectInfo

type PlatformObjectInfo []string

func ListBucketFiles

func ListBucketFiles(bucket string) (datas []PlatformObjectInfo, err error)

Jump to

Keyboard shortcuts

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