oss

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

阿里云 oss 的相关处理包,kv在代码里存了,安全性有问题 需要增加定时删除的 定时任务

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIAddFileAction

func APIAddFileAction(c *gin.Context)

APIAddFileAction 添加文件 @since 0.0.3

func APIFindFileAction

func APIFindFileAction(c *gin.Context)

APIFindFileAction 获取应用下所有文件数据 @since 0.0.3

func PutObjectFromFile

func PutObjectFromFile(filename string, filepath string) error

PutObjectFromFile 上传文件到oss @since 0.0.3

func Register

func Register()

Register 注册路由和配置信息

Types

type File

type File struct {
	Key              string
	Class            string
	Type             string
	LastModifiedTime string
}

File 文件结构体

type FileData

type FileData struct {
	Folders []string
	Files   []File
}

FileData 文件树数据结构体

func FindFile

func FindFile(p string, marker string, count uint64) (*FileData, error)

FindFile 获取文件列表

type FormAPIFindFileAction

type FormAPIFindFileAction struct {
	Path   string `form:"path"`
	Marker string `form:"marker"`
	Count  uint64 `form:"count"`
}

http://127.0.0.1:9001/api/file_data?path=xiao&count=49 FormAPIFindFileAction Form @since 0.0.3

Jump to

Keyboard shortcuts

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