Rename root, api and sdk module paths (imports, go.mod, go_package, ldflags, build scripts, buf configs) and regenerate protobuf/gateway code with the project's pinned toolchain. Wire identifiers unchanged. api gets a local replace for sdk; root/api/sdk require v0.1.0. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
98 lines
2.6 KiB
Go
98 lines
2.6 KiB
Go
// Copyright IBM Corp. 2020, 2026
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"repo.anhonesthost.net/CyberCoveLLC/threshold/internal/clientcache/cmd/cache"
|
|
"repo.anhonesthost.net/CyberCoveLLC/threshold/internal/clientcache/cmd/search"
|
|
"repo.anhonesthost.net/CyberCoveLLC/threshold/internal/cmd/base"
|
|
"repo.anhonesthost.net/CyberCoveLLC/threshold/internal/cmd/wrapper"
|
|
"github.com/mitchellh/cli"
|
|
)
|
|
|
|
func init() {
|
|
extraCommandsFuncs = append(extraCommandsFuncs, func(ui, serverCmdUi cli.Ui, runOpts *RunOptions) {
|
|
Commands["cache"] = func() (cli.Command, error) {
|
|
return &cache.CacheCommand{
|
|
Command: base.NewCommand(ui),
|
|
}, nil
|
|
}
|
|
Commands["cache start"] = func() (cli.Command, error) {
|
|
return &cache.StartCommand{
|
|
Command: base.NewCommand(ui),
|
|
}, nil
|
|
}
|
|
Commands["cache stop"] = func() (cli.Command, error) {
|
|
return &cache.StopCommand{
|
|
Command: base.NewCommand(ui),
|
|
}, nil
|
|
}
|
|
Commands["cache add-token"] = func() (cli.Command, error) {
|
|
return &cache.AddTokenCommand{
|
|
Command: base.NewCommand(ui),
|
|
}, nil
|
|
}
|
|
Commands["cache status"] = func() (cli.Command, error) {
|
|
return &cache.StatusCommand{
|
|
Command: base.NewCommand(ui),
|
|
}, nil
|
|
}
|
|
// TODO(johanbrandhorst): remove after deprecation period
|
|
Commands["daemon"] = wrapper.WrapForDeprecation(
|
|
func() wrapper.WrappableCommand {
|
|
return &cache.CacheCommand{
|
|
Command: base.NewCommand(ui),
|
|
}
|
|
},
|
|
"daemon",
|
|
"cache",
|
|
)
|
|
// TODO(johanbrandhorst): remove after deprecation period
|
|
Commands["daemon start"] = wrapper.WrapForDeprecation(
|
|
func() wrapper.WrappableCommand {
|
|
return &cache.StartCommand{
|
|
Command: base.NewCommand(ui),
|
|
}
|
|
},
|
|
"daemon",
|
|
"cache",
|
|
)
|
|
// TODO(johanbrandhorst): remove after deprecation period
|
|
Commands["daemon stop"] = wrapper.WrapForDeprecation(
|
|
func() wrapper.WrappableCommand {
|
|
return &cache.StopCommand{
|
|
Command: base.NewCommand(ui),
|
|
}
|
|
},
|
|
"daemon",
|
|
"cache",
|
|
)
|
|
// TODO(johanbrandhorst): remove after deprecation period
|
|
Commands["daemon add-token"] = wrapper.WrapForDeprecation(
|
|
func() wrapper.WrappableCommand {
|
|
return &cache.AddTokenCommand{
|
|
Command: base.NewCommand(ui),
|
|
}
|
|
},
|
|
"daemon",
|
|
"cache",
|
|
)
|
|
// TODO(johanbrandhorst): remove after deprecation period
|
|
Commands["daemon status"] = wrapper.WrapForDeprecation(
|
|
func() wrapper.WrappableCommand {
|
|
return &cache.StatusCommand{
|
|
Command: base.NewCommand(ui),
|
|
}
|
|
},
|
|
"daemon",
|
|
"cache",
|
|
)
|
|
Commands["search"] = func() (cli.Command, error) {
|
|
return &search.SearchCommand{
|
|
Command: base.NewCommand(ui),
|
|
}, nil
|
|
}
|
|
})
|
|
}
|