Don't use dot imports
This commit is contained in:
parent
0619958fa3
commit
fc281c83b3
3 changed files with 14 additions and 13 deletions
4
Gopkg.lock
generated
4
Gopkg.lock
generated
|
@ -71,13 +71,13 @@
|
|||
branch = "master"
|
||||
name = "golang.org/x/crypto"
|
||||
packages = ["ssh/terminal"]
|
||||
revision = "eb71ad9bd329b5ac0fd0148dd99bd62e8be8e035"
|
||||
revision = "81e90905daefcd6fd217b62423c0908922eadb30"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/sys"
|
||||
packages = ["unix","windows"]
|
||||
revision = "07c182904dbd53199946ba614a412c61d3c548f5"
|
||||
revision = "2d6f6f883a06fc0d5f4b14a81e4c28705ea64c15"
|
||||
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# S3 Manager
|
||||
|
||||
[![Build Status](https://travis-ci.org/mastertinner/s3manager.svg?branch=master)](https://travis-ci.org/mastertinner/s3manager)
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/mastertinner/s3manager)](https://goreportcard.com/report/github.com/mastertinner/s3manager)
|
||||
|
||||
A Web GUI written in Go to manage S3 buckets from any provider.
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/gorilla/mux"
|
||||
"github.com/mastertinner/adapters"
|
||||
"github.com/mastertinner/adapters/logging"
|
||||
. "github.com/mastertinner/s3manager"
|
||||
"github.com/mastertinner/s3manager"
|
||||
minio "github.com/minio/minio-go"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
@ -57,58 +57,58 @@ func main() {
|
|||
Methods(http.MethodGet).
|
||||
Path("/buckets").
|
||||
Handler(adapters.Adapt(
|
||||
BucketsViewHandler(s3),
|
||||
s3manager.BucketsViewHandler(s3),
|
||||
logging.Handler(logger),
|
||||
))
|
||||
r.
|
||||
Methods(http.MethodGet).
|
||||
Path("/buckets/{bucketName}").
|
||||
Handler(adapters.Adapt(
|
||||
BucketViewHandler(s3),
|
||||
s3manager.BucketViewHandler(s3),
|
||||
logging.Handler(logger),
|
||||
))
|
||||
r.
|
||||
Methods(http.MethodPost).
|
||||
Path("/api/buckets").
|
||||
Handler(adapters.Adapt(
|
||||
CreateBucketHandler(s3),
|
||||
s3manager.CreateBucketHandler(s3),
|
||||
logging.Handler(logger),
|
||||
))
|
||||
r.
|
||||
Methods(http.MethodDelete).
|
||||
Path("/api/buckets/{bucketName}").
|
||||
Handler(adapters.Adapt(
|
||||
DeleteBucketHandler(s3),
|
||||
s3manager.DeleteBucketHandler(s3),
|
||||
logging.Handler(logger),
|
||||
))
|
||||
r.
|
||||
Methods(http.MethodPost).
|
||||
Headers(HeaderContentType, ContentTypeJSON).
|
||||
Headers(s3manager.HeaderContentType, s3manager.ContentTypeJSON).
|
||||
Path("/api/buckets/{bucketName}/objects").
|
||||
Handler(adapters.Adapt(
|
||||
CopyObjectHandler(s3),
|
||||
s3manager.CopyObjectHandler(s3),
|
||||
logging.Handler(logger),
|
||||
))
|
||||
r.
|
||||
Methods(http.MethodPost).
|
||||
HeadersRegexp(HeaderContentType, ContentTypeMultipartForm).
|
||||
HeadersRegexp(s3manager.HeaderContentType, s3manager.ContentTypeMultipartForm).
|
||||
Path("/api/buckets/{bucketName}/objects").
|
||||
Handler(adapters.Adapt(
|
||||
CreateObjectHandler(s3),
|
||||
s3manager.CreateObjectHandler(s3),
|
||||
logging.Handler(logger),
|
||||
))
|
||||
r.
|
||||
Methods(http.MethodGet).
|
||||
Path("/api/buckets/{bucketName}/objects/{objectName}").
|
||||
Handler(adapters.Adapt(
|
||||
GetObjectHandler(s3),
|
||||
s3manager.GetObjectHandler(s3),
|
||||
logging.Handler(logger),
|
||||
))
|
||||
r.
|
||||
Methods(http.MethodDelete).
|
||||
Path("/api/buckets/{bucketName}/objects/{objectName}").
|
||||
Handler(adapters.Adapt(
|
||||
DeleteObjectHandler(s3),
|
||||
s3manager.DeleteObjectHandler(s3),
|
||||
logging.Handler(logger),
|
||||
))
|
||||
|
||||
|
|
Loading…
Reference in a new issue