mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-25 05:47:57 +02:00
Better naming, distingiush between "service" and "backend"
This commit is contained in:
parent
6e330daf06
commit
8b227cb514
5 changed files with 20 additions and 20 deletions
10
cmd/beam.go
10
cmd/beam.go
|
@ -28,10 +28,10 @@ import (
|
|||
// beamCmd represents the beam command
|
||||
var beamCmd = &cobra.Command{
|
||||
Use: "beam",
|
||||
Short: "Transfer data between two backends",
|
||||
Long: `Transfers data (listens, loves) between two configured backends.
|
||||
Short: "Transfer data between two services",
|
||||
Long: `Transfers data (listens, loves) between two configured services.
|
||||
|
||||
The backends must be configured and be able to handle export and import of
|
||||
The services must be configured and be able to handle export and import of
|
||||
the data.`,
|
||||
// Run: func(cmd *cobra.Command, args []string) { },
|
||||
}
|
||||
|
@ -43,9 +43,9 @@ func init() {
|
|||
|
||||
// Cobra supports Persistent Flags which will work for this command
|
||||
// and all subcommands, e.g.:
|
||||
beamCmd.PersistentFlags().StringP("from", "f", "", "Source backend configuration (required)")
|
||||
beamCmd.PersistentFlags().StringP("from", "f", "", "Source service configuration (required)")
|
||||
beamCmd.MarkPersistentFlagRequired("from")
|
||||
beamCmd.PersistentFlags().StringP("to", "t", "", "Target backend configuration (required)")
|
||||
beamCmd.PersistentFlags().StringP("to", "t", "", "Target service configuration (required)")
|
||||
beamCmd.MarkPersistentFlagRequired("to")
|
||||
beamCmd.PersistentFlags().Int64P("timestamp", "s", 0, "Only import data newer then given Unix timestamp")
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ import (
|
|||
// listensCmd represents the listens command
|
||||
var listensCmd = &cobra.Command{
|
||||
Use: "listens",
|
||||
Short: "Transfer listens between two backends",
|
||||
Long: `Transfers listens between two configured backends.`,
|
||||
Short: "Transfer listens between two services",
|
||||
Long: `Transfers listens between two configured services.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
sourceName, sourceConfig := getConfigFromFlag(cmd, "from")
|
||||
targetName, targetConfig := getConfigFromFlag(cmd, "to")
|
||||
|
|
|
@ -36,8 +36,8 @@ import (
|
|||
// lovesCmd represents the loves command
|
||||
var lovesCmd = &cobra.Command{
|
||||
Use: "loves",
|
||||
Short: "Transfer loves between two backends",
|
||||
Long: `Transfers loves between two configured backends.`,
|
||||
Short: "Transfer loves between two services",
|
||||
Long: `Transfers loves between two configured services.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
sourceName, sourceConfig := getConfigFromFlag(cmd, "from")
|
||||
targetName, targetConfig := getConfigFromFlag(cmd, "to")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue