caddyfss3

package module
v0.0.0-...-de90fca Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2023 License: MIT Imports: 9 Imported by: 0

README

Caddy FS module for AWS S3

GitHub Workflow Status

Installation

Build Caddy using xcaddy:

xcaddy --with github.com/sagikazarmark/caddy-fs-s3

Usage

example.com

file_server {
	fs s3 {
		bucket mybucket
		region us-east-1

		# endpoint <endpoint>
		# profile <profile>
		# force_path_style
	}
}

Development

Run Caddy with the following command:

task run

When all coding and testing is done, please run the test suite:

task check

For the best developer experience, install Nix and direnv.

Alternatively, install Go, xcaddy and the rest of the dependencies manually or using a package manager.

License

The project is licensed under the MIT License.

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 name of the S3 bucket.
	Bucket string `json:"bucket,omitempty"`

	// The AWS region the bucket is hosted in.
	Region string `json:"region,omitempty"`

	// The AWS profile to use if mulitple profiles are specified.
	Profile string `json:"profile,omitempty"`

	// Use non-standard endpoint for S3.
	Endpoint string `json:"endpoint,omitempty"`

	// Set this to `true` to force the request to use path-style addressing.
	S3ForcePathStyle bool `json:"force_path_style,omitempty"`
	// contains filtered or unexported fields
}

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