Compare commits
23 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e45bbe4571 | ||
![]() |
fb5a84212c | ||
![]() |
dedc1c45a1 | ||
![]() |
6a12f9ff84 | ||
![]() |
641ed1873b | ||
![]() |
1d50da4b1c | ||
![]() |
c7897cca5d | ||
![]() |
4091b6f6b4 | ||
![]() |
766f35554e | ||
![]() |
c86137449e | ||
![]() |
efec01a92f | ||
![]() |
4fcad8e04b | ||
![]() |
4b4b2d790e | ||
![]() |
ec6ae343dd | ||
![]() |
b9fb361959 | ||
![]() |
a189298ab0 | ||
![]() |
714a2ad730 | ||
![]() |
fa8b96dfa1 | ||
![]() |
01955a0df8 | ||
![]() |
ac4aee39e3 | ||
![]() |
a0bca42a7a | ||
![]() |
af543dcd05 | ||
![]() |
af77109a47 |
10
README.md
@@ -163,7 +163,7 @@ See <https://github.com/42wim/matterbridge/wiki>
|
||||
|
||||
### Binaries
|
||||
|
||||
- Latest stable release [v1.22.1](https://github.com/42wim/matterbridge/releases/latest)
|
||||
- Latest stable release [v1.22.3](https://github.com/42wim/matterbridge/releases/latest)
|
||||
- Development releases (follows master) can be downloaded [here](https://github.com/42wim/matterbridge/actions) selecting the latest green build and then artifacts.
|
||||
|
||||
To install or upgrade just download the latest [binary](https://github.com/42wim/matterbridge/releases/latest). On \*nix platforms you may need to make the binary executable - you can do this by running `chmod a+x` on the binary (example: `chmod a+x matterbridge-1.20.0-linux-64bit`). After downloading (and making the binary executable, if necessary), follow the instructions on the [howto](https://github.com/42wim/matterbridge/wiki/How-to-create-your-config) for a step by step walkthrough for creating your configuration.
|
||||
@@ -212,8 +212,8 @@ All possible [settings](https://github.com/42wim/matterbridge/wiki/Settings) for
|
||||
|
||||
```toml
|
||||
[irc]
|
||||
[irc.freenode]
|
||||
Server="irc.freenode.net:6667"
|
||||
[irc.libera]
|
||||
Server="irc.libera.chat:6667"
|
||||
Nick="yourbotname"
|
||||
|
||||
[mattermost]
|
||||
@@ -229,7 +229,7 @@ All possible [settings](https://github.com/42wim/matterbridge/wiki/Settings) for
|
||||
name="mygateway"
|
||||
enable=true
|
||||
[[gateway.inout]]
|
||||
account="irc.freenode"
|
||||
account="irc.libera"
|
||||
channel="#testing"
|
||||
|
||||
[[gateway.inout]]
|
||||
@@ -363,7 +363,7 @@ Matterbridge wouldn't exist without these libraries:
|
||||
|
||||
[mb-discord]: https://discord.gg/AkKPtrQ
|
||||
[mb-gitter]: https://gitter.im/42wim/matterbridge
|
||||
[mb-irc]: https://webchat.freenode.net/?channels=matterbridgechat
|
||||
[mb-irc]: https://web.libera.chat/#matterbridge
|
||||
[mb-keybase]: https://keybase.io/team/matterbridge
|
||||
[mb-matrix]: https://riot.im/app/#/room/#matterbridge:matrix.org
|
||||
[mb-mattermost]: https://framateam.org/signup_user_complete/?id=tfqm33ggop8x3qgu4boeieta6e
|
||||
|
@@ -85,27 +85,28 @@ type ChannelMember struct {
|
||||
type ChannelMembers []ChannelMember
|
||||
|
||||
type Protocol struct {
|
||||
AuthCode string // steam
|
||||
BindAddress string // mattermost, slack // DEPRECATED
|
||||
Buffer int // api
|
||||
Charset string // irc
|
||||
ClientID string // msteams
|
||||
ColorNicks bool // only irc for now
|
||||
Debug bool // general
|
||||
DebugLevel int // only for irc now
|
||||
DisableWebPagePreview bool // telegram
|
||||
EditSuffix string // mattermost, slack, discord, telegram, gitter
|
||||
EditDisable bool // mattermost, slack, discord, telegram, gitter
|
||||
HTMLDisable bool // matrix
|
||||
IconURL string // mattermost, slack
|
||||
IgnoreFailureOnStart bool // general
|
||||
IgnoreNicks string // all protocols
|
||||
IgnoreMessages string // all protocols
|
||||
Jid string // xmpp
|
||||
JoinDelay string // all protocols
|
||||
Label string // all protocols
|
||||
Login string // mattermost, matrix
|
||||
LogFile string // general
|
||||
AllowMention []string // discord
|
||||
AuthCode string // steam
|
||||
BindAddress string // mattermost, slack // DEPRECATED
|
||||
Buffer int // api
|
||||
Charset string // irc
|
||||
ClientID string // msteams
|
||||
ColorNicks bool // only irc for now
|
||||
Debug bool // general
|
||||
DebugLevel int // only for irc now
|
||||
DisableWebPagePreview bool // telegram
|
||||
EditSuffix string // mattermost, slack, discord, telegram, gitter
|
||||
EditDisable bool // mattermost, slack, discord, telegram, gitter
|
||||
HTMLDisable bool // matrix
|
||||
IconURL string // mattermost, slack
|
||||
IgnoreFailureOnStart bool // general
|
||||
IgnoreNicks string // all protocols
|
||||
IgnoreMessages string // all protocols
|
||||
Jid string // xmpp
|
||||
JoinDelay string // all protocols
|
||||
Label string // all protocols
|
||||
Login string // mattermost, matrix
|
||||
LogFile string // general
|
||||
MediaDownloadBlackList []string
|
||||
MediaDownloadPath string // Basically MediaServerUpload, but instead of uploading it, just write it to a file on the same server.
|
||||
MediaDownloadSize int // all protocols
|
||||
@@ -119,6 +120,7 @@ type Protocol struct {
|
||||
MessageQueue int // IRC, size of message queue for flood control
|
||||
MessageSplit bool // IRC, split long messages with newlines on MessageLength instead of clipping
|
||||
Muc string // xmpp
|
||||
MxID string // matrix
|
||||
Name string // all protocols
|
||||
Nick string // all protocols
|
||||
NickFormatter string // mattermost, slack
|
||||
@@ -141,7 +143,7 @@ type Protocol struct {
|
||||
ReplaceNicks [][]string // all protocols
|
||||
RemoteNickFormat string // all protocols
|
||||
RunCommands []string // IRC
|
||||
Server string // IRC,mattermost,XMPP,discord
|
||||
Server string // IRC,mattermost,XMPP,discord,matrix
|
||||
SessionFile string // msteams,whatsapp
|
||||
ShowJoinPart bool // all protocols
|
||||
ShowTopicChange bool // slack
|
||||
@@ -156,7 +158,7 @@ type Protocol struct {
|
||||
Team string // mattermost, keybase
|
||||
TeamID string // msteams
|
||||
TenantID string // msteams
|
||||
Token string // gitter, slack, discord, api
|
||||
Token string // gitter, slack, discord, api, matrix
|
||||
Topic string // zulip
|
||||
URL string // mattermost, slack // DEPRECATED
|
||||
UseAPI bool // mattermost, slack
|
||||
|
@@ -283,7 +283,7 @@ func (b *Bdiscord) handleEventBotUser(msg *config.Message, channelID string) (st
|
||||
// Upload a file if it exists
|
||||
if msg.Extra != nil {
|
||||
for _, rmsg := range helper.HandleExtra(msg, b.General) {
|
||||
rmsg.Text = helper.ClipMessage(rmsg.Text, MessageLength)
|
||||
rmsg.Text = helper.ClipMessage(rmsg.Text, MessageLength, b.GetString("MessageClipped"))
|
||||
if _, err := b.c.ChannelMessageSend(channelID, rmsg.Username+rmsg.Text); err != nil {
|
||||
b.Log.Errorf("Could not send message %#v: %s", rmsg, err)
|
||||
}
|
||||
@@ -294,7 +294,7 @@ func (b *Bdiscord) handleEventBotUser(msg *config.Message, channelID string) (st
|
||||
}
|
||||
}
|
||||
|
||||
msg.Text = helper.ClipMessage(msg.Text, MessageLength)
|
||||
msg.Text = helper.ClipMessage(msg.Text, MessageLength, b.GetString("MessageClipped"))
|
||||
msg.Text = b.replaceUserMentions(msg.Text)
|
||||
|
||||
// Edit message
|
||||
@@ -304,7 +304,8 @@ func (b *Bdiscord) handleEventBotUser(msg *config.Message, channelID string) (st
|
||||
}
|
||||
|
||||
m := discordgo.MessageSend{
|
||||
Content: msg.Username + msg.Text,
|
||||
Content: msg.Username + msg.Text,
|
||||
AllowedMentions: b.getAllowedMentions(),
|
||||
}
|
||||
|
||||
if msg.ParentValid() {
|
||||
@@ -335,8 +336,9 @@ func (b *Bdiscord) handleUploadFile(msg *config.Message, channelID string) (stri
|
||||
Reader: bytes.NewReader(*fi.Data),
|
||||
}
|
||||
m := discordgo.MessageSend{
|
||||
Content: msg.Username + fi.Comment,
|
||||
Files: []*discordgo.File{&file},
|
||||
Content: msg.Username + fi.Comment,
|
||||
Files: []*discordgo.File{&file},
|
||||
AllowedMentions: b.getAllowedMentions(),
|
||||
}
|
||||
_, err = b.c.ChannelMessageSendComplex(channelID, &m)
|
||||
if err != nil {
|
||||
|
@@ -9,6 +9,30 @@ import (
|
||||
"github.com/matterbridge/discordgo"
|
||||
)
|
||||
|
||||
func (b *Bdiscord) getAllowedMentions() *discordgo.MessageAllowedMentions {
|
||||
// If AllowMention is not specified, then allow all mentions (default Discord behavior)
|
||||
if !b.IsKeySet("AllowMention") {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Otherwise, allow only the mentions that are specified
|
||||
allowedMentionTypes := make([]discordgo.AllowedMentionType, 0, 3)
|
||||
for _, m := range b.GetStringSlice("AllowMention") {
|
||||
switch m {
|
||||
case "everyone":
|
||||
allowedMentionTypes = append(allowedMentionTypes, discordgo.AllowedMentionTypeEveryone)
|
||||
case "roles":
|
||||
allowedMentionTypes = append(allowedMentionTypes, discordgo.AllowedMentionTypeRoles)
|
||||
case "users":
|
||||
allowedMentionTypes = append(allowedMentionTypes, discordgo.AllowedMentionTypeUsers)
|
||||
}
|
||||
}
|
||||
|
||||
return &discordgo.MessageAllowedMentions{
|
||||
Parse: allowedMentionTypes,
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Bdiscord) getNick(user *discordgo.User, guildID string) string {
|
||||
b.membersMutex.RLock()
|
||||
defer b.membersMutex.RUnlock()
|
||||
|
@@ -63,9 +63,10 @@ func (b *Bdiscord) webhookSend(msg *config.Message, channelID string) (*discordg
|
||||
res, err = b.transmitter.Send(
|
||||
channelID,
|
||||
&discordgo.WebhookParams{
|
||||
Content: msg.Text,
|
||||
Username: msg.Username,
|
||||
AvatarURL: msg.Avatar,
|
||||
Content: msg.Text,
|
||||
Username: msg.Username,
|
||||
AvatarURL: msg.Avatar,
|
||||
AllowedMentions: b.getAllowedMentions(),
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -88,10 +89,11 @@ func (b *Bdiscord) webhookSend(msg *config.Message, channelID string) (*discordg
|
||||
_, e2 := b.transmitter.Send(
|
||||
channelID,
|
||||
&discordgo.WebhookParams{
|
||||
Username: msg.Username,
|
||||
AvatarURL: msg.Avatar,
|
||||
File: &file,
|
||||
Content: content,
|
||||
Username: msg.Username,
|
||||
AvatarURL: msg.Avatar,
|
||||
File: &file,
|
||||
Content: content,
|
||||
AllowedMentions: b.getAllowedMentions(),
|
||||
},
|
||||
)
|
||||
if e2 != nil {
|
||||
@@ -114,7 +116,7 @@ func (b *Bdiscord) handleEventWebhook(msg *config.Message, channelID string) (st
|
||||
return "", nil
|
||||
}
|
||||
|
||||
msg.Text = helper.ClipMessage(msg.Text, MessageLength)
|
||||
msg.Text = helper.ClipMessage(msg.Text, MessageLength, b.GetString("MessageClipped"))
|
||||
msg.Text = b.replaceUserMentions(msg.Text)
|
||||
// discord username must be [0..32] max
|
||||
if len(msg.Username) > 32 {
|
||||
@@ -124,8 +126,9 @@ func (b *Bdiscord) handleEventWebhook(msg *config.Message, channelID string) (st
|
||||
if msg.ID != "" {
|
||||
b.Log.Debugf("Editing webhook message")
|
||||
err := b.transmitter.Edit(channelID, msg.ID, &discordgo.WebhookParams{
|
||||
Content: msg.Text,
|
||||
Username: msg.Username,
|
||||
Content: msg.Text,
|
||||
Username: msg.Username,
|
||||
AllowedMentions: b.getAllowedMentions(),
|
||||
})
|
||||
if err == nil {
|
||||
return msg.ID, nil
|
||||
|
@@ -82,8 +82,10 @@ func DownloadFileAuthRocket(url, token, userID string) (*[]byte, error) {
|
||||
// TODO: The current implementation has the inconvenient that it disregards
|
||||
// word boundaries when splitting but this is hard to solve without potentially
|
||||
// breaking formatting and other stylistic effects.
|
||||
func GetSubLines(message string, maxLineLength int) []string {
|
||||
const clippingMessage = " <clipped message>"
|
||||
func GetSubLines(message string, maxLineLength int, clippingMessage string) []string {
|
||||
if clippingMessage == "" {
|
||||
clippingMessage = " <clipped message>"
|
||||
}
|
||||
|
||||
var lines []string
|
||||
for _, line := range strings.Split(strings.TrimSpace(message), "\n") {
|
||||
@@ -193,8 +195,11 @@ func RemoveEmptyNewLines(msg string) string {
|
||||
|
||||
// ClipMessage trims a message to the specified length if it exceeds it and adds a warning
|
||||
// to the message in case it does so.
|
||||
func ClipMessage(text string, length int) string {
|
||||
const clippingMessage = " <clipped message>"
|
||||
func ClipMessage(text string, length int, clippingMessage string) string {
|
||||
if clippingMessage == "" {
|
||||
clippingMessage = " <clipped message>"
|
||||
}
|
||||
|
||||
if len(text) > length {
|
||||
text = text[:length-len(clippingMessage)]
|
||||
if r, size := utf8.DecodeLastRuneInString(text); r == utf8.RuneError {
|
||||
|
@@ -10,98 +10,96 @@ import (
|
||||
|
||||
const testLineLength = 64
|
||||
|
||||
var (
|
||||
lineSplittingTestCases = map[string]struct {
|
||||
input string
|
||||
splitOutput []string
|
||||
nonSplitOutput []string
|
||||
}{
|
||||
"Short single-line message": {
|
||||
input: "short",
|
||||
splitOutput: []string{"short"},
|
||||
nonSplitOutput: []string{"short"},
|
||||
var lineSplittingTestCases = map[string]struct {
|
||||
input string
|
||||
splitOutput []string
|
||||
nonSplitOutput []string
|
||||
}{
|
||||
"Short single-line message": {
|
||||
input: "short",
|
||||
splitOutput: []string{"short"},
|
||||
nonSplitOutput: []string{"short"},
|
||||
},
|
||||
"Long single-line message": {
|
||||
input: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
||||
splitOutput: []string{
|
||||
"Lorem ipsum dolor sit amet, consectetur adipis <clipped message>",
|
||||
"cing elit, sed do eiusmod tempor incididunt ut <clipped message>",
|
||||
" labore et dolore magna aliqua.",
|
||||
},
|
||||
"Long single-line message": {
|
||||
input: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
||||
splitOutput: []string{
|
||||
"Lorem ipsum dolor sit amet, consectetur adipis <clipped message>",
|
||||
"cing elit, sed do eiusmod tempor incididunt ut <clipped message>",
|
||||
" labore et dolore magna aliqua.",
|
||||
},
|
||||
nonSplitOutput: []string{"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."},
|
||||
nonSplitOutput: []string{"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."},
|
||||
},
|
||||
"Short multi-line message": {
|
||||
input: "I\ncan't\nget\nno\nsatisfaction!",
|
||||
splitOutput: []string{
|
||||
"I",
|
||||
"can't",
|
||||
"get",
|
||||
"no",
|
||||
"satisfaction!",
|
||||
},
|
||||
"Short multi-line message": {
|
||||
input: "I\ncan't\nget\nno\nsatisfaction!",
|
||||
splitOutput: []string{
|
||||
"I",
|
||||
"can't",
|
||||
"get",
|
||||
"no",
|
||||
"satisfaction!",
|
||||
},
|
||||
nonSplitOutput: []string{
|
||||
"I",
|
||||
"can't",
|
||||
"get",
|
||||
"no",
|
||||
"satisfaction!",
|
||||
},
|
||||
nonSplitOutput: []string{
|
||||
"I",
|
||||
"can't",
|
||||
"get",
|
||||
"no",
|
||||
"satisfaction!",
|
||||
},
|
||||
"Long multi-line message": {
|
||||
input: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n" +
|
||||
"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n" +
|
||||
"Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\n" +
|
||||
"Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
|
||||
splitOutput: []string{
|
||||
"Lorem ipsum dolor sit amet, consectetur adipis <clipped message>",
|
||||
"cing elit, sed do eiusmod tempor incididunt ut <clipped message>",
|
||||
" labore et dolore magna aliqua.",
|
||||
"Ut enim ad minim veniam, quis nostrud exercita <clipped message>",
|
||||
"tion ullamco laboris nisi ut aliquip ex ea com <clipped message>",
|
||||
"modo consequat.",
|
||||
"Duis aute irure dolor in reprehenderit in volu <clipped message>",
|
||||
"ptate velit esse cillum dolore eu fugiat nulla <clipped message>",
|
||||
" pariatur.",
|
||||
"Excepteur sint occaecat cupidatat non proident <clipped message>",
|
||||
", sunt in culpa qui officia deserunt mollit an <clipped message>",
|
||||
"im id est laborum.",
|
||||
},
|
||||
nonSplitOutput: []string{
|
||||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
||||
"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
|
||||
"Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",
|
||||
"Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
|
||||
},
|
||||
},
|
||||
"Long multi-line message": {
|
||||
input: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n" +
|
||||
"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n" +
|
||||
"Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\n" +
|
||||
"Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
|
||||
splitOutput: []string{
|
||||
"Lorem ipsum dolor sit amet, consectetur adipis <clipped message>",
|
||||
"cing elit, sed do eiusmod tempor incididunt ut <clipped message>",
|
||||
" labore et dolore magna aliqua.",
|
||||
"Ut enim ad minim veniam, quis nostrud exercita <clipped message>",
|
||||
"tion ullamco laboris nisi ut aliquip ex ea com <clipped message>",
|
||||
"modo consequat.",
|
||||
"Duis aute irure dolor in reprehenderit in volu <clipped message>",
|
||||
"ptate velit esse cillum dolore eu fugiat nulla <clipped message>",
|
||||
" pariatur.",
|
||||
"Excepteur sint occaecat cupidatat non proident <clipped message>",
|
||||
", sunt in culpa qui officia deserunt mollit an <clipped message>",
|
||||
"im id est laborum.",
|
||||
},
|
||||
"Message ending with new-line.": {
|
||||
input: "Newline ending\n",
|
||||
splitOutput: []string{"Newline ending"},
|
||||
nonSplitOutput: []string{"Newline ending"},
|
||||
nonSplitOutput: []string{
|
||||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
||||
"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
|
||||
"Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",
|
||||
"Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
|
||||
},
|
||||
"Long message containing UTF-8 multi-byte runes": {
|
||||
input: "不布人個我此而及單石業喜資富下我河下日沒一我臺空達的常景便物沒為……子大我別名解成?生賣的全直黑,我自我結毛分洲了世當,是政福那是東;斯說",
|
||||
splitOutput: []string{
|
||||
"不布人個我此而及單石業喜資富下 <clipped message>",
|
||||
"我河下日沒一我臺空達的常景便物 <clipped message>",
|
||||
"沒為……子大我別名解成?生賣的 <clipped message>",
|
||||
"全直黑,我自我結毛分洲了世當, <clipped message>",
|
||||
"是政福那是東;斯說",
|
||||
},
|
||||
nonSplitOutput: []string{"不布人個我此而及單石業喜資富下我河下日沒一我臺空達的常景便物沒為……子大我別名解成?生賣的全直黑,我自我結毛分洲了世當,是政福那是東;斯說"},
|
||||
},
|
||||
"Message ending with new-line.": {
|
||||
input: "Newline ending\n",
|
||||
splitOutput: []string{"Newline ending"},
|
||||
nonSplitOutput: []string{"Newline ending"},
|
||||
},
|
||||
"Long message containing UTF-8 multi-byte runes": {
|
||||
input: "不布人個我此而及單石業喜資富下我河下日沒一我臺空達的常景便物沒為……子大我別名解成?生賣的全直黑,我自我結毛分洲了世當,是政福那是東;斯說",
|
||||
splitOutput: []string{
|
||||
"不布人個我此而及單石業喜資富下 <clipped message>",
|
||||
"我河下日沒一我臺空達的常景便物 <clipped message>",
|
||||
"沒為……子大我別名解成?生賣的 <clipped message>",
|
||||
"全直黑,我自我結毛分洲了世當, <clipped message>",
|
||||
"是政福那是東;斯說",
|
||||
},
|
||||
}
|
||||
)
|
||||
nonSplitOutput: []string{"不布人個我此而及單石業喜資富下我河下日沒一我臺空達的常景便物沒為……子大我別名解成?生賣的全直黑,我自我結毛分洲了世當,是政福那是東;斯說"},
|
||||
},
|
||||
}
|
||||
|
||||
func TestGetSubLines(t *testing.T) {
|
||||
for testname, testcase := range lineSplittingTestCases {
|
||||
splitLines := GetSubLines(testcase.input, testLineLength)
|
||||
splitLines := GetSubLines(testcase.input, testLineLength, "")
|
||||
assert.Equalf(t, testcase.splitOutput, splitLines, "'%s' testcase should give expected lines with splitting.", testname)
|
||||
for _, splitLine := range splitLines {
|
||||
byteLength := len([]byte(splitLine))
|
||||
assert.True(t, byteLength <= testLineLength, "Splitted line '%s' of testcase '%s' should not exceed the maximum byte-length (%d vs. %d).", splitLine, testcase, byteLength, testLineLength)
|
||||
}
|
||||
|
||||
nonSplitLines := GetSubLines(testcase.input, 0)
|
||||
nonSplitLines := GetSubLines(testcase.input, 0, "")
|
||||
assert.Equalf(t, testcase.nonSplitOutput, nonSplitLines, "'%s' testcase should give expected lines without splitting.", testname)
|
||||
}
|
||||
}
|
||||
@@ -110,16 +108,19 @@ func TestConvertWebPToPNG(t *testing.T) {
|
||||
if os.Getenv("LOCAL_TEST") == "" {
|
||||
t.Skip()
|
||||
}
|
||||
|
||||
input, err := ioutil.ReadFile("test.webp")
|
||||
if err != nil {
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
d := &input
|
||||
err = ConvertWebPToPNG(d)
|
||||
if err != nil {
|
||||
t.Fail()
|
||||
}
|
||||
err = ioutil.WriteFile("test.png", *d, 0644)
|
||||
|
||||
err = ioutil.WriteFile("test.png", *d, 0o644) // nolint:gosec
|
||||
if err != nil {
|
||||
t.Fail()
|
||||
}
|
||||
|
@@ -167,9 +167,9 @@ func (b *Birc) Send(msg config.Message) (string, error) {
|
||||
}
|
||||
|
||||
if b.GetBool("MessageSplit") {
|
||||
msgLines = helper.GetSubLines(msg.Text, b.MessageLength)
|
||||
msgLines = helper.GetSubLines(msg.Text, b.MessageLength, b.GetString("MessageClipped"))
|
||||
} else {
|
||||
msgLines = helper.GetSubLines(msg.Text, 0)
|
||||
msgLines = helper.GetSubLines(msg.Text, 0, b.GetString("MessageClipped"))
|
||||
}
|
||||
for i := range msgLines {
|
||||
if len(b.Local) >= b.MessageQueue {
|
||||
@@ -316,12 +316,16 @@ func (b *Birc) endNames(client *girc.Client, event girc.Event) {
|
||||
sort.Strings(b.names[channel])
|
||||
maxNamesPerPost := (300 / b.nicksPerRow()) * b.nicksPerRow()
|
||||
for len(b.names[channel]) > maxNamesPerPost {
|
||||
b.Remote <- config.Message{Username: b.Nick, Text: b.formatnicks(b.names[channel][0:maxNamesPerPost]),
|
||||
Channel: channel, Account: b.Account}
|
||||
b.Remote <- config.Message{
|
||||
Username: b.Nick, Text: b.formatnicks(b.names[channel][0:maxNamesPerPost]),
|
||||
Channel: channel, Account: b.Account,
|
||||
}
|
||||
b.names[channel] = b.names[channel][maxNamesPerPost:]
|
||||
}
|
||||
b.Remote <- config.Message{Username: b.Nick, Text: b.formatnicks(b.names[channel]),
|
||||
Channel: channel, Account: b.Account}
|
||||
b.Remote <- config.Message{
|
||||
Username: b.Nick, Text: b.formatnicks(b.names[channel]),
|
||||
Channel: channel, Account: b.Account,
|
||||
}
|
||||
b.names[channel] = nil
|
||||
b.i.Handlers.Clear(girc.RPL_NAMREPLY)
|
||||
b.i.Handlers.Clear(girc.RPL_ENDOFNAMES)
|
||||
|
@@ -75,22 +75,33 @@ func New(cfg *bridge.Config) bridge.Bridger {
|
||||
func (b *Bmatrix) Connect() error {
|
||||
var err error
|
||||
b.Log.Infof("Connecting %s", b.GetString("Server"))
|
||||
b.mc, err = matrix.NewClient(b.GetString("Server"), "", "")
|
||||
if err != nil {
|
||||
return err
|
||||
if b.GetString("MxID") != "" && b.GetString("Token") != "" {
|
||||
b.mc, err = matrix.NewClient(
|
||||
b.GetString("Server"), b.GetString("MxID"), b.GetString("Token"),
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
b.UserID = b.GetString("MxID")
|
||||
b.Log.Info("Using existing Matrix credentials")
|
||||
} else {
|
||||
b.mc, err = matrix.NewClient(b.GetString("Server"), "", "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
resp, err := b.mc.Login(&matrix.ReqLogin{
|
||||
Type: "m.login.password",
|
||||
User: b.GetString("Login"),
|
||||
Password: b.GetString("Password"),
|
||||
Identifier: matrix.NewUserIdentifier(b.GetString("Login")),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
b.mc.SetCredentials(resp.UserID, resp.AccessToken)
|
||||
b.UserID = resp.UserID
|
||||
b.Log.Info("Connection succeeded")
|
||||
}
|
||||
resp, err := b.mc.Login(&matrix.ReqLogin{
|
||||
Type: "m.login.password",
|
||||
User: b.GetString("Login"),
|
||||
Password: b.GetString("Password"),
|
||||
Identifier: matrix.NewUserIdentifier(b.GetString("Login")),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
b.mc.SetCredentials(resp.UserID, resp.AccessToken)
|
||||
b.UserID = resp.UserID
|
||||
b.Log.Info("Connection succeeded")
|
||||
go b.handlematrix()
|
||||
return nil
|
||||
}
|
||||
@@ -357,13 +368,6 @@ func (b *Bmatrix) handleEvent(ev *matrix.Event) {
|
||||
Avatar: b.getAvatarURL(ev.Sender),
|
||||
}
|
||||
|
||||
// Text must be a string
|
||||
if rmsg.Text, ok = ev.Content["body"].(string); !ok {
|
||||
b.Log.Errorf("Content[body] is not a string: %T\n%#v",
|
||||
ev.Content["body"], ev.Content)
|
||||
return
|
||||
}
|
||||
|
||||
// Remove homeserver suffix if configured
|
||||
if b.GetBool("NoHomeServerSuffix") {
|
||||
re := regexp.MustCompile("(.*?):.*")
|
||||
@@ -379,6 +383,13 @@ func (b *Bmatrix) handleEvent(ev *matrix.Event) {
|
||||
return
|
||||
}
|
||||
|
||||
// Text must be a string
|
||||
if rmsg.Text, ok = ev.Content["body"].(string); !ok {
|
||||
b.Log.Errorf("Content[body] is not a string: %T\n%#v",
|
||||
ev.Content["body"], ev.Content)
|
||||
return
|
||||
}
|
||||
|
||||
// Do we have a /me action
|
||||
if ev.Content["msgtype"].(string) == "m.emote" {
|
||||
rmsg.Event = config.EventUserAction
|
||||
|
@@ -248,9 +248,9 @@ func (b *Bmumble) processMessage(msg *config.Message) {
|
||||
// If there is a maximum message length, split and truncate the lines
|
||||
var msgLines []string
|
||||
if maxLength := b.serverConfig.MaximumMessageLength; maxLength != nil {
|
||||
msgLines = helper.GetSubLines(msg.Text, *maxLength-len(msg.Username))
|
||||
msgLines = helper.GetSubLines(msg.Text, *maxLength-len(msg.Username), b.GetString("MessageClipped"))
|
||||
} else {
|
||||
msgLines = helper.GetSubLines(msg.Text, 0)
|
||||
msgLines = helper.GetSubLines(msg.Text, 0, b.GetString("MessageClipped"))
|
||||
}
|
||||
// Send the individual lindes
|
||||
for i := range msgLines {
|
||||
|
@@ -74,12 +74,6 @@ func (b *Btalk) JoinChannel(channel config.ChannelInfo) error {
|
||||
}
|
||||
b.rooms = append(b.rooms, newRoom)
|
||||
|
||||
// Config
|
||||
guestSuffix := " (Guest)"
|
||||
if b.IsKeySet("GuestSuffix") {
|
||||
guestSuffix = b.GetString("GuestSuffix")
|
||||
}
|
||||
|
||||
go func() {
|
||||
for msg := range c {
|
||||
msg := msg
|
||||
@@ -90,35 +84,23 @@ func (b *Btalk) JoinChannel(channel config.ChannelInfo) error {
|
||||
return
|
||||
}
|
||||
|
||||
// ignore messages that are one of the following
|
||||
// * not a message from a user
|
||||
// * from ourselves
|
||||
if msg.MessageType != ocs.MessageComment || msg.ActorID == b.user.User {
|
||||
continue
|
||||
}
|
||||
remoteMessage := config.Message{
|
||||
Text: formatRichObjectString(msg.Message, msg.MessageParameters),
|
||||
Channel: newRoom.room.Token,
|
||||
Username: DisplayName(msg, guestSuffix),
|
||||
UserID: msg.ActorID,
|
||||
Account: b.Account,
|
||||
}
|
||||
// It is possible for the ID to not be set on older versions of Talk so we only set it if
|
||||
// the ID is not blank
|
||||
if msg.ID != 0 {
|
||||
remoteMessage.ID = strconv.Itoa(msg.ID)
|
||||
}
|
||||
|
||||
// Handle Files
|
||||
err = b.handleFiles(&remoteMessage, &msg)
|
||||
if err != nil {
|
||||
b.Log.Errorf("Error handling file: %#v", msg)
|
||||
|
||||
// Ignore messages that are from the bot user
|
||||
if msg.ActorID == b.user.User {
|
||||
continue
|
||||
}
|
||||
|
||||
// Handle deleting messages
|
||||
if msg.MessageType == ocs.MessageSystem && msg.Parent != nil && msg.Parent.MessageType == ocs.MessageDelete {
|
||||
b.handleDeletingMessage(&msg, &newRoom)
|
||||
continue
|
||||
}
|
||||
|
||||
// Handle sending messages
|
||||
if msg.MessageType == ocs.MessageComment {
|
||||
b.handleSendingMessage(&msg, &newRoom)
|
||||
continue
|
||||
}
|
||||
|
||||
b.Log.Debugf("<= Message is %#v", remoteMessage)
|
||||
b.Remote <- remoteMessage
|
||||
}
|
||||
}()
|
||||
return nil
|
||||
@@ -131,16 +113,40 @@ func (b *Btalk) Send(msg config.Message) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
// Talk currently only supports sending normal messages
|
||||
if msg.Event != "" {
|
||||
return "", nil
|
||||
// Standard Message Send
|
||||
if msg.Event == "" {
|
||||
// Handle sending files if they are included
|
||||
err := b.handleSendingFile(&msg, r)
|
||||
if err != nil {
|
||||
b.Log.Errorf("Could not send files in message to room %v from %v: %v", msg.Channel, msg.Username, err)
|
||||
|
||||
return "", nil
|
||||
}
|
||||
|
||||
sentMessage, err := r.room.SendMessage(msg.Username + msg.Text)
|
||||
if err != nil {
|
||||
b.Log.Errorf("Could not send message to room %v from %v: %v", msg.Channel, msg.Username, err)
|
||||
|
||||
return "", nil
|
||||
}
|
||||
return strconv.Itoa(sentMessage.ID), nil
|
||||
}
|
||||
sentMessage, err := r.room.SendMessage(msg.Username + msg.Text)
|
||||
if err != nil {
|
||||
b.Log.Errorf("Could not send message to room %v from %v: %v", msg.Channel, msg.Username, err)
|
||||
return "", nil
|
||||
|
||||
// Message Deletion
|
||||
if msg.Event == config.EventMsgDelete {
|
||||
messageID, err := strconv.Atoi(msg.ID)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
data, err := r.room.DeleteMessage(messageID)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return strconv.Itoa(data.ID), nil
|
||||
}
|
||||
return strconv.Itoa(sentMessage.ID), nil
|
||||
|
||||
// Message is not a type that is currently supported
|
||||
return "", nil
|
||||
}
|
||||
|
||||
func (b *Btalk) getRoom(token string) *Broom {
|
||||
@@ -177,6 +183,74 @@ func (b *Btalk) handleFiles(mmsg *config.Message, message *ocs.TalkRoomMessageDa
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *Btalk) handleSendingFile(msg *config.Message, r *Broom) error {
|
||||
for _, f := range msg.Extra["file"] {
|
||||
fi := f.(config.FileInfo)
|
||||
if fi.URL == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
message := msg.Username
|
||||
if fi.Comment != "" {
|
||||
message += fi.Comment + " "
|
||||
}
|
||||
message += fi.URL
|
||||
_, err := r.room.SendMessage(message)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *Btalk) handleSendingMessage(msg *ocs.TalkRoomMessageData, r *Broom) {
|
||||
remoteMessage := config.Message{
|
||||
Text: formatRichObjectString(msg.Message, msg.MessageParameters),
|
||||
Channel: r.room.Token,
|
||||
Username: DisplayName(msg, b.guestSuffix()),
|
||||
UserID: msg.ActorID,
|
||||
Account: b.Account,
|
||||
}
|
||||
// It is possible for the ID to not be set on older versions of Talk so we only set it if
|
||||
// the ID is not blank
|
||||
if msg.ID != 0 {
|
||||
remoteMessage.ID = strconv.Itoa(msg.ID)
|
||||
}
|
||||
|
||||
// Handle Files
|
||||
err := b.handleFiles(&remoteMessage, msg)
|
||||
if err != nil {
|
||||
b.Log.Errorf("Error handling file: %#v", msg)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
b.Log.Debugf("<= Message is %#v", remoteMessage)
|
||||
b.Remote <- remoteMessage
|
||||
}
|
||||
|
||||
func (b *Btalk) handleDeletingMessage(msg *ocs.TalkRoomMessageData, r *Broom) {
|
||||
remoteMessage := config.Message{
|
||||
Event: config.EventMsgDelete,
|
||||
Text: config.EventMsgDelete,
|
||||
Channel: r.room.Token,
|
||||
ID: strconv.Itoa(msg.Parent.ID),
|
||||
Account: b.Account,
|
||||
}
|
||||
b.Log.Debugf("<= Message being deleted is %#v", remoteMessage)
|
||||
b.Remote <- remoteMessage
|
||||
}
|
||||
|
||||
func (b *Btalk) guestSuffix() string {
|
||||
guestSuffix := " (Guest)"
|
||||
if b.IsKeySet("GuestSuffix") {
|
||||
guestSuffix = b.GetString("GuestSuffix")
|
||||
}
|
||||
|
||||
return guestSuffix
|
||||
}
|
||||
|
||||
// Spec: https://github.com/nextcloud/server/issues/1706#issue-182308785
|
||||
func formatRichObjectString(message string, parameters map[string]ocs.RichObjectString) string {
|
||||
for id, parameter := range parameters {
|
||||
@@ -197,7 +271,7 @@ func formatRichObjectString(message string, parameters map[string]ocs.RichObject
|
||||
return message
|
||||
}
|
||||
|
||||
func DisplayName(msg ocs.TalkRoomMessageData, suffix string) string {
|
||||
func DisplayName(msg *ocs.TalkRoomMessageData, suffix string) string {
|
||||
if msg.ActorType == ocs.ActorGuest {
|
||||
if msg.ActorDisplayName == "" {
|
||||
return "Guest"
|
||||
|
@@ -156,7 +156,7 @@ func (b *Bslack) JoinChannel(channel config.ChannelInfo) error {
|
||||
|
||||
// try to join a channel when in legacy
|
||||
if b.legacy {
|
||||
_, err := b.sc.JoinChannel(channel.Name)
|
||||
_, _, _, err := b.sc.JoinConversation(channel.Name)
|
||||
if err != nil {
|
||||
switch err.Error() {
|
||||
case "name_taken", "restricted_action":
|
||||
@@ -195,7 +195,7 @@ func (b *Bslack) Send(msg config.Message) (string, error) {
|
||||
b.Log.Debugf("=> Receiving %#v", msg)
|
||||
}
|
||||
|
||||
msg.Text = helper.ClipMessage(msg.Text, messageLength)
|
||||
msg.Text = helper.ClipMessage(msg.Text, messageLength, b.GetString("MessageClipped"))
|
||||
msg.Text = b.replaceCodeFence(msg.Text)
|
||||
|
||||
// Make a action /me of the message
|
||||
|
@@ -283,7 +283,7 @@ func (b *channels) populateChannels(wait bool) {
|
||||
// We only retrieve public and private channels, not IMs
|
||||
// and MPIMs as those do not have a channel name.
|
||||
queryParams := &slack.GetConversationsParameters{
|
||||
ExcludeArchived: "true",
|
||||
ExcludeArchived: true,
|
||||
Types: []string{"public_channel,private_channel"},
|
||||
}
|
||||
for {
|
||||
|
@@ -175,6 +175,11 @@ func (b *Bwhatsapp) HandleImageMessage(message whatsapp.ImageMessage) {
|
||||
fileExt[0] = ".jpg"
|
||||
}
|
||||
|
||||
// rename .jpe to .jpg https://github.com/42wim/matterbridge/issues/1463
|
||||
if fileExt[0] == ".jpe" {
|
||||
fileExt[0] = ".jpg"
|
||||
}
|
||||
|
||||
filename := fmt.Sprintf("%v%v", message.Info.Id, fileExt[0])
|
||||
|
||||
b.Log.Debugf("Trying to download %s with type %s", filename, message.Type)
|
||||
@@ -232,6 +237,10 @@ func (b *Bwhatsapp) HandleVideoMessage(message whatsapp.VideoMessage) {
|
||||
return
|
||||
}
|
||||
|
||||
if len(fileExt) == 0 {
|
||||
fileExt = append(fileExt, ".mp4")
|
||||
}
|
||||
|
||||
filename := fmt.Sprintf("%v%v", message.Info.Id, fileExt[0])
|
||||
|
||||
b.Log.Debugf("Trying to download %s with size %#v and type %s", filename, message.Length, message.Type)
|
||||
@@ -312,3 +321,60 @@ func (b *Bwhatsapp) HandleAudioMessage(message whatsapp.AudioMessage) {
|
||||
|
||||
b.Remote <- rmsg
|
||||
}
|
||||
|
||||
// HandleDocumentMessage downloads documents
|
||||
func (b *Bwhatsapp) HandleDocumentMessage(message whatsapp.DocumentMessage) {
|
||||
if message.Info.FromMe || message.Info.Timestamp < b.startedAt {
|
||||
return
|
||||
}
|
||||
|
||||
senderJID := message.Info.SenderJid
|
||||
if len(message.Info.SenderJid) == 0 && message.Info.Source != nil && message.Info.Source.Participant != nil {
|
||||
senderJID = *message.Info.Source.Participant
|
||||
}
|
||||
|
||||
senderName := b.getSenderName(message.Info.SenderJid)
|
||||
if senderName == "" {
|
||||
senderName = "Someone" // don't expose telephone number
|
||||
}
|
||||
|
||||
rmsg := config.Message{
|
||||
UserID: senderJID,
|
||||
Username: senderName,
|
||||
Channel: message.Info.RemoteJid,
|
||||
Account: b.Account,
|
||||
Protocol: b.Protocol,
|
||||
Extra: make(map[string][]interface{}),
|
||||
ID: message.Info.Id,
|
||||
}
|
||||
|
||||
if avatarURL, exists := b.userAvatars[senderJID]; exists {
|
||||
rmsg.Avatar = avatarURL
|
||||
}
|
||||
|
||||
fileExt, err := mime.ExtensionsByType(message.Type)
|
||||
if err != nil {
|
||||
b.Log.Errorf("Mimetype detection error: %s", err)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
filename := fmt.Sprintf("%v", message.FileName)
|
||||
|
||||
b.Log.Debugf("Trying to download %s with extension %s and type %s", filename, fileExt, message.Type)
|
||||
|
||||
data, err := message.Download()
|
||||
if err != nil {
|
||||
b.Log.Errorf("Download document message failed: %s", err)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// Move file to bridge storage
|
||||
helper.HandleDownloadData(b.Log, &rmsg, filename, "document", "", &data, b.General)
|
||||
|
||||
b.Log.Debugf("<= Sending message from %s on %s to gateway", senderJID, b.Account)
|
||||
b.Log.Debugf("<= Message is %#v", rmsg)
|
||||
|
||||
b.Remote <- rmsg
|
||||
}
|
||||
|
31
changelog.md
@@ -1,3 +1,34 @@
|
||||
# v1.22.3
|
||||
|
||||
## Bugfixes
|
||||
|
||||
- whatsapp: Update Rhymen/go-whatsapp module to latest master (2b8a3e9b8aa2) (#1518)
|
||||
|
||||
This release couldn't exist without the following contributors:
|
||||
@nathanaelhoun
|
||||
|
||||
# v1.22.2
|
||||
|
||||
## Enhancements
|
||||
|
||||
- general: Add a MessageClipped option to set your own clipped message. Closes #1359 (#1487)
|
||||
- discord: Add AllowMention to restrict allowed mentions (#1462)
|
||||
- matrix: Add MxId/Token login option for Matrix (#1438)
|
||||
- nctalk: Support sending file URLs (nctalk) (#1489)
|
||||
- nctalk: Add support for message deletion (nctalk) (#1492)
|
||||
- whatsapp: Handle document messages (whatsapp) (#1475)
|
||||
|
||||
## Bugfixes
|
||||
|
||||
- general: Update vendored libs
|
||||
- matrix: Fix content body issue for redactions (matrix) (#1496)
|
||||
- telegram: Add libwebp-dev to tgs.Dockerfile fixes Telegram sticker to WebP rendering (#1476)
|
||||
- whatsapp: Rename .jpe files to .jpg Fixes #1463 (whatsapp) (#1485)
|
||||
- whatsapp: Fix crash on encountering VideoMessage (whatsapp) (#1483)
|
||||
|
||||
This release couldn't exist without the following contributors:
|
||||
@AvinashReddy3108, @chrisbobbe, @jaywink, @Funatiker, @computeronix, @alexandregv, @gary-kim, @SuperSandro2000
|
||||
|
||||
# v1.22.1
|
||||
|
||||
## Enhancements
|
||||
|
25
go.mod
@@ -5,14 +5,14 @@ require (
|
||||
github.com/Baozisoftware/qrcode-terminal-go v0.0.0-20170407111555-c0650d8dff0f
|
||||
github.com/Jeffail/gabs v1.4.0 // indirect
|
||||
github.com/Philipp15b/go-steam v1.0.1-0.20200727090957-6ae9b3c0a560
|
||||
github.com/Rhymen/go-whatsapp v0.1.2-0.20210126174449-3c094ebae0ce
|
||||
github.com/SevereCloud/vksdk/v2 v2.9.0
|
||||
github.com/Rhymen/go-whatsapp v0.1.2-0.20210615184944-2b8a3e9b8aa2
|
||||
github.com/SevereCloud/vksdk/v2 v2.10.0
|
||||
github.com/d5/tengo/v2 v2.7.0
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
github.com/fsnotify/fsnotify v1.4.9
|
||||
github.com/go-telegram-bot-api/telegram-bot-api v1.0.1-0.20200524105306-7434b0456e81
|
||||
github.com/gomarkdown/markdown v0.0.0-20210208175418-bda154fe17d8
|
||||
github.com/google/gops v0.3.17
|
||||
github.com/gomarkdown/markdown v0.0.0-20210514010506-3b9f47219fe7
|
||||
github.com/google/gops v0.3.18
|
||||
github.com/gopackage/ddp v0.0.0-20170117053602-652027933df4 // indirect
|
||||
github.com/gorilla/schema v1.2.0
|
||||
github.com/gorilla/websocket v1.4.2
|
||||
@@ -20,8 +20,8 @@ require (
|
||||
github.com/jpillora/backoff v1.0.0
|
||||
github.com/keybase/go-keybase-chat-bot v0.0.0-20200505163032-5cacf52379da
|
||||
github.com/kyokomi/emoji/v2 v2.2.8
|
||||
github.com/labstack/echo/v4 v4.2.1
|
||||
github.com/lrstanley/girc v0.0.0-20190801035559-4fc93959e1a7
|
||||
github.com/labstack/echo/v4 v4.3.0
|
||||
github.com/lrstanley/girc v0.0.0-20210611213246-771323f1624b
|
||||
github.com/matrix-org/gomatrix v0.0.0-20210324163249-be2af5ef2e16
|
||||
github.com/matterbridge/Rocket.Chat.Go.SDK v0.0.0-20210403163225-761e8622445d
|
||||
github.com/matterbridge/discordgo v0.21.2-0.20210201201054-fb39a175b4f7
|
||||
@@ -41,19 +41,18 @@ require (
|
||||
github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca
|
||||
github.com/shazow/ssh-chat v1.10.1
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/slack-go/slack v0.8.2
|
||||
github.com/spf13/afero v1.3.4 // indirect
|
||||
github.com/spf13/cast v1.3.1 // indirect
|
||||
github.com/spf13/viper v1.7.1
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect
|
||||
github.com/slack-go/slack v0.9.1
|
||||
github.com/spf13/viper v1.8.0
|
||||
github.com/stretchr/testify v1.7.0
|
||||
github.com/vincent-petithory/dataurl v0.0.0-20191104211930-d1553a71de50
|
||||
github.com/writeas/go-strip-markdown v2.0.1+incompatible
|
||||
github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect
|
||||
github.com/yaegashi/msgraph.go v0.1.4
|
||||
github.com/zfjagann/golang-ring v0.0.0-20210116075443-7c86fdb43134
|
||||
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb
|
||||
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602
|
||||
gomod.garykim.dev/nc-talk v0.1.7
|
||||
golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9
|
||||
golang.org/x/oauth2 v0.0.0-20210615190721-d04028783cf1
|
||||
gomod.garykim.dev/nc-talk v0.2.2
|
||||
gopkg.in/olahol/melody.v1 v1.0.0-20170518105555-d52139073376
|
||||
layeh.com/gumble v0.0.0-20200818122324-146f9205029b
|
||||
)
|
||||
|
225
go.sum
@@ -16,6 +16,11 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV
|
||||
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
|
||||
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
|
||||
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
|
||||
cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
|
||||
cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
|
||||
cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
|
||||
cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
|
||||
cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
|
||||
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
||||
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
|
||||
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
|
||||
@@ -76,17 +81,12 @@ github.com/Philipp15b/go-steam v1.0.1-0.20200727090957-6ae9b3c0a560 h1:ItnC9PEEM
|
||||
github.com/Philipp15b/go-steam v1.0.1-0.20200727090957-6ae9b3c0a560/go.mod h1:o38AwUFFS4gzbjSoyIgrZ1h9UeDrKwcci1Pj6baifvI=
|
||||
github.com/PuerkitoBio/goquery v1.4.1/go.mod h1:T9ezsOHcCrDCgA8aF1Cqr3sSYbO/xgdy8/R/XiIMAhA=
|
||||
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
|
||||
github.com/Rhymen/go-whatsapp v0.0.0/go.mod h1:rdQr95g2C1xcOfM7QGOhza58HeI3I+tZ/bbluv7VazA=
|
||||
github.com/Rhymen/go-whatsapp v0.1.2-0.20210126174449-3c094ebae0ce h1:qitALaMtz6i05smexphqLty1gGc7Viwhn8bdSRmp4UM=
|
||||
github.com/Rhymen/go-whatsapp v0.1.2-0.20210126174449-3c094ebae0ce/go.mod h1:o7jjkvKnigfu432dMbQ/w4PH0Yp5u4Y6ysCNjUlcYCk=
|
||||
github.com/Rhymen/go-whatsapp/examples/echo v0.0.0-20190325075644-cc2581bbf24d/go.mod h1:zgCiQtBtZ4P4gFWvwl9aashsdwOcbb/EHOGRmSzM8ME=
|
||||
github.com/Rhymen/go-whatsapp/examples/restoreSession v0.0.0-20190325075644-cc2581bbf24d/go.mod h1:5sCUSpG616ZoSJhlt9iBNI/KXBqrVLcNUJqg7J9+8pU=
|
||||
github.com/Rhymen/go-whatsapp/examples/sendImage v0.0.0-20190325075644-cc2581bbf24d/go.mod h1:RdiyhanVEGXTam+mZ3k6Y3VDCCvXYCwReOoxGozqhHw=
|
||||
github.com/Rhymen/go-whatsapp/examples/sendTextMessages v0.0.0-20190325075644-cc2581bbf24d/go.mod h1:suwzklatySS3Q0+NCxCDh5hYfgXdQUWU1DNcxwAxStM=
|
||||
github.com/Rhymen/go-whatsapp v0.1.2-0.20210615184944-2b8a3e9b8aa2 h1:xEhWgQl3hCOtFph6nWpTjVgAdPmAk0zUTENPDb3HJ7Y=
|
||||
github.com/Rhymen/go-whatsapp v0.1.2-0.20210615184944-2b8a3e9b8aa2/go.mod h1:DNSFRLFDFIqm2+0aJzSOVfn25020vldM4SRqz6YtLgI=
|
||||
github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo=
|
||||
github.com/RoaringBitmap/roaring v0.5.1/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo=
|
||||
github.com/SevereCloud/vksdk/v2 v2.9.0 h1:39qjzmozK5FDfnDkfA+YN0CtKi4mDrzjPtoT5GN9Xg0=
|
||||
github.com/SevereCloud/vksdk/v2 v2.9.0/go.mod h1:IBmfJ3rs+zDLD9NHCoJEpgg5A4UOoxgUU/g8p5lYb48=
|
||||
github.com/SevereCloud/vksdk/v2 v2.10.0 h1:HFTKrRmWaPuRn46PtWjHFlJNElyWrNP3+J2b4j9ztpY=
|
||||
github.com/SevereCloud/vksdk/v2 v2.10.0/go.mod h1:jCicWsIOXu4bfbGGuvVw4dM/EbrC8dOyA+0ccvhiFEo=
|
||||
github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0=
|
||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
||||
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
||||
@@ -107,6 +107,7 @@ github.com/andybalholm/cascadia v1.0.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9Pq
|
||||
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
|
||||
github.com/andybalholm/cascadia v1.2.0/go.mod h1:YCyR8vOZT9aZ1CHEd8ap0gMVm2aFgxBp0T0eFw1RUQY=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
|
||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
|
||||
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
|
||||
github.com/araddon/dateparse v0.0.0-20180729174819-cfd92a431d0e/go.mod h1:SLqhdZcd+dF3TEVL2RMoob5bBP5R1P1qkox+HtCBgGI=
|
||||
@@ -129,7 +130,7 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
|
||||
github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
|
||||
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
|
||||
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
|
||||
github.com/blevesearch/bleve v1.0.12/go.mod h1:G0ErXWdIrUSYZLPoMpS9Z3saTnTsk4ebhPsVv/+0nxk=
|
||||
@@ -160,19 +161,21 @@ github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp
|
||||
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
|
||||
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
|
||||
github.com/codegangsta/cli v1.20.0/go.mod h1:/qJNoX69yVSKu5o4jLyXAENLRyk1uhi7zkbQ3slBdOA=
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
|
||||
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/corpix/uarand v0.1.1/go.mod h1:SFKZvkcRoLqVRFZ4u25xPmp6m9ktANfbpXZ7SJ0/FNU=
|
||||
@@ -220,6 +223,9 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw=
|
||||
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64=
|
||||
@@ -283,10 +289,12 @@ github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3a
|
||||
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
|
||||
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
@@ -302,8 +310,8 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
|
||||
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
@@ -315,13 +323,17 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
|
||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/gomarkdown/markdown v0.0.0-20210208175418-bda154fe17d8 h1:nWU6p08f1VgIalT6iZyqXi4o5cZsz4X6qa87nusfcsc=
|
||||
github.com/gomarkdown/markdown v0.0.0-20210208175418-bda154fe17d8/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU=
|
||||
github.com/gomarkdown/markdown v0.0.0-20210514010506-3b9f47219fe7 h1:oKYOfNR7Hp6XpZ4JqolL5u642Js5Z0n7psPVl+S5heo=
|
||||
github.com/gomarkdown/markdown v0.0.0-20210514010506-3b9f47219fe7/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU=
|
||||
github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
|
||||
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
@@ -333,15 +345,19 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
||||
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
|
||||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
|
||||
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/gops v0.3.17 h1:CguOcnDVYG32soOj2YevV8mW9asrIh1lZw3d7Ovty/o=
|
||||
github.com/google/gops v0.3.17/go.mod h1:Pfp8hWGIFdV/7rY9/O/U5WgdjYQXf/GiEK4NVuVd2ZE=
|
||||
github.com/google/gops v0.3.18 h1:my259V+172PVFmduS2RAsq4FKH+HjKqdh7pLr17Ot8c=
|
||||
github.com/google/gops v0.3.18/go.mod h1:Pfp8hWGIFdV/7rY9/O/U5WgdjYQXf/GiEK4NVuVd2ZE=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||
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=
|
||||
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
@@ -349,6 +365,10 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf
|
||||
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
@@ -387,6 +407,7 @@ github.com/grpc-ecosystem/grpc-gateway v1.6.2/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpg
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
||||
github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c/go.mod h1:ObS/W+h8RYb1Y7fYivughjxojTmIu5iAIjSrSLCLeqE=
|
||||
github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026/go.mod h1:5Scbynm8dF1XAPwIwkGPqzkM/shndPm79Jd1003hTjE=
|
||||
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
|
||||
@@ -434,6 +455,7 @@ github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c/go.mod h1:lADxMC39cJ
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/icrowley/fake v0.0.0-20180203215853-4178557ae428/go.mod h1:uhpZMVGznybq1itEKXj6RYw9I71qK4kH+OGMjRC4KEo=
|
||||
github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
@@ -464,6 +486,7 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u
|
||||
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
|
||||
@@ -482,6 +505,7 @@ github.com/keybase/go-keybase-chat-bot v0.0.0-20200505163032-5cacf52379da h1:LK+
|
||||
github.com/keybase/go-keybase-chat-bot v0.0.0-20200505163032-5cacf52379da/go.mod h1:xJA+X9ZVyT/irGldcb7q1XnJBq5F9s5H9h2L44Y+poY=
|
||||
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19/go.mod h1:hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ=
|
||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||
github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||
@@ -509,8 +533,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/kyokomi/emoji/v2 v2.2.8 h1:jcofPxjHWEkJtkIbcLHvZhxKgCPl6C7MyjTrD4KDqUE=
|
||||
github.com/kyokomi/emoji/v2 v2.2.8/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5CqkmoirZZP9qE=
|
||||
github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g=
|
||||
github.com/labstack/echo/v4 v4.2.1 h1:LF5Iq7t/jrtUuSutNuiEWtB5eiHfZ5gSe2pcu5exjQw=
|
||||
github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg=
|
||||
github.com/labstack/echo/v4 v4.3.0 h1:DCP6cbtT+Zu++K6evHOJzSgA2115cPMuCx0xg55q1EQ=
|
||||
github.com/labstack/echo/v4 v4.3.0/go.mod h1:PvmtTvhVqKDzDQy4d3bWzPjZLzom4iQbAZy2sgZ/qI8=
|
||||
github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0=
|
||||
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
|
||||
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o=
|
||||
@@ -522,13 +546,13 @@ github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
|
||||
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
|
||||
github.com/lrstanley/girc v0.0.0-20190801035559-4fc93959e1a7 h1:BS9tqL0OCiOGuy/CYYk2gc33fxqaqh5/rhqMKu4tcYA=
|
||||
github.com/lrstanley/girc v0.0.0-20190801035559-4fc93959e1a7/go.mod h1:liX5MxHPrwgHaKowoLkYGwbXfYABh1jbZ6FpElbGF1I=
|
||||
github.com/lrstanley/girc v0.0.0-20210611213246-771323f1624b h1:jrLvME7VuLW6NRysbiZtenTB9QcNlR9RPKK4LFfZn60=
|
||||
github.com/lrstanley/girc v0.0.0-20210611213246-771323f1624b/go.mod h1:liX5MxHPrwgHaKowoLkYGwbXfYABh1jbZ6FpElbGF1I=
|
||||
github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
|
||||
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
|
||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4=
|
||||
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
|
||||
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||
github.com/marstr/guid v0.0.0-20170427235115-8bdf7d1a087c/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho=
|
||||
@@ -556,15 +580,12 @@ github.com/mattermost/mattermost-server/v5 v5.30.1 h1:vsTTMyQcsZGevgsvR1EbQM4/RA
|
||||
github.com/mattermost/mattermost-server/v5 v5.30.1/go.mod h1:+6oGzqA4hEsoYpmFHT9j+3BtAscj7LJa/qNDxbGvrp4=
|
||||
github.com/mattermost/rsc v0.0.0-20160330161541-bbaefb05eaa0/go.mod h1:nV5bfVpT//+B1RPD2JvRnxbkLmJEYXmRaaVl15fsXjs=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
|
||||
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
|
||||
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
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.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
|
||||
@@ -610,8 +631,9 @@ github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUb
|
||||
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
|
||||
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
|
||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag=
|
||||
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
@@ -694,8 +716,9 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP
|
||||
github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw=
|
||||
github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM=
|
||||
github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc=
|
||||
github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ=
|
||||
github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
|
||||
github.com/peterbourgon/diskv v0.0.0-20171120014656-2973218375c3/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
|
||||
github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ=
|
||||
@@ -756,6 +779,7 @@ github.com/rickb777/date v1.12.4/go.mod h1:xP0eo/I5qmUt97yRGClHZfyLZ3ikMw6v6SU5M
|
||||
github.com/rickb777/plural v1.2.0 h1:5tvEc7UBCZ7l8h/2UeybSkt/uu1DQsZFOFdNevmUhlE=
|
||||
github.com/rickb777/plural v1.2.0/go.mod h1:UdpyWFCGbo3mvK3f/PfZOAOrkjzJlYN/sD46XNWJ+Es=
|
||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
|
||||
@@ -814,10 +838,10 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf
|
||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
||||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9 h1:lpEzuenPuO1XNTeikEmvqYFcU37GVLl8SRNblzyvGBE=
|
||||
github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9/go.mod h1:PLPIyL7ikehBD1OAjmKKiOEhbvWyHGaNDjquXMcYABo=
|
||||
github.com/slack-go/slack v0.8.2 h1:D7jNu0AInBfdQ4QyKPtVSp+ZxQes3EzWW17RZ/va4JE=
|
||||
github.com/slack-go/slack v0.8.2/go.mod h1:FGqNzJBmxIsZURAxh2a8D21AnOVvvXZvGligs4npPUM=
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0=
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M=
|
||||
github.com/slack-go/slack v0.9.1 h1:pekQBs0RmrdAgoqzcMCzUCWSyIkhzUU3F83ExAdZrKo=
|
||||
github.com/slack-go/slack v0.9.1/go.mod h1:wWL//kk0ho+FcQXcBTmEafUI5dz4qz5f4mMk8oIkioQ=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/assertions v1.0.0 h1:UVQPSSmc3qtTi+zPPkCXvZX9VvW/xT/NsRvKfwY81a8=
|
||||
github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=
|
||||
@@ -830,24 +854,25 @@ github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:Udh
|
||||
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=
|
||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
github.com/spf13/afero v1.3.4 h1:8q6vk3hthlpb2SouZcnBVKboxWQWMDNF38bwholZrJc=
|
||||
github.com/spf13/afero v1.3.4/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
|
||||
github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=
|
||||
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
|
||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng=
|
||||
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
|
||||
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
|
||||
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
|
||||
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
||||
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
|
||||
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
|
||||
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
|
||||
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
|
||||
github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk=
|
||||
github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
|
||||
github.com/spf13/viper v1.8.0 h1:QRwDgoG8xX+kp69di68D+YYTCWfYEckbZRfUlEIAal0=
|
||||
github.com/spf13/viper v1.8.0/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=
|
||||
github.com/splitio/go-client/v6 v6.0.0/go.mod h1:dTs/FpMfHb01sLso64uvudHFItiAW59ypqsK2Pbhuq4=
|
||||
github.com/splitio/go-split-commons/v2 v2.0.0/go.mod h1:iJVknIQ96Ezic+5FJ4vHYdqDfOV5w7s+w2wKjwgjFB0=
|
||||
github.com/splitio/go-toolkit/v3 v3.0.0/go.mod h1:HGgawLnM2RlM84zVRbATpPMjF7H6u9CUYG6RlpwOlOk=
|
||||
@@ -940,6 +965,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/zfjagann/golang-ring v0.0.0-20210116075443-7c86fdb43134 h1:itYC8Ycx8aVBN7a8q1Yr187W5WmQthvYU13+f4rOWkU=
|
||||
github.com/zfjagann/golang-ring v0.0.0-20210116075443-7c86fdb43134/go.mod h1:0MsIttMJIF/8Y7x0XjonJP7K99t3sR6bjj4m5S4JmqU=
|
||||
github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
|
||||
@@ -947,6 +973,9 @@ go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
|
||||
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
|
||||
go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
|
||||
go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=
|
||||
go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
|
||||
go.opencensus.io v0.19.1/go.mod h1:gug0GbSHa8Pafr0d2urOSgoXHZ6x/RUlaiT0d9pqb4A=
|
||||
go.opencensus.io v0.19.2/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M=
|
||||
@@ -957,6 +986,8 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
|
||||
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
|
||||
go.opentelemetry.io/otel v0.11.0/go.mod h1:G8UCk+KooF2HLkgo8RHX9epABH/aRGYET7gQOqBVdB0=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
@@ -972,8 +1003,9 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
|
||||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
|
||||
go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM=
|
||||
go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
|
||||
go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
|
||||
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
|
||||
go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
|
||||
golang.org/dl v0.0.0-20190829154251-82a15e2f2ead/go.mod h1:IUMfjQLJQd4UTqG1Z90tenwKoCX93Gn3MAQJMOSBsDQ=
|
||||
golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw=
|
||||
@@ -982,7 +1014,6 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf
|
||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190131182504-b8fe1690c613/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
@@ -993,10 +1024,10 @@ golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E=
|
||||
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w=
|
||||
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||
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=
|
||||
@@ -1014,8 +1045,8 @@ golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f/go.mod h1:kZ7UVZpmo3dzQBMx
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.0.0-20200927104501-e162460cd6b5/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb h1:fqpd0EBDzlHRCjiphRR5Zo/RSWWQlWv34418dnEixWk=
|
||||
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9 h1:D0iM1dTCbD5Dg1CbuvLC/v/agLc79efSj/L35Q3Vqhs=
|
||||
golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
|
||||
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
@@ -1027,8 +1058,9 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
|
||||
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k=
|
||||
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
@@ -1037,8 +1069,10 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
|
||||
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449 h1:xUIPaMhvROX9dhPvRCenIJtU78+lbEenGbgqB5hfHCQ=
|
||||
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@@ -1084,8 +1118,16 @@ golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0 h1:wBouT66WTYFXdxfVdz9sVWARVd/2vfGcmI45D2gj45M=
|
||||
golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
@@ -1094,8 +1136,15 @@ golang.org/x/oauth2 v0.0.0-20190319182350-c85d3e98c914/go.mod h1:gOpvHmFTYa4Iltr
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602 h1:0Ja1LBD+yisY6RWM/BH7TJVXWsSjs2VwBSmvSX4HdBc=
|
||||
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210615190721-d04028783cf1 h1:x622Z2o4hgCr/4CiKWc51jHVKaWdtVpBNmEI8wI9Qns=
|
||||
golang.org/x/oauth2 v0.0.0-20210615190721-d04028783cf1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@@ -1105,6 +1154,9 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -1160,19 +1212,34 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201007165808-a893ed343c85/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201110211018-35f3e6cf4a65/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210217105451-b926d437f341 h1:2/QtM1mL37YmcsT8HaDNHDgTqqFVw+zr8UzMiBVLzYU=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210217105451-b926d437f341/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
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=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
|
||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
@@ -1231,19 +1298,27 @@ golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roY
|
||||
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200529172331-a64b76657301/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200731060945-b5fad4ed8dd6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20201008025239-9df69603baec h1:RY2OghEV/7X1MLaecgm1mwFd3sGvUddm5pGVSxQvX0c=
|
||||
golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
|
||||
golang.org/x/tools v0.0.0-20201008025239-9df69603baec/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU=
|
||||
golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gomod.garykim.dev/nc-talk v0.1.7 h1:G2qsiRcyaj5FEADQlulsBAFJHs27tPmH9VtKK+at9SM=
|
||||
gomod.garykim.dev/nc-talk v0.1.7/go.mod h1:DNucAJ6zeaumBEwV5NiYk+Eea8Ca+Q5f+plhz9F7d58=
|
||||
gomod.garykim.dev/nc-talk v0.2.2 h1:+U+daJFPPuwM7yRXYazeMHZgIBSGP6SeQURO0O5a32I=
|
||||
gomod.garykim.dev/nc-talk v0.2.2/go.mod h1:q/Adot/H7iqi+H4lANopV7/xcMf+sX3AZXUXqiITwok=
|
||||
google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
|
||||
google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
|
||||
google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
|
||||
@@ -1266,6 +1341,12 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M
|
||||
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
||||
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
|
||||
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
|
||||
google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
|
||||
google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
|
||||
google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
|
||||
google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
|
||||
google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
|
||||
google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
@@ -1273,8 +1354,9 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
|
||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
|
||||
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc=
|
||||
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
|
||||
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
@@ -1306,13 +1388,25 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG
|
||||
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
|
||||
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20201007142714-5c0e72c5e71e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
|
||||
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
|
||||
google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
|
||||
@@ -1334,7 +1428,15 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa
|
||||
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
|
||||
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
|
||||
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
|
||||
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
@@ -1344,8 +1446,10 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
|
||||
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
@@ -1359,7 +1463,6 @@ gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
|
||||
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
|
||||
gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU=
|
||||
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
@@ -1378,14 +1481,17 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN
|
||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||
gopkg.in/yaml.v2 v2.2.1/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.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o=
|
||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
@@ -1395,7 +1501,6 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
|
||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
layeh.com/gopus v0.0.0-20161224163843-0ebf989153aa/go.mod h1:AOef7vHz0+v4sWwJnr0jSyHiX/1NgsMoaxl+rEPz/I0=
|
||||
layeh.com/gumble v0.0.0-20200818122324-146f9205029b h1:Kne6wkHqbqrygRsqs5XUNhSs84DFG5TYMeCkCbM56sY=
|
||||
|
Before Width: | Height: | Size: 270 KiB |
Before Width: | Height: | Size: 170 KiB |
Before Width: | Height: | Size: 282 KiB |
Before Width: | Height: | Size: 204 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 62 KiB |
@@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
version = "1.22.1"
|
||||
version = "1.22.3"
|
||||
githash string
|
||||
|
||||
flagConfig = flag.String("conf", "matterbridge.toml", "config file")
|
||||
|
@@ -9,12 +9,12 @@
|
||||
[irc]
|
||||
|
||||
#You can configure multiple servers "[irc.name]" or "[irc.name2]"
|
||||
#In this example we use [irc.freenode]
|
||||
#In this example we use [irc.libera]
|
||||
#REQUIRED
|
||||
[irc.freenode]
|
||||
[irc.libera]
|
||||
#irc server to connect to.
|
||||
#REQUIRED
|
||||
Server="irc.freenode.net:6667"
|
||||
Server="irc.libera.chat:6667"
|
||||
|
||||
#Password for irc server (if necessary)
|
||||
#OPTIONAL (default "")
|
||||
@@ -24,7 +24,7 @@ Password=""
|
||||
#OPTIONAL (default false)
|
||||
UseTLS=false
|
||||
|
||||
#Enable SASL (PLAIN) authentication. (freenode requires this from eg AWS hosts)
|
||||
#Enable SASL (PLAIN) authentication. (libera requires this from eg AWS hosts)
|
||||
#It uses NickServNick and NickServPassword as login and password
|
||||
#OPTIONAL (default false)
|
||||
UseSASL=false
|
||||
@@ -55,7 +55,7 @@ Charset=""
|
||||
#REQUIRED
|
||||
Nick="matterbot"
|
||||
|
||||
#If you registered your bot with a service like Nickserv on freenode.
|
||||
#If you registered your bot with a service like Nickserv on libera.
|
||||
#Also being used when UseSASL=true
|
||||
#
|
||||
#Note: if you want do to quakenet auth, set NickServNick="Q@CServe.quakenet.org"
|
||||
@@ -76,20 +76,24 @@ MessageDelay=1300
|
||||
|
||||
#Maximum amount of messages to hold in queue. If queue is full
|
||||
#messages will be dropped.
|
||||
#<message clipped> will be add to the message that fills the queue.
|
||||
#<clipped message> will be add to the message that fills the queue.
|
||||
#OPTIONAL (default 30)
|
||||
MessageQueue=30
|
||||
|
||||
#Maximum length of message sent to irc server. If it exceeds
|
||||
#<message clipped> will be add to the message.
|
||||
#<clipped message> will be add to the message.
|
||||
#OPTIONAL (default 400)
|
||||
MessageLength=400
|
||||
|
||||
#Split messages on MessageLength instead of showing the <message clipped>
|
||||
#Split messages on MessageLength instead of showing the <clipped message>
|
||||
#WARNING: this could lead to flooding
|
||||
#OPTIONAL (default false)
|
||||
MessageSplit=false
|
||||
|
||||
#Message to show when a message is too big
|
||||
#Default "<clipped message>"
|
||||
MessageClipped="<clipped message>"
|
||||
|
||||
#Delay in seconds to rejoin a channel when kicked
|
||||
#OPTIONAL (default 0)
|
||||
RejoinDelay=0
|
||||
@@ -826,6 +830,10 @@ PreserveThreading=false
|
||||
#OPTIONAL (default false)
|
||||
ShowUserTyping=false
|
||||
|
||||
#Message to show when a message is too big
|
||||
#Default "<clipped message>"
|
||||
MessageClipped="<clipped message>"
|
||||
|
||||
###################################################################
|
||||
#discord section
|
||||
###################################################################
|
||||
@@ -848,6 +856,14 @@ Server="yourservername"
|
||||
## All settings below can be reloaded by editing the file.
|
||||
## They are also all optional.
|
||||
|
||||
# AllowMention controls which mentions are allowed. If not specified, all mentions are allowed.
|
||||
# Note that even when a mention is not allowed, it will still be displayed nicely and be clickable. It just prevents the ping/notification.
|
||||
#
|
||||
# "everyone" allows @everyone and @here mentions
|
||||
# "roles" allows @role mentions
|
||||
# "users" allows @user mentions
|
||||
AllowMention=["everyone", "roles", "users"]
|
||||
|
||||
# ShowEmbeds shows the title, description and URL of embedded messages (sent by other bots)
|
||||
ShowEmbeds=false
|
||||
|
||||
@@ -953,6 +969,10 @@ ShowTopicChange=false
|
||||
# Supported from the following bridges: slack
|
||||
SyncTopic=false
|
||||
|
||||
#Message to show when a message is too big
|
||||
#Default "<clipped message>"
|
||||
MessageClipped="<clipped message>"
|
||||
|
||||
###################################################################
|
||||
#telegram section
|
||||
###################################################################
|
||||
@@ -1011,6 +1031,13 @@ QuoteFormat="{MESSAGE} (re @{QUOTENICK}: {QUOTEMESSAGE})"
|
||||
#OPTIONAL (default false)
|
||||
MediaConvertWebPToPNG=false
|
||||
|
||||
#Convert Tgs (Telegram animated sticker) images to PNG before upload.
|
||||
#This is useful when your bridge also contains platforms that do not support animated WebP files, like Discord.
|
||||
#This requires the external dependency `lottie`, which can be installed like this:
|
||||
#`pip install lottie cairosvg`
|
||||
#https://github.com/42wim/matterbridge/issues/874
|
||||
#MediaConvertTgs="png"
|
||||
|
||||
#Disable sending of edits to other bridges
|
||||
#OPTIONAL (default false)
|
||||
EditDisable=false
|
||||
@@ -1230,12 +1257,16 @@ ShowTopicChange=false
|
||||
#REQUIRED
|
||||
Server="https://matrix.org"
|
||||
|
||||
#login/pass of your bot.
|
||||
#Authentication for your bot.
|
||||
#You can use either login/password OR mxid/token. The latter will be preferred if found.
|
||||
#Use a dedicated user for this and not your own!
|
||||
#Messages sent from this user will not be relayed to avoid loops.
|
||||
#REQUIRED
|
||||
Login="yourlogin"
|
||||
Password="yourpass"
|
||||
#OR
|
||||
MxID="@yourlogin:domain.tld"
|
||||
Token="tokenforthebotuser"
|
||||
|
||||
#Whether to send the homeserver suffix. eg ":matrix.org" in @username:matrix.org
|
||||
#to other bridges, or only send "username".(true only sends username)
|
||||
@@ -1416,9 +1447,7 @@ StripNick=false
|
||||
ShowTopicChange=false
|
||||
|
||||
###################################################################
|
||||
#
|
||||
# NCTalk (Nextcloud Talk)
|
||||
#
|
||||
###################################################################
|
||||
|
||||
[nctalk.bridge]
|
||||
@@ -1441,9 +1470,7 @@ Password = "talkuserpass"
|
||||
GuestSuffix = " (Guest)"
|
||||
|
||||
###################################################################
|
||||
#
|
||||
# Mumble
|
||||
#
|
||||
###################################################################
|
||||
|
||||
[mumble.bridge]
|
||||
@@ -1486,9 +1513,14 @@ TLSCACertificate=mumble-ca.crt
|
||||
# OPTIONAL (default false)
|
||||
SkipTLSVerify=false
|
||||
|
||||
#Message to show when a message is too big
|
||||
#Default "<clipped message>"
|
||||
MessageClipped="<clipped message>"
|
||||
|
||||
###################################################################
|
||||
#VK
|
||||
###################################################################
|
||||
#
|
||||
[vk.myvk]
|
||||
#Group access token
|
||||
#See https://vk.com/dev/bots_docs
|
||||
@@ -1499,9 +1531,7 @@ Token="Yourtokenhere"
|
||||
GroupID=123456789
|
||||
|
||||
###################################################################
|
||||
#
|
||||
# WhatsApp
|
||||
#
|
||||
###################################################################
|
||||
|
||||
[whatsapp.bridge]
|
||||
@@ -1528,9 +1558,7 @@ Label="Organization"
|
||||
|
||||
|
||||
###################################################################
|
||||
#
|
||||
# zulip
|
||||
#
|
||||
###################################################################
|
||||
|
||||
[zulip]
|
||||
@@ -1819,7 +1847,7 @@ enable=true
|
||||
|
||||
# account specified above
|
||||
# REQUIRED
|
||||
account="irc.freenode"
|
||||
account="irc.libera"
|
||||
|
||||
# The channel key in each gateway is mapped to a similar group chat ID on the chat platform
|
||||
# To find the group chat ID for different platforms, refer to the table below
|
||||
@@ -1877,7 +1905,7 @@ enable=true
|
||||
|
||||
#[[gateway.out]] specifies the account and channels we will sent messages to.
|
||||
[[gateway.out]]
|
||||
account="irc.freenode"
|
||||
account="irc.libera"
|
||||
channel="#testing"
|
||||
|
||||
#OPTIONAL - only used for IRC and XMPP protocols at the moment
|
||||
|
@@ -1,21 +1,18 @@
|
||||
FROM alpine AS builder
|
||||
|
||||
COPY . /go/src/github.com/42wim/matterbridge
|
||||
COPY . /go/src/matterbridge
|
||||
RUN apk add \
|
||||
go \
|
||||
git \
|
||||
gcc \
|
||||
musl-dev \
|
||||
&& cd /go/src/github.com/42wim/matterbridge \
|
||||
&& export GOPATH=/go \
|
||||
&& go get \
|
||||
&& go build -x -ldflags "-X main.githash=$(git log --pretty=format:'%h' -n 1)" -o /bin/matterbridge
|
||||
&& cd /go/src/matterbridge \
|
||||
&& go build -mod vendor -ldflags "-X main.githash=$(git log --pretty=format:'%h' -n 1)" -o /bin/matterbridge
|
||||
|
||||
FROM alpine
|
||||
RUN apk --no-cache add \
|
||||
ca-certificates \
|
||||
cairo \
|
||||
libjpeg-turbo \
|
||||
libwebp-dev \
|
||||
mailcap \
|
||||
py3-webencodings \
|
||||
python3 \
|
||||
|
14842
vendor/github.com/Rhymen/go-whatsapp/binary/proto/def.pb.go
generated
vendored
445
vendor/github.com/Rhymen/go-whatsapp/binary/proto/def.proto
generated
vendored
@@ -1,6 +1,12 @@
|
||||
syntax = "proto2";
|
||||
package proto;
|
||||
|
||||
message PaymentMoney {
|
||||
optional int64 value = 1;
|
||||
optional uint32 offset = 2;
|
||||
optional string currencyCode = 3;
|
||||
}
|
||||
|
||||
message HydratedQuickReplyButton {
|
||||
optional string displayText = 1;
|
||||
optional string id = 2;
|
||||
@@ -69,18 +75,46 @@ message InteractiveAnnotation {
|
||||
}
|
||||
}
|
||||
|
||||
message DeviceListMetadata {
|
||||
optional bytes senderKeyHash = 1;
|
||||
optional uint64 senderTimestamp = 2;
|
||||
optional bytes recipientKeyHash = 8;
|
||||
optional uint64 recipientTimestamp = 9;
|
||||
}
|
||||
|
||||
message MessageContextInfo {
|
||||
optional DeviceListMetadata deviceListMetadata = 1;
|
||||
}
|
||||
|
||||
message AdReplyInfo {
|
||||
optional string advertiserName = 1;
|
||||
enum AD_REPLY_INFO_MEDIATYPE {
|
||||
enum AdReplyInfoMediaType {
|
||||
NONE = 0;
|
||||
IMAGE = 1;
|
||||
VIDEO = 2;
|
||||
}
|
||||
optional AD_REPLY_INFO_MEDIATYPE mediaType = 2;
|
||||
optional AdReplyInfoMediaType mediaType = 2;
|
||||
optional bytes jpegThumbnail = 16;
|
||||
optional string caption = 17;
|
||||
}
|
||||
|
||||
message ExternalAdReplyInfo {
|
||||
optional string title = 1;
|
||||
optional string body = 2;
|
||||
enum ExternalAdReplyInfoMediaType {
|
||||
NONE = 0;
|
||||
IMAGE = 1;
|
||||
VIDEO = 2;
|
||||
}
|
||||
optional ExternalAdReplyInfoMediaType mediaType = 3;
|
||||
optional string thumbnailUrl = 4;
|
||||
optional string mediaUrl = 5;
|
||||
optional bytes thumbnail = 6;
|
||||
optional string sourceType = 7;
|
||||
optional string sourceId = 8;
|
||||
optional string sourceUrl = 9;
|
||||
}
|
||||
|
||||
message ContextInfo {
|
||||
optional string stanzaId = 1;
|
||||
optional string participant = 2;
|
||||
@@ -96,6 +130,8 @@ message ContextInfo {
|
||||
optional MessageKey placeholderKey = 24;
|
||||
optional uint32 expiration = 25;
|
||||
optional int64 ephemeralSettingTimestamp = 26;
|
||||
optional bytes ephemeralSharedSecret = 27;
|
||||
optional ExternalAdReplyInfo externalAdReply = 28;
|
||||
}
|
||||
|
||||
message SenderKeyDistributionMessage {
|
||||
@@ -125,6 +161,27 @@ message ImageMessage {
|
||||
repeated uint32 scanLengths = 22;
|
||||
optional bytes midQualityFileSha256 = 23;
|
||||
optional bytes midQualityFileEncSha256 = 24;
|
||||
optional bool viewOnce = 25;
|
||||
optional string thumbnailDirectPath = 26;
|
||||
optional bytes thumbnailSha256 = 27;
|
||||
optional bytes thumbnailEncSha256 = 28;
|
||||
}
|
||||
|
||||
message InvoiceMessage {
|
||||
optional string note = 1;
|
||||
optional string token = 2;
|
||||
enum InvoiceMessageAttachmentType {
|
||||
IMAGE = 0;
|
||||
PDF = 1;
|
||||
}
|
||||
optional InvoiceMessageAttachmentType attachmentType = 3;
|
||||
optional string attachmentMimetype = 4;
|
||||
optional bytes attachmentMediaKey = 5;
|
||||
optional int64 attachmentMediaKeyTimestamp = 6;
|
||||
optional bytes attachmentFileSha256 = 7;
|
||||
optional bytes attachmentFileEncSha256 = 8;
|
||||
optional string attachmentDirectPath = 9;
|
||||
optional bytes attachmentJpegThumbnail = 10;
|
||||
}
|
||||
|
||||
message ContactMessage {
|
||||
@@ -156,7 +213,7 @@ message ExtendedTextMessage {
|
||||
optional string title = 6;
|
||||
optional fixed32 textArgb = 7;
|
||||
optional fixed32 backgroundArgb = 8;
|
||||
enum EXTENDED_TEXT_MESSAGE_FONTTYPE {
|
||||
enum ExtendedTextMessageFontType {
|
||||
SANS_SERIF = 0;
|
||||
SERIF = 1;
|
||||
NORICAN_REGULAR = 2;
|
||||
@@ -164,12 +221,12 @@ message ExtendedTextMessage {
|
||||
BEBASNEUE_REGULAR = 4;
|
||||
OSWALD_HEAVY = 5;
|
||||
}
|
||||
optional EXTENDED_TEXT_MESSAGE_FONTTYPE font = 9;
|
||||
enum EXTENDED_TEXT_MESSAGE_PREVIEWTYPE {
|
||||
optional ExtendedTextMessageFontType font = 9;
|
||||
enum ExtendedTextMessagePreviewType {
|
||||
NONE = 0;
|
||||
VIDEO = 1;
|
||||
}
|
||||
optional EXTENDED_TEXT_MESSAGE_PREVIEWTYPE previewType = 10;
|
||||
optional ExtendedTextMessagePreviewType previewType = 10;
|
||||
optional bytes jpegThumbnail = 16;
|
||||
optional ContextInfo contextInfo = 17;
|
||||
optional bool doNotPlayInline = 18;
|
||||
@@ -187,8 +244,14 @@ message DocumentMessage {
|
||||
optional bytes fileEncSha256 = 9;
|
||||
optional string directPath = 10;
|
||||
optional int64 mediaKeyTimestamp = 11;
|
||||
optional bool contactVcard = 12;
|
||||
optional string thumbnailDirectPath = 13;
|
||||
optional bytes thumbnailSha256 = 14;
|
||||
optional bytes thumbnailEncSha256 = 15;
|
||||
optional bytes jpegThumbnail = 16;
|
||||
optional ContextInfo contextInfo = 17;
|
||||
optional uint32 thumbnailHeight = 18;
|
||||
optional uint32 thumbnailWidth = 19;
|
||||
}
|
||||
|
||||
message AudioMessage {
|
||||
@@ -224,12 +287,16 @@ message VideoMessage {
|
||||
optional bytes jpegThumbnail = 16;
|
||||
optional ContextInfo contextInfo = 17;
|
||||
optional bytes streamingSidecar = 18;
|
||||
enum VIDEO_MESSAGE_ATTRIBUTION {
|
||||
enum VideoMessageAttribution {
|
||||
NONE = 0;
|
||||
GIPHY = 1;
|
||||
TENOR = 2;
|
||||
}
|
||||
optional VIDEO_MESSAGE_ATTRIBUTION gifAttribution = 19;
|
||||
optional VideoMessageAttribution gifAttribution = 19;
|
||||
optional bool viewOnce = 20;
|
||||
optional string thumbnailDirectPath = 21;
|
||||
optional bytes thumbnailSha256 = 22;
|
||||
optional bytes thumbnailEncSha256 = 23;
|
||||
}
|
||||
|
||||
message Call {
|
||||
@@ -243,16 +310,25 @@ message Chat {
|
||||
|
||||
message ProtocolMessage {
|
||||
optional MessageKey key = 1;
|
||||
enum PROTOCOL_MESSAGE_TYPE {
|
||||
enum ProtocolMessageType {
|
||||
REVOKE = 0;
|
||||
EPHEMERAL_SETTING = 3;
|
||||
EPHEMERAL_SYNC_RESPONSE = 4;
|
||||
HISTORY_SYNC_NOTIFICATION = 5;
|
||||
APP_STATE_SYNC_KEY_SHARE = 6;
|
||||
APP_STATE_SYNC_KEY_REQUEST = 7;
|
||||
MSG_FANOUT_BACKFILL_REQUEST = 8;
|
||||
INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC = 9;
|
||||
APP_STATE_FATAL_EXCEPTION_NOTIFICATION = 10;
|
||||
}
|
||||
optional PROTOCOL_MESSAGE_TYPE type = 2;
|
||||
optional ProtocolMessageType type = 2;
|
||||
optional uint32 ephemeralExpiration = 4;
|
||||
optional int64 ephemeralSettingTimestamp = 5;
|
||||
optional HistorySyncNotification historySyncNotification = 6;
|
||||
optional AppStateSyncKeyShare appStateSyncKeyShare = 7;
|
||||
optional AppStateSyncKeyRequest appStateSyncKeyRequest = 8;
|
||||
optional InitialSecurityNotificationSettingSync initialSecurityNotificationSettingSync = 9;
|
||||
optional AppStateFatalExceptionNotification appStateFatalExceptionNotification = 10;
|
||||
}
|
||||
|
||||
message HistorySyncNotification {
|
||||
@@ -261,14 +337,54 @@ message HistorySyncNotification {
|
||||
optional bytes mediaKey = 3;
|
||||
optional bytes fileEncSha256 = 4;
|
||||
optional string directPath = 5;
|
||||
enum HISTORY_SYNC_NOTIFICATION_HISTORYSYNCTYPE {
|
||||
enum HistorySyncNotificationHistorySyncType {
|
||||
INITIAL_BOOTSTRAP = 0;
|
||||
INITIAL_STATUS_V3 = 1;
|
||||
FULL = 2;
|
||||
RECENT = 3;
|
||||
PUSH_NAME = 4;
|
||||
}
|
||||
optional HISTORY_SYNC_NOTIFICATION_HISTORYSYNCTYPE syncType = 6;
|
||||
optional HistorySyncNotificationHistorySyncType syncType = 6;
|
||||
optional uint32 chunkOrder = 7;
|
||||
optional string originalMessageId = 8;
|
||||
}
|
||||
|
||||
message AppStateSyncKey {
|
||||
optional AppStateSyncKeyId keyId = 1;
|
||||
optional AppStateSyncKeyData keyData = 2;
|
||||
}
|
||||
|
||||
message AppStateSyncKeyId {
|
||||
optional bytes keyId = 1;
|
||||
}
|
||||
|
||||
message AppStateSyncKeyFingerprint {
|
||||
optional uint32 rawId = 1;
|
||||
optional uint32 currentIndex = 2;
|
||||
repeated uint32 deviceIndexes = 3 [packed=true];
|
||||
}
|
||||
|
||||
message AppStateSyncKeyData {
|
||||
optional bytes keyData = 1;
|
||||
optional AppStateSyncKeyFingerprint fingerprint = 2;
|
||||
optional int64 timestamp = 3;
|
||||
}
|
||||
|
||||
message AppStateSyncKeyShare {
|
||||
repeated AppStateSyncKey keys = 1;
|
||||
}
|
||||
|
||||
message AppStateSyncKeyRequest {
|
||||
repeated AppStateSyncKeyId keyIds = 1;
|
||||
}
|
||||
|
||||
message AppStateFatalExceptionNotification {
|
||||
repeated string collectionNames = 1;
|
||||
optional int64 timestamp = 2;
|
||||
}
|
||||
|
||||
message InitialSecurityNotificationSettingSync {
|
||||
optional bool securityNotificationEnabled = 1;
|
||||
}
|
||||
|
||||
message ContactsArrayMessage {
|
||||
@@ -283,7 +399,7 @@ message HSMCurrency {
|
||||
}
|
||||
|
||||
message HSMDateTimeComponent {
|
||||
enum HSM_DATE_TIME_COMPONENT_DAYOFWEEKTYPE {
|
||||
enum HSMDateTimeComponentDayOfWeekType {
|
||||
MONDAY = 1;
|
||||
TUESDAY = 2;
|
||||
WEDNESDAY = 3;
|
||||
@@ -292,17 +408,17 @@ message HSMDateTimeComponent {
|
||||
SATURDAY = 6;
|
||||
SUNDAY = 7;
|
||||
}
|
||||
optional HSM_DATE_TIME_COMPONENT_DAYOFWEEKTYPE dayOfWeek = 1;
|
||||
optional HSMDateTimeComponentDayOfWeekType dayOfWeek = 1;
|
||||
optional uint32 year = 2;
|
||||
optional uint32 month = 3;
|
||||
optional uint32 dayOfMonth = 4;
|
||||
optional uint32 hour = 5;
|
||||
optional uint32 minute = 6;
|
||||
enum HSM_DATE_TIME_COMPONENT_CALENDARTYPE {
|
||||
enum HSMDateTimeComponentCalendarType {
|
||||
GREGORIAN = 1;
|
||||
SOLAR_HIJRI = 2;
|
||||
}
|
||||
optional HSM_DATE_TIME_COMPONENT_CALENDARTYPE calendar = 7;
|
||||
optional HSMDateTimeComponentCalendarType calendar = 7;
|
||||
}
|
||||
|
||||
message HSMDateTimeUnixEpoch {
|
||||
@@ -347,6 +463,7 @@ message RequestPaymentMessage {
|
||||
optional uint64 amount1000 = 2;
|
||||
optional string requestFrom = 3;
|
||||
optional int64 expiryTimestamp = 5;
|
||||
optional PaymentMoney amount = 6;
|
||||
}
|
||||
|
||||
message DeclinePaymentRequestMessage {
|
||||
@@ -457,6 +574,66 @@ message ProductMessage {
|
||||
optional ContextInfo contextInfo = 17;
|
||||
}
|
||||
|
||||
message OrderMessage {
|
||||
optional string orderId = 1;
|
||||
optional bytes thumbnail = 2;
|
||||
optional int32 itemCount = 3;
|
||||
enum OrderMessageOrderStatus {
|
||||
INQUIRY = 1;
|
||||
}
|
||||
optional OrderMessageOrderStatus status = 4;
|
||||
enum OrderMessageOrderSurface {
|
||||
CATALOG = 1;
|
||||
}
|
||||
optional OrderMessageOrderSurface surface = 5;
|
||||
optional string message = 6;
|
||||
optional string orderTitle = 7;
|
||||
optional string sellerJid = 8;
|
||||
optional string token = 9;
|
||||
optional int64 totalAmount1000 = 10;
|
||||
optional string totalCurrencyCode = 11;
|
||||
optional ContextInfo contextInfo = 17;
|
||||
}
|
||||
|
||||
message Row {
|
||||
optional string title = 1;
|
||||
optional string description = 2;
|
||||
optional string rowId = 3;
|
||||
}
|
||||
|
||||
message Section {
|
||||
optional string title = 1;
|
||||
repeated Row rows = 2;
|
||||
}
|
||||
|
||||
message ListMessage {
|
||||
optional string title = 1;
|
||||
optional string description = 2;
|
||||
optional string buttonText = 3;
|
||||
enum ListMessageListType {
|
||||
UNKNOWN = 0;
|
||||
SINGLE_SELECT = 1;
|
||||
}
|
||||
optional ListMessageListType listType = 4;
|
||||
repeated Section sections = 5;
|
||||
}
|
||||
|
||||
message SingleSelectReply {
|
||||
optional string selectedRowId = 1;
|
||||
}
|
||||
|
||||
message ListResponseMessage {
|
||||
optional string title = 1;
|
||||
enum ListResponseMessageListType {
|
||||
UNKNOWN = 0;
|
||||
SINGLE_SELECT = 1;
|
||||
}
|
||||
optional ListResponseMessageListType listType = 2;
|
||||
optional SingleSelectReply singleSelectReply = 3;
|
||||
optional ContextInfo contextInfo = 4;
|
||||
optional string description = 5;
|
||||
}
|
||||
|
||||
message GroupInviteMessage {
|
||||
optional string groupJid = 1;
|
||||
optional string inviteCode = 2;
|
||||
@@ -467,13 +644,72 @@ message GroupInviteMessage {
|
||||
optional ContextInfo contextInfo = 7;
|
||||
}
|
||||
|
||||
message EphemeralSetting {
|
||||
optional string chatJid = 1;
|
||||
optional uint32 ephemeralExpiration = 2;
|
||||
optional int64 ephemeralSettingTimestamp = 3;
|
||||
}
|
||||
|
||||
message DeviceSentMessage {
|
||||
optional string destinationJid = 1;
|
||||
optional Message message = 2;
|
||||
optional string phash = 3;
|
||||
repeated EphemeralSetting broadcastEphemeralSettings = 4;
|
||||
}
|
||||
|
||||
message DeviceSyncMessage {
|
||||
optional bytes serializedXmlBytes = 1;
|
||||
message FutureProofMessage {
|
||||
optional Message message = 1;
|
||||
}
|
||||
|
||||
message ButtonText {
|
||||
optional string displayText = 1;
|
||||
}
|
||||
|
||||
message Button {
|
||||
optional string buttonId = 1;
|
||||
optional ButtonText buttonText = 2;
|
||||
enum ButtonType {
|
||||
UNKNOWN = 0;
|
||||
RESPONSE = 1;
|
||||
}
|
||||
optional ButtonType type = 3;
|
||||
}
|
||||
|
||||
message ButtonsMessage {
|
||||
optional string contentText = 6;
|
||||
optional string footerText = 7;
|
||||
optional ContextInfo contextInfo = 8;
|
||||
repeated Button buttons = 9;
|
||||
enum ButtonsMessageHeaderType {
|
||||
UNKNOWN = 0;
|
||||
EMPTY = 1;
|
||||
TEXT = 2;
|
||||
DOCUMENT = 3;
|
||||
IMAGE = 4;
|
||||
VIDEO = 5;
|
||||
LOCATION = 6;
|
||||
}
|
||||
optional ButtonsMessageHeaderType headerType = 10;
|
||||
oneof header {
|
||||
string text = 1;
|
||||
DocumentMessage documentMessage = 2;
|
||||
ImageMessage imageMessage = 3;
|
||||
VideoMessage videoMessage = 4;
|
||||
LocationMessage locationMessage = 5;
|
||||
}
|
||||
}
|
||||
|
||||
message ButtonsResponseMessage {
|
||||
optional string selectedButtonId = 1;
|
||||
optional ContextInfo contextInfo = 3;
|
||||
enum ButtonsResponseMessageType {
|
||||
UNKNOWN = 0;
|
||||
DISPLAY_TEXT = 1;
|
||||
}
|
||||
optional ButtonsResponseMessageType type = 4;
|
||||
oneof response {
|
||||
string selectedDisplayText = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message Message {
|
||||
@@ -503,7 +739,15 @@ message Message {
|
||||
optional TemplateButtonReplyMessage templateButtonReplyMessage = 29;
|
||||
optional ProductMessage productMessage = 30;
|
||||
optional DeviceSentMessage deviceSentMessage = 31;
|
||||
optional DeviceSyncMessage deviceSyncMessage = 32;
|
||||
optional MessageContextInfo messageContextInfo = 35;
|
||||
optional ListMessage listMessage = 36;
|
||||
optional FutureProofMessage viewOnceMessage = 37;
|
||||
optional OrderMessage orderMessage = 38;
|
||||
optional ListResponseMessage listResponseMessage = 39;
|
||||
optional FutureProofMessage ephemeralMessage = 40;
|
||||
optional InvoiceMessage invoiceMessage = 41;
|
||||
optional ButtonsMessage buttonsMessage = 42;
|
||||
optional ButtonsResponseMessage buttonsResponseMessage = 43;
|
||||
}
|
||||
|
||||
message MessageKey {
|
||||
@@ -514,51 +758,52 @@ message MessageKey {
|
||||
}
|
||||
|
||||
message WebFeatures {
|
||||
enum WEB_FEATURES_FLAG {
|
||||
enum WebFeaturesFlag {
|
||||
NOT_STARTED = 0;
|
||||
FORCE_UPGRADE = 1;
|
||||
DEVELOPMENT = 2;
|
||||
PRODUCTION = 3;
|
||||
}
|
||||
optional WEB_FEATURES_FLAG labelsDisplay = 1;
|
||||
optional WEB_FEATURES_FLAG voipIndividualOutgoing = 2;
|
||||
optional WEB_FEATURES_FLAG groupsV3 = 3;
|
||||
optional WEB_FEATURES_FLAG groupsV3Create = 4;
|
||||
optional WEB_FEATURES_FLAG changeNumberV2 = 5;
|
||||
optional WEB_FEATURES_FLAG queryStatusV3Thumbnail = 6;
|
||||
optional WEB_FEATURES_FLAG liveLocations = 7;
|
||||
optional WEB_FEATURES_FLAG queryVname = 8;
|
||||
optional WEB_FEATURES_FLAG voipIndividualIncoming = 9;
|
||||
optional WEB_FEATURES_FLAG quickRepliesQuery = 10;
|
||||
optional WEB_FEATURES_FLAG payments = 11;
|
||||
optional WEB_FEATURES_FLAG stickerPackQuery = 12;
|
||||
optional WEB_FEATURES_FLAG liveLocationsFinal = 13;
|
||||
optional WEB_FEATURES_FLAG labelsEdit = 14;
|
||||
optional WEB_FEATURES_FLAG mediaUpload = 15;
|
||||
optional WEB_FEATURES_FLAG mediaUploadRichQuickReplies = 18;
|
||||
optional WEB_FEATURES_FLAG vnameV2 = 19;
|
||||
optional WEB_FEATURES_FLAG videoPlaybackUrl = 20;
|
||||
optional WEB_FEATURES_FLAG statusRanking = 21;
|
||||
optional WEB_FEATURES_FLAG voipIndividualVideo = 22;
|
||||
optional WEB_FEATURES_FLAG thirdPartyStickers = 23;
|
||||
optional WEB_FEATURES_FLAG frequentlyForwardedSetting = 24;
|
||||
optional WEB_FEATURES_FLAG groupsV4JoinPermission = 25;
|
||||
optional WEB_FEATURES_FLAG recentStickers = 26;
|
||||
optional WEB_FEATURES_FLAG catalog = 27;
|
||||
optional WEB_FEATURES_FLAG starredStickers = 28;
|
||||
optional WEB_FEATURES_FLAG voipGroupCall = 29;
|
||||
optional WEB_FEATURES_FLAG templateMessage = 30;
|
||||
optional WEB_FEATURES_FLAG templateMessageInteractivity = 31;
|
||||
optional WEB_FEATURES_FLAG ephemeralMessages = 32;
|
||||
optional WEB_FEATURES_FLAG e2ENotificationSync = 33;
|
||||
optional WEB_FEATURES_FLAG recentStickersV2 = 34;
|
||||
}
|
||||
|
||||
message TabletNotificationsInfo {
|
||||
optional uint64 timestamp = 2;
|
||||
optional uint32 unreadChats = 3;
|
||||
optional uint32 notifyMessageCount = 4;
|
||||
repeated NotificationMessageInfo notifyMessage = 5;
|
||||
optional WebFeaturesFlag labelsDisplay = 1;
|
||||
optional WebFeaturesFlag voipIndividualOutgoing = 2;
|
||||
optional WebFeaturesFlag groupsV3 = 3;
|
||||
optional WebFeaturesFlag groupsV3Create = 4;
|
||||
optional WebFeaturesFlag changeNumberV2 = 5;
|
||||
optional WebFeaturesFlag queryStatusV3Thumbnail = 6;
|
||||
optional WebFeaturesFlag liveLocations = 7;
|
||||
optional WebFeaturesFlag queryVname = 8;
|
||||
optional WebFeaturesFlag voipIndividualIncoming = 9;
|
||||
optional WebFeaturesFlag quickRepliesQuery = 10;
|
||||
optional WebFeaturesFlag payments = 11;
|
||||
optional WebFeaturesFlag stickerPackQuery = 12;
|
||||
optional WebFeaturesFlag liveLocationsFinal = 13;
|
||||
optional WebFeaturesFlag labelsEdit = 14;
|
||||
optional WebFeaturesFlag mediaUpload = 15;
|
||||
optional WebFeaturesFlag mediaUploadRichQuickReplies = 18;
|
||||
optional WebFeaturesFlag vnameV2 = 19;
|
||||
optional WebFeaturesFlag videoPlaybackUrl = 20;
|
||||
optional WebFeaturesFlag statusRanking = 21;
|
||||
optional WebFeaturesFlag voipIndividualVideo = 22;
|
||||
optional WebFeaturesFlag thirdPartyStickers = 23;
|
||||
optional WebFeaturesFlag frequentlyForwardedSetting = 24;
|
||||
optional WebFeaturesFlag groupsV4JoinPermission = 25;
|
||||
optional WebFeaturesFlag recentStickers = 26;
|
||||
optional WebFeaturesFlag catalog = 27;
|
||||
optional WebFeaturesFlag starredStickers = 28;
|
||||
optional WebFeaturesFlag voipGroupCall = 29;
|
||||
optional WebFeaturesFlag templateMessage = 30;
|
||||
optional WebFeaturesFlag templateMessageInteractivity = 31;
|
||||
optional WebFeaturesFlag ephemeralMessages = 32;
|
||||
optional WebFeaturesFlag e2ENotificationSync = 33;
|
||||
optional WebFeaturesFlag recentStickersV2 = 34;
|
||||
optional WebFeaturesFlag syncdRelease1 = 35;
|
||||
optional WebFeaturesFlag recentStickersV3 = 36;
|
||||
optional WebFeaturesFlag userNotice = 37;
|
||||
optional WebFeaturesFlag syncdRelease11 = 38;
|
||||
optional WebFeaturesFlag support = 39;
|
||||
optional WebFeaturesFlag groupUiiCleanup = 40;
|
||||
optional WebFeaturesFlag groupDogfoodingInternalOnly = 41;
|
||||
optional WebFeaturesFlag settingsSync = 42;
|
||||
}
|
||||
|
||||
message NotificationMessageInfo {
|
||||
@@ -576,14 +821,14 @@ message WebNotificationsInfo {
|
||||
}
|
||||
|
||||
message PaymentInfo {
|
||||
enum PAYMENT_INFO_CURRENCY {
|
||||
enum PaymentInfoCurrency {
|
||||
UNKNOWN_CURRENCY = 0;
|
||||
INR = 1;
|
||||
}
|
||||
optional PAYMENT_INFO_CURRENCY currencyDeprecated = 1;
|
||||
optional PaymentInfoCurrency currencyDeprecated = 1;
|
||||
optional uint64 amount1000 = 2;
|
||||
optional string receiverJid = 3;
|
||||
enum PAYMENT_INFO_STATUS {
|
||||
enum PaymentInfoStatus {
|
||||
UNKNOWN_STATUS = 0;
|
||||
PROCESSING = 1;
|
||||
SENT = 2;
|
||||
@@ -597,13 +842,13 @@ message PaymentInfo {
|
||||
WAITING_FOR_PAYER = 10;
|
||||
WAITING = 11;
|
||||
}
|
||||
optional PAYMENT_INFO_STATUS status = 4;
|
||||
optional PaymentInfoStatus status = 4;
|
||||
optional uint64 transactionTimestamp = 5;
|
||||
optional MessageKey requestMessageKey = 6;
|
||||
optional uint64 expiryTimestamp = 7;
|
||||
optional bool futureproofed = 8;
|
||||
optional string currency = 9;
|
||||
enum PAYMENT_INFO_TXNSTATUS {
|
||||
enum PaymentInfoTxnStatus {
|
||||
UNKNOWN = 0;
|
||||
PENDING_SETUP = 1;
|
||||
PENDING_RECEIVER_SETUP = 2;
|
||||
@@ -633,14 +878,17 @@ message PaymentInfo {
|
||||
COLLECT_CANCELED = 26;
|
||||
COLLECT_CANCELLING = 27;
|
||||
}
|
||||
optional PAYMENT_INFO_TXNSTATUS txnStatus = 10;
|
||||
optional PaymentInfoTxnStatus txnStatus = 10;
|
||||
optional bool useNoviFiatFormat = 11;
|
||||
optional PaymentMoney primaryAmount = 12;
|
||||
optional PaymentMoney exchangeAmount = 13;
|
||||
}
|
||||
|
||||
message WebMessageInfo {
|
||||
required MessageKey key = 1;
|
||||
optional Message message = 2;
|
||||
optional uint64 messageTimestamp = 3;
|
||||
enum WEB_MESSAGE_INFO_STATUS {
|
||||
enum WebMessageInfoStatus {
|
||||
ERROR = 0;
|
||||
PENDING = 1;
|
||||
SERVER_ACK = 2;
|
||||
@@ -648,7 +896,7 @@ message WebMessageInfo {
|
||||
READ = 4;
|
||||
PLAYED = 5;
|
||||
}
|
||||
optional WEB_MESSAGE_INFO_STATUS status = 4;
|
||||
optional WebMessageInfoStatus status = 4;
|
||||
optional string participant = 5;
|
||||
optional bool ignore = 16;
|
||||
optional bool starred = 17;
|
||||
@@ -658,7 +906,7 @@ message WebMessageInfo {
|
||||
optional bool multicast = 21;
|
||||
optional bool urlText = 22;
|
||||
optional bool urlNumber = 23;
|
||||
enum WEB_MESSAGE_INFO_STUBTYPE {
|
||||
enum WebMessageInfoStubType {
|
||||
UNKNOWN = 0;
|
||||
REVOKE = 1;
|
||||
CIPHERTEXT = 2;
|
||||
@@ -732,8 +980,54 @@ message WebMessageInfo {
|
||||
GROUP_V4_ADD_INVITE_SENT = 70;
|
||||
GROUP_PARTICIPANT_ADD_REQUEST_JOIN = 71;
|
||||
CHANGE_EPHEMERAL_SETTING = 72;
|
||||
E2E_DEVICE_CHANGED = 73;
|
||||
VIEWED_ONCE = 74;
|
||||
E2E_ENCRYPTED_NOW = 75;
|
||||
BLUE_MSG_BSP_FB_TO_BSP_PREMISE = 76;
|
||||
BLUE_MSG_BSP_FB_TO_SELF_FB = 77;
|
||||
BLUE_MSG_BSP_FB_TO_SELF_PREMISE = 78;
|
||||
BLUE_MSG_BSP_FB_UNVERIFIED = 79;
|
||||
BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 80;
|
||||
BLUE_MSG_BSP_FB_VERIFIED = 81;
|
||||
BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 82;
|
||||
BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE = 83;
|
||||
BLUE_MSG_BSP_PREMISE_UNVERIFIED = 84;
|
||||
BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 85;
|
||||
BLUE_MSG_BSP_PREMISE_VERIFIED = 86;
|
||||
BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 87;
|
||||
BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED = 88;
|
||||
BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED = 89;
|
||||
BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED = 90;
|
||||
BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED = 91;
|
||||
BLUE_MSG_SELF_FB_TO_BSP_PREMISE = 92;
|
||||
BLUE_MSG_SELF_FB_TO_SELF_PREMISE = 93;
|
||||
BLUE_MSG_SELF_FB_UNVERIFIED = 94;
|
||||
BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 95;
|
||||
BLUE_MSG_SELF_FB_VERIFIED = 96;
|
||||
BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 97;
|
||||
BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE = 98;
|
||||
BLUE_MSG_SELF_PREMISE_UNVERIFIED = 99;
|
||||
BLUE_MSG_SELF_PREMISE_VERIFIED = 100;
|
||||
BLUE_MSG_TO_BSP_FB = 101;
|
||||
BLUE_MSG_TO_CONSUMER = 102;
|
||||
BLUE_MSG_TO_SELF_FB = 103;
|
||||
BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED = 104;
|
||||
BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 105;
|
||||
BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED = 106;
|
||||
BLUE_MSG_UNVERIFIED_TO_VERIFIED = 107;
|
||||
BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED = 108;
|
||||
BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 109;
|
||||
BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED = 110;
|
||||
BLUE_MSG_VERIFIED_TO_UNVERIFIED = 111;
|
||||
BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 112;
|
||||
BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED = 113;
|
||||
BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 114;
|
||||
BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED = 115;
|
||||
BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 116;
|
||||
BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 117;
|
||||
E2E_IDENTITY_UNAVAILABLE = 118;
|
||||
}
|
||||
optional WEB_MESSAGE_INFO_STUBTYPE messageStubType = 24;
|
||||
optional WebMessageInfoStubType messageStubType = 24;
|
||||
optional bool clearMedia = 25;
|
||||
repeated string messageStubParameters = 26;
|
||||
optional uint32 duration = 27;
|
||||
@@ -743,5 +1037,14 @@ message WebMessageInfo {
|
||||
optional PaymentInfo quotedPaymentInfo = 31;
|
||||
optional uint64 ephemeralStartTimestamp = 32;
|
||||
optional uint32 ephemeralDuration = 33;
|
||||
}
|
||||
|
||||
optional bool ephemeralOffToOn = 34;
|
||||
optional bool ephemeralOutOfSync = 35;
|
||||
enum WebMessageInfoBizPrivacyStatus {
|
||||
E2EE = 0;
|
||||
FB = 2;
|
||||
BSP = 1;
|
||||
BSP_AND_FB = 3;
|
||||
}
|
||||
optional WebMessageInfoBizPrivacyStatus bizPrivacyStatus = 36;
|
||||
optional string verifiedBizName = 37;
|
||||
}
|
34
vendor/github.com/Rhymen/go-whatsapp/contact.go
generated
vendored
@@ -286,3 +286,37 @@ func (wac *Conn) handleBlockContact(action, jid string) (<-chan string, error) {
|
||||
|
||||
return wac.writeBinary(n, contact, ignore, tag)
|
||||
}
|
||||
|
||||
// Search product details on order
|
||||
func (wac *Conn) SearchProductDetails(id, orderId, token string) (<-chan string, error) {
|
||||
data := []interface{}{"query", "order", map[string]string{
|
||||
"id": id,
|
||||
"orderId": orderId,
|
||||
"imageHeight": strconv.Itoa(80),
|
||||
"imageWidth": strconv.Itoa(80),
|
||||
"token": token,
|
||||
}}
|
||||
return wac.writeJson(data)
|
||||
}
|
||||
|
||||
// Order search and get product catalog reh
|
||||
func (wac *Conn) SearchOrder(catalogWid, stanzaId string) (<-chan string, error) {
|
||||
data := []interface{}{"query", "bizCatalog", map[string]string{
|
||||
"catalogWid": catalogWid,
|
||||
"limit": strconv.Itoa(10),
|
||||
"height": strconv.Itoa(100),
|
||||
"width": strconv.Itoa(100),
|
||||
"stanza_id": stanzaId,
|
||||
"type": "get_product_catalog_reh",
|
||||
}}
|
||||
return wac.writeJson(data)
|
||||
}
|
||||
|
||||
// Company details for Whatsapp Business
|
||||
func (wac *Conn) BusinessProfile(wid string) (<-chan string, error) {
|
||||
query := map[string]string{
|
||||
"wid": wid,
|
||||
}
|
||||
data := []interface{}{"query", "businessProfile", []map[string]string{query}}
|
||||
return wac.writeJson(data)
|
||||
}
|
||||
|
7
vendor/github.com/Rhymen/go-whatsapp/go.mod
generated
vendored
@@ -1,14 +1,11 @@
|
||||
module github.com/Rhymen/go-whatsapp
|
||||
|
||||
require (
|
||||
github.com/Rhymen/go-whatsapp/examples/echo v0.0.0-20190325075644-cc2581bbf24d // indirect
|
||||
github.com/Rhymen/go-whatsapp/examples/restoreSession v0.0.0-20190325075644-cc2581bbf24d // indirect
|
||||
github.com/Rhymen/go-whatsapp/examples/sendImage v0.0.0-20190325075644-cc2581bbf24d // indirect
|
||||
github.com/Rhymen/go-whatsapp/examples/sendTextMessages v0.0.0-20190325075644-cc2581bbf24d // indirect
|
||||
github.com/golang/protobuf v1.3.0
|
||||
github.com/golang/protobuf v1.4.1
|
||||
github.com/gorilla/websocket v1.4.1
|
||||
github.com/pkg/errors v0.8.1
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
|
||||
google.golang.org/protobuf v1.25.0
|
||||
)
|
||||
|
||||
go 1.13
|
||||
|
88
vendor/github.com/Rhymen/go-whatsapp/go.sum
generated
vendored
@@ -1,37 +1,71 @@
|
||||
github.com/Baozisoftware/qrcode-terminal-go v0.0.0-20170407111555-c0650d8dff0f h1:2dk3eOnYllh+wUOuDhOoC2vUVoJF/5z478ryJ+wzEII=
|
||||
github.com/Baozisoftware/qrcode-terminal-go v0.0.0-20170407111555-c0650d8dff0f/go.mod h1:4a58ifQTEe2uwwsaqbh3i2un5/CBPg+At/qHpt18Tmk=
|
||||
github.com/Rhymen/go-whatsapp v0.0.0/go.mod h1:rdQr95g2C1xcOfM7QGOhza58HeI3I+tZ/bbluv7VazA=
|
||||
github.com/Rhymen/go-whatsapp/examples/echo v0.0.0-20190325075644-cc2581bbf24d h1:m3wkrunHupL9XzzM+JZu1pgoDV1d9LFtD0gedNTHVDU=
|
||||
github.com/Rhymen/go-whatsapp/examples/echo v0.0.0-20190325075644-cc2581bbf24d/go.mod h1:zgCiQtBtZ4P4gFWvwl9aashsdwOcbb/EHOGRmSzM8ME=
|
||||
github.com/Rhymen/go-whatsapp/examples/restoreSession v0.0.0-20190325075644-cc2581bbf24d h1:muQlzqfZxjptOBjPdv+UoxVMr8Y1rPx7VMGPJIAFc5w=
|
||||
github.com/Rhymen/go-whatsapp/examples/restoreSession v0.0.0-20190325075644-cc2581bbf24d/go.mod h1:5sCUSpG616ZoSJhlt9iBNI/KXBqrVLcNUJqg7J9+8pU=
|
||||
github.com/Rhymen/go-whatsapp/examples/sendImage v0.0.0-20190325075644-cc2581bbf24d h1:xP//3V77YvHd1cj2Z3ttuQWAvs5WmIwBbjKe/t0g/tM=
|
||||
github.com/Rhymen/go-whatsapp/examples/sendImage v0.0.0-20190325075644-cc2581bbf24d/go.mod h1:RdiyhanVEGXTam+mZ3k6Y3VDCCvXYCwReOoxGozqhHw=
|
||||
github.com/Rhymen/go-whatsapp/examples/sendTextMessages v0.0.0-20190325075644-cc2581bbf24d h1:IRmRE0SPMByczwE2dhnTcVojje3w2TCSKwFrboLUbDg=
|
||||
github.com/Rhymen/go-whatsapp/examples/sendTextMessages v0.0.0-20190325075644-cc2581bbf24d/go.mod h1:suwzklatySS3Q0+NCxCDh5hYfgXdQUWU1DNcxwAxStM=
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.0 h1:kbxbvI4Un1LUWKxufD+BiE6AEExYYgkQLQmLFqA1LFk=
|
||||
github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0=
|
||||
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.1 h1:ZFgWrT+bLgsYPirOnRfKLYJLvssAegOj/hgyMFdJZe0=
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
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.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM=
|
||||
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg=
|
||||
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
|
||||
github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw=
|
||||
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9 h1:lpEzuenPuO1XNTeikEmvqYFcU37GVLl8SRNblzyvGBE=
|
||||
github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9/go.mod h1:PLPIyL7ikehBD1OAjmKKiOEhbvWyHGaNDjquXMcYABo=
|
||||
golang.org/x/crypto v0.0.0-20190131182504-b8fe1690c613/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
|
42
vendor/github.com/Rhymen/go-whatsapp/handler.go
generated
vendored
@@ -97,6 +97,22 @@ type ContactMessageHandler interface {
|
||||
HandleContactMessage(message ContactMessage)
|
||||
}
|
||||
|
||||
/*
|
||||
The ProductMessageHandler interface needs to be implemented to receive product messages dispatched by the dispatcher.
|
||||
*/
|
||||
type ProductMessageHandler interface {
|
||||
Handler
|
||||
HandleProductMessage(message ProductMessage)
|
||||
}
|
||||
|
||||
/*
|
||||
The OrderMessageHandler interface needs to be implemented to receive order messages dispatched by the dispatcher.
|
||||
*/
|
||||
type OrderMessageHandler interface {
|
||||
Handler
|
||||
HandleOrderMessage(message OrderMessage)
|
||||
}
|
||||
|
||||
/*
|
||||
The JsonMessageHandler interface needs to be implemented to receive json messages dispatched by the dispatcher.
|
||||
These json messages contain status updates of every kind sent by WhatsAppWeb servers. WhatsAppWeb uses these messages
|
||||
@@ -301,7 +317,7 @@ func (wac *Conn) handleWithCustomHandlers(message interface{}, handlers []Handle
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case BatteryMessage:
|
||||
for _, h := range handlers {
|
||||
if x, ok := h.(BatteryMessageHandler); ok {
|
||||
@@ -312,7 +328,7 @@ func (wac *Conn) handleWithCustomHandlers(message interface{}, handlers []Handle
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case Contact:
|
||||
for _, h := range handlers {
|
||||
if x, ok := h.(NewContactHandler); ok {
|
||||
@@ -324,6 +340,28 @@ func (wac *Conn) handleWithCustomHandlers(message interface{}, handlers []Handle
|
||||
}
|
||||
}
|
||||
|
||||
case ProductMessage:
|
||||
for _, h := range handlers {
|
||||
if x, ok := h.(ProductMessageHandler); ok {
|
||||
if wac.shouldCallSynchronously(h) {
|
||||
x.HandleProductMessage(m)
|
||||
} else {
|
||||
go x.HandleProductMessage(m)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
case OrderMessage:
|
||||
for _, h := range handlers {
|
||||
if x, ok := h.(OrderMessageHandler); ok {
|
||||
if wac.shouldCallSynchronously(h) {
|
||||
x.HandleOrderMessage(m)
|
||||
} else {
|
||||
go x.HandleOrderMessage(m)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
case *proto.WebMessageInfo:
|
||||
for _, h := range handlers {
|
||||
if x, ok := h.(RawMessageHandler); ok {
|
||||
|
122
vendor/github.com/Rhymen/go-whatsapp/message.go
generated
vendored
@@ -65,10 +65,15 @@ func (wac *Conn) Send(msg interface{}) (string, error) {
|
||||
msgProto = GetLiveLocationProto(m)
|
||||
case ContactMessage:
|
||||
msgProto = getContactMessageProto(m)
|
||||
case ProductMessage:
|
||||
msgProto = getProductMessageProto(m)
|
||||
case OrderMessage:
|
||||
msgProto = getOrderMessageProto(m)
|
||||
default:
|
||||
return "ERROR", fmt.Errorf("cannot match type %T, use message types declared in the package", msg)
|
||||
}
|
||||
|
||||
status := proto.WebMessageInfo_PENDING
|
||||
msgProto.Status = &status
|
||||
ch, err := wac.sendProto(msgProto)
|
||||
if err != nil {
|
||||
return "ERROR", fmt.Errorf("could not send proto: %v", err)
|
||||
@@ -258,7 +263,7 @@ func getInfoProto(info *MessageInfo) *proto.WebMessageInfo {
|
||||
}
|
||||
info.FromMe = true
|
||||
|
||||
status := proto.WebMessageInfo_WEB_MESSAGE_INFO_STATUS(info.Status)
|
||||
status := proto.WebMessageInfo_WebMessageInfoStatus(info.Status)
|
||||
|
||||
return &proto.WebMessageInfo{
|
||||
Key: &proto.MessageKey{
|
||||
@@ -802,6 +807,113 @@ func getContactMessageProto(msg ContactMessage) *proto.WebMessageInfo {
|
||||
return p
|
||||
}
|
||||
|
||||
/*
|
||||
OrderMessage represents a order message.
|
||||
*/
|
||||
|
||||
type OrderMessage struct {
|
||||
Info MessageInfo
|
||||
OrderId string
|
||||
Thumbnail []byte
|
||||
ItemCount int32
|
||||
Status proto.OrderMessage_OrderMessageOrderStatus
|
||||
Surface proto.OrderMessage_OrderMessageOrderSurface
|
||||
Message string
|
||||
OrderTitle string
|
||||
SellerJid string
|
||||
Token string
|
||||
TotalAmount1000 int64
|
||||
TotalCurrencyCode string
|
||||
ContextInfo ContextInfo
|
||||
}
|
||||
|
||||
func getOrderMessage(msg *proto.WebMessageInfo) OrderMessage {
|
||||
order := msg.GetMessage().GetOrderMessage()
|
||||
|
||||
orderMessage := OrderMessage{
|
||||
Info: getMessageInfo(msg),
|
||||
OrderId: order.GetOrderId(),
|
||||
Thumbnail: order.GetThumbnail(),
|
||||
ItemCount: order.GetItemCount(),
|
||||
Status: order.GetStatus(),
|
||||
Surface: order.GetSurface(),
|
||||
Message: order.GetMessage(),
|
||||
OrderTitle: order.GetOrderTitle(),
|
||||
SellerJid: order.GetSellerJid(),
|
||||
Token: order.GetToken(),
|
||||
TotalAmount1000: order.GetTotalAmount1000(),
|
||||
TotalCurrencyCode: order.GetTotalCurrencyCode(),
|
||||
ContextInfo: getMessageContext(order.GetContextInfo()),
|
||||
}
|
||||
|
||||
return orderMessage
|
||||
}
|
||||
|
||||
func getOrderMessageProto(msg OrderMessage) *proto.WebMessageInfo {
|
||||
p := getInfoProto(&msg.Info)
|
||||
contextInfo := getContextInfoProto(&msg.ContextInfo)
|
||||
|
||||
p.Message = &proto.Message{
|
||||
OrderMessage: &proto.OrderMessage{
|
||||
Thumbnail: msg.Thumbnail,
|
||||
ItemCount: &msg.ItemCount,
|
||||
Status: &msg.Status,
|
||||
Surface: &msg.Surface,
|
||||
Message: &msg.Message,
|
||||
OrderTitle: &msg.OrderTitle,
|
||||
SellerJid: &msg.SellerJid,
|
||||
Token: &msg.Token,
|
||||
TotalAmount1000: &msg.TotalAmount1000,
|
||||
TotalCurrencyCode: &msg.TotalCurrencyCode,
|
||||
ContextInfo: contextInfo,
|
||||
},
|
||||
}
|
||||
|
||||
return p
|
||||
}
|
||||
|
||||
/*
|
||||
ProductMessage represents a product message.
|
||||
*/
|
||||
|
||||
type ProductMessage struct {
|
||||
Info MessageInfo
|
||||
Product *proto.ProductSnapshot
|
||||
BusinessOwnerJid string
|
||||
Catalog *proto.CatalogSnapshot
|
||||
ContextInfo ContextInfo
|
||||
}
|
||||
|
||||
func getProductMessage(msg *proto.WebMessageInfo) ProductMessage {
|
||||
prod := msg.GetMessage().GetProductMessage()
|
||||
|
||||
productMessage := ProductMessage{
|
||||
Info: getMessageInfo(msg),
|
||||
Product: prod.GetProduct(),
|
||||
BusinessOwnerJid: prod.GetBusinessOwnerJid(),
|
||||
Catalog: prod.GetCatalog(),
|
||||
ContextInfo: getMessageContext(prod.GetContextInfo()),
|
||||
}
|
||||
|
||||
return productMessage
|
||||
}
|
||||
|
||||
func getProductMessageProto(msg ProductMessage) *proto.WebMessageInfo {
|
||||
p := getInfoProto(&msg.Info)
|
||||
contextInfo := getContextInfoProto(&msg.ContextInfo)
|
||||
|
||||
p.Message = &proto.Message{
|
||||
ProductMessage: &proto.ProductMessage{
|
||||
Product: msg.Product,
|
||||
BusinessOwnerJid: &msg.BusinessOwnerJid,
|
||||
Catalog: msg.Catalog,
|
||||
ContextInfo: contextInfo,
|
||||
},
|
||||
}
|
||||
|
||||
return p
|
||||
}
|
||||
|
||||
func ParseProtoMessage(msg *proto.WebMessageInfo) interface{} {
|
||||
|
||||
switch {
|
||||
@@ -836,6 +948,12 @@ func ParseProtoMessage(msg *proto.WebMessageInfo) interface{} {
|
||||
case msg.GetMessage().GetContactMessage() != nil:
|
||||
return getContactMessage(msg)
|
||||
|
||||
case msg.GetMessage().GetProductMessage() != nil:
|
||||
return getProductMessage(msg)
|
||||
|
||||
case msg.GetMessage().GetOrderMessage() != nil:
|
||||
return getOrderMessage(msg)
|
||||
|
||||
default:
|
||||
//cannot match message
|
||||
return ErrMessageTypeNotImplemented
|
||||
|
24
vendor/github.com/Rhymen/go-whatsapp/profile.go
generated
vendored
@@ -2,9 +2,10 @@ package whatsapp
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/Rhymen/go-whatsapp/binary"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/Rhymen/go-whatsapp/binary"
|
||||
)
|
||||
|
||||
// Pictures must be JPG 640x640 and 96x96, respectively
|
||||
@@ -41,3 +42,24 @@ func (wac *Conn) UploadProfilePic(image, preview []byte) (<-chan string, error)
|
||||
}
|
||||
return wac.writeBinary(n, profile, 136, tag)
|
||||
}
|
||||
|
||||
func (wac *Conn) UpdateProfileName(name string) (<-chan string, error) {
|
||||
tag := fmt.Sprintf("%d.--%d", time.Now().Unix(), wac.msgCount*19)
|
||||
n := binary.Node{
|
||||
Description: "action",
|
||||
Attributes: map[string]string{
|
||||
"type": "set",
|
||||
"epoch": strconv.Itoa(wac.msgCount),
|
||||
},
|
||||
Content: []interface{}{
|
||||
binary.Node{
|
||||
Description: "profile",
|
||||
Attributes: map[string]string{
|
||||
"name": name,
|
||||
},
|
||||
Content: []binary.Node{},
|
||||
},
|
||||
},
|
||||
}
|
||||
return wac.writeBinary(n, profile, ignore, tag)
|
||||
}
|
||||
|
2
vendor/github.com/Rhymen/go-whatsapp/session.go
generated
vendored
@@ -18,7 +18,7 @@ import (
|
||||
)
|
||||
|
||||
//represents the WhatsAppWeb client version
|
||||
var waVersion = []int{2, 2039, 9}
|
||||
var waVersion = []int{2, 2121, 6}
|
||||
|
||||
/*
|
||||
Session contains session individual information. To be able to resume the connection without scanning the qr code
|
||||
|
24
vendor/github.com/SevereCloud/vksdk/v2/.golangci.yml
generated
vendored
@@ -10,14 +10,11 @@ linters:
|
||||
- gocritic
|
||||
- gofmt
|
||||
- goimports
|
||||
- golint
|
||||
- goprintffuncname
|
||||
- gosec
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
- interfacer
|
||||
- maligned
|
||||
- misspell
|
||||
- nakedret
|
||||
- prealloc
|
||||
@@ -39,10 +36,23 @@ linters:
|
||||
- tparallel
|
||||
- errorlint
|
||||
- paralleltest
|
||||
- forbidigo
|
||||
- makezero
|
||||
- thelper
|
||||
- predeclared
|
||||
- ifshort
|
||||
- revive
|
||||
- durationcheck
|
||||
- gomoddirectives
|
||||
- importas
|
||||
- nilerr
|
||||
- revive
|
||||
- wastedassign
|
||||
|
||||
# - wrapcheck # TODO: v3 Fix
|
||||
# - testpackage # TODO: Fix testpackage
|
||||
# - nestif # TODO: Fix nestif
|
||||
# - noctx # TODO: Fix noctx
|
||||
|
||||
# don't enable:
|
||||
# - depguard
|
||||
@@ -62,6 +72,14 @@ linters:
|
||||
# - nlreturn
|
||||
# - gci
|
||||
# - exhaustivestruct
|
||||
# - cyclop
|
||||
# - promlinter
|
||||
# - tagliatelle
|
||||
|
||||
# depricated
|
||||
# - maligned
|
||||
# - interfacer
|
||||
# - golint
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
|
6
vendor/github.com/SevereCloud/vksdk/v2/README.md
generated
vendored
@@ -14,7 +14,7 @@
|
||||
|
||||
## Features
|
||||
|
||||
Version API 5.126.
|
||||
Version API 5.131.
|
||||
|
||||
- [API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/api)
|
||||
- 400+ methods
|
||||
@@ -40,6 +40,9 @@ Version API 5.126.
|
||||
- Machine-readable ontology describing persons
|
||||
- Works with users and groups
|
||||
- The only place to get page creation date
|
||||
- [Games](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/games)
|
||||
- Checking launch parameters
|
||||
- Intermediate http handler
|
||||
- [VK Mini Apps](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/vkapps)
|
||||
- Checking launch parameters
|
||||
- Intermediate http handler
|
||||
@@ -47,6 +50,7 @@ Version API 5.126.
|
||||
- Processes payment notifications
|
||||
- [Marusia Skills](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/marusia)
|
||||
- For creating Marusia Skills
|
||||
- Support SSML
|
||||
|
||||
## Install
|
||||
|
||||
|
23
vendor/github.com/SevereCloud/vksdk/v2/api/errors.go
generated
vendored
@@ -174,6 +174,9 @@ const (
|
||||
// Unknown group.
|
||||
ErrUnknownGroup ErrorType = 40
|
||||
|
||||
// Additional signup required.
|
||||
ErrAdditionalSignupRequired ErrorType = 41
|
||||
|
||||
// One of the parameters specified was missing or invalid
|
||||
//
|
||||
// Check the required parameters list and their format on a method
|
||||
@@ -658,9 +661,15 @@ const (
|
||||
// Item has bad links in description.
|
||||
ErrMarketItemHasBadLinks ErrorType = 1408
|
||||
|
||||
// Shop not enabled.
|
||||
// Extended market not enabled.
|
||||
ErrMarketShopNotEnabled ErrorType = 1409
|
||||
|
||||
// Grouping items with different properties.
|
||||
ErrMarketGroupingItemsWithDifferentProperties ErrorType = 1412
|
||||
|
||||
// Grouping already has such variant.
|
||||
ErrMarketGroupingAlreadyHasSuchVariant ErrorType = 1413
|
||||
|
||||
// Variant not found.
|
||||
ErrMarketVariantNotFound ErrorType = 1416
|
||||
|
||||
@@ -697,6 +706,9 @@ const (
|
||||
// Crop size is less than the minimum.
|
||||
ErrMarketPhotosCropSizeTooLow ErrorType = 1435
|
||||
|
||||
// Market not enabled.
|
||||
ErrMarketNotEnabled ErrorType = 1438
|
||||
|
||||
// Cart is empty.
|
||||
ErrMarketCartEmpty ErrorType = 1427
|
||||
|
||||
@@ -730,6 +742,15 @@ const (
|
||||
// Servers number limit is reached.
|
||||
ErrCallbackServersLimit ErrorType = 2000
|
||||
|
||||
// Stickers are not purchased.
|
||||
ErrStickersNotPurchased ErrorType = 2100
|
||||
|
||||
// Too many favorite stickers.
|
||||
ErrStickersTooManyFavorites ErrorType = 2101
|
||||
|
||||
// Stickers are not favorite.
|
||||
ErrStickersNotFavorite ErrorType = 2102
|
||||
|
||||
// Specified link is incorrect (can't find source).
|
||||
ErrWallCheckLinkCantDetermineSource ErrorType = 3102
|
||||
|
||||
|
5
vendor/github.com/SevereCloud/vksdk/v2/api/market.go
generated
vendored
@@ -306,8 +306,9 @@ func (vk *VK) MarketRestoreComment(params Params) (response int, err error) {
|
||||
|
||||
// MarketSearchResponse struct.
|
||||
type MarketSearchResponse struct {
|
||||
Count int `json:"count"`
|
||||
Items []object.MarketMarketItem `json:"items"`
|
||||
Count int `json:"count"`
|
||||
Items []object.MarketMarketItem `json:"items"`
|
||||
ViewType int `json:"view_type"`
|
||||
}
|
||||
|
||||
// MarketSearch searches market items in a community's catalog.
|
||||
|
35
vendor/github.com/SevereCloud/vksdk/v2/api/store.go
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
package api // import "github.com/SevereCloud/vksdk/api"
|
||||
|
||||
import (
|
||||
"github.com/SevereCloud/vksdk/v2/object"
|
||||
)
|
||||
|
||||
// StoreAddStickersToFavorite add stickers to favorite.
|
||||
//
|
||||
// https://vk.com/dev/store.addStickersToFavorite
|
||||
func (vk *VK) StoreAddStickersToFavorite(params Params) (response int, err error) {
|
||||
err = vk.RequestUnmarshal("store.addStickersToFavorite", &response, params)
|
||||
return
|
||||
}
|
||||
|
||||
// StoreGetFavoriteStickersResponse struct.
|
||||
type StoreGetFavoriteStickersResponse struct {
|
||||
Count int `json:"count"`
|
||||
Items []object.BaseSticker `json:"items"`
|
||||
}
|
||||
|
||||
// StoreGetFavoriteStickers return favorite stickers.
|
||||
//
|
||||
// https://vk.com/dev/store.getFavoriteStickers
|
||||
func (vk *VK) StoreGetFavoriteStickers(params Params) (response StoreGetFavoriteStickersResponse, err error) {
|
||||
err = vk.RequestUnmarshal("store.getFavoriteStickers", &response, params)
|
||||
return
|
||||
}
|
||||
|
||||
// StoreRemoveStickersFromFavorite remove stickers from favorite.
|
||||
//
|
||||
// https://vk.com/dev/store.removeStickersFromFavorite
|
||||
func (vk *VK) StoreRemoveStickersFromFavorite(params Params) (response int, err error) {
|
||||
err = vk.RequestUnmarshal("store.removeStickersFromFavorite", &response, params)
|
||||
return
|
||||
}
|
5
vendor/github.com/SevereCloud/vksdk/v2/api/stories.go
generated
vendored
@@ -1,6 +1,8 @@
|
||||
package api // import "github.com/SevereCloud/vksdk/v2/api"
|
||||
|
||||
import "github.com/SevereCloud/vksdk/v2/object"
|
||||
import (
|
||||
"github.com/SevereCloud/vksdk/v2/object"
|
||||
)
|
||||
|
||||
// StoriesBanOwner allows to hide stories from chosen sources from current user's feed.
|
||||
//
|
||||
@@ -240,6 +242,7 @@ func (vk *VK) StoriesHideReply(params Params) (response int, err error) {
|
||||
type StoriesSaveResponse struct {
|
||||
Count int `json:"count"`
|
||||
Items []object.StoriesStory `json:"items"`
|
||||
object.ExtendedResponse
|
||||
}
|
||||
|
||||
// StoriesSave method.
|
||||
|
4
vendor/github.com/SevereCloud/vksdk/v2/doc.go
generated
vendored
@@ -7,6 +7,6 @@ package vksdk
|
||||
|
||||
// Module constants.
|
||||
const (
|
||||
Version = "2.9.0"
|
||||
API = "5.126"
|
||||
Version = "2.10.0"
|
||||
API = "5.131"
|
||||
)
|
||||
|
20
vendor/github.com/SevereCloud/vksdk/v2/events/objects.go
generated
vendored
@@ -316,40 +316,40 @@ type LikeRemoveObject struct {
|
||||
|
||||
// DonutSubscriptionCreateObject struct.
|
||||
type DonutSubscriptionCreateObject struct {
|
||||
Amount int `json:"amount"`
|
||||
Amount float64 `json:"amount"`
|
||||
AmountWithoutFee float64 `json:"amount_without_fee"`
|
||||
UserID int `json:"user_id"`
|
||||
UserID float64 `json:"user_id"`
|
||||
}
|
||||
|
||||
// DonutSubscriptionProlongedObject struct.
|
||||
type DonutSubscriptionProlongedObject struct {
|
||||
Amount int `json:"amount"`
|
||||
Amount float64 `json:"amount"`
|
||||
AmountWithoutFee float64 `json:"amount_without_fee"`
|
||||
UserID int `json:"user_id"`
|
||||
UserID float64 `json:"user_id"`
|
||||
}
|
||||
|
||||
// DonutSubscriptionExpiredObject struct.
|
||||
type DonutSubscriptionExpiredObject struct {
|
||||
UserID int `json:"user_id"`
|
||||
UserID float64 `json:"user_id"`
|
||||
}
|
||||
|
||||
// DonutSubscriptionCancelledObject struct.
|
||||
type DonutSubscriptionCancelledObject struct {
|
||||
UserID int `json:"user_id"`
|
||||
UserID float64 `json:"user_id"`
|
||||
}
|
||||
|
||||
// DonutSubscriptionPriceChangedObject struct.
|
||||
type DonutSubscriptionPriceChangedObject struct {
|
||||
AmountOld int `json:"amount_old"`
|
||||
AmountNew int `json:"amount_new"`
|
||||
AmountOld float64 `json:"amount_old"`
|
||||
AmountNew float64 `json:"amount_new"`
|
||||
AmountDiff float64 `json:"amount_diff"`
|
||||
AmountDiffWithoutFee float64 `json:"amount_diff_without_fee"`
|
||||
UserID int `json:"user_id"`
|
||||
UserID float64 `json:"user_id"`
|
||||
}
|
||||
|
||||
// DonutMoneyWithdrawObject struct.
|
||||
type DonutMoneyWithdrawObject struct {
|
||||
Amount int `json:"amount"`
|
||||
Amount float64 `json:"amount"`
|
||||
AmountWithoutFee float64 `json:"amount_without_fee"`
|
||||
}
|
||||
|
||||
|
4
vendor/github.com/SevereCloud/vksdk/v2/go.mod
generated
vendored
@@ -5,6 +5,6 @@ go 1.13
|
||||
require (
|
||||
github.com/gorilla/schema v1.2.0
|
||||
github.com/gorilla/websocket v1.4.2
|
||||
github.com/stretchr/testify v1.6.1
|
||||
golang.org/x/text v0.3.4
|
||||
github.com/stretchr/testify v1.7.0
|
||||
golang.org/x/text v0.3.5
|
||||
)
|
||||
|
8
vendor/github.com/SevereCloud/vksdk/v2/go.sum
generated
vendored
@@ -7,10 +7,10 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad
|
||||
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/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=
|
||||
golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
|
||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
1
vendor/github.com/SevereCloud/vksdk/v2/internal/transport.go
generated
vendored
@@ -27,6 +27,7 @@ const (
|
||||
LongPollTsKey
|
||||
CallbackRetryCounterKey
|
||||
CallbackRetryAfterKey
|
||||
CallbackRemove
|
||||
)
|
||||
|
||||
// ContextClient return *http.Client.
|
||||
|
3
vendor/github.com/SevereCloud/vksdk/v2/longpoll-bot/longpoll.go
generated
vendored
@@ -173,8 +173,7 @@ func (lp *LongPoll) RunWithContext(ctx context.Context) error {
|
||||
func (lp *LongPoll) run(ctx context.Context) error {
|
||||
ctx, lp.cancel = context.WithCancel(ctx)
|
||||
|
||||
err := lp.autoSetting(ctx)
|
||||
if err != nil {
|
||||
if err := lp.autoSetting(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
8
vendor/github.com/SevereCloud/vksdk/v2/object/account.go
generated
vendored
@@ -16,9 +16,11 @@ type AccountPushConversations struct {
|
||||
|
||||
// AccountPushConversationsItem struct.
|
||||
type AccountPushConversationsItem struct {
|
||||
DisabledUntil int `json:"disabled_until"` // Time until that notifications are disabled in seconds
|
||||
PeerID int `json:"peer_id"` // Peer ID
|
||||
Sound int `json:"sound"` // Information whether the sound are enabled
|
||||
DisabledUntil int `json:"disabled_until"` // Time until that notifications are disabled in seconds
|
||||
PeerID int `json:"peer_id"` // Peer ID
|
||||
Sound int `json:"sound"` // Information whether the sound are enabled
|
||||
DisabledMentions BaseBoolInt `json:"disabled_mentions"`
|
||||
DisabledMassMentions BaseBoolInt `json:"disabled_mass_mentions"`
|
||||
}
|
||||
|
||||
// AccountPushParams struct.
|
||||
|
3
vendor/github.com/SevereCloud/vksdk/v2/object/ads.go
generated
vendored
@@ -207,8 +207,7 @@ type AdsStatsSexAge struct {
|
||||
}
|
||||
|
||||
// AdsTargSettings struct.
|
||||
type AdsTargSettings struct {
|
||||
}
|
||||
type AdsTargSettings struct{}
|
||||
|
||||
// AdsTargStats struct.
|
||||
type AdsTargStats struct {
|
||||
|
1
vendor/github.com/SevereCloud/vksdk/v2/object/groups.go
generated
vendored
@@ -32,6 +32,7 @@ type GroupsAddress struct {
|
||||
Timetable GroupsAddressTimetable `json:"timetable"` // Week timetable for the address
|
||||
Title string `json:"title"` // Title of the place (Zinger, etc)
|
||||
WorkInfoStatus string `json:"work_info_status"` // Status of information about timetable
|
||||
PlaceID int `json:"place_id"`
|
||||
}
|
||||
|
||||
// GroupsAddressTimetable Timetable for a week.
|
||||
|
6
vendor/github.com/SevereCloud/vksdk/v2/object/market.go
generated
vendored
@@ -15,8 +15,9 @@ const (
|
||||
|
||||
// MarketCurrency struct.
|
||||
type MarketCurrency struct {
|
||||
ID int `json:"id"` // Currency ID
|
||||
Name string `json:"name"` // Currency sign
|
||||
ID int `json:"id"` // Currency ID
|
||||
Name string `json:"name"` // Currency sign
|
||||
Title string `json:"title"` // Currency Title
|
||||
}
|
||||
|
||||
// MarketMarketAlbum struct.
|
||||
@@ -72,6 +73,7 @@ type MarketMarketItem struct {
|
||||
VariantsGroupingID int `json:"variants_grouping_id"`
|
||||
PropertyValues []MarketMarketItemProperty `json:"property_values"`
|
||||
CartQuantity int `json:"cart_quantity"`
|
||||
SKU string `json:"sku"`
|
||||
}
|
||||
|
||||
// UnmarshalJSON MarketMarketItem.
|
||||
|
6
vendor/github.com/SevereCloud/vksdk/v2/object/messages.go
generated
vendored
@@ -63,6 +63,7 @@ type MessagesMessage struct {
|
||||
Important BaseBoolInt `json:"important"` // Is it an important message
|
||||
IsHidden BaseBoolInt `json:"is_hidden"`
|
||||
IsCropped BaseBoolInt `json:"is_cropped"`
|
||||
IsSilent BaseBoolInt `json:"is_silent"`
|
||||
Out BaseBoolInt `json:"out"` // Information whether the message is outcoming
|
||||
WasListened BaseBoolInt `json:"was_listened,omitempty"`
|
||||
Keyboard MessagesKeyboard `json:"keyboard"`
|
||||
@@ -461,6 +462,7 @@ type MessagesChatPreview struct {
|
||||
LocalID int `json:"local_id"`
|
||||
Joined bool `json:"joined"`
|
||||
ChatSettings MessagesConversationChatSettings `json:"chat_settings"`
|
||||
IsMember BaseBoolInt `json:"is_member"`
|
||||
}
|
||||
|
||||
// MessagesChatPushSettings struct.
|
||||
@@ -510,6 +512,7 @@ type MessagesConversationCanWrite struct {
|
||||
// MessagesConversationChatSettings struct.
|
||||
type MessagesConversationChatSettings struct {
|
||||
MembersCount int `json:"members_count"`
|
||||
FriendsCount int `json:"friends_count"`
|
||||
Photo MessagesChatSettingsPhoto `json:"photo"`
|
||||
PinnedMessage MessagesPinnedMessage `json:"pinned_message"`
|
||||
State string `json:"state"`
|
||||
@@ -721,8 +724,7 @@ type MessagesPinnedMessage struct {
|
||||
}
|
||||
|
||||
// MessagesUserXtrInvitedBy struct.
|
||||
type MessagesUserXtrInvitedBy struct {
|
||||
}
|
||||
type MessagesUserXtrInvitedBy struct{}
|
||||
|
||||
// MessagesForward struct.
|
||||
type MessagesForward struct {
|
||||
|
10
vendor/github.com/SevereCloud/vksdk/v2/object/newsfeed.go
generated
vendored
@@ -87,11 +87,11 @@ type NewsfeedItemStoriesBlock struct {
|
||||
}
|
||||
|
||||
// NewsfeedItemTopic struct.
|
||||
type NewsfeedItemTopic struct {
|
||||
// Comments BaseCommentsInfo `json:"comments"`
|
||||
// Likes BaseLikesInfo `json:"likes"`
|
||||
// Text string `json:"text"` // Post text
|
||||
}
|
||||
//
|
||||
// Comments BaseCommentsInfo `json:"comments"`
|
||||
// Likes BaseLikesInfo `json:"likes"`
|
||||
// Text string `json:"text"` // Post text.
|
||||
type NewsfeedItemTopic struct{}
|
||||
|
||||
// NewsfeedItemVideo struct.
|
||||
type NewsfeedItemVideo struct {
|
||||
|
1
vendor/github.com/SevereCloud/vksdk/v2/object/object.go
generated
vendored
@@ -262,6 +262,7 @@ type BaseSticker struct {
|
||||
ImagesWithBackground []BaseImage `json:"images_with_background"`
|
||||
ProductID int `json:"product_id"`
|
||||
StickerID int `json:"sticker_id"`
|
||||
IsAllowed bool `json:"is_allowed"`
|
||||
AnimationURL string `json:"animation_url"`
|
||||
}
|
||||
|
||||
|
4
vendor/github.com/SevereCloud/vksdk/v2/object/photos.go
generated
vendored
@@ -134,7 +134,7 @@ type PhotosOwnerUploadResponse struct {
|
||||
type PhotosPhotoAlbum struct {
|
||||
Created int `json:"created"` // Date when the album has been created in Unixtime
|
||||
Description string `json:"description"` // Photo album description
|
||||
ID string `json:"id"` // BUG(VK): Photo album ID
|
||||
ID int `json:"id"` // Photo album ID
|
||||
OwnerID int `json:"owner_id"` // Album owner's ID
|
||||
Size int `json:"size"` // Photos number
|
||||
Thumb PhotosPhoto `json:"thumb"`
|
||||
@@ -144,7 +144,7 @@ type PhotosPhotoAlbum struct {
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
func (album PhotosPhotoAlbum) ToAttachment() string {
|
||||
return fmt.Sprintf("album%d_%s", album.OwnerID, album.ID)
|
||||
return fmt.Sprintf("album%d_%d", album.OwnerID, album.ID)
|
||||
}
|
||||
|
||||
// PhotosPhotoAlbumFull struct.
|
||||
|
1
vendor/github.com/SevereCloud/vksdk/v2/object/polls.go
generated
vendored
@@ -38,6 +38,7 @@ type PollsPoll struct {
|
||||
Friends []PollsFriend `json:"friends"`
|
||||
Profiles []UsersUser `json:"profiles"`
|
||||
Groups []GroupsGroup `json:"groups"`
|
||||
EmbedHash string `json:"embed_hash"`
|
||||
}
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
|
19
vendor/github.com/SevereCloud/vksdk/v2/object/stories.go
generated
vendored
@@ -27,7 +27,9 @@ type StoriesNarrativeInfo struct {
|
||||
Views int `json:"views"`
|
||||
}
|
||||
|
||||
// StoriesPromoData struct.
|
||||
// StoriesPromoData additional data for promo stories.
|
||||
//
|
||||
// TODO: v3 rename StoriesPromoBlock.
|
||||
type StoriesPromoData struct {
|
||||
Name string `json:"name"`
|
||||
Photo50 string `json:"photo_50"`
|
||||
@@ -164,11 +166,16 @@ const (
|
||||
|
||||
// StoriesFeedItem struct.
|
||||
type StoriesFeedItem struct {
|
||||
Type StoriesFeedItemType `json:"type"`
|
||||
ID string `json:"id"`
|
||||
Stories []StoriesStory `json:"stories"`
|
||||
Grouped StoriesFeedItemType `json:"grouped"`
|
||||
App AppsApp `json:"app"`
|
||||
Type StoriesFeedItemType `json:"type"`
|
||||
ID string `json:"id"`
|
||||
Stories []StoriesStory `json:"stories"`
|
||||
Grouped StoriesFeedItemType `json:"grouped"`
|
||||
App AppsApp `json:"app"`
|
||||
BirthdayUserID int `json:"birthday_user_id"`
|
||||
TrackCode string `json:"track_code"`
|
||||
HasUnseen BaseBoolInt `json:"has_unseen"`
|
||||
Name string `json:"name"`
|
||||
PromoData StoriesPromoData `json:"promo_data"`
|
||||
}
|
||||
|
||||
// StoriesClickableStickers struct.
|
||||
|
25
vendor/github.com/SevereCloud/vksdk/v2/object/users.go
generated
vendored
@@ -1,6 +1,8 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
@@ -67,6 +69,7 @@ type UsersUser struct {
|
||||
CanSeeAudio BaseBoolInt `json:"can_see_audio"`
|
||||
CanWritePrivateMessage BaseBoolInt `json:"can_write_private_message"`
|
||||
CanSendFriendRequest BaseBoolInt `json:"can_send_friend_request"`
|
||||
CanCallFromGroup BaseBoolInt `json:"can_call_from_group"`
|
||||
Verified BaseBoolInt `json:"verified"`
|
||||
Trending BaseBoolInt `json:"trending"`
|
||||
Blacklisted BaseBoolInt `json:"blacklisted"`
|
||||
@@ -233,6 +236,28 @@ type UsersPersonal struct {
|
||||
ReligionID int `json:"religion_id"`
|
||||
}
|
||||
|
||||
// UnmarshalJSON UsersPersonal.
|
||||
//
|
||||
// BUG(VK): UsersPersonal return [].
|
||||
func (personal *UsersPersonal) UnmarshalJSON(data []byte) error {
|
||||
if bytes.Equal(data, []byte("[]")) {
|
||||
return nil
|
||||
}
|
||||
|
||||
type renamedUsersPersonal UsersPersonal
|
||||
|
||||
var r renamedUsersPersonal
|
||||
|
||||
err := json.Unmarshal(data, &r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*personal = UsersPersonal(r)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// UsersRelative struct.
|
||||
type UsersRelative struct {
|
||||
BirthDate string `json:"birth_date"` // Date of child birthday (format dd.mm.yyyy)
|
||||
|
21
vendor/github.com/SevereCloud/vksdk/v2/object/video.go
generated
vendored
@@ -35,7 +35,7 @@ type VideoVideo struct {
|
||||
IsPrivate BaseBoolInt `json:"is_private"`
|
||||
Added BaseBoolInt `json:"added"`
|
||||
Repeat BaseBoolInt `json:"repeat"` // Information whether the video is repeated
|
||||
ContentRestricted BaseBoolInt `json:"content_restricted"`
|
||||
ContentRestricted int `json:"content_restricted"`
|
||||
Live BaseBoolInt `json:"live"` // Returns if the video is a live stream
|
||||
Upcoming BaseBoolInt `json:"upcoming"`
|
||||
Comments int `json:"comments"` // Number of comments
|
||||
@@ -81,14 +81,15 @@ func (video VideoVideo) ToAttachment() string {
|
||||
|
||||
// VideoRestriction struct.
|
||||
type VideoRestriction struct {
|
||||
Title string `json:"title"`
|
||||
Text string `json:"text"`
|
||||
AlwaysShown BaseBoolInt `json:"always_shown"`
|
||||
Blur BaseBoolInt `json:"blur"`
|
||||
CanPlay BaseBoolInt `json:"can_play"`
|
||||
CanPreview BaseBoolInt `json:"can_preview"`
|
||||
CardIcon []BaseImage `json:"card_icon"`
|
||||
ListIcon []BaseImage `json:"list_icon"`
|
||||
Title string `json:"title"`
|
||||
Text string `json:"text"`
|
||||
AlwaysShown BaseBoolInt `json:"always_shown"`
|
||||
Blur BaseBoolInt `json:"blur"`
|
||||
CanPlay BaseBoolInt `json:"can_play"`
|
||||
CanPreview BaseBoolInt `json:"can_preview"`
|
||||
CardIcon []BaseImage `json:"card_icon"`
|
||||
ListIcon []BaseImage `json:"list_icon"`
|
||||
DisclaimerType int `json:"disclaimer_type"`
|
||||
}
|
||||
|
||||
// VideoActionButton struct.
|
||||
@@ -113,6 +114,8 @@ type VideoSnippet struct {
|
||||
type VideoVideoFiles struct {
|
||||
External string `json:"external"` // URL of the external player
|
||||
Mp4_1080 string `json:"mp4_1080"` // URL of the mpeg4 file with 1080p quality
|
||||
Mp4_1440 string `json:"mp4_1440"` // URL of the mpeg4 file with 2k quality
|
||||
Mp4_2160 string `json:"mp4_2160"` // URL of the mpeg4 file with 4k quality
|
||||
Mp4_240 string `json:"mp4_240"` // URL of the mpeg4 file with 240p quality
|
||||
Mp4_360 string `json:"mp4_360"` // URL of the mpeg4 file with 360p quality
|
||||
Mp4_480 string `json:"mp4_480"` // URL of the mpeg4 file with 480p quality
|
||||
|
2
vendor/github.com/SevereCloud/vksdk/v2/object/wall.go
generated
vendored
@@ -142,7 +142,7 @@ type WallWallpost struct {
|
||||
FriendsOnly int `json:"friends_only"`
|
||||
Comments BaseCommentsInfo `json:"comments"`
|
||||
Likes BaseLikesInfo `json:"likes"` // Count of likes
|
||||
Reposts BaseRepostsInfo `json:"reposts"` // Count of views
|
||||
Reposts BaseRepostsInfo `json:"reposts"` // Count of reposts
|
||||
Views WallViews `json:"views"` // Count of views
|
||||
PostType string `json:"post_type"`
|
||||
PostSource WallPostSource `json:"post_source"`
|
||||
|
10
vendor/github.com/golang/protobuf/proto/registry.go
generated
vendored
@@ -13,6 +13,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"google.golang.org/protobuf/reflect/protodesc"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/reflect/protoregistry"
|
||||
"google.golang.org/protobuf/runtime/protoimpl"
|
||||
@@ -62,14 +63,7 @@ func FileDescriptor(s filePath) fileDescGZIP {
|
||||
// Find the descriptor in the v2 registry.
|
||||
var b []byte
|
||||
if fd, _ := protoregistry.GlobalFiles.FindFileByPath(s); fd != nil {
|
||||
if fd, ok := fd.(interface{ ProtoLegacyRawDesc() []byte }); ok {
|
||||
b = fd.ProtoLegacyRawDesc()
|
||||
} else {
|
||||
// TODO: Use protodesc.ToFileDescriptorProto to construct
|
||||
// a descriptorpb.FileDescriptorProto and marshal it.
|
||||
// However, doing so causes the proto package to have a dependency
|
||||
// on descriptorpb, leading to cyclic dependency issues.
|
||||
}
|
||||
b, _ = Marshal(protodesc.ToFileDescriptorProto(fd))
|
||||
}
|
||||
|
||||
// Locally cache the raw descriptor form for the file.
|
||||
|
2
vendor/github.com/golang/protobuf/proto/text_decode.go
generated
vendored
@@ -765,7 +765,7 @@ func unescape(s string) (ch string, tail string, err error) {
|
||||
if i > utf8.MaxRune {
|
||||
return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss)
|
||||
}
|
||||
return string(i), s, nil
|
||||
return string(rune(i)), s, nil
|
||||
}
|
||||
return "", "", fmt.Errorf(`unknown escape \%c`, r)
|
||||
}
|
||||
|
2
vendor/github.com/gomarkdown/markdown/html/doc.go
generated
vendored
@@ -9,7 +9,7 @@ A renderer can be configured with multiple options:
|
||||
|
||||
flags := html.CommonFlags | html.CompletePage | html.HrefTargetBlank
|
||||
opts := html.RendererOptions{
|
||||
TItle: "A custom title",
|
||||
Title: "A custom title",
|
||||
Flags: flags,
|
||||
}
|
||||
renderer := html.NewRenderer(opts)
|
||||
|
7
vendor/github.com/gomarkdown/markdown/html/renderer.go
generated
vendored
@@ -43,6 +43,7 @@ const (
|
||||
SmartypantsAngledQuotes // Enable angled double quotes (with Smartypants) for double quotes rendering
|
||||
SmartypantsQuotesNBSP // Enable « French guillemets » (with Smartypants)
|
||||
TOC // Generate a table of contents
|
||||
LazyLoadImages // Include loading="lazy" with images
|
||||
|
||||
CommonFlags Flags = Smartypants | SmartypantsFractions | SmartypantsDashes | SmartypantsLatexDashes
|
||||
)
|
||||
@@ -589,7 +590,11 @@ func (r *Renderer) imageEnter(w io.Writer, image *ast.Image) {
|
||||
//if options.safe && potentiallyUnsafe(dest) {
|
||||
//out(w, `<img src="" alt="`)
|
||||
//} else {
|
||||
r.Outs(w, `<img src="`)
|
||||
if r.opts.Flags&LazyLoadImages != 0 {
|
||||
r.Outs(w, `<img loading="lazy" src="`)
|
||||
} else {
|
||||
r.Outs(w, `<img src="`)
|
||||
}
|
||||
escLink(w, dest)
|
||||
r.Outs(w, `" alt="`)
|
||||
//}
|
||||
|
2
vendor/github.com/gomarkdown/markdown/parser/block.go
generated
vendored
@@ -1221,7 +1221,7 @@ func (p *Parser) tableRow(data []byte, columns []ast.CellAlignFlags, header bool
|
||||
|
||||
// skip the end-of-cell marker, possibly taking us past end of buffer
|
||||
// each _extra_ | means a colspan
|
||||
for data[i] == '|' && !isBackslashEscaped(data, i) {
|
||||
for i < len(data) && data[i] == '|' && !isBackslashEscaped(data, i) {
|
||||
i++
|
||||
colspan++
|
||||
}
|
||||
|
2
vendor/github.com/google/gops/agent/agent.go
generated
vendored
@@ -59,7 +59,7 @@ type Options struct {
|
||||
ShutdownCleanup bool
|
||||
|
||||
// ReuseSocketAddrAndPort determines whether the SO_REUSEADDR and
|
||||
// SO_REUSEADDR socket options should be set on the listening socket of
|
||||
// SO_REUSEPORT socket options should be set on the listening socket of
|
||||
// the agent. This option is only effective on unix-like OSes and if
|
||||
// Addr is set to a fixed host:port.
|
||||
// Optional.
|
||||
|
38
vendor/github.com/labstack/echo/v4/CHANGELOG.md
generated
vendored
@@ -1,6 +1,40 @@
|
||||
# Changelog
|
||||
|
||||
## v4.2.1 - 2020-03-08
|
||||
## v4.3.0 - 2021-05-08
|
||||
|
||||
**Important notes**
|
||||
|
||||
* Route matching has improvements for following cases:
|
||||
1. Correctly match routes with parameter part as last part of route (with trailing backslash)
|
||||
2. Considering handlers when resolving routes and search for matching http method handler
|
||||
* Echo minimal Go version is now 1.13.
|
||||
|
||||
**Fixes**
|
||||
|
||||
* When url ends with slash first param route is the match [#1804](https://github.com/labstack/echo/pull/1812)
|
||||
* Router should check if node is suitable as matching route by path+method and if not then continue search in tree [#1808](https://github.com/labstack/echo/issues/1808)
|
||||
* Fix timeout middleware not writing response correctly when handler panics [#1864](https://github.com/labstack/echo/pull/1864)
|
||||
* Fix binder not working with embedded pointer structs [#1861](https://github.com/labstack/echo/pull/1861)
|
||||
* Add Go 1.16 to CI and drop 1.12 specific code [#1850](https://github.com/labstack/echo/pull/1850)
|
||||
|
||||
**Enhancements**
|
||||
|
||||
* Make KeyFunc public in JWT middleware [#1756](https://github.com/labstack/echo/pull/1756)
|
||||
* Add support for optional filesystem to the static middleware [#1797](https://github.com/labstack/echo/pull/1797)
|
||||
* Add a custom error handler to key-auth middleware [#1847](https://github.com/labstack/echo/pull/1847)
|
||||
* Allow JWT token to be looked up from multiple sources [#1845](https://github.com/labstack/echo/pull/1845)
|
||||
|
||||
## v4.2.2 - 2021-04-07
|
||||
|
||||
**Fixes**
|
||||
|
||||
* Allow proxy middleware to use query part in rewrite (#1802)
|
||||
* Fix timeout middleware not sending status code when handler returns an error (#1805)
|
||||
* Fix Bind() when target is array/slice and path/query params complains bind target not being struct (#1835)
|
||||
* Fix panic in redirect middleware on short host name (#1813)
|
||||
* Fix timeout middleware docs (#1836)
|
||||
|
||||
## v4.2.1 - 2021-03-08
|
||||
|
||||
**Important notes**
|
||||
|
||||
@@ -22,7 +56,7 @@ A performance regression has been fixed, even bringing better performance than b
|
||||
This release was made possible by our **contributors**:
|
||||
aldas, clwluvw, lammel, Le0tk0k, maciej-jezierski, rkilingr, stffabi, withshubh
|
||||
|
||||
## v4.2.0 - 2020-02-11
|
||||
## v4.2.0 - 2021-02-11
|
||||
|
||||
**Important notes**
|
||||
|
||||
|
2
vendor/github.com/labstack/echo/v4/LICENSE
generated
vendored
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 LabStack
|
||||
Copyright (c) 2021 LabStack
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
13
vendor/github.com/labstack/echo/v4/bind.go
generated
vendored
@@ -134,17 +134,30 @@ func (b *DefaultBinder) bindData(destination interface{}, data map[string][]stri
|
||||
|
||||
// !struct
|
||||
if typ.Kind() != reflect.Struct {
|
||||
if tag == "param" || tag == "query" {
|
||||
// incompatible type, data is probably to be found in the body
|
||||
return nil
|
||||
}
|
||||
return errors.New("binding element must be a struct")
|
||||
}
|
||||
|
||||
for i := 0; i < typ.NumField(); i++ {
|
||||
typeField := typ.Field(i)
|
||||
structField := val.Field(i)
|
||||
if typeField.Anonymous {
|
||||
if structField.Kind() == reflect.Ptr {
|
||||
structField = structField.Elem()
|
||||
}
|
||||
}
|
||||
if !structField.CanSet() {
|
||||
continue
|
||||
}
|
||||
structFieldKind := structField.Kind()
|
||||
inputFieldName := typeField.Tag.Get(tag)
|
||||
if typeField.Anonymous && structField.Kind() == reflect.Struct && inputFieldName != "" {
|
||||
// if anonymous struct with query/param/form tags, report an error
|
||||
return errors.New("query/param/form tags are not allowed with anonymous struct field")
|
||||
}
|
||||
|
||||
if inputFieldName == "" {
|
||||
// If tag is nil, we inspect if the field is a not BindUnmarshaler struct and try to bind data into it (might contains fields with tags).
|
||||
|
2
vendor/github.com/labstack/echo/v4/echo.go
generated
vendored
@@ -234,7 +234,7 @@ const (
|
||||
|
||||
const (
|
||||
// Version of Echo
|
||||
Version = "4.2.1"
|
||||
Version = "4.3.0"
|
||||
website = "https://echo.labstack.com"
|
||||
// http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo
|
||||
banner = `
|
||||
|
10
vendor/github.com/labstack/echo/v4/go.mod
generated
vendored
@@ -5,12 +5,12 @@ go 1.15
|
||||
require (
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
||||
github.com/labstack/gommon v0.3.0
|
||||
github.com/mattn/go-colorable v0.1.7 // indirect
|
||||
github.com/mattn/go-colorable v0.1.8 // indirect
|
||||
github.com/stretchr/testify v1.4.0
|
||||
github.com/valyala/fasttemplate v1.2.1
|
||||
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202
|
||||
golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6 // indirect
|
||||
golang.org/x/text v0.3.3 // indirect
|
||||
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4
|
||||
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 // indirect
|
||||
golang.org/x/text v0.3.6 // indirect
|
||||
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324
|
||||
)
|
||||
|
36
vendor/github.com/labstack/echo/v4/go.sum
generated
vendored
@@ -4,12 +4,10 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumC
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0=
|
||||
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
|
||||
github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=
|
||||
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw=
|
||||
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
|
||||
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.9 h1:d5US/mDsogSGW37IV293h//ZFaeajb69h+EHFsv2xGg=
|
||||
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
|
||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
@@ -20,32 +18,26 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasttemplate v1.0.1 h1:tY9CJiPnMXf1ERmG2EyK7gNUd+c6RKGD0IfU8WdUSz8=
|
||||
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
|
||||
github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4=
|
||||
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM=
|
||||
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w=
|
||||
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ=
|
||||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6 h1:DvY3Zkh7KabQE/kfzMvYvKirSiguP9Q/veMtkYyf0o8=
|
||||
golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 h1:F5Gozwx4I1xtr/sr/8CFbb57iKi3297KFs0QDbGN60A=
|
||||
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE=
|
||||
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
|
2
vendor/github.com/labstack/echo/v4/middleware/csrf.go
generated
vendored
@@ -110,7 +110,7 @@ func CSRFWithConfig(config CSRFConfig) echo.MiddlewareFunc {
|
||||
if config.CookieMaxAge == 0 {
|
||||
config.CookieMaxAge = DefaultCSRFConfig.CookieMaxAge
|
||||
}
|
||||
if config.CookieSameSite == SameSiteNoneMode {
|
||||
if config.CookieSameSite == http.SameSiteNoneMode {
|
||||
config.CookieSecure = true
|
||||
}
|
||||
|
||||
|
12
vendor/github.com/labstack/echo/v4/middleware/csrf_samesite.go
generated
vendored
@@ -1,12 +0,0 @@
|
||||
// +build go1.13
|
||||
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
const (
|
||||
// SameSiteNoneMode required to be redefined for Go 1.12 support (see #1524)
|
||||
SameSiteNoneMode http.SameSite = http.SameSiteNoneMode
|
||||
)
|
12
vendor/github.com/labstack/echo/v4/middleware/csrf_samesite_1.12.go
generated
vendored
@@ -1,12 +0,0 @@
|
||||
// +build !go1.13
|
||||
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
const (
|
||||
// SameSiteNoneMode required to be redefined for Go 1.12 support (see #1524)
|
||||
SameSiteNoneMode http.SameSite = 4
|
||||
)
|
108
vendor/github.com/labstack/echo/v4/middleware/jwt.go
generated
vendored
@@ -29,15 +29,19 @@ type (
|
||||
// ErrorHandlerWithContext is almost identical to ErrorHandler, but it's passed the current context.
|
||||
ErrorHandlerWithContext JWTErrorHandlerWithContext
|
||||
|
||||
// Signing key to validate token. Used as fallback if SigningKeys has length 0.
|
||||
// Required. This or SigningKeys.
|
||||
// Signing key to validate token.
|
||||
// This is one of the three options to provide a token validation key.
|
||||
// The order of precedence is a user-defined KeyFunc, SigningKeys and SigningKey.
|
||||
// Required if neither user-defined KeyFunc nor SigningKeys is provided.
|
||||
SigningKey interface{}
|
||||
|
||||
// Map of signing keys to validate token with kid field usage.
|
||||
// Required. This or SigningKey.
|
||||
// This is one of the three options to provide a token validation key.
|
||||
// The order of precedence is a user-defined KeyFunc, SigningKeys and SigningKey.
|
||||
// Required if neither user-defined KeyFunc nor SigningKey is provided.
|
||||
SigningKeys map[string]interface{}
|
||||
|
||||
// Signing method, used to check token signing method.
|
||||
// Signing method used to check the token's signing algorithm.
|
||||
// Optional. Default value HS256.
|
||||
SigningMethod string
|
||||
|
||||
@@ -64,7 +68,16 @@ type (
|
||||
// Optional. Default value "Bearer".
|
||||
AuthScheme string
|
||||
|
||||
keyFunc jwt.Keyfunc
|
||||
// KeyFunc defines a user-defined function that supplies the public key for a token validation.
|
||||
// The function shall take care of verifying the signing algorithm and selecting the proper key.
|
||||
// A user-defined KeyFunc can be useful if tokens are issued by an external party.
|
||||
//
|
||||
// When a user-defined KeyFunc is provided, SigningKey, SigningKeys, and SigningMethod are ignored.
|
||||
// This is one of the three options to provide a token validation key.
|
||||
// The order of precedence is a user-defined KeyFunc, SigningKeys and SigningKey.
|
||||
// Required if neither SigningKeys nor SigningKey is provided.
|
||||
// Default to an internal implementation verifying the signing algorithm and selecting the proper key.
|
||||
KeyFunc jwt.Keyfunc
|
||||
}
|
||||
|
||||
// JWTSuccessHandler defines a function which is executed for a valid token.
|
||||
@@ -99,6 +112,7 @@ var (
|
||||
TokenLookup: "header:" + echo.HeaderAuthorization,
|
||||
AuthScheme: "Bearer",
|
||||
Claims: jwt.MapClaims{},
|
||||
KeyFunc: nil,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -123,7 +137,7 @@ func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc {
|
||||
if config.Skipper == nil {
|
||||
config.Skipper = DefaultJWTConfig.Skipper
|
||||
}
|
||||
if config.SigningKey == nil && len(config.SigningKeys) == 0 {
|
||||
if config.SigningKey == nil && len(config.SigningKeys) == 0 && config.KeyFunc == nil {
|
||||
panic("echo: jwt middleware requires signing key")
|
||||
}
|
||||
if config.SigningMethod == "" {
|
||||
@@ -141,35 +155,29 @@ func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc {
|
||||
if config.AuthScheme == "" {
|
||||
config.AuthScheme = DefaultJWTConfig.AuthScheme
|
||||
}
|
||||
config.keyFunc = func(t *jwt.Token) (interface{}, error) {
|
||||
// Check the signing method
|
||||
if t.Method.Alg() != config.SigningMethod {
|
||||
return nil, fmt.Errorf("unexpected jwt signing method=%v", t.Header["alg"])
|
||||
}
|
||||
if len(config.SigningKeys) > 0 {
|
||||
if kid, ok := t.Header["kid"].(string); ok {
|
||||
if key, ok := config.SigningKeys[kid]; ok {
|
||||
return key, nil
|
||||
}
|
||||
}
|
||||
return nil, fmt.Errorf("unexpected jwt key id=%v", t.Header["kid"])
|
||||
}
|
||||
|
||||
return config.SigningKey, nil
|
||||
if config.KeyFunc == nil {
|
||||
config.KeyFunc = config.defaultKeyFunc
|
||||
}
|
||||
|
||||
// Initialize
|
||||
parts := strings.Split(config.TokenLookup, ":")
|
||||
extractor := jwtFromHeader(parts[1], config.AuthScheme)
|
||||
switch parts[0] {
|
||||
case "query":
|
||||
extractor = jwtFromQuery(parts[1])
|
||||
case "param":
|
||||
extractor = jwtFromParam(parts[1])
|
||||
case "cookie":
|
||||
extractor = jwtFromCookie(parts[1])
|
||||
case "form":
|
||||
extractor = jwtFromForm(parts[1])
|
||||
// Split sources
|
||||
sources := strings.Split(config.TokenLookup, ",")
|
||||
var extractors []jwtExtractor
|
||||
for _, source := range sources {
|
||||
parts := strings.Split(source, ":")
|
||||
|
||||
switch parts[0] {
|
||||
case "query":
|
||||
extractors = append(extractors, jwtFromQuery(parts[1]))
|
||||
case "param":
|
||||
extractors = append(extractors, jwtFromParam(parts[1]))
|
||||
case "cookie":
|
||||
extractors = append(extractors, jwtFromCookie(parts[1]))
|
||||
case "form":
|
||||
extractors = append(extractors, jwtFromForm(parts[1]))
|
||||
case "header":
|
||||
extractors = append(extractors, jwtFromHeader(parts[1], config.AuthScheme))
|
||||
}
|
||||
}
|
||||
|
||||
return func(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
@@ -181,8 +189,17 @@ func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc {
|
||||
if config.BeforeFunc != nil {
|
||||
config.BeforeFunc(c)
|
||||
}
|
||||
|
||||
auth, err := extractor(c)
|
||||
var auth string
|
||||
var err error
|
||||
for _, extractor := range extractors {
|
||||
// Extract token from extractor, if it's not fail break the loop and
|
||||
// set auth
|
||||
auth, err = extractor(c)
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
}
|
||||
// If none of extractor has a token, handle error
|
||||
if err != nil {
|
||||
if config.ErrorHandler != nil {
|
||||
return config.ErrorHandler(err)
|
||||
@@ -193,14 +210,15 @@ func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc {
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
token := new(jwt.Token)
|
||||
// Issue #647, #656
|
||||
if _, ok := config.Claims.(jwt.MapClaims); ok {
|
||||
token, err = jwt.Parse(auth, config.keyFunc)
|
||||
token, err = jwt.Parse(auth, config.KeyFunc)
|
||||
} else {
|
||||
t := reflect.ValueOf(config.Claims).Type().Elem()
|
||||
claims := reflect.New(t).Interface().(jwt.Claims)
|
||||
token, err = jwt.ParseWithClaims(auth, claims, config.keyFunc)
|
||||
token, err = jwt.ParseWithClaims(auth, claims, config.KeyFunc)
|
||||
}
|
||||
if err == nil && token.Valid {
|
||||
// Store user information from token into context.
|
||||
@@ -225,6 +243,24 @@ func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc {
|
||||
}
|
||||
}
|
||||
|
||||
// defaultKeyFunc returns a signing key of the given token.
|
||||
func (config *JWTConfig) defaultKeyFunc(t *jwt.Token) (interface{}, error) {
|
||||
// Check the signing method
|
||||
if t.Method.Alg() != config.SigningMethod {
|
||||
return nil, fmt.Errorf("unexpected jwt signing method=%v", t.Header["alg"])
|
||||
}
|
||||
if len(config.SigningKeys) > 0 {
|
||||
if kid, ok := t.Header["kid"].(string); ok {
|
||||
if key, ok := config.SigningKeys[kid]; ok {
|
||||
return key, nil
|
||||
}
|
||||
}
|
||||
return nil, fmt.Errorf("unexpected jwt key id=%v", t.Header["kid"])
|
||||
}
|
||||
|
||||
return config.SigningKey, nil
|
||||
}
|
||||
|
||||
// jwtFromHeader returns a `jwtExtractor` that extracts token from the request header.
|
||||
func jwtFromHeader(header string, authScheme string) jwtExtractor {
|
||||
return func(c echo.Context) (string, error) {
|
||||
|
13
vendor/github.com/labstack/echo/v4/middleware/key_auth.go
generated
vendored
@@ -30,12 +30,19 @@ type (
|
||||
// Validator is a function to validate key.
|
||||
// Required.
|
||||
Validator KeyAuthValidator
|
||||
|
||||
// ErrorHandler defines a function which is executed for an invalid key.
|
||||
// It may be used to define a custom error.
|
||||
ErrorHandler KeyAuthErrorHandler
|
||||
}
|
||||
|
||||
// KeyAuthValidator defines a function to validate KeyAuth credentials.
|
||||
KeyAuthValidator func(string, echo.Context) (bool, error)
|
||||
|
||||
keyExtractor func(echo.Context) (string, error)
|
||||
|
||||
// KeyAuthErrorHandler defines a function which is executed for an invalid key.
|
||||
KeyAuthErrorHandler func(error, echo.Context) error
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -95,10 +102,16 @@ func KeyAuthWithConfig(config KeyAuthConfig) echo.MiddlewareFunc {
|
||||
// Extract and verify key
|
||||
key, err := extractor(c)
|
||||
if err != nil {
|
||||
if config.ErrorHandler != nil {
|
||||
return config.ErrorHandler(err, c)
|
||||
}
|
||||
return echo.NewHTTPError(http.StatusBadRequest, err.Error())
|
||||
}
|
||||
valid, err := config.Validator(key, c)
|
||||
if err != nil {
|
||||
if config.ErrorHandler != nil {
|
||||
return config.ErrorHandler(err, c)
|
||||
}
|
||||
return &echo.HTTPError{
|
||||
Code: http.StatusUnauthorized,
|
||||
Message: "invalid key",
|
||||
|
50
vendor/github.com/labstack/echo/v4/middleware/middleware.go
generated
vendored
@@ -2,7 +2,6 @@ package middleware
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -49,30 +48,39 @@ func rewriteRulesRegex(rewrite map[string]string) map[*regexp.Regexp]string {
|
||||
return rulesRegex
|
||||
}
|
||||
|
||||
func rewritePath(rewriteRegex map[*regexp.Regexp]string, req *http.Request) {
|
||||
for k, v := range rewriteRegex {
|
||||
rawPath := req.URL.RawPath
|
||||
if rawPath != "" {
|
||||
// RawPath is only set when there has been escaping done. In that case Path must be deduced from rewritten RawPath
|
||||
// because encoded Path could match rules that RawPath did not
|
||||
if replacer := captureTokens(k, rawPath); replacer != nil {
|
||||
rawPath = replacer.Replace(v)
|
||||
func rewriteURL(rewriteRegex map[*regexp.Regexp]string, req *http.Request) error {
|
||||
if len(rewriteRegex) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
req.URL.RawPath = rawPath
|
||||
req.URL.Path, _ = url.PathUnescape(rawPath)
|
||||
|
||||
return // rewrite only once
|
||||
}
|
||||
|
||||
continue
|
||||
// Depending how HTTP request is sent RequestURI could contain Scheme://Host/path or be just /path.
|
||||
// We only want to use path part for rewriting and therefore trim prefix if it exists
|
||||
rawURI := req.RequestURI
|
||||
if rawURI != "" && rawURI[0] != '/' {
|
||||
prefix := ""
|
||||
if req.URL.Scheme != "" {
|
||||
prefix = req.URL.Scheme + "://"
|
||||
}
|
||||
|
||||
if replacer := captureTokens(k, req.URL.Path); replacer != nil {
|
||||
req.URL.Path = replacer.Replace(v)
|
||||
|
||||
return // rewrite only once
|
||||
if req.URL.Host != "" {
|
||||
prefix += req.URL.Host // host or host:port
|
||||
}
|
||||
if prefix != "" {
|
||||
rawURI = strings.TrimPrefix(rawURI, prefix)
|
||||
}
|
||||
}
|
||||
|
||||
for k, v := range rewriteRegex {
|
||||
if replacer := captureTokens(k, rawURI); replacer != nil {
|
||||
url, err := req.URL.Parse(replacer.Replace(v))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
req.URL = url
|
||||
|
||||
return nil // rewrite only once
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DefaultSkipper returns false which processes the middleware.
|
||||
|
42
vendor/github.com/labstack/echo/v4/middleware/proxy.go
generated
vendored
@@ -1,13 +1,16 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/rand"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
@@ -231,8 +234,9 @@ func ProxyWithConfig(config ProxyConfig) echo.MiddlewareFunc {
|
||||
tgt := config.Balancer.Next(c)
|
||||
c.Set(config.ContextKey, tgt)
|
||||
|
||||
// Set rewrite path and raw path
|
||||
rewritePath(config.RegexRewrite, req)
|
||||
if err := rewriteURL(config.RegexRewrite, req); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Fix header
|
||||
// Basically it's not good practice to unconditionally pass incoming x-real-ip header to upstream.
|
||||
@@ -263,3 +267,37 @@ func ProxyWithConfig(config ProxyConfig) echo.MiddlewareFunc {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// StatusCodeContextCanceled is a custom HTTP status code for situations
|
||||
// where a client unexpectedly closed the connection to the server.
|
||||
// As there is no standard error code for "client closed connection", but
|
||||
// various well-known HTTP clients and server implement this HTTP code we use
|
||||
// 499 too instead of the more problematic 5xx, which does not allow to detect this situation
|
||||
const StatusCodeContextCanceled = 499
|
||||
|
||||
func proxyHTTP(tgt *ProxyTarget, c echo.Context, config ProxyConfig) http.Handler {
|
||||
proxy := httputil.NewSingleHostReverseProxy(tgt.URL)
|
||||
proxy.ErrorHandler = func(resp http.ResponseWriter, req *http.Request, err error) {
|
||||
desc := tgt.URL.String()
|
||||
if tgt.Name != "" {
|
||||
desc = fmt.Sprintf("%s(%s)", tgt.Name, tgt.URL.String())
|
||||
}
|
||||
// If the client canceled the request (usually by closing the connection), we can report a
|
||||
// client error (4xx) instead of a server error (5xx) to correctly identify the situation.
|
||||
// The Go standard library (at of late 2020) wraps the exported, standard
|
||||
// context.Canceled error with unexported garbage value requiring a substring check, see
|
||||
// https://github.com/golang/go/blob/6965b01ea248cabb70c3749fd218b36089a21efb/src/net/net.go#L416-L430
|
||||
if err == context.Canceled || strings.Contains(err.Error(), "operation was canceled") {
|
||||
httpError := echo.NewHTTPError(StatusCodeContextCanceled, fmt.Sprintf("client closed connection: %v", err))
|
||||
httpError.Internal = err
|
||||
c.Set("_error", httpError)
|
||||
} else {
|
||||
httpError := echo.NewHTTPError(http.StatusBadGateway, fmt.Sprintf("remote %s unreachable, could not forward: %v", desc, err))
|
||||
httpError.Internal = err
|
||||
c.Set("_error", httpError)
|
||||
}
|
||||
}
|
||||
proxy.Transport = config.Transport
|
||||
proxy.ModifyResponse = config.ModifyResponse
|
||||
return proxy
|
||||
}
|
||||
|
47
vendor/github.com/labstack/echo/v4/middleware/proxy_1_11.go
generated
vendored
@@ -1,47 +0,0 @@
|
||||
// +build go1.11
|
||||
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"strings"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
// StatusCodeContextCanceled is a custom HTTP status code for situations
|
||||
// where a client unexpectedly closed the connection to the server.
|
||||
// As there is no standard error code for "client closed connection", but
|
||||
// various well-known HTTP clients and server implement this HTTP code we use
|
||||
// 499 too instead of the more problematic 5xx, which does not allow to detect this situation
|
||||
const StatusCodeContextCanceled = 499
|
||||
|
||||
func proxyHTTP(tgt *ProxyTarget, c echo.Context, config ProxyConfig) http.Handler {
|
||||
proxy := httputil.NewSingleHostReverseProxy(tgt.URL)
|
||||
proxy.ErrorHandler = func(resp http.ResponseWriter, req *http.Request, err error) {
|
||||
desc := tgt.URL.String()
|
||||
if tgt.Name != "" {
|
||||
desc = fmt.Sprintf("%s(%s)", tgt.Name, tgt.URL.String())
|
||||
}
|
||||
// If the client canceled the request (usually by closing the connection), we can report a
|
||||
// client error (4xx) instead of a server error (5xx) to correctly identify the situation.
|
||||
// The Go standard library (at of late 2020) wraps the exported, standard
|
||||
// context.Canceled error with unexported garbage value requiring a substring check, see
|
||||
// https://github.com/golang/go/blob/6965b01ea248cabb70c3749fd218b36089a21efb/src/net/net.go#L416-L430
|
||||
if err == context.Canceled || strings.Contains(err.Error(), "operation was canceled") {
|
||||
httpError := echo.NewHTTPError(StatusCodeContextCanceled, fmt.Sprintf("client closed connection: %v", err))
|
||||
httpError.Internal = err
|
||||
c.Set("_error", httpError)
|
||||
} else {
|
||||
httpError := echo.NewHTTPError(http.StatusBadGateway, fmt.Sprintf("remote %s unreachable, could not forward: %v", desc, err))
|
||||
httpError.Internal = err
|
||||
c.Set("_error", httpError)
|
||||
}
|
||||
}
|
||||
proxy.Transport = config.Transport
|
||||
proxy.ModifyResponse = config.ModifyResponse
|
||||
return proxy
|
||||
}
|
14
vendor/github.com/labstack/echo/v4/middleware/proxy_1_11_n.go
generated
vendored
@@ -1,14 +0,0 @@
|
||||
// +build !go1.11
|
||||
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
func proxyHTTP(t *ProxyTarget, c echo.Context, config ProxyConfig) http.Handler {
|
||||
return httputil.NewSingleHostReverseProxy(t.URL)
|
||||
}
|
45
vendor/github.com/labstack/echo/v4/middleware/redirect.go
generated
vendored
@@ -2,6 +2,7 @@ package middleware
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
@@ -40,11 +41,11 @@ func HTTPSRedirect() echo.MiddlewareFunc {
|
||||
// HTTPSRedirectWithConfig returns an HTTPSRedirect middleware with config.
|
||||
// See `HTTPSRedirect()`.
|
||||
func HTTPSRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc {
|
||||
return redirect(config, func(scheme, host, uri string) (ok bool, url string) {
|
||||
if ok = scheme != "https"; ok {
|
||||
url = "https://" + host + uri
|
||||
return redirect(config, func(scheme, host, uri string) (bool, string) {
|
||||
if scheme != "https" {
|
||||
return true, "https://" + host + uri
|
||||
}
|
||||
return
|
||||
return false, ""
|
||||
})
|
||||
}
|
||||
|
||||
@@ -59,11 +60,11 @@ func HTTPSWWWRedirect() echo.MiddlewareFunc {
|
||||
// HTTPSWWWRedirectWithConfig returns an HTTPSRedirect middleware with config.
|
||||
// See `HTTPSWWWRedirect()`.
|
||||
func HTTPSWWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc {
|
||||
return redirect(config, func(scheme, host, uri string) (ok bool, url string) {
|
||||
if ok = scheme != "https" && host[:4] != www; ok {
|
||||
url = "https://www." + host + uri
|
||||
return redirect(config, func(scheme, host, uri string) (bool, string) {
|
||||
if scheme != "https" && !strings.HasPrefix(host, www) {
|
||||
return true, "https://www." + host + uri
|
||||
}
|
||||
return
|
||||
return false, ""
|
||||
})
|
||||
}
|
||||
|
||||
@@ -79,13 +80,11 @@ func HTTPSNonWWWRedirect() echo.MiddlewareFunc {
|
||||
// See `HTTPSNonWWWRedirect()`.
|
||||
func HTTPSNonWWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc {
|
||||
return redirect(config, func(scheme, host, uri string) (ok bool, url string) {
|
||||
if ok = scheme != "https"; ok {
|
||||
if host[:4] == www {
|
||||
host = host[4:]
|
||||
}
|
||||
url = "https://" + host + uri
|
||||
if scheme != "https" {
|
||||
host = strings.TrimPrefix(host, www)
|
||||
return true, "https://" + host + uri
|
||||
}
|
||||
return
|
||||
return false, ""
|
||||
})
|
||||
}
|
||||
|
||||
@@ -100,11 +99,11 @@ func WWWRedirect() echo.MiddlewareFunc {
|
||||
// WWWRedirectWithConfig returns an HTTPSRedirect middleware with config.
|
||||
// See `WWWRedirect()`.
|
||||
func WWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc {
|
||||
return redirect(config, func(scheme, host, uri string) (ok bool, url string) {
|
||||
if ok = host[:4] != www; ok {
|
||||
url = scheme + "://www." + host + uri
|
||||
return redirect(config, func(scheme, host, uri string) (bool, string) {
|
||||
if !strings.HasPrefix(host, www) {
|
||||
return true, scheme + "://www." + host + uri
|
||||
}
|
||||
return
|
||||
return false, ""
|
||||
})
|
||||
}
|
||||
|
||||
@@ -119,17 +118,17 @@ func NonWWWRedirect() echo.MiddlewareFunc {
|
||||
// NonWWWRedirectWithConfig returns an HTTPSRedirect middleware with config.
|
||||
// See `NonWWWRedirect()`.
|
||||
func NonWWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc {
|
||||
return redirect(config, func(scheme, host, uri string) (ok bool, url string) {
|
||||
if ok = host[:4] == www; ok {
|
||||
url = scheme + "://" + host[4:] + uri
|
||||
return redirect(config, func(scheme, host, uri string) (bool, string) {
|
||||
if strings.HasPrefix(host, www) {
|
||||
return true, scheme + "://" + host[4:] + uri
|
||||
}
|
||||
return
|
||||
return false, ""
|
||||
})
|
||||
}
|
||||
|
||||
func redirect(config RedirectConfig, cb redirectLogic) echo.MiddlewareFunc {
|
||||
if config.Skipper == nil {
|
||||
config.Skipper = DefaultTrailingSlashConfig.Skipper
|
||||
config.Skipper = DefaultRedirectConfig.Skipper
|
||||
}
|
||||
if config.Code == 0 {
|
||||
config.Code = DefaultRedirectConfig.Code
|
||||
|
6
vendor/github.com/labstack/echo/v4/middleware/rewrite.go
generated
vendored
@@ -72,9 +72,9 @@ func RewriteWithConfig(config RewriteConfig) echo.MiddlewareFunc {
|
||||
return next(c)
|
||||
}
|
||||
|
||||
req := c.Request()
|
||||
// Set rewrite path and raw path
|
||||
rewritePath(config.RegexRules, req)
|
||||
if err := rewriteURL(config.RegexRules, c.Request()); err != nil {
|
||||
return err
|
||||
}
|
||||
return next(c)
|
||||
}
|
||||
}
|
||||
|
80
vendor/github.com/labstack/echo/v4/middleware/static.go
generated
vendored
@@ -42,6 +42,10 @@ type (
|
||||
// the filesystem path is not doubled
|
||||
// Optional. Default value false.
|
||||
IgnoreBase bool `yaml:"ignoreBase"`
|
||||
|
||||
// Filesystem provides access to the static content.
|
||||
// Optional. Defaults to http.Dir(config.Root)
|
||||
Filesystem http.FileSystem `yaml:"-"`
|
||||
}
|
||||
)
|
||||
|
||||
@@ -146,6 +150,10 @@ func StaticWithConfig(config StaticConfig) echo.MiddlewareFunc {
|
||||
if config.Index == "" {
|
||||
config.Index = DefaultStaticConfig.Index
|
||||
}
|
||||
if config.Filesystem == nil {
|
||||
config.Filesystem = http.Dir(config.Root)
|
||||
config.Root = "."
|
||||
}
|
||||
|
||||
// Index template
|
||||
t, err := template.New("index").Parse(html)
|
||||
@@ -178,49 +186,73 @@ func StaticWithConfig(config StaticConfig) echo.MiddlewareFunc {
|
||||
}
|
||||
}
|
||||
|
||||
fi, err := os.Stat(name)
|
||||
file, err := openFile(config.Filesystem, name)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
if err = next(c); err != nil {
|
||||
if he, ok := err.(*echo.HTTPError); ok {
|
||||
if config.HTML5 && he.Code == http.StatusNotFound {
|
||||
return c.File(filepath.Join(config.Root, config.Index))
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
if !os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = next(c); err == nil {
|
||||
return err
|
||||
}
|
||||
|
||||
he, ok := err.(*echo.HTTPError)
|
||||
if !(ok && config.HTML5 && he.Code == http.StatusNotFound) {
|
||||
return err
|
||||
}
|
||||
|
||||
file, err = openFile(config.Filesystem, filepath.Join(config.Root, config.Index))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if fi.IsDir() {
|
||||
index := filepath.Join(name, config.Index)
|
||||
fi, err = os.Stat(index)
|
||||
defer file.Close()
|
||||
|
||||
info, err := file.Stat()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if info.IsDir() {
|
||||
index, err := openFile(config.Filesystem, filepath.Join(name, config.Index))
|
||||
if err != nil {
|
||||
if config.Browse {
|
||||
return listDir(t, name, c.Response())
|
||||
return listDir(t, name, file, c.Response())
|
||||
}
|
||||
|
||||
if os.IsNotExist(err) {
|
||||
return next(c)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
return c.File(index)
|
||||
defer index.Close()
|
||||
|
||||
info, err = index.Stat()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return serveFile(c, index, info)
|
||||
}
|
||||
|
||||
return c.File(name)
|
||||
return serveFile(c, file, info)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func listDir(t *template.Template, name string, res *echo.Response) (err error) {
|
||||
file, err := os.Open(name)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
files, err := file.Readdir(-1)
|
||||
func openFile(fs http.FileSystem, name string) (http.File, error) {
|
||||
pathWithSlashes := filepath.ToSlash(name)
|
||||
return fs.Open(pathWithSlashes)
|
||||
}
|
||||
|
||||
func serveFile(c echo.Context, file http.File, info os.FileInfo) error {
|
||||
http.ServeContent(c.Response(), c.Request(), info.Name(), info.ModTime(), file)
|
||||
return nil
|
||||
}
|
||||
|
||||
func listDir(t *template.Template, name string, dir http.File, res *echo.Response) (err error) {
|
||||
files, err := dir.Readdir(-1)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
20
vendor/github.com/labstack/echo/v4/middleware/timeout.go
generated
vendored
@@ -1,5 +1,3 @@
|
||||
// +build go1.13
|
||||
|
||||
package middleware
|
||||
|
||||
import (
|
||||
@@ -42,8 +40,8 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
// Timeout returns a middleware which recovers from panics anywhere in the chain
|
||||
// and handles the control to the centralized HTTPErrorHandler.
|
||||
// Timeout returns a middleware which returns error (503 Service Unavailable error) to client immediately when handler
|
||||
// call runs for longer than its time limit. NB: timeout does not stop handler execution.
|
||||
func Timeout() echo.MiddlewareFunc {
|
||||
return TimeoutWithConfig(DefaultTimeoutConfig)
|
||||
}
|
||||
@@ -94,6 +92,15 @@ func (t echoHandlerFuncWrapper) ServeHTTP(rw http.ResponseWriter, r *http.Reques
|
||||
originalWriter := t.ctx.Response().Writer
|
||||
t.ctx.Response().Writer = rw
|
||||
|
||||
// in case of panic we restore original writer and call panic again
|
||||
// so it could be handled with global middleware Recover()
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
t.ctx.Response().Writer = originalWriter
|
||||
panic(err)
|
||||
}
|
||||
}()
|
||||
|
||||
err := t.handler(t.ctx)
|
||||
if ctxErr := r.Context().Err(); ctxErr == context.DeadlineExceeded {
|
||||
if err != nil && t.errHandler != nil {
|
||||
@@ -106,6 +113,11 @@ func (t echoHandlerFuncWrapper) ServeHTTP(rw http.ResponseWriter, r *http.Reques
|
||||
// so on timeout writer stays what http.TimeoutHandler uses and prevents writing headers/body
|
||||
t.ctx.Response().Writer = originalWriter
|
||||
if err != nil {
|
||||
// call global error handler to write error to the client. This is needed or `http.TimeoutHandler` will send status code by itself
|
||||
// and after that our tries to write status code will not work anymore
|
||||
t.ctx.Error(err)
|
||||
// we pass error from handler to middlewares up in handler chain to act on it if needed. But this means that
|
||||
// global error handler is probably be called twice as `t.ctx.Error` already does that.
|
||||
t.errChan <- err
|
||||
}
|
||||
}
|
||||
|
113
vendor/github.com/labstack/echo/v4/router.go
generated
vendored
@@ -23,6 +23,10 @@ type (
|
||||
methodHandler *methodHandler
|
||||
paramChild *node
|
||||
anyChild *node
|
||||
// isLeaf indicates that node does not have child routes
|
||||
isLeaf bool
|
||||
// isHandler indicates that node has at least one handler registered to it
|
||||
isHandler bool
|
||||
}
|
||||
kind uint8
|
||||
children []*node
|
||||
@@ -50,6 +54,20 @@ const (
|
||||
anyLabel = byte('*')
|
||||
)
|
||||
|
||||
func (m *methodHandler) isHandler() bool {
|
||||
return m.connect != nil ||
|
||||
m.delete != nil ||
|
||||
m.get != nil ||
|
||||
m.head != nil ||
|
||||
m.options != nil ||
|
||||
m.patch != nil ||
|
||||
m.post != nil ||
|
||||
m.propfind != nil ||
|
||||
m.put != nil ||
|
||||
m.trace != nil ||
|
||||
m.report != nil
|
||||
}
|
||||
|
||||
// NewRouter returns a new Router instance.
|
||||
func NewRouter(e *Echo) *Router {
|
||||
return &Router{
|
||||
@@ -73,6 +91,11 @@ func (r *Router) Add(method, path string, h HandlerFunc) {
|
||||
pnames := []string{} // Param names
|
||||
ppath := path // Pristine path
|
||||
|
||||
if h == nil && r.echo.Logger != nil {
|
||||
// FIXME: in future we should return error
|
||||
r.echo.Logger.Errorf("Adding route without handler function: %v:%v", method, path)
|
||||
}
|
||||
|
||||
for i, lcpIndex := 0, len(path); i < lcpIndex; i++ {
|
||||
if path[i] == ':' {
|
||||
j := i + 1
|
||||
@@ -86,6 +109,7 @@ func (r *Router) Add(method, path string, h HandlerFunc) {
|
||||
i, lcpIndex = j, len(path)
|
||||
|
||||
if i == lcpIndex {
|
||||
// path node is last fragment of route path. ie. `/users/:id`
|
||||
r.insert(method, path[:i], h, paramKind, ppath, pnames)
|
||||
} else {
|
||||
r.insert(method, path[:i], nil, paramKind, "", nil)
|
||||
@@ -136,6 +160,7 @@ func (r *Router) insert(method, path string, h HandlerFunc, t kind, ppath string
|
||||
currentNode.ppath = ppath
|
||||
currentNode.pnames = pnames
|
||||
}
|
||||
currentNode.isLeaf = currentNode.staticChildren == nil && currentNode.paramChild == nil && currentNode.anyChild == nil
|
||||
} else if lcpLen < prefixLen {
|
||||
// Split node
|
||||
n := newNode(
|
||||
@@ -149,7 +174,6 @@ func (r *Router) insert(method, path string, h HandlerFunc, t kind, ppath string
|
||||
currentNode.paramChild,
|
||||
currentNode.anyChild,
|
||||
)
|
||||
|
||||
// Update parent path for all children to new node
|
||||
for _, child := range currentNode.staticChildren {
|
||||
child.parent = n
|
||||
@@ -171,6 +195,8 @@ func (r *Router) insert(method, path string, h HandlerFunc, t kind, ppath string
|
||||
currentNode.pnames = nil
|
||||
currentNode.paramChild = nil
|
||||
currentNode.anyChild = nil
|
||||
currentNode.isLeaf = false
|
||||
currentNode.isHandler = false
|
||||
|
||||
// Only Static children could reach here
|
||||
currentNode.addStaticChild(n)
|
||||
@@ -188,6 +214,7 @@ func (r *Router) insert(method, path string, h HandlerFunc, t kind, ppath string
|
||||
// Only Static children could reach here
|
||||
currentNode.addStaticChild(n)
|
||||
}
|
||||
currentNode.isLeaf = currentNode.staticChildren == nil && currentNode.paramChild == nil && currentNode.anyChild == nil
|
||||
} else if lcpLen < searchLen {
|
||||
search = search[lcpLen:]
|
||||
c := currentNode.findChildWithLabel(search[0])
|
||||
@@ -207,6 +234,7 @@ func (r *Router) insert(method, path string, h HandlerFunc, t kind, ppath string
|
||||
case anyKind:
|
||||
currentNode.anyChild = n
|
||||
}
|
||||
currentNode.isLeaf = currentNode.staticChildren == nil && currentNode.paramChild == nil && currentNode.anyChild == nil
|
||||
} else {
|
||||
// Node already exists
|
||||
if h != nil {
|
||||
@@ -233,6 +261,8 @@ func newNode(t kind, pre string, p *node, sc children, mh *methodHandler, ppath
|
||||
methodHandler: mh,
|
||||
paramChild: paramChildren,
|
||||
anyChild: anyChildren,
|
||||
isLeaf: sc == nil && paramChildren == nil && anyChildren == nil,
|
||||
isHandler: mh.isHandler(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,6 +319,12 @@ func (n *node) addHandler(method string, h HandlerFunc) {
|
||||
case REPORT:
|
||||
n.methodHandler.report = h
|
||||
}
|
||||
|
||||
if h != nil {
|
||||
n.isHandler = true
|
||||
} else {
|
||||
n.isHandler = n.methodHandler.isHandler()
|
||||
}
|
||||
}
|
||||
|
||||
func (n *node) findHandler(method string) HandlerFunc {
|
||||
@@ -343,6 +379,8 @@ func (r *Router) Find(method, path string, c Context) {
|
||||
currentNode := r.tree // Current node as root
|
||||
|
||||
var (
|
||||
previousBestMatchNode *node
|
||||
matchedHandler HandlerFunc
|
||||
// search stores the remaining path to check for match. By each iteration we move from start of path to end of the path
|
||||
// and search value gets shorter and shorter.
|
||||
search = path
|
||||
@@ -362,10 +400,11 @@ func (r *Router) Find(method, path string, c Context) {
|
||||
valid = currentNode != nil
|
||||
|
||||
// Next node type by priority
|
||||
// NOTE: With the current implementation we never backtrack from an `any` route, so `previous.kind` is
|
||||
// always `static` or `any`
|
||||
// If this is changed then for any route next kind would be `static` and this statement should be changed
|
||||
nextNodeKind = previous.kind + 1
|
||||
if previous.kind == anyKind {
|
||||
nextNodeKind = staticKind
|
||||
} else {
|
||||
nextNodeKind = previous.kind + 1
|
||||
}
|
||||
|
||||
if fromKind == staticKind {
|
||||
// when backtracking is done from static kind block we did not change search so nothing to restore
|
||||
@@ -380,6 +419,7 @@ func (r *Router) Find(method, path string, c Context) {
|
||||
// for param/any node.prefix value is always `:` so we can not deduce searchIndex from that and must use pValue
|
||||
// for that index as it would also contain part of path we cut off before moving into node we are backtracking from
|
||||
searchIndex -= len(paramValues[paramIndex])
|
||||
paramValues[paramIndex] = ""
|
||||
}
|
||||
search = path[searchIndex:]
|
||||
return
|
||||
@@ -421,7 +461,7 @@ func (r *Router) Find(method, path string, c Context) {
|
||||
// goto Any
|
||||
} else {
|
||||
// Not found (this should never be possible for static node we are looking currently)
|
||||
return
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
@@ -429,9 +469,17 @@ func (r *Router) Find(method, path string, c Context) {
|
||||
search = search[lcpLen:]
|
||||
searchIndex = searchIndex + lcpLen
|
||||
|
||||
// Finish routing if no remaining search and we are on an leaf node
|
||||
if search == "" && currentNode.ppath != "" {
|
||||
break
|
||||
// Finish routing if no remaining search and we are on a node with handler and matching method type
|
||||
if search == "" && currentNode.isHandler {
|
||||
// check if current node has handler registered for http method we are looking for. we store currentNode as
|
||||
// best matching in case we do no find no more routes matching this path+method
|
||||
if previousBestMatchNode == nil {
|
||||
previousBestMatchNode = currentNode
|
||||
}
|
||||
if h := currentNode.findHandler(method); h != nil {
|
||||
matchedHandler = h
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// Static node
|
||||
@@ -446,10 +494,16 @@ func (r *Router) Find(method, path string, c Context) {
|
||||
// Param node
|
||||
if child := currentNode.paramChild; search != "" && child != nil {
|
||||
currentNode = child
|
||||
// FIXME: when param node does not have any children then param node should act similarly to any node - consider all remaining search as match
|
||||
i, l := 0, len(search)
|
||||
for ; i < l && search[i] != '/'; i++ {
|
||||
i := 0
|
||||
l := len(search)
|
||||
if currentNode.isLeaf {
|
||||
// when param node does not have any children then param node should act similarly to any node - consider all remaining search as match
|
||||
i = l
|
||||
} else {
|
||||
for ; i < l && search[i] != '/'; i++ {
|
||||
}
|
||||
}
|
||||
|
||||
paramValues[paramIndex] = search[:i]
|
||||
paramIndex++
|
||||
search = search[i:]
|
||||
@@ -463,29 +517,50 @@ func (r *Router) Find(method, path string, c Context) {
|
||||
// If any node is found, use remaining path for paramValues
|
||||
currentNode = child
|
||||
paramValues[len(currentNode.pnames)-1] = search
|
||||
break
|
||||
// update indexes/search in case we need to backtrack when no handler match is found
|
||||
paramIndex++
|
||||
searchIndex += +len(search)
|
||||
search = ""
|
||||
|
||||
// check if current node has handler registered for http method we are looking for. we store currentNode as
|
||||
// best matching in case we do no find no more routes matching this path+method
|
||||
if previousBestMatchNode == nil {
|
||||
previousBestMatchNode = currentNode
|
||||
}
|
||||
if h := currentNode.findHandler(method); h != nil {
|
||||
matchedHandler = h
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// Let's backtrack to the first possible alternative node of the decision path
|
||||
nk, ok := backtrackToNextNodeKind(anyKind)
|
||||
if !ok {
|
||||
return // No other possibilities on the decision path
|
||||
break // No other possibilities on the decision path
|
||||
} else if nk == paramKind {
|
||||
goto Param
|
||||
} else if nk == anyKind {
|
||||
goto Any
|
||||
} else {
|
||||
// Not found
|
||||
return
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
ctx.handler = currentNode.findHandler(method)
|
||||
if currentNode == nil && previousBestMatchNode == nil {
|
||||
return // nothing matched at all
|
||||
}
|
||||
|
||||
if matchedHandler != nil {
|
||||
ctx.handler = matchedHandler
|
||||
} else {
|
||||
// use previous match as basis. although we have no matching handler we have path match.
|
||||
// so we can send http.StatusMethodNotAllowed (405) instead of http.StatusNotFound (404)
|
||||
currentNode = previousBestMatchNode
|
||||
ctx.handler = currentNode.checkMethodNotAllowed()
|
||||
}
|
||||
ctx.path = currentNode.ppath
|
||||
ctx.pnames = currentNode.pnames
|
||||
|
||||
if ctx.handler == nil {
|
||||
ctx.handler = currentNode.checkMethodNotAllowed()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
3
vendor/github.com/lrstanley/girc/commands.go
generated
vendored
@@ -5,6 +5,7 @@
|
||||
package girc
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
"errors"
|
||||
"fmt"
|
||||
)
|
||||
@@ -356,7 +357,7 @@ func (cmd *Commands) List(channels ...string) {
|
||||
// Whowas sends a WHOWAS query to the server. amount is the amount of results
|
||||
// you want back.
|
||||
func (cmd *Commands) Whowas(user string, amount int) {
|
||||
cmd.c.Send(&Event{Command: WHOWAS, Params: []string{user, string(amount)}})
|
||||
cmd.c.Send(&Event{Command: WHOWAS, Params: []string{user, strconv.Itoa(amount)}})
|
||||
}
|
||||
|
||||
// Monitor sends a MONITOR query to the server. The results of the query
|
||||
|
15
vendor/github.com/lrstanley/girc/event.go
generated
vendored
@@ -248,7 +248,7 @@ func (e *Event) Len() (length int) {
|
||||
|
||||
// If param contains a space or it's empty, it's trailing, so it should be
|
||||
// prefixed with a colon (:).
|
||||
if i == len(e.Params)-1 && (strings.Contains(e.Params[i], " ") || e.Params[i] == "") {
|
||||
if i == len(e.Params)-1 && (strings.Contains(e.Params[i], " ") || strings.HasPrefix(e.Params[i], ":") || e.Params[i] == "") {
|
||||
length++
|
||||
}
|
||||
}
|
||||
@@ -284,9 +284,8 @@ func (e *Event) Bytes() []byte {
|
||||
// Space separated list of arguments.
|
||||
if len(e.Params) > 0 {
|
||||
// buffer.WriteByte(eventSpace)
|
||||
|
||||
for i := 0; i < len(e.Params); i++ {
|
||||
if i == len(e.Params)-1 && (strings.Contains(e.Params[i], " ") || e.Params[i] == "") {
|
||||
if i == len(e.Params)-1 && (strings.Contains(e.Params[i], " ") || strings.HasPrefix(e.Params[i], ":") || e.Params[i] == "") {
|
||||
buffer.WriteString(string(eventSpace) + string(messagePrefix) + e.Params[i])
|
||||
continue
|
||||
}
|
||||
@@ -363,7 +362,15 @@ func (e *Event) Pretty() (out string, ok bool) {
|
||||
|
||||
return fmt.Sprintf("[*] CTCP query from %s: %s%s", ctcp.Source.Name, ctcp.Command, " "+ctcp.Text), true
|
||||
}
|
||||
return fmt.Sprintf("[%s] (%s) %s", strings.Join(e.Params[0:len(e.Params)-1], ","), e.Source.Name, e.Last()), true
|
||||
|
||||
var source string
|
||||
if e.Command == PRIVMSG {
|
||||
source = fmt.Sprintf("(%s)", e.Source.Name)
|
||||
} else { // NOTICE
|
||||
source = fmt.Sprintf("--%s--", e.Source.Name)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("[%s] %s %s", strings.Join(e.Params[0:len(e.Params)-1], ","), source, e.Last()), true
|
||||
}
|
||||
|
||||
if e.Command == RPL_MOTD || e.Command == RPL_MOTDSTART ||
|
||||
|
5
vendor/github.com/magiconair/properties/.travis.yml
generated
vendored
@@ -1,5 +1,6 @@
|
||||
language: go
|
||||
go:
|
||||
- 1.3.x
|
||||
- 1.4.x
|
||||
- 1.5.x
|
||||
- 1.6.x
|
||||
@@ -9,4 +10,8 @@ go:
|
||||
- "1.10.x"
|
||||
- "1.11.x"
|
||||
- "1.12.x"
|
||||
- "1.13.x"
|
||||
- "1.14.x"
|
||||
- "1.15.x"
|
||||
- "1.16.x"
|
||||
- tip
|
||||
|
23
vendor/github.com/magiconair/properties/CHANGELOG.md
generated
vendored
@@ -1,8 +1,29 @@
|
||||
## Changelog
|
||||
|
||||
### [1.8.2](https://github.com/magiconair/properties/tree/v1.8.2) - 25 Aug 2020
|
||||
|
||||
* [PR #36](https://github.com/magiconair/properties/pull/36): Escape backslash on write
|
||||
|
||||
This patch ensures that backslashes are escaped on write. Existing applications which
|
||||
rely on the old behavior may need to be updated.
|
||||
|
||||
Thanks to [@apesternikov](https://github.com/apesternikov) for the patch.
|
||||
|
||||
* [PR #42](https://github.com/magiconair/properties/pull/42): Made Content-Type check whitespace agnostic in LoadURL()
|
||||
|
||||
Thanks to [@aliras1](https://github.com/aliras1) for the patch.
|
||||
|
||||
* [PR #41](https://github.com/magiconair/properties/pull/41): Make key/value separator configurable on Write()
|
||||
|
||||
Thanks to [@mkjor](https://github.com/mkjor) for the patch.
|
||||
|
||||
* [PR #40](https://github.com/magiconair/properties/pull/40): Add method to return a sorted list of keys
|
||||
|
||||
Thanks to [@mkjor](https://github.com/mkjor) for the patch.
|
||||
|
||||
### [1.8.1](https://github.com/magiconair/properties/tree/v1.8.1) - 10 May 2019
|
||||
|
||||
* [PR #26](https://github.com/magiconair/properties/pull/35): Close body always after request
|
||||
* [PR #35](https://github.com/magiconair/properties/pull/35): Close body always after request
|
||||
|
||||
This patch ensures that in `LoadURL` the response body is always closed.
|
||||
|
||||
|
@@ -1,15 +1,14 @@
|
||||
goproperties - properties file decoder for Go
|
||||
|
||||
Copyright (c) 2013-2018 - Frank Schroeder
|
||||
Copyright (c) 2013-2020, Frank Schroeder
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
1
vendor/github.com/magiconair/properties/README.md
generated
vendored
@@ -1,6 +1,5 @@
|
||||
[](https://github.com/magiconair/properties/releases)
|
||||
[](https://travis-ci.org/magiconair/properties)
|
||||
[](https://circleci.com/gh/magiconair/properties)
|
||||
[](https://raw.githubusercontent.com/magiconair/properties/master/LICENSE)
|
||||
[](http://godoc.org/github.com/magiconair/properties)
|
||||
|
||||
|
2
vendor/github.com/magiconair/properties/go.mod
generated
vendored
@@ -1 +1,3 @@
|
||||
module github.com/magiconair/properties
|
||||
|
||||
go 1.13
|
||||
|
5
vendor/github.com/magiconair/properties/load.go
generated
vendored
@@ -132,11 +132,12 @@ func (l *Loader) LoadURL(url string) (*Properties, error) {
|
||||
}
|
||||
|
||||
ct := resp.Header.Get("Content-Type")
|
||||
ct = strings.Join(strings.Fields(ct), "")
|
||||
var enc Encoding
|
||||
switch strings.ToLower(ct) {
|
||||
case "text/plain", "text/plain; charset=iso-8859-1", "text/plain; charset=latin1":
|
||||
case "text/plain", "text/plain;charset=iso-8859-1", "text/plain;charset=latin1":
|
||||
enc = ISO_8859_1
|
||||
case "", "text/plain; charset=utf-8":
|
||||
case "", "text/plain;charset=utf-8":
|
||||
enc = UTF8
|
||||
default:
|
||||
return nil, fmt.Errorf("properties: invalid content type %s", ct)
|
||||
|
31
vendor/github.com/magiconair/properties/properties.go
generated
vendored
@@ -8,11 +8,13 @@ package properties
|
||||
// BUG(frank): Write() does not allow to configure the newline character. Therefore, on Windows LF is used.
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -69,6 +71,9 @@ type Properties struct {
|
||||
|
||||
// Stores the keys in order of appearance.
|
||||
k []string
|
||||
|
||||
// WriteSeparator specifies the separator of key and value while writing the properties.
|
||||
WriteSeparator string
|
||||
}
|
||||
|
||||
// NewProperties creates a new Properties struct with the default
|
||||
@@ -111,7 +116,7 @@ func (p *Properties) Get(key string) (value string, ok bool) {
|
||||
// circular references and malformed expressions
|
||||
// so we panic if we still get an error here.
|
||||
if err != nil {
|
||||
ErrorHandler(fmt.Errorf("%s in %q", err, key+" = "+v))
|
||||
ErrorHandler(err)
|
||||
}
|
||||
|
||||
return expanded, true
|
||||
@@ -586,6 +591,12 @@ func (p *Properties) String() string {
|
||||
return s
|
||||
}
|
||||
|
||||
// Sort sorts the properties keys in alphabetical order.
|
||||
// This is helpfully before writing the properties.
|
||||
func (p *Properties) Sort() {
|
||||
sort.Strings(p.k)
|
||||
}
|
||||
|
||||
// Write writes all unexpanded 'key = value' pairs to the given writer.
|
||||
// Write returns the number of bytes written and any write error encountered.
|
||||
func (p *Properties) Write(w io.Writer, enc Encoding) (n int, err error) {
|
||||
@@ -626,7 +637,7 @@ func (p *Properties) WriteComment(w io.Writer, prefix string, enc Encoding) (n i
|
||||
}
|
||||
|
||||
for _, c := range comments {
|
||||
x, err = fmt.Fprintf(w, "%s%s\n", prefix, encode(c, "", enc))
|
||||
x, err = fmt.Fprintf(w, "%s%s\n", prefix, c)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@@ -635,8 +646,11 @@ func (p *Properties) WriteComment(w io.Writer, prefix string, enc Encoding) (n i
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
x, err = fmt.Fprintf(w, "%s = %s\n", encode(key, " :", enc), encode(value, "", enc))
|
||||
sep := " = "
|
||||
if p.WriteSeparator != "" {
|
||||
sep = p.WriteSeparator
|
||||
}
|
||||
x, err = fmt.Fprintf(w, "%s%s%s\n", encode(key, " :", enc), sep, encode(value, "", enc))
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@@ -753,7 +767,12 @@ func expand(s string, keys []string, prefix, postfix string, values map[string]s
|
||||
|
||||
for _, k := range keys {
|
||||
if key == k {
|
||||
return "", fmt.Errorf("circular reference")
|
||||
var b bytes.Buffer
|
||||
b.WriteString("circular reference in:\n")
|
||||
for _, k1 := range keys {
|
||||
fmt.Fprintf(&b, "%s=%s\n", k1, values[k1])
|
||||
}
|
||||
return "", fmt.Errorf(b.String())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -820,6 +839,8 @@ func escape(r rune, special string) string {
|
||||
return "\\r"
|
||||
case '\t':
|
||||
return "\\t"
|
||||
case '\\':
|
||||
return "\\\\"
|
||||
default:
|
||||
if strings.ContainsRune(special, r) {
|
||||
return "\\" + string(r)
|
||||
|
8
vendor/github.com/mitchellh/mapstructure/.travis.yml
generated
vendored
@@ -1,8 +0,0 @@
|
||||
language: go
|
||||
|
||||
go:
|
||||
- "1.11.x"
|
||||
- tip
|
||||
|
||||
script:
|
||||
- go test
|
52
vendor/github.com/mitchellh/mapstructure/CHANGELOG.md
generated
vendored
@@ -1,3 +1,55 @@
|
||||
## unreleased
|
||||
|
||||
* Fix regression where `*time.Time` value would be set to empty and not be sent
|
||||
to decode hooks properly [GH-232]
|
||||
|
||||
## 1.4.0
|
||||
|
||||
* A new decode hook type `DecodeHookFuncValue` has been added that has
|
||||
access to the full values. [GH-183]
|
||||
* Squash is now supported with embedded fields that are struct pointers [GH-205]
|
||||
* Empty strings will convert to 0 for all numeric types when weakly decoding [GH-206]
|
||||
|
||||
## 1.3.3
|
||||
|
||||
* Decoding maps from maps creates a settable value for decode hooks [GH-203]
|
||||
|
||||
## 1.3.2
|
||||
|
||||
* Decode into interface type with a struct value is supported [GH-187]
|
||||
|
||||
## 1.3.1
|
||||
|
||||
* Squash should only squash embedded structs. [GH-194]
|
||||
|
||||
## 1.3.0
|
||||
|
||||
* Added `",omitempty"` support. This will ignore zero values in the source
|
||||
structure when encoding. [GH-145]
|
||||
|
||||
## 1.2.3
|
||||
|
||||
* Fix duplicate entries in Keys list with pointer values. [GH-185]
|
||||
|
||||
## 1.2.2
|
||||
|
||||
* Do not add unsettable (unexported) values to the unused metadata key
|
||||
or "remain" value. [GH-150]
|
||||
|
||||
## 1.2.1
|
||||
|
||||
* Go modules checksum mismatch fix
|
||||
|
||||
## 1.2.0
|
||||
|
||||
* Added support to capture unused values in a field using the `",remain"` value
|
||||
in the mapstructure tag. There is an example to showcase usage.
|
||||
* Added `DecoderConfig` option to always squash embedded structs
|
||||
* `json.Number` can decode into `uint` types
|
||||
* Empty slices are preserved and not replaced with nil slices
|
||||
* Fix panic that can occur in when decoding a map into a nil slice of structs
|
||||
* Improved package documentation for godoc
|
||||
|
||||
## 1.1.2
|
||||
|
||||
* Fix error when decode hook decodes interface implementation into interface
|
||||
|
71
vendor/github.com/mitchellh/mapstructure/decode_hooks.go
generated
vendored
@@ -1,6 +1,7 @@
|
||||
package mapstructure
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
@@ -16,10 +17,11 @@ func typedDecodeHook(h DecodeHookFunc) DecodeHookFunc {
|
||||
// Create variables here so we can reference them with the reflect pkg
|
||||
var f1 DecodeHookFuncType
|
||||
var f2 DecodeHookFuncKind
|
||||
var f3 DecodeHookFuncValue
|
||||
|
||||
// Fill in the variables into this interface and the rest is done
|
||||
// automatically using the reflect package.
|
||||
potential := []interface{}{f1, f2}
|
||||
potential := []interface{}{f1, f2, f3}
|
||||
|
||||
v := reflect.ValueOf(h)
|
||||
vt := v.Type()
|
||||
@@ -38,13 +40,15 @@ func typedDecodeHook(h DecodeHookFunc) DecodeHookFunc {
|
||||
// that took reflect.Kind instead of reflect.Type.
|
||||
func DecodeHookExec(
|
||||
raw DecodeHookFunc,
|
||||
from reflect.Type, to reflect.Type,
|
||||
data interface{}) (interface{}, error) {
|
||||
from reflect.Value, to reflect.Value) (interface{}, error) {
|
||||
|
||||
switch f := typedDecodeHook(raw).(type) {
|
||||
case DecodeHookFuncType:
|
||||
return f(from, to, data)
|
||||
return f(from.Type(), to.Type(), from.Interface())
|
||||
case DecodeHookFuncKind:
|
||||
return f(from.Kind(), to.Kind(), data)
|
||||
return f(from.Kind(), to.Kind(), from.Interface())
|
||||
case DecodeHookFuncValue:
|
||||
return f(from, to)
|
||||
default:
|
||||
return nil, errors.New("invalid decode hook signature")
|
||||
}
|
||||
@@ -56,22 +60,16 @@ func DecodeHookExec(
|
||||
// The composed funcs are called in order, with the result of the
|
||||
// previous transformation.
|
||||
func ComposeDecodeHookFunc(fs ...DecodeHookFunc) DecodeHookFunc {
|
||||
return func(
|
||||
f reflect.Type,
|
||||
t reflect.Type,
|
||||
data interface{}) (interface{}, error) {
|
||||
return func(f reflect.Value, t reflect.Value) (interface{}, error) {
|
||||
var err error
|
||||
var data interface{}
|
||||
newFrom := f
|
||||
for _, f1 := range fs {
|
||||
data, err = DecodeHookExec(f1, f, t, data)
|
||||
data, err = DecodeHookExec(f1, newFrom, t)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Modify the from kind to be correct with the new data
|
||||
f = nil
|
||||
if val := reflect.ValueOf(data); val.IsValid() {
|
||||
f = val.Type()
|
||||
}
|
||||
newFrom = reflect.ValueOf(data)
|
||||
}
|
||||
|
||||
return data, nil
|
||||
@@ -215,3 +213,44 @@ func WeaklyTypedHook(
|
||||
|
||||
return data, nil
|
||||
}
|
||||
|
||||
func RecursiveStructToMapHookFunc() DecodeHookFunc {
|
||||
return func(f reflect.Value, t reflect.Value) (interface{}, error) {
|
||||
if f.Kind() != reflect.Struct {
|
||||
return f.Interface(), nil
|
||||
}
|
||||
|
||||
var i interface{} = struct{}{}
|
||||
if t.Type() != reflect.TypeOf(&i).Elem() {
|
||||
return f.Interface(), nil
|
||||
}
|
||||
|
||||
m := make(map[string]interface{})
|
||||
t.Set(reflect.ValueOf(m))
|
||||
|
||||
return f.Interface(), nil
|
||||
}
|
||||
}
|
||||
|
||||
// TextUnmarshallerHookFunc returns a DecodeHookFunc that applies
|
||||
// strings to the UnmarshalText function, when the target type
|
||||
// implements the encoding.TextUnmarshaler interface
|
||||
func TextUnmarshallerHookFunc() DecodeHookFuncType {
|
||||
return func(
|
||||
f reflect.Type,
|
||||
t reflect.Type,
|
||||
data interface{}) (interface{}, error) {
|
||||
if f.Kind() != reflect.String {
|
||||
return data, nil
|
||||
}
|
||||
result := reflect.New(t).Interface()
|
||||
unmarshaller, ok := result.(encoding.TextUnmarshaler)
|
||||
if !ok {
|
||||
return data, nil
|
||||
}
|
||||
if err := unmarshaller.UnmarshalText([]byte(data.(string))); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
}
|
||||
|
2
vendor/github.com/mitchellh/mapstructure/go.mod
generated
vendored
@@ -1 +1,3 @@
|
||||
module github.com/mitchellh/mapstructure
|
||||
|
||||
go 1.14
|
||||
|