aboutsummaryrefslogtreecommitdiff
path: root/weed/command/scaffold.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2025-07-02 18:03:17 -0700
committerGitHub <noreply@github.com>2025-07-02 18:03:17 -0700
commit1db7c2b8aad59177f9ccb32f156908faf0c13eca (patch)
treeb1ea2df918591ab01822e3bd3ce08277825c47fb /weed/command/scaffold.go
parent6b706f9ccdf46046133c867c4240c4e8594da5b3 (diff)
downloadseaweedfs-1db7c2b8aad59177f9ccb32f156908faf0c13eca.tar.xz
seaweedfs-1db7c2b8aad59177f9ccb32f156908faf0c13eca.zip
Add credential storage (#6938)
* add credential store interface * load credential.toml * lint * create credentialManager with explicit store type * add type name * InitializeCredentialManager * remove unused functions * fix missing import * fix import * fix nil configuration
Diffstat (limited to 'weed/command/scaffold.go')
-rw-r--r--weed/command/scaffold.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/weed/command/scaffold.go b/weed/command/scaffold.go
index 5d1ccb13f..26de2e1fd 100644
--- a/weed/command/scaffold.go
+++ b/weed/command/scaffold.go
@@ -2,9 +2,10 @@ package command
import (
"fmt"
- "github.com/seaweedfs/seaweedfs/weed/util"
"path/filepath"
+ "github.com/seaweedfs/seaweedfs/weed/util"
+
"github.com/seaweedfs/seaweedfs/weed/command/scaffold"
)
@@ -13,9 +14,9 @@ func init() {
}
var cmdScaffold = &Command{
- UsageLine: "scaffold -config=[filer|notification|replication|security|master]",
+ UsageLine: "scaffold -config=[filer|notification|replication|security|master|shell|credential]",
Short: "generate basic configuration files",
- Long: `Generate filer.toml with all possible configurations for you to customize.
+ Long: `Generate configuration files with all possible configurations for you to customize.
The options can also be overwritten by environment variables.
For example, the filer.toml mysql password can be overwritten by environment variable
@@ -30,7 +31,7 @@ var cmdScaffold = &Command{
var (
outputPath = cmdScaffold.Flag.String("output", "", "if not empty, save the configuration file to this directory")
- config = cmdScaffold.Flag.String("config", "filer", "[filer|notification|replication|security|master] the configuration file to generate")
+ config = cmdScaffold.Flag.String("config", "filer", "[filer|notification|replication|security|master|shell|credential] the configuration file to generate")
)
func runScaffold(cmd *Command, args []string) bool {
@@ -49,6 +50,8 @@ func runScaffold(cmd *Command, args []string) bool {
content = scaffold.Master
case "shell":
content = scaffold.Shell
+ case "credential":
+ content = scaffold.Credential
}
if content == "" {
println("need a valid -config option")