qiniu

package
v0.0.0-...-be1e383 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClientNotExist     = errors.New("specific client not exist")
	ErrNotSpecifyEndPoint = errors.New("not specify endpoint in metadata")
)

Functions

func NewQiniuOSS

func NewQiniuOSS() file.File

Types

type BucketManager

type BucketManager interface {
	Stat(bucket, key string) (storage.FileInfo, error)
	Delete(bucket, key string) (err error)
	ListFiles(bucket, prefix, delimiter, marker string,
		limit int) (entries []storage.ListItem, commonPrefixes []string, nextMarker string, hasNext bool, err error)
}

type FormUploader

type FormUploader interface {
	Put(ctx context.Context, ret interface{}, uptoken, key string, data io.Reader, size int64, extra *storage.PutExtra) (err error)
}

type OssMetadata

type OssMetadata struct {
	Endpoint        string `json:"endpoint"`        // bucket url
	AccessKeyID     string `json:"accessKeyID"`     // SecretID
	AccessKeySecret string `json:"accessKeySecret"` // SecretKey
	Bucket          string `json:"bucket"`
	Private         bool   `json:"private"`
	UseHTTPS        bool   `json:"useHTTPS"`
	UseCdnDomains   bool   `json:"useCdnDomains"`
}

type QiniuOSS

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

func (*QiniuOSS) Del

func (q *QiniuOSS) Del(ctx context.Context, st *file.DelRequest) error

func (*QiniuOSS) Get

func (q *QiniuOSS) Get(ctx context.Context, st *file.GetFileStu) (io.ReadCloser, error)

func (*QiniuOSS) Init

func (q *QiniuOSS) Init(ctx context.Context, metadata *file.FileConfig) error

func (*QiniuOSS) List

func (q *QiniuOSS) List(ctx context.Context, st *file.ListRequest) (*file.ListResp, error)

func (*QiniuOSS) Put

func (q *QiniuOSS) Put(ctx context.Context, st *file.PutFileStu) error

func (*QiniuOSS) Stat

type QiniuOSSClient

type QiniuOSSClient struct {
	AccessKey string
	SecretKey string
	Bucket    string
	Domain    string
	Private   bool
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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