pkg

package
v0.0.0-...-be5c59c Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(path string) bool

判断文件夹是否存在

func PrintFileList

func PrintFileList(fl []string)

func ReadDirectory

func ReadDirectory(dir string) (fl []string)

* 读取目录内的文件

Types

type Config

type Config struct {
	AccessKey     string `json:"access_key"`
	SecretKey     string `json:"secret_key"`
	Zone          int    `json:"zone"`
	Bucket        string `json:"Bucket"`
	UseHTTPS      bool   `json:"use_https"`
	UseCdnDomains bool   `json:"use_cdn_domains"`
	Domain        string `json:"domain"`
}

func LoadConfig

func LoadConfig() *Config

type QiNiuClient

type QiNiuClient struct {
	AccessKey     string `json:"access_key"`
	SecretKey     string `json:"secret_key"`
	Bucket        string `json:"bucket"`
	Zone          int    `json:"zone"` //0:华东, 1:华北, 2:华南, 3:北美
	UseHTTPS      bool   `json:"use_https"`
	UseCdnDomains bool   `json:"use_cdn_domains"`
	Domain        string `json:"domain"`
}

func NewClient

func NewClient(accessKey, secretKey, bucket string, Zone int, useHttps, useCdnDomains bool, domain string) *QiNiuClient

func (*QiNiuClient) UploadFile

func (client *QiNiuClient) UploadFile(fileList []string) []string

Jump to

Keyboard shortcuts

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