GoWindGoWind
Home
Framework
GoWind Toolkit
  • Open Source

    • GoWind Admin (Admin Platform)
    • GoWind CMS (Content Management)
    • GoWind UBA (Behavior Analytics)
    • GoWind Shop (E-commerce)
    • GoWind Kanban (Kanban Boards)
    • GoWind Ledger (Personal Finance)
    • GoWind ShortPlay (Short Drama)
    • GoWind Ops (Operations Platform)
    • RushWind (Rust Ecosystem)
  • Open Core (Community + Enterprise)

    • GoWind OA (Office Collaboration)
    • GoWind ERP (Procure-to-Pay)
    • GoWind WMS (Warehousing)
  • Commercial

    • GoWind IM (Instant Messaging)
    • GoWind IoT (IoT Platform)
    • GoWind Edu (AI Education)
    • GoWind MES (Manufacturing Execution)
    • GoWind CDC (Data Pipeline)
    • GoWind SDP (Zero-Trust Gateway)
    • GoWind Quant (Quant Research)
    • GoWind Trade Radar (Export Sourcing)
    • GoWind Game Radar (Game Greenlight)
  • 简体中文
  • English
GitHub
Home
Framework
GoWind Toolkit
  • Open Source

    • GoWind Admin (Admin Platform)
    • GoWind CMS (Content Management)
    • GoWind UBA (Behavior Analytics)
    • GoWind Shop (E-commerce)
    • GoWind Kanban (Kanban Boards)
    • GoWind Ledger (Personal Finance)
    • GoWind ShortPlay (Short Drama)
    • GoWind Ops (Operations Platform)
    • RushWind (Rust Ecosystem)
  • Open Core (Community + Enterprise)

    • GoWind OA (Office Collaboration)
    • GoWind ERP (Procure-to-Pay)
    • GoWind WMS (Warehousing)
  • Commercial

    • GoWind IM (Instant Messaging)
    • GoWind IoT (IoT Platform)
    • GoWind Edu (AI Education)
    • GoWind MES (Manufacturing Execution)
    • GoWind CDC (Data Pipeline)
    • GoWind SDP (Zero-Trust Gateway)
    • GoWind Quant (Quant Research)
    • GoWind Trade Radar (Export Sourcing)
    • GoWind Game Radar (Game Greenlight)
  • 简体中文
  • English
GitHub
  • Introduction

    • GoWind Framework
    • Framework Architecture
  • go-wind Core

    • go-wind Core Framework
    • App Lifecycle Management
    • Context Propagation
    • Transport Abstraction
    • Log Facade Interface
  • go-wind-plugins

    • go-wind-plugins Plugin Overview
    • Plugin Configuration System
    • Plugin Registration Mechanism (SPI)
    • Logging Adapter Plugins
    • Transport Protocol Plugins
    • Message Middleware Plugins
    • Encoding Plugins
    • Security and Authentication Plugins
    • Distributed Tracing Plugins
    • Cache Plugins
    • Object Storage Plugins (OSS)
    • Rate Limiting Plugins
    • Metrics Plugins
    • AI Plugins
    • Workflow Plugins
    • Database and Cache Plugins
    • Bootstrap Integration and Gateway Plugins
    • Compression and Serialization Plugins
    • Template Rendering and Validation Plugins
  • go-wind-bootstrap

    • go-wind-bootstrap: The Declarative Bootstrap
    • The Bootstrap Configuration System
    • The Bootstrap SPI Mechanism
    • Declarative Middleware Orchestration
    • Bootstrap Command-Line Integration
    • Bootstrap Practical Examples
  • go-wind-flow Workflow Engine

    • GoWind Flow Process Engine
  • Tutorials

    • Quick Start Tutorial
    • Custom Plugin Development Tutorial
    • Multi-Protocol Listening Tutorial
    • Framework Migration Guide

Object Storage Plugins (OSS)

go-wind-plugins provides object storage adapters covering MinIO and AWS S3. The two implementations use incompatible underlying SDKs and return types, so each defines its own local Config without extracting a shared interface.

1. Plugin List

PluginImport PathFramework
MinIOplugins/oss/miniominio/minio-go (works with various S3-compatible stores)
S3plugins/oss/s3aws/aws-sdk-go-v2

2. MinIO

import "github.com/tx7do/go-wind-plugins/oss/minio"

storage := minio.NewStorage(&minio.Config{
    Endpoint:  "127.0.0.1:9000",
    AccessKey: "your-access-key",
    SecretKey: "your-secret-key",
    UseSsl:    false,
    // Region:         "us-east-1",   // required for signature v4 by some S3-compatible stores
    // ForcePathStyle: true,          // path-style addressing (needed by some S3 implementations)
})

Uploading Files

file, _ := os.Open("photo.jpg")
defer file.Close()

_, err := storage.PutObject(ctx, "photos", "2024/01/photo.jpg", file, "image/jpeg")

Downloading Files

obj, err := storage.GetObject(ctx, "photos", "2024/01/photo.jpg")
defer obj.Close()

io.Copy(os.Stdout, obj)

Using the Native SDK Directly

// For scenarios outside the Storage wrapper, grab the native client directly
mc := storage.SDK()
info, _ := mc.StatObject(ctx, "photos", "2024/01/photo.jpg", minio.StatObjectOptions{})

YAML Configuration

oss:
  minio:
    endpoint: "localhost:9000"
    access_key: "minioadmin"
    secret_key: "minioadmin"
    secure: false
    region: "us-east-1"

3. AWS S3

import "github.com/tx7do/go-wind-plugins/oss/s3"

storage := s3.NewStorage(&s3.Config{
    Region:    "us-east-1",
    AccessKey: "your-access-key",
    SecretKey: "your-secret-key",
    Bucket:    "my-bucket",
})

// The S3 version of PutObject is bound to the default bucket, so no bucket argument
_, err := storage.PutObject(ctx, "2024/01/photo.jpg", file, "image/jpeg")
_, err = storage.GetObject(ctx, "2024/01/photo.jpg")

YAML Configuration

oss:
  s3:
    region: "us-east-1"
    access_key_id: ${AWS_ACCESS_KEY_ID}
    secret_access_key: ${AWS_SECRET_ACCESS_KEY}
    session_token: ${AWS_SESSION_TOKEN}     # optional
    buckets:
      - name: my-bucket
        region: us-east-1

4. Selection Notes

ScenarioRecommendationNotes
Self-hosted object storage / on-prem deploymentMinIOminio-go works with various S3-compatible stores (MinIO, Ceph, SeaweedFS, etc.)
Storage on AWSS3aws-sdk-go-v2, default-bucket mode
Alibaba Cloud OSS / Tencent Cloud COSMinIO pluginBoth offer S3-compatible endpoints; connect with Endpoint + ForcePathStyle

Related Documents

  • Plugin Configuration System
  • Plugin Overview
Edit this page
Last Updated:: 11/3/26, 2:14 PM
Contributors: Bobo
Prev
Cache Plugins
Next
Rate Limiting Plugins