Documentation ¶
Index ¶
- func CalculatePieceSize(fileSize int64, isBoost bool) (int64, float64)
- func CalculateRealCost(sectorSizeBytes float64, pricePerGiB decimal.Decimal) decimal.Decimal
- func CheckDirExists(dir, dirName string) error
- func Convert2Title(text string) string
- func ConvertPrice2AttoFil(price string) string
- func CopyFile(srcFilePath, destFilePath string) (int64, error)
- func CreateDir(dir string) error
- func CreateDirIfNotExists(dir, dirName string) error
- func CreateFileWithByteContents(filefullpath string, contents []byte) (int, error)
- func CreateFileWithContents(filefullpath string, lines []string) (int, error)
- func DecodeJwtToken(tokenStr string) (jwt.MapClaims, error)
- func DirSize(dir string) (size int64, err error)
- func FirstLetter2Upper(text string) string
- func GenerateFile(filepath, filename string, filesize int64)
- func GetByteSizeFromStr(sizeStr string) int64
- func GetCurrentEpoch() int
- func GetCurrentUtcMilliSecond() (millis int64)
- func GetCurrentUtcSecond() int64
- func GetDayNumFromEpoch(epoch int) int
- func GetDecimalFromStr(source string) (*decimal.Decimal, error)
- func GetDefaultTaskName() string
- func GetEpochFromDay(day int) int
- func GetFieldFromJson(jsonBytes []byte, fieldName string) interface{}
- func GetFieldMapFromJson(jsonBytes []byte, fieldName string) map[string]interface{}
- func GetFieldStrFromJson(jsonBytes []byte, fieldName string) string
- func GetFileSize(fileFullPath string) int64
- func GetFileSize2(dir, fileName string) int64
- func GetFilesSize(dir string) (*int64, error)
- func GetFloat64FromStr(numStr *string) (float64, error)
- func GetInt64FromStr(numStr string) int64
- func GetIntFromStr(numStr string) (int, error)
- func GetMinFloat64(val1, val2 *float64) *float64
- func GetNumStrFromStr(numStr string) string
- func GetPathType(dirFullPath string) int
- func GetPriceFormat(price string) string
- func GetRandInRange(min, max int) int
- func GetStr(val interface{}) string
- func IsDirExists(dir string) bool
- func IsFileExists(filePath, fileName string) bool
- func IsFileExistsFullPath(fileFullPath string) bool
- func IsPathFile(dirFullPath string) (*bool, error)
- func IsSameDay(nanoSec1, nanoSec2 int64) bool
- func IsStrEmpty(str *string) bool
- func RandString(optionChars string, strLen int) string
- func RandStringRunes(letterRunes []rune, strLen int) string
- func ReadAllLines(dir, filename string) ([]string, error)
- func ReadCSVFile(filepath string) ([][]string, error)
- func ReadFile(filePath string) (string, []byte, error)
- func ReadRawCSVFile(filepath string) ([][]string, error)
- func RemoveFile(filePath, fileName string)
- func SearchFloat64FromStr(source string) *float64
- func ToJson(obj interface{}) string
- func UrlJoin(root string, parts ...string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculatePieceSize ¶ added in v0.2.22
https://docs.filecoin.io/store/lotus/very-large-files/#maximizing-storage-per-sector
func CalculateRealCost ¶ added in v0.2.22
func CheckDirExists ¶ added in v0.2.105
func Convert2Title ¶ added in v0.2.46
func ConvertPrice2AttoFil ¶ added in v0.2.54
func CreateDirIfNotExists ¶ added in v0.2.105
func CreateFileWithByteContents ¶ added in v0.2.57
func CreateFileWithContents ¶
func DecodeJwtToken ¶ added in v0.0.9
func FirstLetter2Upper ¶ added in v0.2.51
func GenerateFile ¶ added in v0.0.9
func GetByteSizeFromStr ¶
func GetCurrentEpoch ¶
func GetCurrentEpoch() int
func GetCurrentUtcMilliSecond ¶ added in v0.2.125
func GetCurrentUtcMilliSecond() (millis int64)
func GetCurrentUtcSecond ¶ added in v0.2.125
func GetCurrentUtcSecond() int64
func GetDayNumFromEpoch ¶
func GetDefaultTaskName ¶ added in v0.2.102
func GetDefaultTaskName() string
func GetEpochFromDay ¶
func GetFieldFromJson ¶
func GetFieldMapFromJson ¶
func GetFieldStrFromJson ¶
func GetFileSize ¶
func GetFileSize2 ¶
func GetFilesSize ¶ added in v0.2.117
func GetFloat64FromStr ¶
func GetInt64FromStr ¶
func GetIntFromStr ¶
func GetMinFloat64 ¶
func GetNumStrFromStr ¶
func GetPathType ¶
func GetPriceFormat ¶ added in v0.2.55
func GetRandInRange ¶
func IsDirExists ¶ added in v0.0.9
func IsFileExists ¶
func IsFileExistsFullPath ¶ added in v0.2.16
func IsPathFile ¶
func IsStrEmpty ¶
func RandString ¶ added in v0.2.20
func RandStringRunes ¶ added in v0.0.9
func ReadAllLines ¶
func ReadCSVFile ¶ added in v0.3.0
func ReadRawCSVFile ¶ added in v0.3.0
func RemoveFile ¶
func RemoveFile(filePath, fileName string)
func SearchFloat64FromStr ¶ added in v0.2.51
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.