oss

package
v0.15.96 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cp

func Cp(f, t string) error

func Destroy

func Destroy()

func Exist

func Exist(obj string) (bool, error)

func Init

func Init(bucket string, storageID string, baseUrl string, timeoutSec time.Duration)

func Ls

func Ls(dir string) ([]string, error)

func Mv

func Mv(f, t string) error

func Rm

func Rm(objs ...string) error

func Touch

func Touch(reader io.Reader, to string) error

func Url

func Url(obj string) (string, error)

func ZoomUrl

func ZoomUrl(obj, s string) (string, error)

Types

type CheckObjectExistRequest

type CheckObjectExistRequest struct {
	StorageID string `form:"storageId" binding:"required"`
	Bucket    string `form:"bucket" binding:"required"`
	ObjPath   string `form:"objPath" binding:"required"`
}

type CheckObjectExistResponse

type CheckObjectExistResponse struct {
	Exist bool `json:"exist" binding:"required"`
	// contains filtered or unexported fields
}

type CreateBucketRequest

type CreateBucketRequest struct {
	StorageID string `json:"storageId" binding:"required"`
	Bucket    string `json:"bucket" binding:"required"`
}

type DeleteObjectsRequest

type DeleteObjectsRequest struct {
	StorageID string `json:"storageId" binding:"required"`
	Bucket    string `json:"bucket" binding:"required"`
	ObjPaths  string `json:"objPaths" binding:"required"`
}

type GetObjectUrlRequest

type GetObjectUrlRequest struct {
	StorageID string            `form:"storageId" binding:"required"`
	Bucket    string            `form:"bucket" binding:"required"`
	ObjPath   string            `form:"objPath" binding:"required"`
	Option    map[string]string `form:"option"`
}

type GetObjectUrlResponse

type GetObjectUrlResponse struct {
	Url string `json:"url" binding:"required"`
	// contains filtered or unexported fields
}

type LsObjectExistResponse

type LsObjectExistResponse struct {
	Objs []string `json:"objs" binding:"required"`
	// contains filtered or unexported fields
}

type LsObjectsExistRequest

type LsObjectsExistRequest struct {
	StorageID string `form:"storageId" binding:"required"`
	Bucket    string `form:"bucket" binding:"required"`
	Dir       string `form:"dir" binding:"required"`
}

type MoveOrCpObjectRequest

type MoveOrCpObjectRequest struct {
	StorageID string `json:"storageId" binding:"required"`
	Bucket    string `json:"bucket" binding:"required"`
	FromPath  string `json:"fromPath" binding:"required"`
	ToPath    string `json:"toPath" binding:"required"`
}

type PutObjectRequest

type PutObjectRequest struct {
	StorageID string `json:"storageId" binding:"required"`
	Object    []byte `json:"object" binding:"required"`
	Bucket    string `json:"bucket" binding:"required"`
	ObjPath   string `json:"objPath" binding:"required"`
}

Jump to

Keyboard shortcuts

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