func (S3Proxy) CaddyModule() caddy.ModuleInfo {
	return caddy.ModuleInfo{
		ID:  "http.handlers.s3proxy",
		New: func() caddy.Module { return new(S3Proxy) },
	}
}
CaddyModule returns the Caddy module information.
package caddys3proxy
import (
	"bytes"
	"errors"
	"fmt"
	"html/template"
	"io"
	"io/ioutil"
	"net/http"
	"path"
	"path/filepath"
	"reflect"
	"strings"
	"time"
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/s3"
	"github.com/caddyserver/caddy/v2"
	"github.com/caddyserver/caddy/v2/modules/caddyhttp"
	"go.uber.org/zap"
)
var defaultIndexNames = []string{"index.html", "index.txt"}
func init() {
	caddy.RegisterModule(S3Proxy{})
}
type S3Proxy struct {
	Root string `json:"root,omitempty"`
	Region string `json:"region,omitempty"`
	Profile string `json:"profile,omitempty"`
	Bucket string `json:"bucket,omitempty"`
	Endpoint string `json:"endpoint,omitempty"`
	IndexNames []string `json:"index_names,omitempty"`
	Hide []string
	EnablePut bool
	EnableDelete bool
	EnableBrowse bool
	BrowseTemplate string
	ErrorPages map[int]string `json:"error_pages,omitempty"`
	DefaultErrorPage string `json:"default_error_page,omitempty"`
	S3ForcePathStyle bool `json:"force_path_style,omitempty"`
	S3UseAccelerate bool `json:"use_accelerate,omitempty"`
	client      *s3.S3
	dirTemplate *template.Template
	log         *zap.Logger
}