provider

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const COS = "cos" // cos 名称
View Source
const OSS = "oss" // oss 名称

Variables

This section is empty.

Functions

This section is empty.

Types

type AliyunOss

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

func NewAliyunOss

func NewAliyunOss(cfg *config.TransferConfig) *AliyunOss

NewAliyunOss 实例化ossImpl

func (*AliyunOss) GetFile

func (s *AliyunOss) GetFile(key string, filepath string) error

func (*AliyunOss) List

func (s *AliyunOss) List(prefix string, marker string) (list []string)

func (*AliyunOss) PutFile

func (s *AliyunOss) PutFile(key string, filepath string) error

type Provider

type Provider interface {
	PutFile(key string, filepath string) error
	GetFile(key string, filepath string) error
	List(prefix string, marker string) []string
}

A Provider describes an interface for providing files

type QcloudCos

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

QcloudCos

func NewQcloudCos

func NewQcloudCos(cfg *config.TransferConfig) *QcloudCos

NewQcloudCos 实例化cosImpl

func (*QcloudCos) GetFile

func (s *QcloudCos) GetFile(key string, filepath string) error

func (*QcloudCos) List

func (s *QcloudCos) List(prefix string, marker string) (list []string)

func (*QcloudCos) PutFile

func (s *QcloudCos) PutFile(key string, filepath string) error

Jump to

Keyboard shortcuts

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