Skip to content

Commit

Permalink
added more but now its broken
Browse files Browse the repository at this point in the history
  • Loading branch information
Xemdo committed Jul 7, 2024
1 parent 30cf222 commit a2af19f
Show file tree
Hide file tree
Showing 8 changed files with 377 additions and 20 deletions.
10 changes: 6 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ go 1.20

require (
github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2
github.com/fatih/color v1.15.0
github.com/fatih/color v1.17.0
github.com/goccy/go-yaml v1.11.3
github.com/gorilla/websocket v1.5.0
github.com/hashicorp/go-version v1.6.0
github.com/jmoiron/sqlx v1.3.4
github.com/manifoldco/promptui v0.8.0
github.com/mattn/go-sqlite3 v1.14.17
Expand All @@ -19,15 +21,14 @@ require (
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hokaccha/go-prettyjson v0.0.0-20201222001619-a42f9ac2ec8e // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
github.com/lunixbochs/vtclean v1.0.0 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/pelletier/go-toml v1.9.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand All @@ -36,8 +37,9 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
21 changes: 16 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=
github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
Expand All @@ -55,9 +55,14 @@ github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE=
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/goccy/go-yaml v1.11.3 h1:B3W9IdWbvrUu2OYQGwvU1nZtvMQJPBKgBUuweJjLj6I=
github.com/goccy/go-yaml v1.11.3/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
Expand All @@ -72,6 +77,7 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
Expand Down Expand Up @@ -133,6 +139,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0=
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
Expand All @@ -149,8 +156,8 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98=
github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM=
github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
Expand Down Expand Up @@ -242,6 +249,7 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
Expand Down Expand Up @@ -298,8 +306,9 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
Expand Down Expand Up @@ -328,6 +337,8 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
Expand Down
112 changes: 101 additions & 11 deletions internal/events/trigger/trigger_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,11 @@ package trigger

import (
"encoding/json"
"errors"
"fmt"
"io"
"net/rpc"
"strings"
"time"

"github.com/fatih/color"
"github.com/spf13/viper"
"github.com/twitchdev/twitch-cli/internal/database"
"github.com/twitchdev/twitch-cli/internal/events"
"github.com/twitchdev/twitch-cli/internal/events/types"
"github.com/twitchdev/twitch-cli/internal/models"
rpc_handler "github.com/twitchdev/twitch-cli/internal/rpc"
"github.com/twitchdev/twitch-cli/internal/util"
)

Expand Down Expand Up @@ -61,8 +52,107 @@ type TriggerResponse struct {
Timestamp string
}

// Fire emits an event using the TriggerParameters defined above.
func Fire(p TriggerParameters) (string, error) {
// Register all events before we proceed
err := types.RegisterAllEvents()
if err != nil {
return "", err
}

if p.ClientID == "" {
p.ClientID = viper.GetString("ClientID") // Get from config

if p.ClientID == "" {
// --client-id wasn't used, and config file doesn't have a Client ID set.
// Generate a randomized one
p.ClientID = util.RandomClientID()
}
}

if p.ToUser == "" {
p.ToUser = util.RandomUserID()
}

if p.FromUser == "" {
p.FromUser = util.RandomUserID()
}

if p.GameID == "" {
p.GameID = fmt.Sprint(util.RandomInt(10 * 1000))
}

switch p.Tier {
case "":
p.Tier = "1000"
case "1000", "2000", "3000":
// do nothing, these are valid values
default:
return "", fmt.Errorf(
"Discarding event: Invalid tier provided.\n" +
"Valid values are 1000, 2000 or 3000")
}

if p.EventMessageID == "" {
p.EventMessageID = util.RandomGUID()
}

if p.Timestamp == "" {
p.Timestamp = util.GetTimestamp().Format(time.RFC3339Nano)
} else {
// Verify custom timestamp
_, err := time.Parse(time.RFC3339Nano, p.Timestamp)
if err != nil {
return "", fmt.Errorf(
`Discarding event: Invalid timestamp provided.
Please follow RFC3339Nano, which is used by Twitch as seen here:
https://dev.twitch.tv/docs/eventsub/handling-webhook-events#processing-an-event`)
}
}

mockAbstract, err := types.NEW_GetByTriggerAndTransportAndVersion(p.Event, p.Transport, p.Version)
if err != nil {
return "", err
}

mockEvent := types.MockEventBase{
Subscription: make(map[string]interface{}),
Event: make(map[string]interface{}),
}

_ = map[string]types.MockAbstractData(mockEvent.Subscription)

Check failure on line 122 in internal/events/trigger/trigger_event.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, ubuntu-latest)

cannot convert mockEvent.Subscription (variable of type map[string]interface{}) to type map[string]types.MockAbstractData

Check failure on line 122 in internal/events/trigger/trigger_event.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, macos-latest)

cannot convert mockEvent.Subscription (variable of type map[string]interface{}) to type map[string]types.MockAbstractData

//mockEvent.Subscription, err = types.GenerateEventObject(
// mockAbstract.Subscription.(map[string]types.MockAbstractData),
//)

// Go through subscription data
for identifier, innards := range mockAbstract.Subscription {
if innards.Type == "string" {
mockEvent.Subscription[identifier] = "Test"
} else if innards.Type == "string[]" {
mockEvent.Subscription[identifier] = []string{}
} else if innards.Type == "int" {
mockEvent.Subscription[identifier] = 0
} else if innards.Type == "int[]" {
mockEvent.Subscription[identifier] = []int{}
} else if innards.Type == "object" {
// TODO
mockEvent.Subscription[identifier] = make(map[string]interface{})
} else if innards.Type == "object[]" {
mockEvent.Subscription[identifier] = []map[string]interface{}{}
}
}

j, err := json.Marshal(mockEvent)
if err != nil {
return "", err
}

return string(j), nil
}

