s3

package
v1.74.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 35 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package s3 implements an s3 server for rclone

Package s3 implements a fake s3 server for rclone

Package s3 implements a fake s3 server for rclone

Index

Constants

This section is empty.

Variables

View Source
var Command = &cobra.Command{
	Annotations: map[string]string{
		"versionIntroduced": "v1.65",
		"groups":            "Filter",
		"status":            "Experimental",
	},
	Use:   "s3 remote:path",
	Short: `Serve remote:path over s3.`,
	Long:  help() + strings.TrimSpace(httplib.AuthHelp(flagPrefix)+httplib.Help(flagPrefix)+vfs.Help()),
	RunE: func(command *cobra.Command, args []string) error {
		var f fs.Fs
		if proxy.Opt.AuthProxy == "" {
			cmd.CheckArgs(1, 1, command, args)
			f = cmd.NewFsSrc(args)
		} else {
			cmd.CheckArgs(0, 0, command, args)
		}

		cmd.Run(false, false, command, func() error {
			s, err := newServer(context.Background(), f, &Opt, &vfscommon.Opt, &proxy.Opt)
			if err != nil {
				return err
			}
			return s.Serve()
		})
		return nil
	},
}

Command definition for cobra

View Source
var OptionsInfo = fs.Options{{
	Name:    "force_path_style",
	Default: true,
	Help:    "If true use path style access if false use virtual hosted style",
}, {
	Name:    "etag_hash",
	Default: "MD5",
	Help:    "Which hash to use for the ETag, or auto or blank for off",
}, {
	Name:    "auth_key",
	Default: []string{},
	Help:    "Set key pair for v4 authorization: access_key_id,secret_access_key",
}, {
	Name:    "no_cleanup",
	Default: false,
	Help:    "Not to cleanup empty folder after object is deleted",
}}.
	Add(httplib.ConfigInfo).
	Add(httplib.AuthConfigInfo)

OptionsInfo describes the Options in use

Functions

This section is empty.

Types

type Options

type Options struct {
	//TODO add more options
	ForcePathStyle bool     `config:"force_path_style"`
	EtagHash       string   `config:"etag_hash"`
	AuthKey        []string `config:"auth_key"`
	NoCleanup      bool     `config:"no_cleanup"`
	Auth           httplib.AuthConfig
	HTTP           httplib.Config
}

Options contains options for the s3 Server

var Opt Options

Opt is options set by command line flags

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is a s3.FileSystem interface

func (*Server) Addr

func (w *Server) Addr() net.Addr

Addr returns the first address of the server

func (*Server) Bind

func (w *Server) Bind(router chi.Router)

Bind register the handler to http.Router

func (*Server) Serve

func (w *Server) Serve() error

Serve serves the s3 server until the server is shutdown

func (*Server) Shutdown

func (w *Server) Shutdown() error

Shutdown the server

Jump to

Keyboard shortcuts

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