models

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CombinePaths

func CombinePaths(path1, path2, sep string) string

func ConvertSizeString

func ConvertSizeString(size int64) string

func FilterStrings

func FilterStrings(arr []string, filter func(string) bool) []string

func GetFileName

func GetFileName(path string) string

func GetParentPath

func GetParentPath(path string) string

func PathExists

func PathExists(path string) bool

func SelectStrings

func SelectStrings(arr []string, selector func(string) string) []string

func ShortString

func ShortString(str string, length int) string

func ToMd5

func ToMd5(str string) string

Types

type Config

type Config struct {
	DownloadPath      string `json:"downloadPath"`
	DownloadThread    int32  `json:"downloadThread"`
	DownloadBlockSize int64  `json:"downloadBlockSize"`
	PeakTaskCount     int32  `json:"peakTask"`
	QingzhenToken     string `json:"token"`
}
var (
	DefaultConf *Config
)

func LoadConfig

func LoadConfig(file string) *Config

func (*Config) SaveFile

func (conf *Config) SaveFile(file string)

type SixHttpClient

type SixHttpClient struct {
	QingzhenToken string
	// contains filtered or unexported fields
}

6盘

func NewSixHttpClient

func NewSixHttpClient(token string) *SixHttpClient

func (*SixHttpClient) PostJson

func (cli *SixHttpClient) PostJson(url, body string) string

Jump to

Keyboard shortcuts

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