caddyfss3

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: MIT Imports: 6 Imported by: 0

README

Caddy FS module for S3

stolen from sagikazarmark/caddy-fs-s3

use dsn to specify the s3 bucket, refer to s3_dsn

xcaddy build --with github.com/geektheripper/caddy-fs-s3

Usage

{
	filesystem bucket1 s3 {
        dsn = "s3://minioadmin:minioadmin@localhost:9000/bucket1?force-path-style=true&protocol=http"
	}
	filesystem bucket2 s3 {
        dsn = "$(S3_BUCKET_DSN)"
	}
}

example.com {
    file_server {
        fs bucket1
    }
}
fxample.com {
    file_server {
        fs bucket2
    }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS struct {
	fs.StatFS `json:"-"`

	// The dsn of the S3 bucket. if set, the bucket and region will be ignored.
	DSN string `json:"dsn,omitempty"`
}

FS is a Caddy virtual filesystem module for AWS S3 (and compatible) object store.

func (FS) CaddyModule

func (FS) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*FS) Provision

func (fs *FS) Provision(ctx caddy.Context) error

func (*FS) UnmarshalCaddyfile

func (fs *FS) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile unmarshals a caddyfile.

Jump to

Keyboard shortcuts

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