// Fire emits an event using the TriggerParameters defined above.
/*func Fire(p TriggerParameters) (string, error) {
var resp events.MockEventResponse
var err error
Expand Down Expand Up @@ -269,4 +359,4 @@ https://dev.twitch.tv/docs/eventsub/handling-webhook-events#processing-an-event`
}
return string(resp.JSON), nil
}
}*/
128 changes: 128 additions & 0 deletions internal/events/types/types_new.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package types

import (
"errors"
"fmt"
"io/fs"
"os"
"path"
"path/filepath"
"sort"
"strings"
)

type MockEventBase struct {
Subscription map[string]interface{} `json:"subscription"`
Event map[string]interface{} `json:"event"`
}

var mockEvents []MockAbstract

func RegisterAllEvents() error {
// Find directory holding YAML EventSub templates
exeDir, err := os.Executable()
if err != nil {
return err
}
templatesBaseDir := path.Join(filepath.Dir(exeDir), "templates", "events")

// Go through eventsYamlDir to find all files
files := []string{}
err = filepath.Walk(templatesBaseDir, func(path string, info fs.FileInfo, err error) error {
if !info.IsDir() && strings.HasSuffix(strings.ToLower(path), ".yaml") {
files = append(files, path)
}
return nil
})
if err != nil {
return errors.New("Could not read EventSub yaml files: " + err.Error())
}

// Read and store all the files
for _, f := range files {
abstract, err := ParseEventYaml(f)
if err != nil {
return err
}

// Check for duplicates
ok, duplicateFilepath := RegisterSubscriptionType(abstract)
if !ok {
return errors.New("Duplicate subscription type/version pair:\n - " + abstract.Filepath + "\n - " + duplicateFilepath)
}

}

return nil
}

func RegisterSubscriptionType(eventAbstract MockAbstract) (bool, string) {
// Look for duplicates
for _, sub := range mockEvents {
if sub.Metadata.Type == eventAbstract.Metadata.Type && sub.Metadata.Version == eventAbstract.Metadata.Version {
return false, sub.Filepath
}
}

mockEvents = append(mockEvents, eventAbstract)

return true, ""
}

func NEW_GetByTriggerAndTransportAndVersion(trigger string, transport string, version string) (*MockAbstract, error) {
validEventBadVersions := []string{}
var latestEventSeen *MockAbstract

for _, sub := range mockEvents {
if trigger == sub.Metadata.Type {
// Found an event type that match's user input

// Check if transport is valid
validTransport := false
for _, t := range sub.Metadata.SupportedTransports {
if transport == t {
validTransport = true
break
}
}
if !validTransport {
if strings.EqualFold(transport, "websocket") {
return nil, errors.New("Invalid transport. This event is not available via WebSockets.")
}
return nil, fmt.Errorf("Invalid transport. This event supports the following transport types: %v", strings.Join(sub.Metadata.SupportedTransports, ", "))
}

// Check for matching verison; Assumes version is not empty but doesn't matter performance-wise
if version == sub.Metadata.Version {
return &sub, nil
} else {
validEventBadVersions = append(validEventBadVersions, sub.Metadata.Version)
latestEventSeen = &sub
}
}
}

// When no version is given, and there's only one version available, use the default version.
if version == "" && len(validEventBadVersions) == 1 {
return latestEventSeen, nil
}

// Error for events with non-existent version used
if len(validEventBadVersions) != 0 {
sort.Strings(validEventBadVersions)
errStr := fmt.Sprintf("Invalid version given. Valid version(s): %v", strings.Join(validEventBadVersions, ", "))
if version == "" {
errStr += "\nUse --version to specify"
}
return nil, errors.New(errStr)
}

// Default error
return nil, errors.New("Invalid event") // TODO
}

func GenerateEventObject() (map[string]MockAbstractData, error) {
return nil, nil
}
Loading

0 comments on commit a2af19f

Please sign in to comment.