This repository has been archived by the owner on Jul 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update packages, support @pocketbase and @surrealdb databases
- Loading branch information
Showing
20 changed files
with
340 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/abdfnx/botway/tools" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func PocketBaseCMD() *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "pocketbase", | ||
Short: "Manage your work with PocketBase", | ||
Aliases: []string{"pb"}, | ||
} | ||
|
||
cmd.AddCommand(PocketBaseInitCMD()) | ||
|
||
return cmd | ||
} | ||
|
||
func PocketBaseInitCMD() *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "init", | ||
Short: "Initialize pocketbase in your docker compose config file", | ||
PreRun: func(cmd *cobra.Command, args []string) { tools.CheckDir() }, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
tools.InitInDockerCompose("pocketbase") | ||
}, | ||
} | ||
|
||
return cmd | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/abdfnx/botway/tools" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func SurrealCMD() *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "surrealdb", | ||
Short: "Manage your work with PocketBase", | ||
Aliases: []string{"surreal", "sdb"}, | ||
} | ||
|
||
cmd.AddCommand(SurrealInitCMD()) | ||
|
||
return cmd | ||
} | ||
|
||
func SurrealInitCMD() *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "init", | ||
Short: "Initialize surrealdb in your docker compose config file", | ||
PreRun: func(cmd *cobra.Command, args []string) { tools.CheckDir() }, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
tools.InitInDockerCompose("surrealdb") | ||
}, | ||
} | ||
|
||
return cmd | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
mybot: | ||
build: . | ||
env_file: | ||
- ./config/botway-tokens.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.