aliyun

package module
v1.0.1000 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

文件管理器 阿里云适配器

项目介绍

  • go 版本实现的文件管理器

安装

go get -u github.com/deatil/go-filesystem-aliyun

开源协议

  • go-filesystem-aliyun 文件管理器 遵循 Apache2 开源协议发布,在保留本软件版权的情况下提供个人及商业免费使用。

版权

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ALiYunOSS

type ALiYunOSS struct {
	// 默认适配器基类
	adapter.Adapter
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *ALiYunOSS

初始化

func (*ALiYunOSS) Delete

func (this *ALiYunOSS) Delete(path string) error

删除

func (*ALiYunOSS) DeleteDir

func (this *ALiYunOSS) DeleteDir(dirname string) error

删除文件夹

func (*ALiYunOSS) Read

func (this *ALiYunOSS) Read(path string) (map[string]any, error)

读取

func (*ALiYunOSS) SetVisibility

func (this *ALiYunOSS) SetVisibility(path string, visibility string) (map[string]string, error)

设置文件的权限

func (*ALiYunOSS) Write

func (this *ALiYunOSS) Write(path string, contents []byte, conf interfaces.Config) (map[string]any, error)

上传

func (*ALiYunOSS) WriteStream

func (this *ALiYunOSS) WriteStream(path string, stream io.Reader, conf interfaces.Config) (map[string]interface{}, error)

上传 Stream 文件类型

type Option

type Option func(*ALiYunOSS)

func WithAccessKeyId

func WithAccessKeyId(accessKeyId string) Option

func WithAccessKeySecret

func WithAccessKeySecret(accessKeySecret string) Option

func WithBucketName

func WithBucketName(bucketName string) Option

func WithEndpoint

func WithEndpoint(endpoint string) Option

Jump to

Keyboard shortcuts

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