package
1.8.0
Repository: https://github.com/casdoor/oss.git
Documentation: pkg.go.dev

# README

Google Cloud

Google Cloud backend for QOR OSS

Usage

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

func main() {
  storage := googlecloud.New(&qiniu.Config{
    AccessID:  "access_id",
    AccessKey: "access_key",
    Bucket:    "bucket",
    Endpoint:  "https://console.cloud.google.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

New initializes Google Cloud Storage.

# Structs

Client Google Cloud Storage.
Config Google Cloud Storage client config.