package
0.0.0-20241126061828-4629f3a3524a
Repository: https://github.com/qor/oss.git
Documentation: pkg.go.dev

# README

Qiniu

Qiniu backend for QOR OSS

Usage

import "github.com/qor/oss/qiniu"

func main() {
  storage := qiniu.New(&qiniu.Config{
    AccessID:  "access_id",
    AccessKey: "access_key",
    Bucket:    "bucket",
    Region:    "huadong",
    Endpoint:  "https://up.qiniup.com",
  })

  // Save a reader interface into storage
  storage.Put("/sample.txt", reader)

  // Get file with path
  storage.Get("/sample.txt")

  // Get object as io.ReadCloser
  storage.GetStream("/sample.txt")

  // Delete file with path
  storage.Delete("/sample.txt")

  // List all objects under path
  storage.List("/")

  // Get Public Accessible URL (useful if current file saved privately)
  storage.GetURL("/sample.txt")
}

# Functions

No description provided by the author

# Structs

Client Qiniu storage.
Config Qiniu client config.