@@ -26,7 +26,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminQuotaFlags = []cli.Flag{
|
||||
|
||||
@@ -30,7 +30,7 @@ import (
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio-go/v7/pkg/s3utils"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminBucketRemoteAddFlags = []cli.Flag{
|
||||
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminBandwidthInfoCmdFlags = []cli.Flag{
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio-go/v7/pkg/s3utils"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminBucketRemoteEditFlags = []cli.Flag{
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminBucketRemoteListFlags = []cli.Flag{
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminBucketRemoteRmFlags = []cli.Flag{
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var historyListFlags = []cli.Flag{
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminConfigImportCmd = cli.Command{
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminConfigEnvFlags = []cli.Flag{
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminConfigRestoreCmd = cli.Command{
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminConfigSetCmd = cli.Command{
|
||||
|
||||
@@ -28,7 +28,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
const logTimeFormat string = "15:04:05 MST 01/02/2006"
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminGroupAddCmd = cli.Command{
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminGroupEnableCmd = cli.Command{
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminGroupInfoCmd = cli.Command{
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminGroupListCmd = cli.Command{
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminGroupRemoveCmd = cli.Command{
|
||||
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminInfoCmd = cli.Command{
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminKMSKeyStatusCmd = cli.Command{
|
||||
|
||||
+7
-16
@@ -18,7 +18,6 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
|
||||
@@ -26,8 +25,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
iampolicy "github.com/minio/minio/pkg/iam/policy"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminPolicyAddCmd = cli.Command{
|
||||
@@ -68,11 +66,11 @@ func checkAdminPolicyAddSyntax(ctx *cli.Context) {
|
||||
// userPolicyMessage container for content message structure
|
||||
type userPolicyMessage struct {
|
||||
op string
|
||||
Status string `json:"status"`
|
||||
Policy string `json:"policy,omitempty"`
|
||||
PolicyJSON []byte `json:"policyJSON,omitempty"`
|
||||
UserOrGroup string `json:"userOrGroup,omitempty"`
|
||||
IsGroup bool `json:"isGroup"`
|
||||
Status string `json:"status"`
|
||||
Policy string `json:"policy,omitempty"`
|
||||
PolicyJSON json.RawMessage `json:"policyJSON,omitempty"`
|
||||
UserOrGroup string `json:"userOrGroup,omitempty"`
|
||||
IsGroup bool `json:"isGroup"`
|
||||
}
|
||||
|
||||
func (u userPolicyMessage) accountType() string {
|
||||
@@ -89,11 +87,7 @@ func (u userPolicyMessage) accountType() string {
|
||||
func (u userPolicyMessage) String() string {
|
||||
switch u.op {
|
||||
case "info":
|
||||
policy, e := iampolicy.ParseConfig(bytes.NewReader(u.PolicyJSON))
|
||||
fatalIf(probe.NewError(e), "Unable to parse policy")
|
||||
buf, e := json.MarshalIndent(policy, "", " ")
|
||||
fatalIf(probe.NewError(e), "Unable to parse policy")
|
||||
return string(buf)
|
||||
return string(u.PolicyJSON)
|
||||
case "list":
|
||||
policyFieldMaxLen := 20
|
||||
// Create a new pretty table with cols configuration
|
||||
@@ -140,9 +134,6 @@ func mainAdminPolicyAdd(ctx *cli.Context) error {
|
||||
client, err := newAdminClient(aliasedURL)
|
||||
fatalIf(err, "Unable to initialize admin connection.")
|
||||
|
||||
_, e = iampolicy.ParseConfig(bytes.NewReader(policy))
|
||||
fatalIf(probe.NewError(e).Trace(args...), "Unable to parse the input policy")
|
||||
|
||||
fatalIf(probe.NewError(client.AddCannedPolicy(globalContext, args.Get(1), []byte(policy))).Trace(args...), "Unable to add new policy")
|
||||
|
||||
printMsg(userPolicyMessage{
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminPolicyInfoCmd = cli.Command{
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminPolicyListCmd = cli.Command{
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminPolicyRemoveCmd = cli.Command{
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminPolicySetCmd = cli.Command{
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminPolicyUnsetCmd = cli.Command{
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminPolicyUpdateCmd = cli.Command{
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio-go/v7/pkg/set"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminProfileStartFlags = []cli.Flag{
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminProfileStopCmd = cli.Command{
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
|
||||
jwtgo "github.com/dgrijalva/jwt-go"
|
||||
json "github.com/minio/colorjson"
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminServiceRestartCmd = cli.Command{
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminServiceStopCmd = cli.Command{
|
||||
|
||||
@@ -40,7 +40,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
madmin "github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminTierAddFlags = []cli.Flag{
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
madmin "github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminTierEditFlags = []cli.Flag{
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
madmin "github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminTierListCmd = cli.Command{
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var topLocksFlag = []cli.Flag{
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminTraceFlags = []cli.Flag{
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminServerUpdateCmd = cli.Command{
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
)
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminUserDisableCmd = cli.Command{
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminUserEnableCmd = cli.Command{
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminUserInfoCmd = cli.Command{
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminUserListCmd = cli.Command{
|
||||
|
||||
@@ -18,16 +18,12 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/fatih/color"
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
iampolicy "github.com/minio/minio/pkg/iam/policy"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminUserPolicyCmd = cli.Command{
|
||||
@@ -77,23 +73,10 @@ func mainAdminUserPolicy(ctx *cli.Context) error {
|
||||
user, e := client.GetUserInfo(globalContext, args.Get(1))
|
||||
fatalIf(probe.NewError(e).Trace(args...), "Unable to get user info")
|
||||
|
||||
var combinedPolicy iampolicy.Policy
|
||||
buf, e := client.InfoCannedPolicy(globalContext, user.PolicyName)
|
||||
fatalIf(probe.NewError(e).Trace(args...), "Unable to fetch user policy document")
|
||||
|
||||
policies := strings.Split(user.PolicyName, ",")
|
||||
|
||||
for _, p := range policies {
|
||||
buf, e := client.InfoCannedPolicy(globalContext, p)
|
||||
fatalIf(probe.NewError(e).Trace(args...), "Unable to fetch user policy document")
|
||||
policy, e := iampolicy.ParseConfig(bytes.NewReader(buf))
|
||||
fatalIf(probe.NewError(e).Trace(args...), "Unable to parse user policy document")
|
||||
combinedPolicy = combinedPolicy.Merge(*policy)
|
||||
}
|
||||
|
||||
var jsoniter = jsoniter.ConfigCompatibleWithStandardLibrary
|
||||
policyJSON, e := jsoniter.MarshalIndent(combinedPolicy, "", " ")
|
||||
fatalIf(probe.NewError(e).Trace(args...), "Unable to parse user policy document")
|
||||
|
||||
fmt.Println(string(policyJSON))
|
||||
fmt.Println(string(buf))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminUserRemoveCmd = cli.Command{
|
||||
|
||||
@@ -18,17 +18,15 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
iampolicy "github.com/minio/minio/pkg/iam/policy"
|
||||
"github.com/minio/minio/pkg/ioutil"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var adminUserSvcAcctAddFlags = []cli.Flag{
|
||||
@@ -162,8 +160,6 @@ func mainAdminUserSvcAcctAdd(ctx *cli.Context) error {
|
||||
var e error
|
||||
buf, e = ioutil.ReadFile(policyPath)
|
||||
fatalIf(probe.NewError(e), "Unable to open the policy document.")
|
||||
_, e = iampolicy.ParseConfig(bytes.NewReader(buf))
|
||||
fatalIf(probe.NewError(e), "Unable to parse the policy document.")
|
||||
}
|
||||
|
||||
opts := madmin.AddServiceAccountReq{
|
||||
|
||||
@@ -18,13 +18,11 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/madmin-go"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
iampolicy "github.com/minio/minio/pkg/iam/policy"
|
||||
"github.com/minio/minio/pkg/ioutil"
|
||||
)
|
||||
|
||||
var adminUserSvcAcctSetFlags = []cli.Flag{
|
||||
@@ -89,8 +87,6 @@ func mainAdminUserSvcAcctSet(ctx *cli.Context) error {
|
||||
var e error
|
||||
buf, e = ioutil.ReadFile(policyPath)
|
||||
fatalIf(probe.NewError(e), "Unable to open the policy document.")
|
||||
_, e = iampolicy.ParseConfig(bytes.NewReader(buf))
|
||||
fatalIf(probe.NewError(e), "Unable to parse the policy document.")
|
||||
}
|
||||
|
||||
opts := madmin.UpdateServiceAccountReq{
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import (
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var aliasListCmd = cli.Command{
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
// Configure an alias in MinIO Client
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ package cmd
|
||||
import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var aliasRemoveCmd = cli.Command{
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio-go/v7"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/certs"
|
||||
"github.com/minio/pkg/certs"
|
||||
)
|
||||
|
||||
// getCertsDir - return the full path of certs dir
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ import (
|
||||
"github.com/minio/minio-go/v7/pkg/lifecycle"
|
||||
"github.com/minio/minio-go/v7/pkg/notification"
|
||||
"github.com/minio/minio-go/v7/pkg/replication"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
// filesystem client
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/minio/mc/pkg/httptracer"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
// traceV2 - tracing structure for signature version '2'.
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/minio/mc/pkg/httptracer"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
// traceV4 - tracing structure for signature version '4'.
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ import (
|
||||
|
||||
"github.com/minio/minio-go/v7/pkg/s3utils"
|
||||
"github.com/minio/minio-go/v7/pkg/tags"
|
||||
"github.com/minio/minio/pkg/mimedb"
|
||||
"github.com/minio/pkg/mimedb"
|
||||
)
|
||||
|
||||
// S3Client construct
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/mimedb"
|
||||
"github.com/minio/pkg/mimedb"
|
||||
)
|
||||
|
||||
// ClientURL url client url structure
|
||||
|
||||
+2
-2
@@ -25,8 +25,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/minio/pkg/quick"
|
||||
"github.com/minio/pkg/console"
|
||||
"github.com/minio/pkg/quick"
|
||||
)
|
||||
|
||||
func fixConfig() {
|
||||
|
||||
@@ -22,8 +22,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/minio/pkg/quick"
|
||||
"github.com/minio/pkg/console"
|
||||
"github.com/minio/pkg/quick"
|
||||
)
|
||||
|
||||
// migrate config files from the any older version to the latest.
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/quick"
|
||||
"github.com/minio/pkg/quick"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
// cp command flags.
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
func checkCopySyntax(ctx context.Context, cliCtx *cli.Context, encKeyDB map[string][]prefixSSEPair, isMvCmd bool) {
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
// diff specific flags.
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
// du specific flags.
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var encryptClearCmd = cli.Command{
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var encryptInfoCmd = cli.Command{
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var encryptSetCmd = cli.Command{
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
// causeMessage container for golang error messages
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
// List of all flags supported by find command.
|
||||
|
||||
+2
-2
@@ -31,10 +31,10 @@ import (
|
||||
|
||||
"github.com/dustin/go-humanize"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
|
||||
// golang does not support flat keys for path matching, find does
|
||||
"github.com/minio/minio/pkg/wildcard"
|
||||
"github.com/minio/pkg/wildcard"
|
||||
)
|
||||
|
||||
// findMessage holds JSON and string values for printing find command output.
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import (
|
||||
"crypto/x509"
|
||||
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import (
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio-go/v7"
|
||||
"github.com/minio/minio-go/v7/pkg/lifecycle"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var ilmAddCmd = cli.Command{
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import (
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
minio "github.com/minio/minio-go/v7"
|
||||
"github.com/minio/minio-go/v7/pkg/lifecycle"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var ilmEditCmd = cli.Command{
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio-go/v7/pkg/lifecycle"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var ilmImportCmd = cli.Command{
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import (
|
||||
"github.com/minio/mc/cmd/ilm"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio-go/v7/pkg/lifecycle"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var ilmListFlags = []cli.Flag{
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ package cmd
|
||||
import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var ilmSubcommands = []cli.Command{
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/cmd/ilm"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var ilmRemoveFlags = []cli.Flag{
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/minio-go/v7"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio-go/v7"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
minio "github.com/minio/minio-go/v7"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var legalHoldSubcommands = []cli.Command{
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/minio-go/v7"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
"maze.io/x/duration"
|
||||
)
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
humanize "github.com/dustin/go-humanize"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
// printDate - human friendly formatted date.
|
||||
|
||||
+3
-3
@@ -35,9 +35,9 @@ import (
|
||||
"github.com/cheggaaa/pb"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/minio/pkg/trie"
|
||||
"github.com/minio/minio/pkg/words"
|
||||
"github.com/minio/pkg/console"
|
||||
"github.com/minio/pkg/trie"
|
||||
"github.com/minio/pkg/words"
|
||||
"github.com/pkg/profile"
|
||||
|
||||
completeinstall "github.com/posener/complete/cmd/install"
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ import (
|
||||
"github.com/minio/minio-go/v7"
|
||||
"github.com/minio/minio-go/v7/pkg/encrypt"
|
||||
"github.com/minio/minio-go/v7/pkg/notification"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/minio/pkg/wildcard"
|
||||
"github.com/minio/pkg/wildcard"
|
||||
)
|
||||
|
||||
//
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
// mv command flags.
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -20,7 +20,7 @@ package cmd
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
// Row specifies row description and theme
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ package cmd
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
// Field configuration: color theme and max content length
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
// message interface for all structured messages implementing JSON(), String() methods.
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/cheggaaa/pb"
|
||||
"github.com/fatih/color"
|
||||
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
// progress extender.
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
json "github.com/minio/colorjson"
|
||||
"github.com/minio/mc/pkg/probe"
|
||||
"github.com/minio/minio/pkg/console"
|
||||
"github.com/minio/pkg/console"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user