You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.8 KiB
66 lines
1.8 KiB
9 years ago
|
/*
|
||
9 years ago
|
* Minio Cloud Storage, (C) 2015, 2016 Minio, Inc.
|
||
9 years ago
|
*
|
||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
* you may not use this file except in compliance with the License.
|
||
|
* You may obtain a copy of the License at
|
||
|
*
|
||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||
|
*
|
||
|
* Unless required by applicable law or agreed to in writing, software
|
||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
* See the License for the specific language governing permissions and
|
||
|
* limitations under the License.
|
||
|
*/
|
||
|
|
||
8 years ago
|
package cmd
|
||
9 years ago
|
|
||
9 years ago
|
import (
|
||
|
"github.com/fatih/color"
|
||
|
"github.com/minio/minio/pkg/objcache"
|
||
|
)
|
||
9 years ago
|
|
||
9 years ago
|
// Global constants for Minio.
|
||
|
const (
|
||
9 years ago
|
minGoVersion = ">= 1.6" // Minio requires at least Go v1.6
|
||
9 years ago
|
)
|
||
9 years ago
|
|
||
|
// minio configuration related constants.
|
||
|
const (
|
||
8 years ago
|
globalMinioConfigVersion = "6"
|
||
9 years ago
|
globalMinioConfigDir = ".minio"
|
||
9 years ago
|
globalMinioCertsDir = "certs"
|
||
9 years ago
|
globalMinioCertFile = "public.crt"
|
||
|
globalMinioKeyFile = "private.key"
|
||
|
globalMinioConfigFile = "config.json"
|
||
9 years ago
|
// Add new global values here.
|
||
9 years ago
|
)
|
||
|
|
||
9 years ago
|
var (
|
||
|
globalQuiet = false // Quiet flag set via command line
|
||
9 years ago
|
globalTrace = false // Trace flag set via environment setting.
|
||
9 years ago
|
// Add new global flags here.
|
||
9 years ago
|
|
||
|
// Maximum connections handled per
|
||
|
// server, defaults to 0 (unlimited).
|
||
|
globalMaxConn = 0
|
||
9 years ago
|
// Maximum cache size.
|
||
|
globalMaxCacheSize = uint64(maxCacheSize)
|
||
9 years ago
|
// Cache expiry.
|
||
|
globalCacheExpiry = objcache.DefaultExpiry
|
||
9 years ago
|
// Add new variable global values here.
|
||
9 years ago
|
)
|
||
|
|
||
8 years ago
|
var (
|
||
|
// Limit fields size (except file) to 1Mib since Policy document
|
||
|
// can reach that size according to https://aws.amazon.com/articles/1434
|
||
|
maxFormFieldSize = int64(1024 * 1024)
|
||
|
)
|
||
|
|
||
9 years ago
|
// global colors.
|
||
|
var (
|
||
8 years ago
|
colorBlue = color.New(color.FgBlue).SprintfFunc()
|
||
|
colorBold = color.New(color.Bold).SprintFunc()
|
||
9 years ago
|
)
|