Files
threshold/internal/cmd/search_cmd_freebsd.go
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

99 lines
2.6 KiB
Go
Raw Normal View History

// Copyright IBM Corp. 2020, 2026
2023-06-11 20:40:47 -04:00
// SPDX-License-Identifier: BUSL-1.1
//go:build amd64 || arm64
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"
2023-06-11 20:40:47 -04:00
"github.com/mitchellh/cli"
)
func init() {
extraCommandsFuncs = append(extraCommandsFuncs, func(ui, serverCmdUi cli.Ui, runOpts *RunOptions) {
2024-05-22 11:11:48 -07:00
Commands["cache"] = func() (cli.Command, error) {
return &cache.CacheCommand{
Command: base.NewCommand(ui),
}, nil
}
2024-05-22 11:11:48 -07:00
Commands["cache start"] = func() (cli.Command, error) {
return &cache.StartCommand{
2023-06-11 20:40:47 -04:00
Command: base.NewCommand(ui),
}, nil
}
2024-05-22 11:11:48 -07:00
Commands["cache stop"] = func() (cli.Command, error) {
return &cache.StopCommand{
2023-06-11 20:40:47 -04:00
Command: base.NewCommand(ui),
}, nil
}
2024-05-22 11:11:48 -07:00
Commands["cache add-token"] = func() (cli.Command, error) {
return &cache.AddTokenCommand{
2023-06-11 20:40:47 -04:00
Command: base.NewCommand(ui),
}, nil
}
2024-05-22 11:11:48 -07:00
Commands["cache status"] = func() (cli.Command, error) {
return &cache.StatusCommand{
Command: base.NewCommand(ui),
}, nil
}
2024-05-22 11:11:48 -07:00
// 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",
)
2023-06-11 20:40:47 -04:00
Commands["search"] = func() (cli.Command, error) {
return &search.SearchCommand{
Command: base.NewCommand(ui),
}, nil
}
})
}