mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 04:54:18 +02:00
enhanced default cluster selection, add 'cluster switch', overhaul json header setting (#47)
This commit is contained in:
@@ -28,7 +28,7 @@ import (
|
||||
)
|
||||
|
||||
func RoleNames(conf *cfg.Config) ([]string, error) {
|
||||
res, err := conf.DefaultCluster.ES.Security.GetRole().
|
||||
res, err := conf.DefaultCluster.ES().Security.GetRole().
|
||||
Do(context.Background())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get roles: %s", esErrorString(err))
|
||||
@@ -45,7 +45,7 @@ func RoleNames(conf *cfg.Config) ([]string, error) {
|
||||
}
|
||||
|
||||
func RoleList(conf *cfg.Config) error {
|
||||
res, err := conf.DefaultCluster.ES.Security.GetRole().
|
||||
res, err := conf.DefaultCluster.ES().Security.GetRole().
|
||||
Do(context.Background())
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get roles: %s", esErrorString(err))
|
||||
@@ -71,7 +71,7 @@ func RoleList(conf *cfg.Config) error {
|
||||
}
|
||||
|
||||
func RoleShow(conf *cfg.Config, rolename string) error {
|
||||
res, err := conf.DefaultCluster.ES.Security.GetRole().
|
||||
res, err := conf.DefaultCluster.ES().Security.GetRole().
|
||||
Name(rolename).
|
||||
Do(context.Background())
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user