web: Removing dependency for gpg and downloading assets.

Assets are vendorized from now on and updated for each release.
This commit is contained in:
Harshavardhana
2016-02-23 13:05:47 -08:00
parent 997141d031
commit 2181003609
11 changed files with 945 additions and 41 deletions

View File

@@ -20,6 +20,7 @@ import (
"net"
"net/http"
"github.com/elazarl/go-bindata-assetfs"
router "github.com/gorilla/mux"
jsonrpc "github.com/gorilla/rpc/v2"
"github.com/gorilla/rpc/v2/json2"
@@ -27,6 +28,7 @@ import (
"github.com/minio/minio/pkg/fs"
"github.com/minio/minio/pkg/probe"
"github.com/minio/minio/pkg/s3/signature4"
"github.com/minio/miniobrowser"
)
// storageAPI container for S3 compatible API.
@@ -67,6 +69,17 @@ func (h indexHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
h.handler.ServeHTTP(w, r)
}
const assetPrefix = "production"
func assetFS() *assetfs.AssetFS {
return &assetfs.AssetFS{
Asset: miniobrowser.Asset,
AssetDir: miniobrowser.AssetDir,
AssetInfo: miniobrowser.AssetInfo,
Prefix: assetPrefix,
}
}
// registerAPIHandlers - register all the handlers to their respective paths
func registerAPIHandlers(mux *router.Router, a storageAPI, w *webAPI) {
// Minio rpc router