Browse Source

update framework to v2

master
David Haukeness 5 years ago
parent
commit
2b83c47c55
  1. 2
      commands.go
  2. 2
      go.mod
  3. 4
      go.sum
  4. 6
      handlers.go
  5. 2
      kvstore.go
  6. 6
      main.go
  7. 2
      permissions.go
  8. 2
      types.go
  9. 2
      utils.go

2
commands.go

@ -7,7 +7,7 @@ import (
"strings" "strings"
"text/tabwriter" "text/tabwriter"
"samhofi.us/x/keybase/types/chat1" "samhofi.us/x/keybase/v2/types/chat1"
) )
/* /*

2
go.mod

@ -12,5 +12,5 @@ require (
github.com/ugorji/go/codec v1.1.7 github.com/ugorji/go/codec v1.1.7
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/yaml.v2 v2.2.4 // indirect gopkg.in/yaml.v2 v2.2.4 // indirect
samhofi.us/x/keybase v0.0.0-20200315012740-74fb4a152b35 samhofi.us/x/keybase/v2 v2.0.1
) )

4
go.sum

@ -29,5 +29,5 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
samhofi.us/x/keybase v0.0.0-20200315012740-74fb4a152b35 h1:pnpx+34wna1ML9JxHEChf3lDSBOOEh91B5IDuNFUZYk= samhofi.us/x/keybase/v2 v2.0.1 h1:4PMIlG09Tft+g1zRBrZsZ32a3woxnmHVZHoKDgAy5/c=
samhofi.us/x/keybase v0.0.0-20200315012740-74fb4a152b35/go.mod h1:fcva80IUFyWcHtV4bBSzgKg07K6Rvuvi3GtGCLNGkyE= samhofi.us/x/keybase/v2 v2.0.1/go.mod h1:lJivwhzMSV+WUg+XUbatszStjjFVcuLGl+xcQpqQ5GQ=

6
handlers.go

@ -4,9 +4,9 @@ import (
"log" "log"
"strings" "strings"
"samhofi.us/x/keybase" "samhofi.us/x/keybase/v2"
"samhofi.us/x/keybase/types/chat1" "samhofi.us/x/keybase/v2/types/chat1"
"samhofi.us/x/keybase/types/stellar1" "samhofi.us/x/keybase/v2/types/stellar1"
) )
// RegisterHandlers is called by main to map these handler funcs to events // RegisterHandlers is called by main to map these handler funcs to events

2
kvstore.go

@ -4,7 +4,7 @@ import (
"reflect" "reflect"
"github.com/ugorji/go/codec" "github.com/ugorji/go/codec"
"samhofi.us/x/keybase/types/chat1" "samhofi.us/x/keybase/v2/types/chat1"
) )
// KvStorePutStruct marshals an interface to JSON and sends to kvstore // KvStorePutStruct marshals an interface to JSON and sends to kvstore

6
main.go

@ -6,9 +6,9 @@ import (
"os" "os"
"github.com/teris-io/shortid" "github.com/teris-io/shortid"
"samhofi.us/x/keybase" "samhofi.us/x/keybase/v2"
"samhofi.us/x/keybase/types/chat1" "samhofi.us/x/keybase/v2/types/chat1"
"samhofi.us/x/keybase/types/stellar1" "samhofi.us/x/keybase/v2/types/stellar1"
) )
// Bot holds the necessary information for the bot to work. // Bot holds the necessary information for the bot to work.

2
permissions.go

@ -3,7 +3,7 @@ package main
import ( import (
"strings" "strings"
"samhofi.us/x/keybase/types/chat1" "samhofi.us/x/keybase/v2/types/chat1"
) )
// checkPermissionAndExecute will check the minimum required role for the permission and execute the handler function if allowed // checkPermissionAndExecute will check the minimum required role for the permission and execute the handler function if allowed

2
types.go

@ -1,6 +1,6 @@
package main package main
import "samhofi.us/x/keybase/types/chat1" import "samhofi.us/x/keybase/v2/types/chat1"
// hold reply information when needed // hold reply information when needed
type botReply struct { type botReply struct {

2
utils.go

@ -6,7 +6,7 @@ import (
"reflect" "reflect"
"strings" "strings"
"samhofi.us/x/keybase/types/chat1" "samhofi.us/x/keybase/v2/types/chat1"
) )
// this JSON pretty prints errors and debug // this JSON pretty prints errors and debug

Loading…
Cancel
Save