-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
689f712
commit 53d1c95
Showing
10 changed files
with
123 additions
and
123 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
FROM golang:1.18 | ||
FROM golang:1.21 | ||
|
||
ARG JARVIS_BUILD_COMMIT="0000" | ||
ARG JARVIS_BUILD_VERSION="dev" | ||
|
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,54 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
func CloudCommandHandler(bot *BotExtended, command string, args string) string { | ||
// Extract the command from the Message. | ||
switch command { | ||
case "help": | ||
return clustersHelpCommand() | ||
case "status": | ||
return clusterStatusCommand() | ||
// case "invite": | ||
// return augustInviteCommand(args) | ||
default: | ||
return "Try Again." | ||
} | ||
} | ||
|
||
func clustersHelpCommand() string { | ||
return "Help Menu." | ||
} | ||
|
||
func clusterStatusCommand() string { | ||
versionInfo := fmt.Sprintf("[jarvis] %s, %s\n", version, commit) | ||
return versionInfo | ||
} | ||
|
||
// func augustInviteCommand(args string) string { | ||
// split := strings.Split(args, " ") | ||
// if len(split) > 2 { | ||
// return "Too many arguments. Usage: /invite <name> [count=1]" | ||
// } | ||
// name := split[0] | ||
// var count int64 = 1 | ||
// if len(split) == 2 { | ||
// providedCount, err := strconv.ParseInt(split[1], 10, 64) | ||
// if err != nil { | ||
// return "Invalid count. Must be integer" | ||
// } | ||
// count = providedCount | ||
// } | ||
|
||
// uuid, err := uuid.NewRandom() | ||
// if err != nil { | ||
// return "Failed to generate unique invite Id" | ||
// } | ||
// expiration := time.Now().Add(time.Hour * 32) | ||
|
||
// // TODO: Acually do it. Add cosmos for persistence, -or- sign the token. | ||
|
||
// return fmt.Sprintf("%s has been invited %d times until %s. Invite code: %s", name, count, expiration.Format(time.RFC822Z), uuid.String()) | ||
// } |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,43 +1,44 @@ | ||
module jarvis | ||
|
||
go 1.19 | ||
go 1.21 | ||
|
||
require ( | ||
github.com/gin-gonic/gin v1.9.1 | ||
github.com/google/uuid v1.4.0 | ||
github.com/google/uuid v1.5.0 | ||
github.com/joho/godotenv v1.5.1 | ||
github.com/warthog618/modem v0.4.0 | ||
) | ||
|
||
require ( | ||
github.com/bytedance/sonic v1.9.1 // indirect | ||
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect | ||
github.com/gabriel-vasile/mimetype v1.4.2 // indirect | ||
github.com/bytedance/sonic v1.10.2 // indirect | ||
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect | ||
github.com/chenzhuoyu/iasm v0.9.0 // indirect | ||
github.com/gabriel-vasile/mimetype v1.4.3 // indirect | ||
github.com/goccy/go-json v0.10.2 // indirect | ||
github.com/klauspost/cpuid/v2 v2.2.4 // indirect | ||
github.com/pelletier/go-toml/v2 v2.0.8 // indirect | ||
github.com/klauspost/cpuid/v2 v2.2.6 // indirect | ||
github.com/pelletier/go-toml/v2 v2.1.1 // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07 // indirect | ||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect | ||
golang.org/x/arch v0.3.0 // indirect | ||
golang.org/x/net v0.17.0 // indirect | ||
golang.org/x/text v0.13.0 // indirect | ||
google.golang.org/protobuf v1.30.0 // indirect | ||
golang.org/x/arch v0.6.0 // indirect | ||
golang.org/x/net v0.19.0 // indirect | ||
golang.org/x/text v0.14.0 // indirect | ||
google.golang.org/protobuf v1.32.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) | ||
|
||
require ( | ||
github.com/gin-contrib/sse v0.1.0 // indirect | ||
github.com/go-playground/locales v0.14.1 // indirect | ||
github.com/go-playground/universal-translator v0.18.1 // indirect | ||
github.com/go-playground/validator/v10 v10.14.0 // indirect | ||
github.com/go-playground/validator/v10 v10.16.0 // indirect | ||
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1 | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/leodido/go-urn v1.2.4 // indirect | ||
github.com/mattn/go-isatty v0.0.19 // indirect | ||
github.com/mattn/go-isatty v0.0.20 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/ugorji/go/codec v1.2.11 // indirect | ||
golang.org/x/crypto v0.14.0 // indirect | ||
golang.org/x/sys v0.13.0 // indirect | ||
github.com/ugorji/go/codec v1.2.12 // indirect | ||
golang.org/x/crypto v0.17.0 // indirect | ||
golang.org/x/sys v0.15.0 // indirect | ||
) |
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.