storage

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName = "storage"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadFileRequest

type DownloadFileRequest struct {
	BucketName string
	FileID     string

	*session.Session
	// 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(*UploadFileRequest) error
	Download(*DownloadFileRequest) error
}

Service 存储服务

type UploadFileRequest

type UploadFileRequest struct {
	BucketName string
	FileName   string

	*session.Session
	// 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