Rename to uncensored-send
This commit is contained in:
@@ -12,19 +12,19 @@ import (
|
||||
"text/tabwriter"
|
||||
"time"
|
||||
|
||||
"send/internal/auth"
|
||||
"send/internal/config"
|
||||
"uncensored-send/internal/auth"
|
||||
"uncensored-send/internal/config"
|
||||
)
|
||||
|
||||
const tokenUsage = `send token - manage upload credentials
|
||||
const tokenUsage = `uncensored-send token - manage upload credentials
|
||||
|
||||
Usage:
|
||||
send token add <name> [options] generate a token
|
||||
send token add <name> --token - read a chosen one from stdin
|
||||
send token rotate <name> [--token -] replace the secret, keep everything else
|
||||
send token set <name> [options] change limits and flags in place
|
||||
send token list [options]
|
||||
send token rm <name> [options]
|
||||
uncensored-send token add <name> [options] generate a token
|
||||
uncensored-send token add <name> --token - read a chosen one from stdin
|
||||
uncensored-send token rotate <name> [--token -] replace the secret, keep everything else
|
||||
uncensored-send token set <name> [options] change limits and flags in place
|
||||
uncensored-send token list [options]
|
||||
uncensored-send token rm <name> [options]
|
||||
|
||||
A token grants its own size and lifetime limits. Any limit left unset is
|
||||
inherited from the running server's defaults, so a token with no options
|
||||
@@ -136,7 +136,7 @@ type tokenOptions struct {
|
||||
}
|
||||
|
||||
func (o *tokenOptions) register() *config.Set {
|
||||
fs := config.NewSet("send token", config.EnvPrefix)
|
||||
fs := config.NewSet("uncensored-send token", config.EnvPrefix)
|
||||
fs.String(&o.dataDir, "data", "d", "./data", "DIR", "directory holding the data")
|
||||
fs.String(&o.tokensPath, "tokens", "", "", "FILE", "token file location (default <data>/tokens.json)")
|
||||
fs.String(&o.maxSize, "max-size", "s", "", "SIZE", "per-upload cap for this token; 'unlimited' to remove it")
|
||||
@@ -296,7 +296,7 @@ func tokenSet(file *auth.File, name string, opts tokenOptions, fs *config.Set) e
|
||||
changes = append(changes, fmt.Sprintf("--%s=%t", f.flag, f.value))
|
||||
}
|
||||
if fs.Changed("token") {
|
||||
return errors.New("use \"send token rotate\" to change the secret")
|
||||
return errors.New("use \"uncensored-send token rotate\" to change the secret")
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user