Documentation ¶
Overview ¶
Copyright 2019 Huawei Technologies Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Huawei Technologies Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Huawei Technologies Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Huawei Technologies Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Huawei Technologies Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Huawei Technologies Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Huawei Technologies Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Huawei Technologies Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Huawei Technologies Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Huawei Technologies Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Huawei Technologies Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Huawei Technologies Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Huawei Technologies Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Huawei Technologies Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019 Huawei Technologies Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func AdaptWildcards(input string) string
- func Base64Decode(value string) ([]byte, error)
- func Base64Encode(value []byte) string
- func Base64Md5(value []byte) string
- func BytesToString(b []byte) string
- func CheckErrorAndExit(err error)
- func Chown(path string) error
- func CompileWildcardInput(input string) (*regexp.Regexp, error)
- func CopyFile(oldpath, newpath string, checkNewpathLength bool, writeBufferIoSize int, ...) error
- func Crc64File(fileUrl string) (uint64, error)
- func DoCompress(file *os.File, prefix string, zw *zip.Writer) (int64, error)
- func EnsureDirectory(dir string) (err error)
- func EnterBashMode(additionalTips func(), callback func(value string))
- func FindDirsToDelete(dir string) (dirs []string, err error)
- func FindFiles(folder string, pattern *regexp.Regexp, action func(fileUrl string)) error
- func FindFilesV2(folder string, pattern *regexp.Regexp) ([]string, error)
- func FindMatches(fileUrl string, pattern *regexp.Regexp, action func(groups []string), ...) error
- func FormatUtcNow(format string) string
- func FormatUtcToRfc1123(t time.Time) string
- func GetArch() string
- func GetBase64Md5(writer io.Writer) string
- func GetByteArrayFromPool() []byte
- func GetCpuNumber() int
- func GetCurrentTimestamp() int64
- func GetFileAccessTime(fileInfo os.FileInfo) time.Time
- func GetHexMd5(writer io.Writer) string
- func GetMd5Writer() io.Writer
- func GetOS() string
- func GetOsPath(path string) (ret string)
- func GetRealPath(path string) (realPath string, realStat os.FileInfo, err error)
- func GetTerminalWidth() (int, error)
- func GetUtcNow() time.Time
- func HasChinese(val string) bool
- func HasCommandPrex(commandArg string) bool
- func HasUnicode(val string) bool
- func Hex(value []byte) string
- func HexMd5(value []byte) string
- func Home() (string, error)
- func Int64ToString(value int64) string
- func IntToString(value int) string
- func IsDt() bool
- func IsHec() bool
- func IsLinux() bool
- func IsMac() bool
- func IsObsFilePath(path string) bool
- func IsOtc() bool
- func IsWindows() bool
- func MaxFloat64(va, vb float64) float64
- func MaxInt(va, vb int) int
- func MaybeAddTrailingSlash(srckey string) string
- func MaybeDeleteBeginningSlash(srckey string) string
- func MaybeDeleteTrailingSlash(srckey string) string
- func Md5(value []byte) []byte
- func Md5File(fileUrl string) ([]byte, error)
- func MinFloat64(va, vb float64) float64
- func MinInt(va, vb int) int
- func MkdirAll(path string, perm os.FileMode) error
- func NormalizeBytes(size int64) string
- func NormalizeCount(count int64, unit string) string
- func NormalizeFilePath(fileUrl string) string
- func NormalizeFileSize(fileUrl string) string
- func OpenFile(path string, flag int, perm os.FileMode) (*os.File, error)
- func ParseXml(value []byte, result interface{}) error
- func PathListNested(fileList []string) error
- func PathSeparator() string
- func PreprocessInput(input string) (string, string, bool, error)
- func PutByteArrayToPool(b []byte)
- func QuickCreateFile(fileUrl string, size int64) error
- func ReadContentLineByFileUrl(fileUrl string) ([]string, error)
- func ReadLine(rd *bufio.Reader) ([]byte, error)
- func RenameFile(oldpath, newpath string, forceOverwrite bool, writeBufferIoSize int, ...) error
- func Round(input float64) float64
- func SanitizeInput(input string) string
- func SetCloudType(c string)
- func SleepByCount(cnt int)
- func Str2Timestamp(str string, defaultValue int64) (ts int64, err error)
- func StringToBytes(s string) []byte
- func StringToFloat64(value string, def float64) float64
- func StringToFloat64V2(value string) (float64, error)
- func StringToInt(value string, def int) int
- func StringToInt64(value string, def int64) int64
- func StringToInt64V2(value string) (int64, error)
- func StringToIntV2(value string) (int, error)
- func TransToXml(value interface{}) ([]byte, error)
- func TranslateToFloat64(value string) (float64, error)
- func TranslateToInt64(value string) (int64, error)
- func UseDefaultDownloadPath(args []string) bool
- func Wrap(reader io.Reader, writers ...io.Writer) io.Reader
- type HintV2
- type MapHelper
- type MultiWritersReader
Constants ¶
const ( OBS_PREFIX = "obs://" COMMAND_CONNECTOR = "-" OBS_PREFIX_LEN = 6 )
Variables ¶
var ErrCheckBucketStatus = errors.New("CheckBucketStatusError")
var ErrExecuting = errors.New("ExecutedError")
var ErrFileNotFound = errors.New("FileNotFoundError")
var ErrInitializing = errors.New("InitializingError")
var ErrInterrupted = errors.New("InterruptedError")
var ErrInvalidArgs = errors.New("InvalidArgsError")
var ErrTaskNotFound = errors.New("TaskNotFoundError")
var ErrUncompeleted = errors.New("UncompeletedError")
var ErrUnsupported = errors.New("UnsupportedError")
Functions ¶
func AdaptWildcards ¶
func Base64Decode ¶
func Base64Encode ¶
func BytesToString ¶
func CheckErrorAndExit ¶
func CheckErrorAndExit(err error)
func EnsureDirectory ¶
func EnterBashMode ¶
func EnterBashMode(additionalTips func(), callback func(value string))
func FindDirsToDelete ¶
func FindMatches ¶
func FormatUtcNow ¶
func FormatUtcToRfc1123 ¶
func GetBase64Md5 ¶
func GetByteArrayFromPool ¶
func GetByteArrayFromPool() []byte
func GetCpuNumber ¶
func GetCpuNumber() int
func GetCurrentTimestamp ¶
func GetCurrentTimestamp() int64
func GetMd5Writer ¶
func GetTerminalWidth ¶
func HasChinese ¶
func HasCommandPrex ¶
func HasUnicode ¶
func Int64ToString ¶
func IntToString ¶
func IsObsFilePath ¶
func MaxFloat64 ¶
func MaybeAddTrailingSlash ¶
func MinFloat64 ¶
func NormalizeBytes ¶
func NormalizeCount ¶
func NormalizeFilePath ¶
func NormalizeFileSize ¶
func PathListNested ¶
func PathSeparator ¶
func PathSeparator() string
func PutByteArrayToPool ¶
func PutByteArrayToPool(b []byte)
func QuickCreateFile ¶
func RenameFile ¶
func SanitizeInput ¶
func SetCloudType ¶
func SetCloudType(c string)
func SleepByCount ¶
func SleepByCount(cnt int)
func StringToBytes ¶
func StringToFloat64 ¶
func StringToFloat64V2 ¶
func StringToInt ¶
func StringToInt64 ¶
func StringToInt64V2 ¶
func StringToIntV2 ¶
func TransToXml ¶
func TranslateToFloat64 ¶
func TranslateToInt64 ¶
func UseDefaultDownloadPath ¶
Types ¶
type HintV2 ¶
type MultiWritersReader ¶
type MultiWritersReader struct {
// contains filtered or unexported fields
}