filesync

package
v0.0.0-...-b89d3ad Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Access

type Access struct {
	Endpoint        string `yaml:"endpoint"`
	AccessKeyID     string `yaml:"access_key_id"`
	AccessKeySecret string `yaml:"access_key_secret"`
	Bucket          string `yaml:"bucket"`
	// 绑定的外链域名
	Domain string `yaml:"domain"`
}

type FileSync

type FileSync interface {
	Put(localFile string, key string) (downloadURL string, err error)
	Delete(key string) error
}

type OSSFileSync

type OSSFileSync struct {
	// contains filtered or unexported fields
}

func NewOSSFileSync

func NewOSSFileSync(access Access) OSSFileSync

创建一个基于OSS文件同步工具

func (OSSFileSync) Delete

func (ossfs OSSFileSync) Delete(key string) (err error)

func (OSSFileSync) Put

func (ossfs OSSFileSync) Put(localFile string, key string) (downloadURL string, err error)

type QiniuFileSync

type QiniuFileSync struct {
	// contains filtered or unexported fields
}

func NewQiniuFileSync

func NewQiniuFileSync(access Access) (qiniu QiniuFileSync)

创建一个基于七牛云的文件存储工具

func (QiniuFileSync) Delete

func (qiniu QiniuFileSync) Delete(key string) error

func (QiniuFileSync) Put

func (qiniu QiniuFileSync) Put(localFile string, key string) (downloadURL string, err error)

Jump to

Keyboard shortcuts

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