oss

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AppName = "oss"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadFileRequest

type DownloadFileRequest struct {
	BucketName string
	FileID     string
	// contains filtered or unexported fields
}

DownloadFileRequest 上传文件请求

func NewDownloadFileRequest

func NewDownloadFileRequest(bucketName, fileID string, writer io.Writer) *DownloadFileRequest

NewDownloadFileRequest todo

func (*DownloadFileRequest) Validate

func (req *DownloadFileRequest) Validate() error

Validate 输入参数校验

func (*DownloadFileRequest) Writer

func (req *DownloadFileRequest) Writer() io.Writer

Writer todo

type Service

type Service interface {
	UploadFile(context.Context, *UploadFileRequest) error
	Download(context.Context, *DownloadFileRequest) error
}

type UploadFileRequest

type UploadFileRequest struct {
	BucketName string
	FileName   string
	// contains filtered or unexported fields
}

UploadFileRequest 上传文件请求

func NewUploadFileRequest

func NewUploadFileRequest(bucketName, fileName string, file io.ReadCloser) *UploadFileRequest

NewUploadFileRequest todo

func NewUploadFileRequestFromHTTP

func NewUploadFileRequestFromHTTP(r *http.Request) *UploadFileRequest

NewUploadFileRequestFromHTTP todo

func (*UploadFileRequest) Meta

func (req *UploadFileRequest) Meta() map[string]string

Meta 文件meta

func (*UploadFileRequest) ReadCloser

func (req *UploadFileRequest) ReadCloser() io.ReadCloser

ReadCloser todo

func (*UploadFileRequest) Validate

func (req *UploadFileRequest) Validate() error

Validate 输入参数校验

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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