summaryrefslogtreecommitdiffstats
path: root/vendor/gomod.garykim.dev
diff options
context:
space:
mode:
authorGary Kim <gary@garykim.dev>2020-10-19 17:16:34 -0400
committerGitHub <noreply@github.com>2020-10-19 23:16:34 +0200
commit950f2759bd2b20aa0bdedc3dc9a74d0dafb606d8 (patch)
treea6071c7741df26ae883aa8f791df141786dc7580 /vendor/gomod.garykim.dev
parent25c82ddf023a9f16ff2ef31093ee215b69c345be (diff)
downloadmatterbridge-msglm-950f2759bd2b20aa0bdedc3dc9a74d0dafb606d8.tar.gz
matterbridge-msglm-950f2759bd2b20aa0bdedc3dc9a74d0dafb606d8.tar.bz2
matterbridge-msglm-950f2759bd2b20aa0bdedc3dc9a74d0dafb606d8.zip
Add support for downloading files (nctalk) (#1249)
Signed-off-by: Gary Kim <gary@garykim.dev>
Diffstat (limited to 'vendor/gomod.garykim.dev')
-rw-r--r--vendor/gomod.garykim.dev/nc-talk/.drone.yml24
-rw-r--r--vendor/gomod.garykim.dev/nc-talk/.github_changelog_generator12
-rw-r--r--vendor/gomod.garykim.dev/nc-talk/.golangci.yml26
-rw-r--r--vendor/gomod.garykim.dev/nc-talk/CHANGELOG.md71
-rw-r--r--vendor/gomod.garykim.dev/nc-talk/README.md27
-rw-r--r--vendor/gomod.garykim.dev/nc-talk/constants/constants.go2
-rw-r--r--vendor/gomod.garykim.dev/nc-talk/go.mod8
-rw-r--r--vendor/gomod.garykim.dev/nc-talk/go.sum15
-rw-r--r--vendor/gomod.garykim.dev/nc-talk/gonctalk.go44
-rw-r--r--vendor/gomod.garykim.dev/nc-talk/room/room.go6
10 files changed, 4 insertions, 231 deletions
diff --git a/vendor/gomod.garykim.dev/nc-talk/.drone.yml b/vendor/gomod.garykim.dev/nc-talk/.drone.yml
deleted file mode 100644
index f2367e4d..00000000
--- a/vendor/gomod.garykim.dev/nc-talk/.drone.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-kind: pipeline
-type: docker
-name: test
-
-steps:
- - name: golangci-lint
- image: golangci/golangci-lint:latest-alpine
- commands:
- - golangci-lint run
- - name: test
- image: golang:1.13
- commands:
- - go test ./...
- - name: build-test
- image: golang:1.13
- commands:
- - go build
-
-trigger:
- branch:
- - master
- event:
- - pull_request
- - push
diff --git a/vendor/gomod.garykim.dev/nc-talk/.github_changelog_generator b/vendor/gomod.garykim.dev/nc-talk/.github_changelog_generator
deleted file mode 100644
index eb4525d8..00000000
--- a/vendor/gomod.garykim.dev/nc-talk/.github_changelog_generator
+++ /dev/null
@@ -1,12 +0,0 @@
-user=gary-kim
-project=go-nc-talk
-add_sections={"dependencies": {"labels": ["dependencies"], "prefix": "### Dependencies"}, "Added": {"labels": ["feature"], "prefix": "### Added"}}
-output=
-header_label=# Go Library for Nextcloud Talk
-enhancement_prefix=### Changed
-deprecated_prefix=### Deprecated
-removed_prefix=### Removed
-security_prefix=### Security
-bug_prefix=### Fixed
-add_pr_wo_labels=false
-issues=false
diff --git a/vendor/gomod.garykim.dev/nc-talk/.golangci.yml b/vendor/gomod.garykim.dev/nc-talk/.golangci.yml
deleted file mode 100644
index ef89770a..00000000
--- a/vendor/gomod.garykim.dev/nc-talk/.golangci.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-# golangci-lint configuration options
-
-linters:
- enable:
- - deadcode
- - errcheck
- - goimports
- - golint
- - ineffassign
- - structcheck
- - varcheck
- - govet
- - unconvert
- - prealloc
- - maligned
- disable-all: false
-
-issues:
- # Enable some lints excluded by default
- exclude-use-default: false
-
- # Maximum issues count per one linter. Set to 0 to disable. Default is 50.
- max-per-linter: 0
-
- # Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
- max-same-issues: 0
diff --git a/vendor/gomod.garykim.dev/nc-talk/CHANGELOG.md b/vendor/gomod.garykim.dev/nc-talk/CHANGELOG.md
deleted file mode 100644
index b30e1f11..00000000
--- a/vendor/gomod.garykim.dev/nc-talk/CHANGELOG.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# Go Library for Nextcloud Talk
-
-All notable changes to this project will be documented in this file.
-
-The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
-and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-
-## [v0.1.4](https://github.com/gary-kim/go-nc-talk/tree/v0.1.4) - 2020-09-22
-
-[Full Changelog](https://github.com/gary-kim/go-nc-talk/compare/v0.1.3...v0.1.4)
-
-### Fixed
-
-- Add ActorType for message data [\#18](https://github.com/gary-kim/go-nc-talk/pull/18) ([@gary-kim](https://github.com/gary-kim))
-
-## [v0.1.3](https://github.com/gary-kim/go-nc-talk/tree/v0.1.3) - 2020-09-03
-
-[Full Changelog](https://github.com/gary-kim/go-nc-talk/compare/v0.1.2...v0.1.3)
-
-### Fixed
-
-- Close response bodies [\#15](https://github.com/gary-kim/go-nc-talk/pull/15) ([@gary-kim](https://github.com/gary-kim))
-
-## [v0.1.2](https://github.com/gary-kim/go-nc-talk/tree/v0.1.2) - 2020-08-28
-
-[Full Changelog](https://github.com/gary-kim/go-nc-talk/compare/v0.1.1...v0.1.2)
-
-### Fixed
-
-- Use lastReadMessage for first lastKnownMessageId [\#14](https://github.com/gary-kim/go-nc-talk/pull/14) ([@tilosp](https://github.com/tilosp))
-
-## [v0.1.1](https://github.com/gary-kim/go-nc-talk/tree/v0.1.1) - 2020-08-24
-
-[Full Changelog](https://github.com/gary-kim/go-nc-talk/compare/v0.1.0...v0.1.1)
-
-### Fixed
-
-- ROS type should be of ROST type [\#12](https://github.com/gary-kim/go-nc-talk/pull/12) ([@gary-kim](https://github.com/gary-kim))
-- Fix error when sending a message with no RCS data [\#10](https://github.com/gary-kim/go-nc-talk/pull/10) ([@gary-kim](https://github.com/gary-kim))
-
-## [v0.1.0](https://github.com/gary-kim/go-nc-talk/tree/v0.1.0) - 2020-08-13
-
-[Full Changelog](https://github.com/gary-kim/go-nc-talk/compare/v0.0.2...v0.1.0)
-
-### Added
-
-- Add TLSConfig [\#9](https://github.com/gary-kim/go-nc-talk/pull/9) ([@gary-kim](https://github.com/gary-kim))
-- Add Software using this library in README [\#8](https://github.com/gary-kim/go-nc-talk/pull/8) ([@gary-kim](https://github.com/gary-kim))
-- Add some basic tests [\#7](https://github.com/gary-kim/go-nc-talk/pull/7) ([@gary-kim](https://github.com/gary-kim))
-- Add support for downloading files [\#1](https://github.com/gary-kim/go-nc-talk/pull/1) ([@gary-kim](https://github.com/gary-kim))
-
-### Fixed
-
-- Return error on blank token [\#6](https://github.com/gary-kim/go-nc-talk/pull/6) ([@gary-kim](https://github.com/gary-kim))
-- Add v0.0.2 to changelog [\#4](https://github.com/gary-kim/go-nc-talk/pull/4) ([@gary-kim](https://github.com/gary-kim))
-
-## [v0.0.2](https://github.com/gary-kim/go-nc-talk/tree/v0.0.2) - 2020-07-26
-
-[Full Changelog](https://github.com/gary-kim/go-nc-talk/compare/v0.0.1...v0.0.2)
-
-### Changed
-
-- Add installation instructions to README.md [\#2](https://github.com/gary-kim/go-nc-talk/pull/2) ([@gary-kim](https://github.com/gary-kim))
-
-### Fixed
-
-- Fix Capabilities Request [\#3](https://github.com/gary-kim/go-nc-talk/pull/3) ([@gary-kim](https://github.com/gary-kim))
-
-## [v0.0.1](https://github.com/gary-kim/riotchat/tree/v0.0.1) - 2020-07-10
-
-* First release
diff --git a/vendor/gomod.garykim.dev/nc-talk/README.md b/vendor/gomod.garykim.dev/nc-talk/README.md
deleted file mode 100644
index efa87c6c..00000000
--- a/vendor/gomod.garykim.dev/nc-talk/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# Go Library for Nextcloud Talk
-
-[![Build Status](https://ghdrone.garykim.dev/api/badges/gary-kim/go-nc-talk/status.svg)](https://ghdrone.garykim.dev/gary-kim/go-nc-talk)
-[![Godoc](https://img.shields.io/badge/godoc-gomod.garykim.dev%2Fnc--talk-informational)](https://pkg.go.dev/gomod.garykim.dev/nc-talk)
-
-A Go library that can be used to communicate with [Nextcloud Talk](https://github.com/nextcloud/spreed) instances.
-
-### Installing
-
-You can use this library in your Go projects by installing it with go mod:
-
-```bash
-GO111MODULE=on go get gomod.garykim.dev/nc-talk
-```
-
-Check out the documentation for the package [here](https://pkg.go.dev/gomod.garykim.dev/nc-talk).
-
-
-### Software using this library
-
-* [Matterbridge](https://github.com/42wim/matterbridge)
-
-### License
-
-Copyright © 2020 Gary Kim &lt;<gary@garykim.dev>&gt;, All Rights Reserved
-
-Licensed under [Apache-2.0](LICENSE)
diff --git a/vendor/gomod.garykim.dev/nc-talk/constants/constants.go b/vendor/gomod.garykim.dev/nc-talk/constants/constants.go
index c70e4daa..44473546 100644
--- a/vendor/gomod.garykim.dev/nc-talk/constants/constants.go
+++ b/vendor/gomod.garykim.dev/nc-talk/constants/constants.go
@@ -21,5 +21,5 @@ const (
// RemoteDavEndpoint returns the endpoint for the Dav API for Nextcloud
func RemoteDavEndpoint(username string, davType string) string {
- return "/remote.php/dav/" + username + "/" + davType + "/"
+ return "/remote.php/dav/" + davType + "/" + username + "/"
}
diff --git a/vendor/gomod.garykim.dev/nc-talk/go.mod b/vendor/gomod.garykim.dev/nc-talk/go.mod
deleted file mode 100644
index 1aa51ff7..00000000
--- a/vendor/gomod.garykim.dev/nc-talk/go.mod
+++ /dev/null
@@ -1,8 +0,0 @@
-module gomod.garykim.dev/nc-talk
-
-go 1.13
-
-require (
- github.com/monaco-io/request v1.0.4
- github.com/stretchr/testify v1.6.1
-)
diff --git a/vendor/gomod.garykim.dev/nc-talk/go.sum b/vendor/gomod.garykim.dev/nc-talk/go.sum
deleted file mode 100644
index b4d32468..00000000
--- a/vendor/gomod.garykim.dev/nc-talk/go.sum
+++ /dev/null
@@ -1,15 +0,0 @@
-github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/monaco-io/request v1.0.3 h1:FsiIwXCCbHEyWx9A7lgg6JBTMHhHlEEsADsgAOvZ9HA=
-github.com/monaco-io/request v1.0.3/go.mod h1:EmggwHktBsbJmCgwZXqy7o0H1NNsAstQBWZrFVd3xtQ=
-github.com/monaco-io/request v1.0.4 h1:AbogA+IvPOWqyGZIFU7kSb8YS2Jv5Dnl5ncMj8cQV+o=
-github.com/monaco-io/request v1.0.4/go.mod h1:EmggwHktBsbJmCgwZXqy7o0H1NNsAstQBWZrFVd3xtQ=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
-github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/vendor/gomod.garykim.dev/nc-talk/gonctalk.go b/vendor/gomod.garykim.dev/nc-talk/gonctalk.go
deleted file mode 100644
index 727d5006..00000000
--- a/vendor/gomod.garykim.dev/nc-talk/gonctalk.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2020 Gary Kim <gary@garykim.dev>, All Rights Reserved
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package talk
-
-import (
- "gomod.garykim.dev/nc-talk/room"
- "gomod.garykim.dev/nc-talk/user"
-)
-
-// NewUser returns a TalkUser instance
-// The url should be the full URL of the Nextcloud instance (e.g. https://cloud.mydomain.me)
-//
-// Deprecated: Use user.NewUser instead for more options and error checks
-func NewUser(url string, username string, password string) *user.TalkUser {
- return &user.TalkUser{
- NextcloudURL: url,
- User: username,
- Pass: password,
- }
-}
-
-// NewRoom returns a new TalkRoom instance
-// Token should be the Nextcloud Room Token (e.g. "d6zoa2zs" if the room URL is https://cloud.mydomain.me/call/d6zoa2zs)
-//
-// Deprecated: Use room.NewRoom instead for extra error checks.
-func NewRoom(tuser *user.TalkUser, token string) *room.TalkRoom {
- tr := &room.TalkRoom{
- User: tuser,
- Token: token,
- }
- return tr
-}
diff --git a/vendor/gomod.garykim.dev/nc-talk/room/room.go b/vendor/gomod.garykim.dev/nc-talk/room/room.go
index b53b01fc..da058a37 100644
--- a/vendor/gomod.garykim.dev/nc-talk/room/room.go
+++ b/vendor/gomod.garykim.dev/nc-talk/room/room.go
@@ -62,7 +62,7 @@ func NewTalkRoom(tuser *user.TalkUser, token string) (*TalkRoom, error) {
// SendMessage sends a message in the Talk room
func (t *TalkRoom) SendMessage(msg string) (*ocs.TalkRoomMessageData, error) {
- url := t.User.NextcloudURL + constants.BaseEndpoint + "/chat/" + t.Token
+ url := t.User.NextcloudURL + constants.BaseEndpoint + "chat/" + t.Token
requestParams := map[string]string{
"message": msg,
}
@@ -93,7 +93,7 @@ func (t *TalkRoom) ReceiveMessages(ctx context.Context) (chan ocs.TalkRoomMessag
if err != nil {
return nil, err
}
- url := t.User.NextcloudURL + constants.BaseEndpoint + "/chat/" + t.Token
+ url := t.User.NextcloudURL + constants.BaseEndpoint + "chat/" + t.Token
requestParam := map[string]string{
"lookIntoFuture": "1",
"includeLastKnown": "0",
@@ -154,7 +154,7 @@ func (t *TalkRoom) TestConnection() error {
if t.Token == "" {
return ErrEmptyToken
}
- url := t.User.NextcloudURL + constants.BaseEndpoint + "/chat/" + t.Token
+ url := t.User.NextcloudURL + constants.BaseEndpoint + "chat/" + t.Token
requestParam := map[string]string{
"lookIntoFuture": "0",
"includeLastKnown": "0",