s3

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Config

type S3Config struct {
	Endpoint        string `mapstructure:"endpoint"`
	Region          string `mapstructure:"region"`
	AccessKeyID     string `mapstructure:"access_key_id"`
	SecretAccessKey string `mapstructure:"secret_access_key"`
	BucketName      string `mapstructure:"bucket_name"`
	UsePathStyle    bool   `mapstructure:"use_path_style"`
	FileName        string `mapstructure:"file_name"`
}

S3Config 定义了 S3 配置

type S3Provider

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

S3Provider 实现了 Provider 接口,用于 S3 服务

func NewS3Provider

func NewS3Provider(cfg S3Config) (*S3Provider, error)

NewS3Provider 创建一个新的 S3Provider 实例

func (*S3Provider) Download

func (p *S3Provider) Download(w io.Writer) error

Download 从 S3 下载 ADIF 文件

func (*S3Provider) GetName added in v1.1.0

func (p *S3Provider) GetName() string

GetName 获取提供商的名称

func (*S3Provider) GetSize

func (p *S3Provider) GetSize() (int64, error)

GetSize 获取 S3 上 ADIF 文件的大小

func (*S3Provider) Upload

func (p *S3Provider) Upload(filename string, _ string) error

Upload 上传文件到 S3

Jump to

Keyboard shortcuts

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