Skip to content

Commit

Permalink
Bump Go and mattermost SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
gravufo committed Dec 8, 2023
1 parent 70dca21 commit 3818632
Show file tree
Hide file tree
Showing 10 changed files with 1,182 additions and 2,425 deletions.
4 changes: 2 additions & 2 deletions build/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.12

require (
github.com/go-git/go-git/v5 v5.4.2
github.com/mattermost/mattermost-server/v6 v6.2.1
github.com/mattermost/mattermost/server/public v0.0.11
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.7.0
github.com/stretchr/testify v1.8.4
sigs.k8s.io/yaml v1.3.0
)
1,962 changes: 1,046 additions & 916 deletions build/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/manifest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

"github.com/mattermost/mattermost-server/v6/model"
"github.com/mattermost/mattermost/server/public/model"
"github.com/pkg/errors"
)

Expand Down
13 changes: 7 additions & 6 deletions build/pluginctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
package main

import (
"context"
"errors"
"fmt"
"log"
"net"
"os"

"github.com/mattermost/mattermost-server/v6/model"
"github.com/mattermost/mattermost/server/public/model"
)

const helpText = `
Expand Down Expand Up @@ -91,7 +92,7 @@ func getClient() (*model.Client4, error) {
if adminUsername != "" && adminPassword != "" {
client := model.NewAPIv4Client(siteURL)
log.Printf("Authenticating as %s against %s.", adminUsername, siteURL)
_, _, err := client.Login(adminUsername, adminPassword)
_, _, err := client.Login(context.TODO(), adminUsername, adminPassword)
if err != nil {
return nil, fmt.Errorf("failed to login as %s: %w", adminUsername, err)
}
Expand Down Expand Up @@ -121,13 +122,13 @@ func deploy(client *model.Client4, pluginID, bundlePath string) error {
defer pluginBundle.Close()

log.Print("Uploading plugin via API.")
_, _, err = client.UploadPluginForced(pluginBundle)
_, _, err = client.UploadPluginForced(context.TODO(), pluginBundle)
if err != nil {
return fmt.Errorf("failed to upload plugin bundle: %s", err.Error())
}

log.Print("Enabling plugin.")
_, err = client.EnablePlugin(pluginID)
_, err = client.EnablePlugin(context.TODO(), pluginID)
if err != nil {
return fmt.Errorf("failed to enable plugin: %s", err.Error())
}
Expand All @@ -138,7 +139,7 @@ func deploy(client *model.Client4, pluginID, bundlePath string) error {
// disablePlugin attempts to disable the plugin via the Client4 API.
func disablePlugin(client *model.Client4, pluginID string) error {
log.Print("Disabling plugin.")
_, err := client.DisablePlugin(pluginID)
_, err := client.DisablePlugin(context.TODO(), pluginID)
if err != nil {
return fmt.Errorf("failed to disable plugin: %w", err)
}
Expand All @@ -149,7 +150,7 @@ func disablePlugin(client *model.Client4, pluginID string) error {
// enablePlugin attempts to enable the plugin via the Client4 API.
func enablePlugin(client *model.Client4, pluginID string) error {
log.Print("Enabling plugin.")
_, err := client.EnablePlugin(pluginID)
_, err := client.EnablePlugin(context.TODO(), pluginID)
if err != nil {
return fmt.Errorf("failed to enable plugin: %w", err)
}
Expand Down
82 changes: 37 additions & 45 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,63 +1,55 @@
module github.com/opendwellers/partyparrotssync

go 1.20
go 1.21

require (
github.com/mattermost/mattermost-server/v6 v6.2.1
github.com/mattermost/mattermost/server/public v0.0.11
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.7.0
gopkg.in/yaml.v3 v3.0.0
github.com/stretchr/testify v1.8.4
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/dyatlov/go-opengraph v0.0.0-20210112100619-dae8665a5b09 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/dyatlov/go-opengraph/opengraph v0.0.0-20220524092352-606d7b1e5f8a // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/francoispqt/gojay v1.2.13 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.3 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/hashicorp/go-hclog v1.0.0 // indirect
github.com/hashicorp/go-plugin v1.4.3 // indirect
github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/lib/pq v1.10.3 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.5 // indirect
github.com/go-sql-driver/mysql v1.7.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-plugin v1.4.10 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/mattermost/go-i18n v1.11.1-0.20211013152124-5c415071e404 // indirect
github.com/mattermost/ldap v0.0.0-20201202150706-ee0e6284187d // indirect
github.com/mattermost/logr/v2 v2.0.15 // indirect
github.com/mattn/go-colorable v0.1.11 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/minio/minio-go/v7 v7.0.14 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mattermost/ldap v0.0.0-20231116144001-0f480c025956 // indirect
github.com/mattermost/logr/v2 v2.0.21 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/pborman/uuid v1.2.1 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/philhofer/fwd v1.1.1 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/philhofer/fwd v1.1.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rs/xid v1.3.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/tinylib/msgp v1.1.6 // indirect
github.com/wiggin77/merror v1.0.3 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/tinylib/msgp v1.1.9 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/wiggin77/merror v1.0.5 // indirect
github.com/wiggin77/srslog v1.0.1 // indirect
github.com/yuin/goldmark v1.4.1 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
google.golang.org/grpc v1.53.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/ini.v1 v1.63.2 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect
google.golang.org/grpc v1.56.1 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading

0 comments on commit 3818632

Please sign in to comment.