forked from lug/matterbridge
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bb21262d4 | ||
|
|
3188a9ffe6 | ||
|
|
61569a8610 | ||
|
|
075a84427f | ||
|
|
950f2759bd | ||
|
|
25c82ddf02 | ||
|
|
2d98df6122 | ||
|
|
219a5453f9 | ||
|
|
214a6a1386 | ||
|
|
e7781dc79c | ||
|
|
10c4bd1ac8 | ||
|
|
a42e488e58 | ||
|
|
06eb89b05b | ||
|
|
91c58ec027 |
71
.github/workflows/codeql-analysis.yml
vendored
Normal file
71
.github/workflows/codeql-analysis.yml
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: '0 16 * * 1'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Override automatic language detection by changing the below list
|
||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||
language: ['go']
|
||||
# Learn more...
|
||||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
@@ -93,6 +93,7 @@ And more...
|
||||
- [Matrix](https://matrix.org)
|
||||
- [Mattermost](https://github.com/mattermost/mattermost-server/) 4.x, 5.x
|
||||
- [Microsoft Teams](https://teams.microsoft.com)
|
||||
- [Mumble](https://www.mumble.info/)
|
||||
- [Nextcloud Talk](https://nextcloud.com/talk/)
|
||||
- [Rocket.chat](https://rocket.chat)
|
||||
- [Slack](https://slack.com)
|
||||
@@ -152,7 +153,7 @@ See <https://github.com/42wim/matterbridge/wiki>
|
||||
|
||||
### Binaries
|
||||
|
||||
- Latest stable release [v1.18.3](https://github.com/42wim/matterbridge/releases/latest)
|
||||
- Latest stable release [v1.19.0](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) and 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.
|
||||
@@ -324,11 +325,13 @@ Matterbridge wouldn't exist without these libraries:
|
||||
- gitter - <https://github.com/sromku/go-gitter>
|
||||
- gops - <https://github.com/google/gops>
|
||||
- gozulipbot - <https://github.com/ifo/gozulipbot>
|
||||
- gumble - <https://github.com/layeh/gumble>
|
||||
- irc - <https://github.com/lrstanley/girc>
|
||||
- keybase - <https://github.com/keybase/go-keybase-chat-bot>
|
||||
- matrix - <https://github.com/matrix-org/gomatrix>
|
||||
- mattermost - <https://github.com/mattermost/mattermost-server>
|
||||
- msgraph.go - <https://github.com/yaegashi/msgraph.go>
|
||||
- mumble - <https://github.com/layeh/gumble>
|
||||
- nctalk - <https://github.com/gary-kim/go-nc-talk>
|
||||
- slack - <https://github.com/nlopes/slack>
|
||||
- sshchat - <https://github.com/shazow/ssh-chat>
|
||||
|
||||
@@ -213,6 +213,7 @@ type BridgeValues struct {
|
||||
WhatsApp map[string]Protocol // TODO is this struct used? Search for "SlackLegacy" for example didn't return any results
|
||||
Zulip map[string]Protocol
|
||||
Keybase map[string]Protocol
|
||||
Mumble map[string]Protocol
|
||||
General Protocol
|
||||
Tengo Tengo
|
||||
Gateway []Gateway
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"hash/crc32"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"sort"
|
||||
"strconv"
|
||||
@@ -240,6 +241,11 @@ func (b *Birc) getClient() (*girc.Client, error) {
|
||||
user = user[1:]
|
||||
}
|
||||
|
||||
debug := ioutil.Discard
|
||||
if b.GetInt("DebugLevel") == 2 {
|
||||
debug = b.Log.Writer()
|
||||
}
|
||||
|
||||
i := girc.New(girc.Config{
|
||||
Server: server,
|
||||
ServerPass: b.GetString("Password"),
|
||||
@@ -252,6 +258,7 @@ func (b *Birc) getClient() (*girc.Client, error) {
|
||||
PingDelay: time.Minute,
|
||||
// skip gIRC internal rate limiting, since we have our own throttling
|
||||
AllowFlood: true,
|
||||
Debug: debug,
|
||||
})
|
||||
return i, nil
|
||||
}
|
||||
|
||||
@@ -17,13 +17,16 @@ import (
|
||||
matrix "github.com/matrix-org/gomatrix"
|
||||
)
|
||||
|
||||
var (
|
||||
htmlTag = regexp.MustCompile("</.*?>")
|
||||
htmlReplacementTag = regexp.MustCompile("<[^>]*>")
|
||||
)
|
||||
|
||||
type Bmatrix struct {
|
||||
mc *matrix.Client
|
||||
UserID string
|
||||
RoomMap map[string]string
|
||||
sync.RWMutex
|
||||
htmlTag *regexp.Regexp
|
||||
htmlReplacementTag *regexp.Regexp
|
||||
*bridge.Config
|
||||
}
|
||||
|
||||
@@ -33,10 +36,29 @@ type httpError struct {
|
||||
RetryAfterMs int `json:"retry_after_ms"`
|
||||
}
|
||||
|
||||
type matrixUsername struct {
|
||||
plain string
|
||||
formatted string
|
||||
}
|
||||
|
||||
func newMatrixUsername(username string) *matrixUsername {
|
||||
mUsername := new(matrixUsername)
|
||||
|
||||
// check if we have a </tag>. if we have, we don't escape HTML. #696
|
||||
if htmlTag.MatchString(username) {
|
||||
mUsername.formatted = username
|
||||
// remove the HTML formatting for beautiful push messages #1188
|
||||
mUsername.plain = htmlReplacementTag.ReplaceAllString(username, "")
|
||||
} else {
|
||||
mUsername.formatted = html.EscapeString(username)
|
||||
mUsername.plain = username
|
||||
}
|
||||
|
||||
return mUsername
|
||||
}
|
||||
|
||||
func New(cfg *bridge.Config) bridge.Bridger {
|
||||
b := &Bmatrix{Config: cfg}
|
||||
b.htmlTag = regexp.MustCompile("</.*?>")
|
||||
b.htmlReplacementTag = regexp.MustCompile("<[^>]*>")
|
||||
b.RoomMap = make(map[string]string)
|
||||
return b
|
||||
}
|
||||
@@ -96,11 +118,14 @@ func (b *Bmatrix) Send(msg config.Message) (string, error) {
|
||||
channel := b.getRoomID(msg.Channel)
|
||||
b.Log.Debugf("Channel %s maps to channel id %s", msg.Channel, channel)
|
||||
|
||||
username := newMatrixUsername(msg.Username)
|
||||
|
||||
// Make a action /me of the message
|
||||
if msg.Event == config.EventUserAction {
|
||||
m := matrix.TextMessage{
|
||||
MsgType: "m.emote",
|
||||
Body: msg.Username + msg.Text,
|
||||
MsgType: "m.emote",
|
||||
Body: username.plain + msg.Text,
|
||||
FormattedBody: username.formatted + msg.Text,
|
||||
}
|
||||
resp, err := b.mc.SendMessageEvent(channel, "m.room.message", m)
|
||||
if err != nil {
|
||||
@@ -139,7 +164,12 @@ func (b *Bmatrix) Send(msg config.Message) (string, error) {
|
||||
|
||||
// Use notices to send join/leave events
|
||||
if msg.Event == config.EventJoinLeave {
|
||||
resp, err := b.mc.SendNotice(channel, msg.Username+msg.Text)
|
||||
m := matrix.TextMessage{
|
||||
MsgType: "m.notice",
|
||||
Body: username.plain + msg.Text,
|
||||
FormattedBody: username.formatted + msg.Text,
|
||||
}
|
||||
resp, err := b.mc.SendMessageEvent(channel, "m.room.message", m)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@@ -147,27 +177,15 @@ func (b *Bmatrix) Send(msg config.Message) (string, error) {
|
||||
}
|
||||
|
||||
if b.GetBool("HTMLDisable") {
|
||||
resp, err := b.mc.SendText(channel, msg.Username+msg.Text)
|
||||
resp, err := b.mc.SendText(channel, username.plain+msg.Text)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return resp.EventID, err
|
||||
}
|
||||
|
||||
var username string
|
||||
var plainUsername string
|
||||
// check if we have a </tag>. if we have, we don't escape HTML. #696
|
||||
if b.htmlTag.MatchString(msg.Username) {
|
||||
username = msg.Username
|
||||
// remove the HTML formatting for beautiful push messages #1188
|
||||
plainUsername = b.htmlReplacementTag.ReplaceAllString(msg.Username, "")
|
||||
} else {
|
||||
username = html.EscapeString(msg.Username)
|
||||
plainUsername = msg.Username
|
||||
}
|
||||
|
||||
// Post normal message with HTML support (eg riot.im)
|
||||
resp, err := b.mc.SendFormattedText(channel, plainUsername+msg.Text, username+helper.ParseMarkdown(msg.Text))
|
||||
resp, err := b.mc.SendFormattedText(channel, username.plain+msg.Text, username.formatted+helper.ParseMarkdown(msg.Text))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@@ -330,25 +348,16 @@ func (b *Bmatrix) handleUploadFiles(msg *config.Message, channel string) (string
|
||||
|
||||
// handleUploadFile handles native upload of a file.
|
||||
func (b *Bmatrix) handleUploadFile(msg *config.Message, channel string, fi *config.FileInfo) {
|
||||
username := newMatrixUsername(msg.Username)
|
||||
content := bytes.NewReader(*fi.Data)
|
||||
sp := strings.Split(fi.Name, ".")
|
||||
mtype := mime.TypeByExtension("." + sp[len(sp)-1])
|
||||
if !(strings.Contains(mtype, "image") || strings.Contains(mtype, "video") ||
|
||||
strings.Contains(mtype, "application") || strings.Contains(mtype, "audio")) {
|
||||
return
|
||||
}
|
||||
if fi.Comment != "" {
|
||||
_, err := b.mc.SendText(channel, msg.Username+fi.Comment)
|
||||
if err != nil {
|
||||
b.Log.Errorf("file comment failed: %#v", err)
|
||||
}
|
||||
} else {
|
||||
// image and video uploads send no username, we have to do this ourself here #715
|
||||
_, err := b.mc.SendText(channel, msg.Username)
|
||||
if err != nil {
|
||||
b.Log.Errorf("file comment failed: %#v", err)
|
||||
}
|
||||
// image and video uploads send no username, we have to do this ourself here #715
|
||||
_, err := b.mc.SendFormattedText(channel, username.plain+fi.Comment, username.formatted+fi.Comment)
|
||||
if err != nil {
|
||||
b.Log.Errorf("file comment failed: %#v", err)
|
||||
}
|
||||
|
||||
b.Log.Debugf("uploading file: %s %s", fi.Name, mtype)
|
||||
res, err := b.mc.UploadToContentRepo(content, mtype, int64(len(*fi.Data)))
|
||||
if err != nil {
|
||||
@@ -369,20 +378,6 @@ func (b *Bmatrix) handleUploadFile(msg *config.Message, channel string, fi *conf
|
||||
if err != nil {
|
||||
b.Log.Errorf("sendImage failed: %#v", err)
|
||||
}
|
||||
case strings.Contains(mtype, "application"):
|
||||
b.Log.Debugf("sendFile %s", res.ContentURI)
|
||||
_, err = b.mc.SendMessageEvent(channel, "m.room.message", matrix.FileMessage{
|
||||
MsgType: "m.file",
|
||||
Body: fi.Name,
|
||||
URL: res.ContentURI,
|
||||
Info: matrix.FileInfo{
|
||||
Mimetype: mtype,
|
||||
Size: uint(len(*fi.Data)),
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
b.Log.Errorf("sendFile failed: %#v", err)
|
||||
}
|
||||
case strings.Contains(mtype, "audio"):
|
||||
b.Log.Debugf("sendAudio %s", res.ContentURI)
|
||||
_, err = b.mc.SendMessageEvent(channel, "m.room.message", matrix.AudioMessage{
|
||||
@@ -397,6 +392,20 @@ func (b *Bmatrix) handleUploadFile(msg *config.Message, channel string, fi *conf
|
||||
if err != nil {
|
||||
b.Log.Errorf("sendAudio failed: %#v", err)
|
||||
}
|
||||
default:
|
||||
b.Log.Debugf("sendFile %s", res.ContentURI)
|
||||
_, err = b.mc.SendMessageEvent(channel, "m.room.message", matrix.FileMessage{
|
||||
MsgType: "m.file",
|
||||
Body: fi.Name,
|
||||
URL: res.ContentURI,
|
||||
Info: matrix.FileInfo{
|
||||
Mimetype: mtype,
|
||||
Size: uint(len(*fi.Data)),
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
b.Log.Errorf("sendFile failed: %#v", err)
|
||||
}
|
||||
}
|
||||
b.Log.Debugf("result: %#v", res)
|
||||
}
|
||||
|
||||
28
bridge/matrix/matrix_test.go
Normal file
28
bridge/matrix/matrix_test.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package bmatrix
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestPlainUsername(t *testing.T) {
|
||||
uut := newMatrixUsername("MyUser")
|
||||
|
||||
assert.Equal(t, "MyUser", uut.formatted)
|
||||
assert.Equal(t, "MyUser", uut.plain)
|
||||
}
|
||||
|
||||
func TestHTMLUsername(t *testing.T) {
|
||||
uut := newMatrixUsername("<b>MyUser</b>")
|
||||
|
||||
assert.Equal(t, "<b>MyUser</b>", uut.formatted)
|
||||
assert.Equal(t, "MyUser", uut.plain)
|
||||
}
|
||||
|
||||
func TestFancyUsername(t *testing.T) {
|
||||
uut := newMatrixUsername("<MyUser>")
|
||||
|
||||
assert.Equal(t, "<MyUser>", uut.formatted)
|
||||
assert.Equal(t, "<MyUser>", uut.plain)
|
||||
}
|
||||
90
bridge/mumble/handlers.go
Normal file
90
bridge/mumble/handlers.go
Normal file
@@ -0,0 +1,90 @@
|
||||
package bmumble
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"layeh.com/gumble/gumble"
|
||||
|
||||
"github.com/42wim/matterbridge/bridge/config"
|
||||
"github.com/42wim/matterbridge/bridge/helper"
|
||||
)
|
||||
|
||||
func (b *Bmumble) handleServerConfig(event *gumble.ServerConfigEvent) {
|
||||
b.serverConfigUpdate <- *event
|
||||
}
|
||||
|
||||
func (b *Bmumble) handleTextMessage(event *gumble.TextMessageEvent) {
|
||||
sender := "unknown"
|
||||
if event.TextMessage.Sender != nil {
|
||||
sender = event.TextMessage.Sender.Name
|
||||
}
|
||||
// Convert Mumble HTML messages to markdown
|
||||
parts, err := b.convertHTMLtoMarkdown(event.TextMessage.Message)
|
||||
if err != nil {
|
||||
b.Log.Error(err)
|
||||
}
|
||||
now := time.Now().UTC()
|
||||
for i, part := range parts {
|
||||
// Construct matterbridge message and pass on to the gateway
|
||||
rmsg := config.Message{
|
||||
Channel: strconv.FormatUint(uint64(event.Client.Self.Channel.ID), 10),
|
||||
Username: sender,
|
||||
UserID: sender + "@" + b.Host,
|
||||
Account: b.Account,
|
||||
}
|
||||
if part.Image == nil {
|
||||
rmsg.Text = part.Text
|
||||
} else {
|
||||
fname := b.Account + "_" + strconv.FormatInt(now.UnixNano(), 10) + "_" + strconv.Itoa(i) + part.FileExtension
|
||||
rmsg.Extra = make(map[string][]interface{})
|
||||
if err = helper.HandleDownloadSize(b.Log, &rmsg, fname, int64(len(part.Image)), b.General); err != nil {
|
||||
b.Log.WithError(err).Warn("not including image in message")
|
||||
continue
|
||||
}
|
||||
helper.HandleDownloadData(b.Log, &rmsg, fname, "", "", &part.Image, b.General)
|
||||
}
|
||||
b.Log.Debugf("Sending message to gateway: %+v", rmsg)
|
||||
b.Remote <- rmsg
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Bmumble) handleConnect(event *gumble.ConnectEvent) {
|
||||
// Set the user's "bio"/comment
|
||||
if comment := b.GetString("UserComment"); comment != "" && event.Client.Self != nil {
|
||||
event.Client.Self.SetComment(comment)
|
||||
}
|
||||
// No need to talk or listen
|
||||
event.Client.Self.SetSelfDeafened(true)
|
||||
event.Client.Self.SetSelfMuted(true)
|
||||
// if the Channel variable is set, this is a reconnect -> rejoin channel
|
||||
if b.Channel != nil {
|
||||
if err := b.doJoin(event.Client, *b.Channel); err != nil {
|
||||
b.Log.Error(err)
|
||||
}
|
||||
b.Remote <- config.Message{
|
||||
Username: "system",
|
||||
Text: "rejoin",
|
||||
Channel: "",
|
||||
Account: b.Account,
|
||||
Event: config.EventRejoinChannels,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Bmumble) handleUserChange(event *gumble.UserChangeEvent) {
|
||||
// Only care about changes to self
|
||||
if event.User != event.Client.Self {
|
||||
return
|
||||
}
|
||||
// Someone attempted to move the user out of the configured channel; attempt to join back
|
||||
if b.Channel != nil {
|
||||
if err := b.doJoin(event.Client, *b.Channel); err != nil {
|
||||
b.Log.Error(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Bmumble) handleDisconnect(event *gumble.DisconnectEvent) {
|
||||
b.connected <- *event
|
||||
}
|
||||
143
bridge/mumble/helpers.go
Normal file
143
bridge/mumble/helpers.go
Normal file
@@ -0,0 +1,143 @@
|
||||
package bmumble
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"mime"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/42wim/matterbridge/bridge/config"
|
||||
"github.com/mattn/godown"
|
||||
"github.com/vincent-petithory/dataurl"
|
||||
)
|
||||
|
||||
type MessagePart struct {
|
||||
Text string
|
||||
FileExtension string
|
||||
Image []byte
|
||||
}
|
||||
|
||||
func (b *Bmumble) decodeImage(uri string, parts *[]MessagePart) error {
|
||||
// Decode the data:image/... URI
|
||||
image, err := dataurl.DecodeString(uri)
|
||||
if err != nil {
|
||||
b.Log.WithError(err).Info("No image extracted")
|
||||
return err
|
||||
}
|
||||
// Determine the file extensions for that image
|
||||
ext, err := mime.ExtensionsByType(image.MediaType.ContentType())
|
||||
if err != nil || len(ext) == 0 {
|
||||
b.Log.WithError(err).Infof("No file extension registered for MIME type '%s'", image.MediaType.ContentType())
|
||||
return err
|
||||
}
|
||||
// Add the image to the MessagePart slice
|
||||
*parts = append(*parts, MessagePart{"", ext[0], image.Data})
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *Bmumble) tokenize(t *string) ([]MessagePart, error) {
|
||||
// `^(.*?)` matches everything before the image
|
||||
// `!\[[^\]]*\]\(` matches the `]+)` matches the data: URI used by Mumble
|
||||
// `\)` matches the closing parenthesis after the URI
|
||||
// `(.*)$` matches the remaining text to be examined in the next iteration
|
||||
p := regexp.MustCompile(`^(?ms)(.*?)!\[[^\]]*\]\((data:image\/[^)]+)\)(.*)$`)
|
||||
remaining := *t
|
||||
var parts []MessagePart
|
||||
for {
|
||||
tokens := p.FindStringSubmatch(remaining)
|
||||
if tokens == nil {
|
||||
// no match -> remaining string is non-image text
|
||||
pre := strings.TrimSpace(remaining)
|
||||
if len(pre) > 0 {
|
||||
parts = append(parts, MessagePart{pre, "", nil})
|
||||
}
|
||||
return parts, nil
|
||||
}
|
||||
|
||||
// tokens[1] is the text before the image
|
||||
if len(tokens[1]) > 0 {
|
||||
pre := strings.TrimSpace(tokens[1])
|
||||
parts = append(parts, MessagePart{pre, "", nil})
|
||||
}
|
||||
// tokens[2] is the image URL
|
||||
uri, err := dataurl.UnescapeToString(strings.TrimSpace(strings.ReplaceAll(tokens[2], " ", "")))
|
||||
if err != nil {
|
||||
b.Log.WithError(err).Info("URL unescaping failed")
|
||||
remaining = strings.TrimSpace(tokens[3])
|
||||
continue
|
||||
}
|
||||
err = b.decodeImage(uri, &parts)
|
||||
if err != nil {
|
||||
b.Log.WithError(err).Info("Decoding the image failed")
|
||||
}
|
||||
// tokens[3] is the text after the image, processed in the next iteration
|
||||
remaining = strings.TrimSpace(tokens[3])
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Bmumble) convertHTMLtoMarkdown(html string) ([]MessagePart, error) {
|
||||
var sb strings.Builder
|
||||
err := godown.Convert(&sb, strings.NewReader(html), nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
markdown := sb.String()
|
||||
b.Log.Debugf("### to markdown: %s", markdown)
|
||||
return b.tokenize(&markdown)
|
||||
}
|
||||
|
||||
func (b *Bmumble) extractFiles(msg *config.Message) []config.Message {
|
||||
var messages []config.Message
|
||||
if msg.Extra == nil || len(msg.Extra["file"]) == 0 {
|
||||
return messages
|
||||
}
|
||||
// Create a separate message for each file
|
||||
for _, f := range msg.Extra["file"] {
|
||||
fi := f.(config.FileInfo)
|
||||
imsg := config.Message{
|
||||
Channel: msg.Channel,
|
||||
Username: msg.Username,
|
||||
UserID: msg.UserID,
|
||||
Account: msg.Account,
|
||||
Protocol: msg.Protocol,
|
||||
Timestamp: msg.Timestamp,
|
||||
Event: "mumble_image",
|
||||
}
|
||||
// If no data is present for the file, send a link instead
|
||||
if fi.Data == nil || len(*fi.Data) == 0 {
|
||||
if len(fi.URL) > 0 {
|
||||
imsg.Text = fmt.Sprintf(`<a href="%s">%s</a>`, fi.URL, fi.URL)
|
||||
messages = append(messages, imsg)
|
||||
} else {
|
||||
b.Log.Infof("Not forwarding file without local data")
|
||||
}
|
||||
continue
|
||||
}
|
||||
mimeType := http.DetectContentType(*fi.Data)
|
||||
// Mumble only supports images natively, send a link instead
|
||||
if !strings.HasPrefix(mimeType, "image/") {
|
||||
if len(fi.URL) > 0 {
|
||||
imsg.Text = fmt.Sprintf(`<a href="%s">%s</a>`, fi.URL, fi.URL)
|
||||
messages = append(messages, imsg)
|
||||
} else {
|
||||
b.Log.Infof("Not forwarding file of type %s", mimeType)
|
||||
}
|
||||
continue
|
||||
}
|
||||
mimeType = strings.TrimSpace(strings.Split(mimeType, ";")[0])
|
||||
// Build data:image/...;base64,... style image URL and embed image directly into the message
|
||||
du := dataurl.New(*fi.Data, mimeType)
|
||||
dataURL, err := du.MarshalText()
|
||||
if err != nil {
|
||||
b.Log.WithError(err).Infof("Image Serialization into data URL failed (type: %s, length: %d)", mimeType, len(*fi.Data))
|
||||
continue
|
||||
}
|
||||
imsg.Text = fmt.Sprintf(`<img src="%s"/>`, dataURL)
|
||||
messages = append(messages, imsg)
|
||||
}
|
||||
// Remove files from original message
|
||||
msg.Extra["file"] = nil
|
||||
return messages
|
||||
}
|
||||
259
bridge/mumble/mumble.go
Normal file
259
bridge/mumble/mumble.go
Normal file
@@ -0,0 +1,259 @@
|
||||
package bmumble
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"layeh.com/gumble/gumble"
|
||||
"layeh.com/gumble/gumbleutil"
|
||||
|
||||
"github.com/42wim/matterbridge/bridge"
|
||||
"github.com/42wim/matterbridge/bridge/config"
|
||||
"github.com/42wim/matterbridge/bridge/helper"
|
||||
stripmd "github.com/writeas/go-strip-markdown"
|
||||
|
||||
// We need to import the 'data' package as an implicit dependency.
|
||||
// See: https://godoc.org/github.com/paulrosania/go-charset/charset
|
||||
_ "github.com/paulrosania/go-charset/data"
|
||||
)
|
||||
|
||||
type Bmumble struct {
|
||||
client *gumble.Client
|
||||
Nick string
|
||||
Host string
|
||||
Channel *uint32
|
||||
local chan config.Message
|
||||
running chan error
|
||||
connected chan gumble.DisconnectEvent
|
||||
serverConfigUpdate chan gumble.ServerConfigEvent
|
||||
serverConfig gumble.ServerConfigEvent
|
||||
tlsConfig tls.Config
|
||||
|
||||
*bridge.Config
|
||||
}
|
||||
|
||||
func New(cfg *bridge.Config) bridge.Bridger {
|
||||
b := &Bmumble{}
|
||||
b.Config = cfg
|
||||
b.Nick = b.GetString("Nick")
|
||||
b.local = make(chan config.Message)
|
||||
b.running = make(chan error)
|
||||
b.connected = make(chan gumble.DisconnectEvent)
|
||||
b.serverConfigUpdate = make(chan gumble.ServerConfigEvent)
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *Bmumble) Connect() error {
|
||||
b.Log.Infof("Connecting %s", b.GetString("Server"))
|
||||
host, portstr, err := net.SplitHostPort(b.GetString("Server"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
b.Host = host
|
||||
_, err = strconv.Atoi(portstr)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = b.buildTLSConfig(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
go b.doSend()
|
||||
go b.connectLoop()
|
||||
err = <-b.running
|
||||
return err
|
||||
}
|
||||
|
||||
func (b *Bmumble) Disconnect() error {
|
||||
return b.client.Disconnect()
|
||||
}
|
||||
|
||||
func (b *Bmumble) JoinChannel(channel config.ChannelInfo) error {
|
||||
cid, err := strconv.ParseUint(channel.Name, 10, 32)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
channelID := uint32(cid)
|
||||
if b.Channel != nil && *b.Channel != channelID {
|
||||
b.Log.Fatalf("Cannot join channel ID '%d', already joined to channel ID %d", channelID, *b.Channel)
|
||||
return errors.New("the Mumble bridge can only join a single channel")
|
||||
}
|
||||
b.Channel = &channelID
|
||||
return b.doJoin(b.client, channelID)
|
||||
}
|
||||
|
||||
func (b *Bmumble) Send(msg config.Message) (string, error) {
|
||||
// Only process text messages
|
||||
b.Log.Debugf("=> Received local message %#v", msg)
|
||||
if msg.Event != "" && msg.Event != config.EventUserAction {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
attachments := b.extractFiles(&msg)
|
||||
b.local <- msg
|
||||
for _, a := range attachments {
|
||||
b.local <- a
|
||||
}
|
||||
return "", nil
|
||||
}
|
||||
|
||||
func (b *Bmumble) buildTLSConfig() error {
|
||||
b.tlsConfig = tls.Config{}
|
||||
// Load TLS client certificate keypair required for registered user authentication
|
||||
if cpath := b.GetString("TLSClientCertificate"); cpath != "" {
|
||||
if ckey := b.GetString("TLSClientKey"); ckey != "" {
|
||||
cert, err := tls.LoadX509KeyPair(cpath, ckey)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
b.tlsConfig.Certificates = []tls.Certificate{cert}
|
||||
}
|
||||
}
|
||||
// Load TLS CA used for server verification. If not provided, the Go system trust anchor is used
|
||||
if capath := b.GetString("TLSCACertificate"); capath != "" {
|
||||
ca, err := ioutil.ReadFile(capath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
b.tlsConfig.RootCAs = x509.NewCertPool()
|
||||
b.tlsConfig.RootCAs.AppendCertsFromPEM(ca)
|
||||
}
|
||||
b.tlsConfig.InsecureSkipVerify = b.GetBool("SkipTLSVerify")
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *Bmumble) connectLoop() {
|
||||
firstConnect := true
|
||||
for {
|
||||
err := b.doConnect()
|
||||
if firstConnect {
|
||||
b.running <- err
|
||||
}
|
||||
if err != nil {
|
||||
b.Log.Errorf("Connection to server failed: %#v", err)
|
||||
if firstConnect {
|
||||
break
|
||||
} else {
|
||||
b.Log.Info("Retrying in 10s")
|
||||
time.Sleep(10 * time.Second)
|
||||
continue
|
||||
}
|
||||
}
|
||||
firstConnect = false
|
||||
d := <-b.connected
|
||||
switch d.Type {
|
||||
case gumble.DisconnectError:
|
||||
b.Log.Errorf("Lost connection to the server (%s), attempting reconnect", d.String)
|
||||
continue
|
||||
case gumble.DisconnectKicked:
|
||||
b.Log.Errorf("Kicked from the server (%s), attempting reconnect", d.String)
|
||||
continue
|
||||
case gumble.DisconnectBanned:
|
||||
b.Log.Errorf("Banned from the server (%s), not attempting reconnect", d.String)
|
||||
close(b.connected)
|
||||
close(b.running)
|
||||
return
|
||||
case gumble.DisconnectUser:
|
||||
b.Log.Infof("Disconnect successful")
|
||||
close(b.connected)
|
||||
close(b.running)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Bmumble) doConnect() error {
|
||||
// Create new gumble config and attach event handlers
|
||||
gumbleConfig := gumble.NewConfig()
|
||||
gumbleConfig.Attach(gumbleutil.Listener{
|
||||
ServerConfig: b.handleServerConfig,
|
||||
TextMessage: b.handleTextMessage,
|
||||
Connect: b.handleConnect,
|
||||
Disconnect: b.handleDisconnect,
|
||||
UserChange: b.handleUserChange,
|
||||
})
|
||||
gumbleConfig.Username = b.GetString("Nick")
|
||||
if password := b.GetString("Password"); password != "" {
|
||||
gumbleConfig.Password = password
|
||||
}
|
||||
|
||||
client, err := gumble.DialWithDialer(new(net.Dialer), b.GetString("Server"), gumbleConfig, &b.tlsConfig)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
b.client = client
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *Bmumble) doJoin(client *gumble.Client, channelID uint32) error {
|
||||
channel, ok := client.Channels[channelID]
|
||||
if !ok {
|
||||
return fmt.Errorf("no channel with ID %d", channelID)
|
||||
}
|
||||
client.Self.Move(channel)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *Bmumble) doSend() {
|
||||
// Message sending loop that makes sure server-side
|
||||
// restrictions and client-side message traits don't conflict
|
||||
// with each other.
|
||||
for {
|
||||
select {
|
||||
case serverConfig := <-b.serverConfigUpdate:
|
||||
b.Log.Debugf("Received server config update: AllowHTML=%#v, MaximumMessageLength=%#v", serverConfig.AllowHTML, serverConfig.MaximumMessageLength)
|
||||
b.serverConfig = serverConfig
|
||||
case msg := <-b.local:
|
||||
b.processMessage(&msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Bmumble) processMessage(msg *config.Message) {
|
||||
b.Log.Debugf("Processing message %s", msg.Text)
|
||||
|
||||
allowHTML := true
|
||||
if b.serverConfig.AllowHTML != nil {
|
||||
allowHTML = *b.serverConfig.AllowHTML
|
||||
}
|
||||
|
||||
// If this is a specially generated image message, send it unmodified
|
||||
if msg.Event == "mumble_image" {
|
||||
if allowHTML {
|
||||
b.client.Self.Channel.Send(msg.Username+msg.Text, false)
|
||||
} else {
|
||||
b.Log.Info("Can't send image, server does not allow HTML messages")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Don't process empty messages
|
||||
if len(msg.Text) == 0 {
|
||||
return
|
||||
}
|
||||
// If HTML is allowed, convert markdown into HTML, otherwise strip markdown
|
||||
if allowHTML {
|
||||
msg.Text = helper.ParseMarkdown(msg.Text)
|
||||
} else {
|
||||
msg.Text = stripmd.Strip(msg.Text)
|
||||
}
|
||||
|
||||
// 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))
|
||||
} else {
|
||||
msgLines = helper.GetSubLines(msg.Text, 0)
|
||||
}
|
||||
// Send the individual lindes
|
||||
for i := range msgLines {
|
||||
b.client.Self.Channel.Send(msg.Username+msgLines[i], false)
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
"github.com/42wim/matterbridge/bridge"
|
||||
"github.com/42wim/matterbridge/bridge/config"
|
||||
|
||||
talk "gomod.garykim.dev/nc-talk"
|
||||
"gomod.garykim.dev/nc-talk/ocs"
|
||||
"gomod.garykim.dev/nc-talk/room"
|
||||
"gomod.garykim.dev/nc-talk/user"
|
||||
@@ -61,8 +60,12 @@ func (b *Btalk) Disconnect() error {
|
||||
}
|
||||
|
||||
func (b *Btalk) JoinChannel(channel config.ChannelInfo) error {
|
||||
tr, err := room.NewTalkRoom(b.user, channel.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
newRoom := Broom{
|
||||
room: talk.NewRoom(b.user, channel.Name),
|
||||
room: tr,
|
||||
}
|
||||
newRoom.ctx, newRoom.ctxCancel = context.WithCancel(context.Background())
|
||||
c, err := newRoom.room.ReceiveMessages(newRoom.ctx)
|
||||
@@ -70,8 +73,16 @@ func (b *Btalk) JoinChannel(channel config.ChannelInfo) error {
|
||||
return err
|
||||
}
|
||||
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
|
||||
// ignore messages that are one of the following
|
||||
// * not a message from a user
|
||||
// * from ourselves
|
||||
@@ -81,7 +92,7 @@ func (b *Btalk) JoinChannel(channel config.ChannelInfo) error {
|
||||
remoteMessage := config.Message{
|
||||
Text: formatRichObjectString(msg.Message, msg.MessageParameters),
|
||||
Channel: newRoom.room.Token,
|
||||
Username: msg.ActorDisplayName,
|
||||
Username: DisplayName(msg, guestSuffix),
|
||||
UserID: msg.ActorID,
|
||||
Account: b.Account,
|
||||
}
|
||||
@@ -90,6 +101,15 @@ func (b *Btalk) JoinChannel(channel config.ChannelInfo) error {
|
||||
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)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
b.Log.Debugf("<= Message is %#v", remoteMessage)
|
||||
b.Remote <- remoteMessage
|
||||
}
|
||||
@@ -125,6 +145,31 @@ func (b *Btalk) getRoom(token string) *Broom {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *Btalk) handleFiles(mmsg *config.Message, message *ocs.TalkRoomMessageData) error {
|
||||
for _, parameter := range message.MessageParameters {
|
||||
if parameter.Type == ocs.ROSTypeFile {
|
||||
// Get the file
|
||||
file, err := b.user.DownloadFile(parameter.Path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if mmsg.Extra == nil {
|
||||
mmsg.Extra = make(map[string][]interface{})
|
||||
}
|
||||
|
||||
mmsg.Extra["file"] = append(mmsg.Extra["file"], config.FileInfo{
|
||||
Name: parameter.Name,
|
||||
Data: file,
|
||||
Size: int64(len(*file)),
|
||||
Avatar: false,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// 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 {
|
||||
@@ -135,7 +180,7 @@ func formatRichObjectString(message string, parameters map[string]ocs.RichObject
|
||||
text = "@" + text
|
||||
case ocs.ROSTypeFile:
|
||||
if parameter.Link != "" {
|
||||
text = parameter.Link
|
||||
text = parameter.Name
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,3 +189,15 @@ func formatRichObjectString(message string, parameters map[string]ocs.RichObject
|
||||
|
||||
return message
|
||||
}
|
||||
|
||||
func DisplayName(msg ocs.TalkRoomMessageData, suffix string) string {
|
||||
if msg.ActorType == ocs.ActorGuest {
|
||||
if msg.ActorDisplayName == "" {
|
||||
return "Guest"
|
||||
}
|
||||
|
||||
return msg.ActorDisplayName + suffix
|
||||
}
|
||||
|
||||
return msg.ActorDisplayName
|
||||
}
|
||||
|
||||
@@ -143,10 +143,12 @@ func (b *Bwhatsapp) HandleImageMessage(message whatsapp.ImageMessage) {
|
||||
groupJID := message.Info.RemoteJid
|
||||
|
||||
senderJID := message.Info.SenderJid
|
||||
// if len(senderJid) == 0 {
|
||||
// // TODO workaround till https://github.com/Rhymen/go-whatsapp/issues/86 resolved
|
||||
// senderJid = *message.Info.Source.Participant
|
||||
// }
|
||||
if len(senderJID) == 0 {
|
||||
// TODO workaround till https://github.com/Rhymen/go-whatsapp/issues/86 resolved
|
||||
if message.Info.Source != nil && message.Info.Source.Participant != nil {
|
||||
senderJID = *message.Info.Source.Participant
|
||||
}
|
||||
}
|
||||
|
||||
// translate sender's Jid to the nicest username we can get
|
||||
senderName := b.getSenderName(senderJID)
|
||||
|
||||
@@ -67,7 +67,6 @@ func (b *Bwhatsapp) Connect() error {
|
||||
// https://github.com/Rhymen/go-whatsapp#creating-a-connection
|
||||
b.Log.Debugln("Connecting to WhatsApp..")
|
||||
conn, err := whatsapp.NewConn(20 * time.Second)
|
||||
conn.SetClientVersion(0, 4, 2080)
|
||||
if err != nil {
|
||||
return errors.New("failed to connect to WhatsApp: " + err.Error())
|
||||
}
|
||||
|
||||
19
changelog.md
19
changelog.md
@@ -1,3 +1,22 @@
|
||||
# v1.19.0
|
||||
|
||||
## New features
|
||||
|
||||
- mumble: new protocol added: Add Mumble support (#1245)
|
||||
- nctalk: Add support for downloading files (nctalk) (#1249)
|
||||
- nctalk: Append a suffix if user is a guest user (nctalk) (#1250)
|
||||
|
||||
## Enhancements
|
||||
|
||||
- irc: Add even more debug for irc (#1266)
|
||||
- matrix: Add username formatting for all events (matrix) (#1233)
|
||||
- matrix: Permit uploading files of other mimetypes (#1237)
|
||||
- whatsapp: Use vendored whatsapp version (#1258)
|
||||
- whatsapp: Add username for images from WhatsApp (#1232)
|
||||
|
||||
This release couldn't exist without the following contributors:
|
||||
@Dellle, @42wim, @gary-kim, @s3lph, @BenWiederhake
|
||||
|
||||
# v1.18.3
|
||||
|
||||
## Enhancements
|
||||
|
||||
11
gateway/bridgemap/bmumble.go
Normal file
11
gateway/bridgemap/bmumble.go
Normal file
@@ -0,0 +1,11 @@
|
||||
// +build !nomumble
|
||||
|
||||
package bridgemap
|
||||
|
||||
import (
|
||||
bmumble "github.com/42wim/matterbridge/bridge/mumble"
|
||||
)
|
||||
|
||||
func init() {
|
||||
FullMap["mumble"] = bmumble.New
|
||||
}
|
||||
18
go.mod
18
go.mod
@@ -4,9 +4,9 @@ require (
|
||||
github.com/42wim/go-gitter v0.0.0-20170828205020-017310c2d557
|
||||
github.com/Baozisoftware/qrcode-terminal-go v0.0.0-20170407111555-c0650d8dff0f
|
||||
github.com/Jeffail/gabs v1.1.1 // indirect
|
||||
github.com/Philipp15b/go-steam v1.0.1-0.20190816133340-b04c5a83c1c0
|
||||
github.com/Rhymen/go-whatsapp v0.1.1-0.20200818115958-f07a700b9819
|
||||
github.com/d5/tengo/v2 v2.6.0
|
||||
github.com/Philipp15b/go-steam v1.0.1-0.20200727090957-6ae9b3c0a560
|
||||
github.com/Rhymen/go-whatsapp v0.1.1-0.20201007125822-005103751b7a
|
||||
github.com/d5/tengo/v2 v2.6.2
|
||||
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
|
||||
@@ -27,7 +27,7 @@ require (
|
||||
github.com/matterbridge/go-xmpp v0.0.0-20200418225040-c8a3a57b4050
|
||||
github.com/matterbridge/gozulipbot v0.0.0-20200820220548-be5824faa913
|
||||
github.com/matterbridge/logrus-prefixed-formatter v0.5.3-0.20200523233437-d971309a77ba
|
||||
github.com/mattermost/mattermost-server/v5 v5.25.2
|
||||
github.com/mattermost/mattermost-server/v5 v5.28.1
|
||||
github.com/mattn/godown v0.0.0-20200217152941-afc959f6a561
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
|
||||
github.com/missdeer/golib v1.0.3
|
||||
@@ -39,18 +39,20 @@ require (
|
||||
github.com/russross/blackfriday v1.5.2
|
||||
github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca
|
||||
github.com/shazow/ssh-chat v1.8.3-0.20200308224626-80ddf1f43a98
|
||||
github.com/sirupsen/logrus v1.6.0
|
||||
github.com/slack-go/slack v0.6.6
|
||||
github.com/sirupsen/logrus v1.7.0
|
||||
github.com/slack-go/slack v0.7.2
|
||||
github.com/spf13/viper v1.7.1
|
||||
github.com/stretchr/testify v1.6.1
|
||||
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-20190304061218-d34796e0a6c2
|
||||
golang.org/x/image v0.0.0-20200801110659-972c09e46d76
|
||||
golang.org/x/image v0.0.0-20200927104501-e162460cd6b5
|
||||
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43
|
||||
gomod.garykim.dev/nc-talk v0.1.3
|
||||
gomod.garykim.dev/nc-talk v0.1.5
|
||||
gopkg.in/olahol/melody.v1 v1.0.0-20170518105555-d52139073376
|
||||
layeh.com/gumble v0.0.0-20200818122324-146f9205029b
|
||||
)
|
||||
|
||||
go 1.13
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
version = "1.18.3"
|
||||
version = "1.19.0"
|
||||
githash string
|
||||
|
||||
flagConfig = flag.String("conf", "matterbridge.toml", "config file")
|
||||
|
||||
@@ -1405,6 +1405,55 @@ Login = "talkuser"
|
||||
# Password of the bot
|
||||
Password = "talkuserpass"
|
||||
|
||||
# Suffix for Guest Users
|
||||
GuestSuffix = " (Guest)"
|
||||
|
||||
###################################################################
|
||||
#
|
||||
# Mumble
|
||||
#
|
||||
###################################################################
|
||||
|
||||
[mumble.bridge]
|
||||
|
||||
# Host and port of your Mumble server
|
||||
Server = "mumble.yourdomain.me:64738"
|
||||
|
||||
# Nickname to log in as
|
||||
Nick = "matterbridge"
|
||||
|
||||
# Some servers require a password
|
||||
# OPTIONAL (default empty)
|
||||
Password = "serverpasswordhere"
|
||||
|
||||
# User comment to set on the Mumble user, visible to other users.
|
||||
# OPTIONAL (default empty)
|
||||
UserComment="I am bridging text messages between this channel and #general on irc.yourdomain.me"
|
||||
|
||||
# Self-signed TLS client certificate + private key used to connect to
|
||||
# Mumble. This is required if you want to register the matterbridge
|
||||
# user on your Mumble server, so its nick becomes reserved.
|
||||
# You can generate a keypair using e.g.
|
||||
#
|
||||
# openssl req -x509 -newkey rsa:2048 -nodes -days 10000 \
|
||||
# -keyout mumble.key -out mumble.crt
|
||||
#
|
||||
# To actually register the matterbridege user, connect to Mumble as an
|
||||
# admin, right click on the user and click "Register".
|
||||
#
|
||||
# OPTIONAL (default empty)
|
||||
TLSClientCertificate="mumble.crt"
|
||||
TLSClientKey="mumble.key"
|
||||
|
||||
# TLS CA certificate used to validate the Mumble server.
|
||||
# OPTIONAL (defaults to Go system CA)
|
||||
TLSCACertificate=mumble-ca.crt
|
||||
|
||||
# Enable to not verify the certificate on your Mumble server.
|
||||
# e.g. when using selfsigned certificates
|
||||
# OPTIONAL (default false)
|
||||
SkipTLSVerify=false
|
||||
|
||||
###################################################################
|
||||
#
|
||||
# WhatsApp
|
||||
@@ -1745,6 +1794,8 @@ enable=true
|
||||
# -------------------------------------------------------------------------------------------------------------------------------------
|
||||
# msteams | threadId | 19:82abcxx@thread.skype | You'll find the threadId in the URL
|
||||
# -------------------------------------------------------------------------------------------------------------------------------------
|
||||
# mumble | channel id | 42 | The channel ID, as shown in the channel's "Edit" window
|
||||
# -------------------------------------------------------------------------------------------------------------------------------------
|
||||
# rocketchat | channel | #channel | # is required for private channels too
|
||||
# -------------------------------------------------------------------------------------------------------------------------------------
|
||||
# slack | channel name | general | Do not include the # symbol
|
||||
|
||||
5
vendor/github.com/Philipp15b/go-steam/.gitmodules
generated
vendored
5
vendor/github.com/Philipp15b/go-steam/.gitmodules
generated
vendored
@@ -1,3 +1,6 @@
|
||||
[submodule "generator/SteamKit"]
|
||||
path = generator/SteamKit
|
||||
url = https://github.com/Philipp15b/SteamKit.git
|
||||
url = https://github.com/SteamRE/SteamKit.git
|
||||
[submodule "generator/Protobufs"]
|
||||
path = generator/Protobufs
|
||||
url = https://github.com/SteamDatabase/Protobufs.git
|
||||
|
||||
4
vendor/github.com/Philipp15b/go-steam/auth.go
generated
vendored
4
vendor/github.com/Philipp15b/go-steam/auth.go
generated
vendored
@@ -119,7 +119,7 @@ func (a *Auth) handleLogOnResponse(packet *Packet) {
|
||||
ExtendedResult: EResult(body.GetEresultExtended()),
|
||||
OutOfGameSecsPerHeartbeat: body.GetOutOfGameHeartbeatSeconds(),
|
||||
InGameSecsPerHeartbeat: body.GetInGameHeartbeatSeconds(),
|
||||
PublicIp: body.GetPublicIp(),
|
||||
PublicIp: body.GetDeprecatedPublicIp(),
|
||||
ServerTime: body.GetRtime32ServerTime(),
|
||||
AccountFlags: EAccountFlags(body.GetAccountFlags()),
|
||||
ClientSteamId: SteamId(body.GetClientSuppliedSteamid()),
|
||||
@@ -127,7 +127,7 @@ func (a *Auth) handleLogOnResponse(packet *Packet) {
|
||||
CellId: body.GetCellId(),
|
||||
CellIdPingThreshold: body.GetCellIdPingThreshold(),
|
||||
Steam2Ticket: body.GetSteam2Ticket(),
|
||||
UsePics: body.GetUsePics(),
|
||||
UsePics: body.GetDeprecatedUsePics(),
|
||||
WebApiUserNonce: body.GetWebapiAuthenticateUserNonce(),
|
||||
IpCountryCode: body.GetIpCountryCode(),
|
||||
VanityUrl: body.GetVanityUrl(),
|
||||
|
||||
8
vendor/github.com/Philipp15b/go-steam/go.mod
generated
vendored
Normal file
8
vendor/github.com/Philipp15b/go-steam/go.mod
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
module github.com/Philipp15b/go-steam
|
||||
|
||||
go 1.14
|
||||
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
github.com/golang/protobuf v1.4.2
|
||||
)
|
||||
22
vendor/github.com/Philipp15b/go-steam/go.sum
generated
vendored
Normal file
22
vendor/github.com/Philipp15b/go-steam/go.sum
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
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.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
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 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
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/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.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
32
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/app_ticket.pb.go
generated
vendored
32
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/app_ticket.pb.go
generated
vendored
@@ -21,11 +21,11 @@ var _ = math.Inf
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type EncryptedAppTicket struct {
|
||||
TicketVersionNo *uint32 `protobuf:"varint,1,opt,name=ticket_version_no" json:"ticket_version_no,omitempty"`
|
||||
CrcEncryptedticket *uint32 `protobuf:"varint,2,opt,name=crc_encryptedticket" json:"crc_encryptedticket,omitempty"`
|
||||
CbEncrypteduserdata *uint32 `protobuf:"varint,3,opt,name=cb_encrypteduserdata" json:"cb_encrypteduserdata,omitempty"`
|
||||
CbEncryptedAppownershipticket *uint32 `protobuf:"varint,4,opt,name=cb_encrypted_appownershipticket" json:"cb_encrypted_appownershipticket,omitempty"`
|
||||
EncryptedTicket []byte `protobuf:"bytes,5,opt,name=encrypted_ticket" json:"encrypted_ticket,omitempty"`
|
||||
TicketVersionNo *uint32 `protobuf:"varint,1,opt,name=ticket_version_no,json=ticketVersionNo" json:"ticket_version_no,omitempty"`
|
||||
CrcEncryptedticket *uint32 `protobuf:"varint,2,opt,name=crc_encryptedticket,json=crcEncryptedticket" json:"crc_encryptedticket,omitempty"`
|
||||
CbEncrypteduserdata *uint32 `protobuf:"varint,3,opt,name=cb_encrypteduserdata,json=cbEncrypteduserdata" json:"cb_encrypteduserdata,omitempty"`
|
||||
CbEncryptedAppownershipticket *uint32 `protobuf:"varint,4,opt,name=cb_encrypted_appownershipticket,json=cbEncryptedAppownershipticket" json:"cb_encrypted_appownershipticket,omitempty"`
|
||||
EncryptedTicket []byte `protobuf:"bytes,5,opt,name=encrypted_ticket,json=encryptedTicket" json:"encrypted_ticket,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -98,16 +98,18 @@ func init() {
|
||||
func init() { proto.RegisterFile("encrypted_app_ticket.proto", fileDescriptor_c6d69fd1cac4e8d5) }
|
||||
|
||||
var fileDescriptor_c6d69fd1cac4e8d5 = []byte{
|
||||
// 164 bytes of a gzipped FileDescriptorProto
|
||||
// 202 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xcd, 0x4b, 0x2e,
|
||||
0xaa, 0x2c, 0x28, 0x49, 0x4d, 0x89, 0x4f, 0x2c, 0x28, 0x88, 0x2f, 0xc9, 0x4c, 0xce, 0x4e, 0x2d,
|
||||
0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x5a, 0xcb, 0xc8, 0x25, 0xe4, 0x0a, 0x93, 0x76, 0x2c,
|
||||
0x28, 0x08, 0x01, 0x4b, 0x0a, 0x49, 0x72, 0x09, 0x42, 0x94, 0xc5, 0x97, 0xa5, 0x16, 0x15, 0x67,
|
||||
0xe6, 0xe7, 0xc5, 0xe7, 0xe5, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x0a, 0x49, 0x73, 0x09, 0x27,
|
||||
0x17, 0x25, 0xc7, 0xc3, 0xcd, 0x84, 0xa8, 0x93, 0x60, 0x02, 0x4b, 0xca, 0x70, 0x89, 0x24, 0x27,
|
||||
0x21, 0xe4, 0x4a, 0x8b, 0x53, 0x8b, 0x52, 0x12, 0x4b, 0x12, 0x25, 0x98, 0xc1, 0xb2, 0xea, 0x5c,
|
||||
0xf2, 0xc8, 0xb2, 0x20, 0xd7, 0xe4, 0x97, 0xe7, 0xa5, 0x16, 0x15, 0x67, 0x64, 0x16, 0x40, 0x8d,
|
||||
0x61, 0x01, 0x2b, 0x94, 0xe0, 0x12, 0x40, 0xa8, 0x82, 0xca, 0xb0, 0x2a, 0x30, 0x6a, 0xf0, 0x38,
|
||||
0xb1, 0x7a, 0x30, 0x36, 0x30, 0x32, 0x00, 0x02, 0x00, 0x00, 0xff, 0xff, 0x03, 0x8c, 0xdb, 0x92,
|
||||
0xd3, 0x00, 0x00, 0x00,
|
||||
0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x9a, 0xce, 0xc4, 0x25, 0xe4, 0x0a, 0x93, 0x76, 0x2c,
|
||||
0x28, 0x08, 0x01, 0x4b, 0x0a, 0x69, 0x71, 0x09, 0x42, 0x94, 0xc5, 0x97, 0xa5, 0x16, 0x15, 0x67,
|
||||
0xe6, 0xe7, 0xc5, 0xe7, 0xe5, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x06, 0xf1, 0x43, 0x24, 0xc2,
|
||||
0x20, 0xe2, 0x7e, 0xf9, 0x42, 0xfa, 0x5c, 0xc2, 0xc9, 0x45, 0xc9, 0xf1, 0x70, 0x4b, 0x20, 0xf2,
|
||||
0x12, 0x4c, 0x60, 0xd5, 0x42, 0xc9, 0x45, 0xc9, 0xae, 0xa8, 0x32, 0x42, 0x86, 0x5c, 0x22, 0xc9,
|
||||
0x49, 0x08, 0xf5, 0xa5, 0xc5, 0xa9, 0x45, 0x29, 0x89, 0x25, 0x89, 0x12, 0xcc, 0x60, 0x1d, 0xc2,
|
||||
0xc9, 0x49, 0xae, 0xe8, 0x52, 0x42, 0x6e, 0x5c, 0xf2, 0xc8, 0x5a, 0x40, 0xfe, 0xc8, 0x2f, 0xcf,
|
||||
0x4b, 0x2d, 0x2a, 0xce, 0xc8, 0x2c, 0x80, 0xda, 0xc7, 0x02, 0xd6, 0x2d, 0x8b, 0xa4, 0xdb, 0x11,
|
||||
0x43, 0x91, 0x90, 0x26, 0x97, 0x00, 0xc2, 0x10, 0xa8, 0x46, 0x56, 0x05, 0x46, 0x0d, 0x9e, 0x20,
|
||||
0x7e, 0xb8, 0x38, 0x24, 0x08, 0x9c, 0x58, 0x3d, 0x18, 0x1b, 0x18, 0x19, 0x00, 0x01, 0x00, 0x00,
|
||||
0xff, 0xff, 0xe8, 0x03, 0x98, 0x21, 0x3d, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
1221
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/base.pb.go
generated
vendored
1221
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/base.pb.go
generated
vendored
File diff suppressed because it is too large
Load Diff
2801
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/client_server.pb.go
generated
vendored
2801
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/client_server.pb.go
generated
vendored
File diff suppressed because it is too large
Load Diff
2860
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/client_server_2.pb.go
generated
vendored
2860
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/client_server_2.pb.go
generated
vendored
File diff suppressed because it is too large
Load Diff
531
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/client_server_friends.pb.go
generated
vendored
531
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/client_server_friends.pb.go
generated
vendored
@@ -22,10 +22,10 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type CMsgClientFriendMsg struct {
|
||||
Steamid *uint64 `protobuf:"fixed64,1,opt,name=steamid" json:"steamid,omitempty"`
|
||||
ChatEntryType *int32 `protobuf:"varint,2,opt,name=chat_entry_type" json:"chat_entry_type,omitempty"`
|
||||
ChatEntryType *int32 `protobuf:"varint,2,opt,name=chat_entry_type,json=chatEntryType" json:"chat_entry_type,omitempty"`
|
||||
Message []byte `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"`
|
||||
Rtime32ServerTimestamp *uint32 `protobuf:"fixed32,4,opt,name=rtime32_server_timestamp" json:"rtime32_server_timestamp,omitempty"`
|
||||
EchoToSender *bool `protobuf:"varint,5,opt,name=echo_to_sender" json:"echo_to_sender,omitempty"`
|
||||
Rtime32ServerTimestamp *uint32 `protobuf:"fixed32,4,opt,name=rtime32_server_timestamp,json=rtime32ServerTimestamp" json:"rtime32_server_timestamp,omitempty"`
|
||||
EchoToSender *bool `protobuf:"varint,5,opt,name=echo_to_sender,json=echoToSender" json:"echo_to_sender,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -92,11 +92,11 @@ func (m *CMsgClientFriendMsg) GetEchoToSender() bool {
|
||||
}
|
||||
|
||||
type CMsgClientFriendMsgIncoming struct {
|
||||
SteamidFrom *uint64 `protobuf:"fixed64,1,opt,name=steamid_from" json:"steamid_from,omitempty"`
|
||||
ChatEntryType *int32 `protobuf:"varint,2,opt,name=chat_entry_type" json:"chat_entry_type,omitempty"`
|
||||
FromLimitedAccount *bool `protobuf:"varint,3,opt,name=from_limited_account" json:"from_limited_account,omitempty"`
|
||||
SteamidFrom *uint64 `protobuf:"fixed64,1,opt,name=steamid_from,json=steamidFrom" json:"steamid_from,omitempty"`
|
||||
ChatEntryType *int32 `protobuf:"varint,2,opt,name=chat_entry_type,json=chatEntryType" json:"chat_entry_type,omitempty"`
|
||||
FromLimitedAccount *bool `protobuf:"varint,3,opt,name=from_limited_account,json=fromLimitedAccount" json:"from_limited_account,omitempty"`
|
||||
Message []byte `protobuf:"bytes,4,opt,name=message" json:"message,omitempty"`
|
||||
Rtime32ServerTimestamp *uint32 `protobuf:"fixed32,5,opt,name=rtime32_server_timestamp" json:"rtime32_server_timestamp,omitempty"`
|
||||
Rtime32ServerTimestamp *uint32 `protobuf:"fixed32,5,opt,name=rtime32_server_timestamp,json=rtime32ServerTimestamp" json:"rtime32_server_timestamp,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -163,8 +163,8 @@ func (m *CMsgClientFriendMsgIncoming) GetRtime32ServerTimestamp() uint32 {
|
||||
}
|
||||
|
||||
type CMsgClientAddFriend struct {
|
||||
SteamidToAdd *uint64 `protobuf:"fixed64,1,opt,name=steamid_to_add" json:"steamid_to_add,omitempty"`
|
||||
AccountnameOrEmailToAdd *string `protobuf:"bytes,2,opt,name=accountname_or_email_to_add" json:"accountname_or_email_to_add,omitempty"`
|
||||
SteamidToAdd *uint64 `protobuf:"fixed64,1,opt,name=steamid_to_add,json=steamidToAdd" json:"steamid_to_add,omitempty"`
|
||||
AccountnameOrEmailToAdd *string `protobuf:"bytes,2,opt,name=accountname_or_email_to_add,json=accountnameOrEmailToAdd" json:"accountname_or_email_to_add,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -211,8 +211,8 @@ func (m *CMsgClientAddFriend) GetAccountnameOrEmailToAdd() string {
|
||||
|
||||
type CMsgClientAddFriendResponse struct {
|
||||
Eresult *int32 `protobuf:"varint,1,opt,name=eresult,def=2" json:"eresult,omitempty"`
|
||||
SteamIdAdded *uint64 `protobuf:"fixed64,2,opt,name=steam_id_added" json:"steam_id_added,omitempty"`
|
||||
PersonaNameAdded *string `protobuf:"bytes,3,opt,name=persona_name_added" json:"persona_name_added,omitempty"`
|
||||
SteamIdAdded *uint64 `protobuf:"fixed64,2,opt,name=steam_id_added,json=steamIdAdded" json:"steam_id_added,omitempty"`
|
||||
PersonaNameAdded *string `protobuf:"bytes,3,opt,name=persona_name_added,json=personaNameAdded" json:"persona_name_added,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -355,9 +355,9 @@ func (m *CMsgClientHideFriend) GetHide() bool {
|
||||
type CMsgClientFriendsList struct {
|
||||
Bincremental *bool `protobuf:"varint,1,opt,name=bincremental" json:"bincremental,omitempty"`
|
||||
Friends []*CMsgClientFriendsList_Friend `protobuf:"bytes,2,rep,name=friends" json:"friends,omitempty"`
|
||||
MaxFriendCount *uint32 `protobuf:"varint,3,opt,name=max_friend_count" json:"max_friend_count,omitempty"`
|
||||
ActiveFriendCount *uint32 `protobuf:"varint,4,opt,name=active_friend_count" json:"active_friend_count,omitempty"`
|
||||
FriendsLimitHit *bool `protobuf:"varint,5,opt,name=friends_limit_hit" json:"friends_limit_hit,omitempty"`
|
||||
MaxFriendCount *uint32 `protobuf:"varint,3,opt,name=max_friend_count,json=maxFriendCount" json:"max_friend_count,omitempty"`
|
||||
ActiveFriendCount *uint32 `protobuf:"varint,4,opt,name=active_friend_count,json=activeFriendCount" json:"active_friend_count,omitempty"`
|
||||
FriendsLimitHit *bool `protobuf:"varint,5,opt,name=friends_limit_hit,json=friendsLimitHit" json:"friends_limit_hit,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -826,7 +826,7 @@ func (m *CMsgClientSetPlayerNicknameResponse) GetEresult() uint32 {
|
||||
}
|
||||
|
||||
type CMsgClientRequestFriendData struct {
|
||||
PersonaStateRequested *uint32 `protobuf:"varint,1,opt,name=persona_state_requested" json:"persona_state_requested,omitempty"`
|
||||
PersonaStateRequested *uint32 `protobuf:"varint,1,opt,name=persona_state_requested,json=personaStateRequested" json:"persona_state_requested,omitempty"`
|
||||
Friends []uint64 `protobuf:"fixed64,2,rep,name=friends" json:"friends,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
@@ -873,14 +873,14 @@ func (m *CMsgClientRequestFriendData) GetFriends() []uint64 {
|
||||
}
|
||||
|
||||
type CMsgClientChangeStatus struct {
|
||||
PersonaState *uint32 `protobuf:"varint,1,opt,name=persona_state" json:"persona_state,omitempty"`
|
||||
PlayerName *string `protobuf:"bytes,2,opt,name=player_name" json:"player_name,omitempty"`
|
||||
IsAutoGeneratedName *bool `protobuf:"varint,3,opt,name=is_auto_generated_name" json:"is_auto_generated_name,omitempty"`
|
||||
HighPriority *bool `protobuf:"varint,4,opt,name=high_priority" json:"high_priority,omitempty"`
|
||||
PersonaSetByUser *bool `protobuf:"varint,5,opt,name=persona_set_by_user" json:"persona_set_by_user,omitempty"`
|
||||
PersonaStateFlags *uint32 `protobuf:"varint,6,opt,name=persona_state_flags,def=0" json:"persona_state_flags,omitempty"`
|
||||
NeedPersonaResponse *bool `protobuf:"varint,7,opt,name=need_persona_response" json:"need_persona_response,omitempty"`
|
||||
IsClientIdle *bool `protobuf:"varint,8,opt,name=is_client_idle" json:"is_client_idle,omitempty"`
|
||||
PersonaState *uint32 `protobuf:"varint,1,opt,name=persona_state,json=personaState" json:"persona_state,omitempty"`
|
||||
PlayerName *string `protobuf:"bytes,2,opt,name=player_name,json=playerName" json:"player_name,omitempty"`
|
||||
IsAutoGeneratedName *bool `protobuf:"varint,3,opt,name=is_auto_generated_name,json=isAutoGeneratedName" json:"is_auto_generated_name,omitempty"`
|
||||
HighPriority *bool `protobuf:"varint,4,opt,name=high_priority,json=highPriority" json:"high_priority,omitempty"`
|
||||
PersonaSetByUser *bool `protobuf:"varint,5,opt,name=persona_set_by_user,json=personaSetByUser" json:"persona_set_by_user,omitempty"`
|
||||
PersonaStateFlags *uint32 `protobuf:"varint,6,opt,name=persona_state_flags,json=personaStateFlags,def=0" json:"persona_state_flags,omitempty"`
|
||||
NeedPersonaResponse *bool `protobuf:"varint,7,opt,name=need_persona_response,json=needPersonaResponse" json:"need_persona_response,omitempty"`
|
||||
IsClientIdle *bool `protobuf:"varint,8,opt,name=is_client_idle,json=isClientIdle" json:"is_client_idle,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -971,7 +971,7 @@ func (m *CMsgClientChangeStatus) GetIsClientIdle() bool {
|
||||
|
||||
type CMsgPersonaChangeResponse struct {
|
||||
Result *uint32 `protobuf:"varint,1,opt,name=result" json:"result,omitempty"`
|
||||
PlayerName *string `protobuf:"bytes,2,opt,name=player_name" json:"player_name,omitempty"`
|
||||
PlayerName *string `protobuf:"bytes,2,opt,name=player_name,json=playerName" json:"player_name,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -1017,7 +1017,7 @@ func (m *CMsgPersonaChangeResponse) GetPlayerName() string {
|
||||
}
|
||||
|
||||
type CMsgClientPersonaState struct {
|
||||
StatusFlags *uint32 `protobuf:"varint,1,opt,name=status_flags" json:"status_flags,omitempty"`
|
||||
StatusFlags *uint32 `protobuf:"varint,1,opt,name=status_flags,json=statusFlags" json:"status_flags,omitempty"`
|
||||
Friends []*CMsgClientPersonaState_Friend `protobuf:"bytes,2,rep,name=friends" json:"friends,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
@@ -1065,34 +1065,33 @@ func (m *CMsgClientPersonaState) GetFriends() []*CMsgClientPersonaState_Friend {
|
||||
|
||||
type CMsgClientPersonaState_Friend struct {
|
||||
Friendid *uint64 `protobuf:"fixed64,1,opt,name=friendid" json:"friendid,omitempty"`
|
||||
PersonaState *uint32 `protobuf:"varint,2,opt,name=persona_state" json:"persona_state,omitempty"`
|
||||
GamePlayedAppId *uint32 `protobuf:"varint,3,opt,name=game_played_app_id" json:"game_played_app_id,omitempty"`
|
||||
GameServerIp *uint32 `protobuf:"varint,4,opt,name=game_server_ip" json:"game_server_ip,omitempty"`
|
||||
GameServerPort *uint32 `protobuf:"varint,5,opt,name=game_server_port" json:"game_server_port,omitempty"`
|
||||
PersonaStateFlags *uint32 `protobuf:"varint,6,opt,name=persona_state_flags" json:"persona_state_flags,omitempty"`
|
||||
OnlineSessionInstances *uint32 `protobuf:"varint,7,opt,name=online_session_instances" json:"online_session_instances,omitempty"`
|
||||
PublishedInstanceId *uint32 `protobuf:"varint,8,opt,name=published_instance_id" json:"published_instance_id,omitempty"`
|
||||
PersonaSetByUser *bool `protobuf:"varint,10,opt,name=persona_set_by_user" json:"persona_set_by_user,omitempty"`
|
||||
PlayerName *string `protobuf:"bytes,15,opt,name=player_name" json:"player_name,omitempty"`
|
||||
QueryPort *uint32 `protobuf:"varint,20,opt,name=query_port" json:"query_port,omitempty"`
|
||||
SteamidSource *uint64 `protobuf:"fixed64,25,opt,name=steamid_source" json:"steamid_source,omitempty"`
|
||||
AvatarHash []byte `protobuf:"bytes,31,opt,name=avatar_hash" json:"avatar_hash,omitempty"`
|
||||
LastLogoff *uint32 `protobuf:"varint,45,opt,name=last_logoff" json:"last_logoff,omitempty"`
|
||||
LastLogon *uint32 `protobuf:"varint,46,opt,name=last_logon" json:"last_logon,omitempty"`
|
||||
LastSeenOnline *uint32 `protobuf:"varint,47,opt,name=last_seen_online" json:"last_seen_online,omitempty"`
|
||||
ClanRank *uint32 `protobuf:"varint,50,opt,name=clan_rank" json:"clan_rank,omitempty"`
|
||||
GameName *string `protobuf:"bytes,55,opt,name=game_name" json:"game_name,omitempty"`
|
||||
PersonaState *uint32 `protobuf:"varint,2,opt,name=persona_state,json=personaState" json:"persona_state,omitempty"`
|
||||
GamePlayedAppId *uint32 `protobuf:"varint,3,opt,name=game_played_app_id,json=gamePlayedAppId" json:"game_played_app_id,omitempty"`
|
||||
GameServerIp *uint32 `protobuf:"varint,4,opt,name=game_server_ip,json=gameServerIp" json:"game_server_ip,omitempty"`
|
||||
GameServerPort *uint32 `protobuf:"varint,5,opt,name=game_server_port,json=gameServerPort" json:"game_server_port,omitempty"`
|
||||
PersonaStateFlags *uint32 `protobuf:"varint,6,opt,name=persona_state_flags,json=personaStateFlags" json:"persona_state_flags,omitempty"`
|
||||
OnlineSessionInstances *uint32 `protobuf:"varint,7,opt,name=online_session_instances,json=onlineSessionInstances" json:"online_session_instances,omitempty"`
|
||||
PersonaSetByUser *bool `protobuf:"varint,10,opt,name=persona_set_by_user,json=personaSetByUser" json:"persona_set_by_user,omitempty"`
|
||||
PlayerName *string `protobuf:"bytes,15,opt,name=player_name,json=playerName" json:"player_name,omitempty"`
|
||||
QueryPort *uint32 `protobuf:"varint,20,opt,name=query_port,json=queryPort" json:"query_port,omitempty"`
|
||||
SteamidSource *uint64 `protobuf:"fixed64,25,opt,name=steamid_source,json=steamidSource" json:"steamid_source,omitempty"`
|
||||
AvatarHash []byte `protobuf:"bytes,31,opt,name=avatar_hash,json=avatarHash" json:"avatar_hash,omitempty"`
|
||||
LastLogoff *uint32 `protobuf:"varint,45,opt,name=last_logoff,json=lastLogoff" json:"last_logoff,omitempty"`
|
||||
LastLogon *uint32 `protobuf:"varint,46,opt,name=last_logon,json=lastLogon" json:"last_logon,omitempty"`
|
||||
LastSeenOnline *uint32 `protobuf:"varint,47,opt,name=last_seen_online,json=lastSeenOnline" json:"last_seen_online,omitempty"`
|
||||
ClanRank *uint32 `protobuf:"varint,50,opt,name=clan_rank,json=clanRank" json:"clan_rank,omitempty"`
|
||||
GameName *string `protobuf:"bytes,55,opt,name=game_name,json=gameName" json:"game_name,omitempty"`
|
||||
Gameid *uint64 `protobuf:"fixed64,56,opt,name=gameid" json:"gameid,omitempty"`
|
||||
GameDataBlob []byte `protobuf:"bytes,60,opt,name=game_data_blob" json:"game_data_blob,omitempty"`
|
||||
ClanData *CMsgClientPersonaState_Friend_ClanData `protobuf:"bytes,64,opt,name=clan_data" json:"clan_data,omitempty"`
|
||||
ClanTag *string `protobuf:"bytes,65,opt,name=clan_tag" json:"clan_tag,omitempty"`
|
||||
RichPresence []*CMsgClientPersonaState_Friend_KV `protobuf:"bytes,71,rep,name=rich_presence" json:"rich_presence,omitempty"`
|
||||
BroadcastId *uint64 `protobuf:"fixed64,72,opt,name=broadcast_id" json:"broadcast_id,omitempty"`
|
||||
GameLobbyId *uint64 `protobuf:"fixed64,73,opt,name=game_lobby_id" json:"game_lobby_id,omitempty"`
|
||||
WatchingBroadcastAccountid *uint32 `protobuf:"varint,74,opt,name=watching_broadcast_accountid" json:"watching_broadcast_accountid,omitempty"`
|
||||
WatchingBroadcastAppid *uint32 `protobuf:"varint,75,opt,name=watching_broadcast_appid" json:"watching_broadcast_appid,omitempty"`
|
||||
WatchingBroadcastViewers *uint32 `protobuf:"varint,76,opt,name=watching_broadcast_viewers" json:"watching_broadcast_viewers,omitempty"`
|
||||
WatchingBroadcastTitle *string `protobuf:"bytes,77,opt,name=watching_broadcast_title" json:"watching_broadcast_title,omitempty"`
|
||||
GameDataBlob []byte `protobuf:"bytes,60,opt,name=game_data_blob,json=gameDataBlob" json:"game_data_blob,omitempty"`
|
||||
ClanData *CMsgClientPersonaState_Friend_ClanData `protobuf:"bytes,64,opt,name=clan_data,json=clanData" json:"clan_data,omitempty"`
|
||||
ClanTag *string `protobuf:"bytes,65,opt,name=clan_tag,json=clanTag" json:"clan_tag,omitempty"`
|
||||
RichPresence []*CMsgClientPersonaState_Friend_KV `protobuf:"bytes,71,rep,name=rich_presence,json=richPresence" json:"rich_presence,omitempty"`
|
||||
BroadcastId *uint64 `protobuf:"fixed64,72,opt,name=broadcast_id,json=broadcastId" json:"broadcast_id,omitempty"`
|
||||
GameLobbyId *uint64 `protobuf:"fixed64,73,opt,name=game_lobby_id,json=gameLobbyId" json:"game_lobby_id,omitempty"`
|
||||
WatchingBroadcastAccountid *uint32 `protobuf:"varint,74,opt,name=watching_broadcast_accountid,json=watchingBroadcastAccountid" json:"watching_broadcast_accountid,omitempty"`
|
||||
WatchingBroadcastAppid *uint32 `protobuf:"varint,75,opt,name=watching_broadcast_appid,json=watchingBroadcastAppid" json:"watching_broadcast_appid,omitempty"`
|
||||
WatchingBroadcastViewers *uint32 `protobuf:"varint,76,opt,name=watching_broadcast_viewers,json=watchingBroadcastViewers" json:"watching_broadcast_viewers,omitempty"`
|
||||
WatchingBroadcastTitle *string `protobuf:"bytes,77,opt,name=watching_broadcast_title,json=watchingBroadcastTitle" json:"watching_broadcast_title,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -1172,13 +1171,6 @@ func (m *CMsgClientPersonaState_Friend) GetOnlineSessionInstances() uint32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientPersonaState_Friend) GetPublishedInstanceId() uint32 {
|
||||
if m != nil && m.PublishedInstanceId != nil {
|
||||
return *m.PublishedInstanceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientPersonaState_Friend) GetPersonaSetByUser() bool {
|
||||
if m != nil && m.PersonaSetByUser != nil {
|
||||
return *m.PersonaSetByUser
|
||||
@@ -1327,8 +1319,8 @@ func (m *CMsgClientPersonaState_Friend) GetWatchingBroadcastTitle() string {
|
||||
}
|
||||
|
||||
type CMsgClientPersonaState_Friend_ClanData struct {
|
||||
OggAppId *uint32 `protobuf:"varint,1,opt,name=ogg_app_id" json:"ogg_app_id,omitempty"`
|
||||
ChatGroupId *uint64 `protobuf:"varint,2,opt,name=chat_group_id" json:"chat_group_id,omitempty"`
|
||||
OggAppId *uint32 `protobuf:"varint,1,opt,name=ogg_app_id,json=oggAppId" json:"ogg_app_id,omitempty"`
|
||||
ChatGroupId *uint64 `protobuf:"varint,2,opt,name=chat_group_id,json=chatGroupId" json:"chat_group_id,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -1423,7 +1415,7 @@ func (m *CMsgClientPersonaState_Friend_KV) GetValue() string {
|
||||
}
|
||||
|
||||
type CMsgClientFriendProfileInfo struct {
|
||||
SteamidFriend *uint64 `protobuf:"fixed64,1,opt,name=steamid_friend" json:"steamid_friend,omitempty"`
|
||||
SteamidFriend *uint64 `protobuf:"fixed64,1,opt,name=steamid_friend,json=steamidFriend" json:"steamid_friend,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -1463,12 +1455,12 @@ func (m *CMsgClientFriendProfileInfo) GetSteamidFriend() uint64 {
|
||||
|
||||
type CMsgClientFriendProfileInfoResponse struct {
|
||||
Eresult *int32 `protobuf:"varint,1,opt,name=eresult,def=2" json:"eresult,omitempty"`
|
||||
SteamidFriend *uint64 `protobuf:"fixed64,2,opt,name=steamid_friend" json:"steamid_friend,omitempty"`
|
||||
TimeCreated *uint32 `protobuf:"varint,3,opt,name=time_created" json:"time_created,omitempty"`
|
||||
RealName *string `protobuf:"bytes,4,opt,name=real_name" json:"real_name,omitempty"`
|
||||
CityName *string `protobuf:"bytes,5,opt,name=city_name" json:"city_name,omitempty"`
|
||||
StateName *string `protobuf:"bytes,6,opt,name=state_name" json:"state_name,omitempty"`
|
||||
CountryName *string `protobuf:"bytes,7,opt,name=country_name" json:"country_name,omitempty"`
|
||||
SteamidFriend *uint64 `protobuf:"fixed64,2,opt,name=steamid_friend,json=steamidFriend" json:"steamid_friend,omitempty"`
|
||||
TimeCreated *uint32 `protobuf:"varint,3,opt,name=time_created,json=timeCreated" json:"time_created,omitempty"`
|
||||
RealName *string `protobuf:"bytes,4,opt,name=real_name,json=realName" json:"real_name,omitempty"`
|
||||
CityName *string `protobuf:"bytes,5,opt,name=city_name,json=cityName" json:"city_name,omitempty"`
|
||||
StateName *string `protobuf:"bytes,6,opt,name=state_name,json=stateName" json:"state_name,omitempty"`
|
||||
CountryName *string `protobuf:"bytes,7,opt,name=country_name,json=countryName" json:"country_name,omitempty"`
|
||||
Headline *string `protobuf:"bytes,8,opt,name=headline" json:"headline,omitempty"`
|
||||
Summary *string `protobuf:"bytes,9,opt,name=summary" json:"summary,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
@@ -1569,7 +1561,7 @@ func (m *CMsgClientFriendProfileInfoResponse) GetSummary() string {
|
||||
type CMsgClientCreateFriendsGroup struct {
|
||||
Steamid *uint64 `protobuf:"fixed64,1,opt,name=steamid" json:"steamid,omitempty"`
|
||||
Groupname *string `protobuf:"bytes,2,opt,name=groupname" json:"groupname,omitempty"`
|
||||
SteamidFriends []uint64 `protobuf:"fixed64,3,rep,name=steamid_friends" json:"steamid_friends,omitempty"`
|
||||
SteamidFriends []uint64 `protobuf:"fixed64,3,rep,name=steamid_friends,json=steamidFriends" json:"steamid_friends,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -1757,8 +1749,8 @@ func (m *CMsgClientDeleteFriendsGroupResponse) GetEresult() uint32 {
|
||||
type CMsgClientManageFriendsGroup struct {
|
||||
Groupid *int32 `protobuf:"varint,1,opt,name=groupid" json:"groupid,omitempty"`
|
||||
Groupname *string `protobuf:"bytes,2,opt,name=groupname" json:"groupname,omitempty"`
|
||||
SteamidFriendsAdded []uint64 `protobuf:"fixed64,3,rep,name=steamid_friends_added" json:"steamid_friends_added,omitempty"`
|
||||
SteamidFriendsRemoved []uint64 `protobuf:"fixed64,4,rep,name=steamid_friends_removed" json:"steamid_friends_removed,omitempty"`
|
||||
SteamidFriendsAdded []uint64 `protobuf:"fixed64,3,rep,name=steamid_friends_added,json=steamidFriendsAdded" json:"steamid_friends_added,omitempty"`
|
||||
SteamidFriendsRemoved []uint64 `protobuf:"fixed64,4,rep,name=steamid_friends_removed,json=steamidFriendsRemoved" json:"steamid_friends_removed,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -2063,6 +2055,8 @@ var xxx_messageInfo_CMsgClientGetEmoticonList proto.InternalMessageInfo
|
||||
|
||||
type CMsgClientEmoticonList struct {
|
||||
Emoticons []*CMsgClientEmoticonList_Emoticon `protobuf:"bytes,1,rep,name=emoticons" json:"emoticons,omitempty"`
|
||||
Stickers []*CMsgClientEmoticonList_Sticker `protobuf:"bytes,2,rep,name=stickers" json:"stickers,omitempty"`
|
||||
Effects []*CMsgClientEmoticonList_Effect `protobuf:"bytes,3,rep,name=effects" json:"effects,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -2100,12 +2094,26 @@ func (m *CMsgClientEmoticonList) GetEmoticons() []*CMsgClientEmoticonList_Emotic
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CMsgClientEmoticonList) GetStickers() []*CMsgClientEmoticonList_Sticker {
|
||||
if m != nil {
|
||||
return m.Stickers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CMsgClientEmoticonList) GetEffects() []*CMsgClientEmoticonList_Effect {
|
||||
if m != nil {
|
||||
return m.Effects
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CMsgClientEmoticonList_Emoticon struct {
|
||||
Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
|
||||
Count *int32 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"`
|
||||
TimeLastUsed *uint32 `protobuf:"varint,3,opt,name=time_last_used" json:"time_last_used,omitempty"`
|
||||
UseCount *uint32 `protobuf:"varint,4,opt,name=use_count" json:"use_count,omitempty"`
|
||||
TimeReceived *uint32 `protobuf:"varint,5,opt,name=time_received" json:"time_received,omitempty"`
|
||||
TimeLastUsed *uint32 `protobuf:"varint,3,opt,name=time_last_used,json=timeLastUsed" json:"time_last_used,omitempty"`
|
||||
UseCount *uint32 `protobuf:"varint,4,opt,name=use_count,json=useCount" json:"use_count,omitempty"`
|
||||
TimeReceived *uint32 `protobuf:"varint,5,opt,name=time_received,json=timeReceived" json:"time_received,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -2171,6 +2179,140 @@ func (m *CMsgClientEmoticonList_Emoticon) GetTimeReceived() uint32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
type CMsgClientEmoticonList_Sticker struct {
|
||||
Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
|
||||
Count *int32 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"`
|
||||
TimeReceived *uint32 `protobuf:"varint,3,opt,name=time_received,json=timeReceived" json:"time_received,omitempty"`
|
||||
Appid *uint32 `protobuf:"varint,4,opt,name=appid" json:"appid,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CMsgClientEmoticonList_Sticker) Reset() { *m = CMsgClientEmoticonList_Sticker{} }
|
||||
func (m *CMsgClientEmoticonList_Sticker) String() string { return proto.CompactTextString(m) }
|
||||
func (*CMsgClientEmoticonList_Sticker) ProtoMessage() {}
|
||||
func (*CMsgClientEmoticonList_Sticker) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4f7c18b08a29999e, []int{28, 1}
|
||||
}
|
||||
|
||||
func (m *CMsgClientEmoticonList_Sticker) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CMsgClientEmoticonList_Sticker.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CMsgClientEmoticonList_Sticker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CMsgClientEmoticonList_Sticker.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CMsgClientEmoticonList_Sticker) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CMsgClientEmoticonList_Sticker.Merge(m, src)
|
||||
}
|
||||
func (m *CMsgClientEmoticonList_Sticker) XXX_Size() int {
|
||||
return xxx_messageInfo_CMsgClientEmoticonList_Sticker.Size(m)
|
||||
}
|
||||
func (m *CMsgClientEmoticonList_Sticker) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CMsgClientEmoticonList_Sticker.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CMsgClientEmoticonList_Sticker proto.InternalMessageInfo
|
||||
|
||||
func (m *CMsgClientEmoticonList_Sticker) GetName() string {
|
||||
if m != nil && m.Name != nil {
|
||||
return *m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CMsgClientEmoticonList_Sticker) GetCount() int32 {
|
||||
if m != nil && m.Count != nil {
|
||||
return *m.Count
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientEmoticonList_Sticker) GetTimeReceived() uint32 {
|
||||
if m != nil && m.TimeReceived != nil {
|
||||
return *m.TimeReceived
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientEmoticonList_Sticker) GetAppid() uint32 {
|
||||
if m != nil && m.Appid != nil {
|
||||
return *m.Appid
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type CMsgClientEmoticonList_Effect struct {
|
||||
Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
|
||||
Count *int32 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"`
|
||||
TimeReceived *uint32 `protobuf:"varint,3,opt,name=time_received,json=timeReceived" json:"time_received,omitempty"`
|
||||
InfiniteUse *bool `protobuf:"varint,4,opt,name=infinite_use,json=infiniteUse" json:"infinite_use,omitempty"`
|
||||
Appid *uint32 `protobuf:"varint,5,opt,name=appid" json:"appid,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CMsgClientEmoticonList_Effect) Reset() { *m = CMsgClientEmoticonList_Effect{} }
|
||||
func (m *CMsgClientEmoticonList_Effect) String() string { return proto.CompactTextString(m) }
|
||||
func (*CMsgClientEmoticonList_Effect) ProtoMessage() {}
|
||||
func (*CMsgClientEmoticonList_Effect) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4f7c18b08a29999e, []int{28, 2}
|
||||
}
|
||||
|
||||
func (m *CMsgClientEmoticonList_Effect) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CMsgClientEmoticonList_Effect.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CMsgClientEmoticonList_Effect) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CMsgClientEmoticonList_Effect.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CMsgClientEmoticonList_Effect) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CMsgClientEmoticonList_Effect.Merge(m, src)
|
||||
}
|
||||
func (m *CMsgClientEmoticonList_Effect) XXX_Size() int {
|
||||
return xxx_messageInfo_CMsgClientEmoticonList_Effect.Size(m)
|
||||
}
|
||||
func (m *CMsgClientEmoticonList_Effect) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CMsgClientEmoticonList_Effect.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CMsgClientEmoticonList_Effect proto.InternalMessageInfo
|
||||
|
||||
func (m *CMsgClientEmoticonList_Effect) GetName() string {
|
||||
if m != nil && m.Name != nil {
|
||||
return *m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CMsgClientEmoticonList_Effect) GetCount() int32 {
|
||||
if m != nil && m.Count != nil {
|
||||
return *m.Count
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientEmoticonList_Effect) GetTimeReceived() uint32 {
|
||||
if m != nil && m.TimeReceived != nil {
|
||||
return *m.TimeReceived
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientEmoticonList_Effect) GetInfiniteUse() bool {
|
||||
if m != nil && m.InfiniteUse != nil {
|
||||
return *m.InfiniteUse
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *CMsgClientEmoticonList_Effect) GetAppid() uint32 {
|
||||
if m != nil && m.Appid != nil {
|
||||
return *m.Appid
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*CMsgClientFriendMsg)(nil), "CMsgClientFriendMsg")
|
||||
proto.RegisterType((*CMsgClientFriendMsgIncoming)(nil), "CMsgClientFriendMsgIncoming")
|
||||
@@ -2209,6 +2351,8 @@ func init() {
|
||||
proto.RegisterType((*CMsgClientGetEmoticonList)(nil), "CMsgClientGetEmoticonList")
|
||||
proto.RegisterType((*CMsgClientEmoticonList)(nil), "CMsgClientEmoticonList")
|
||||
proto.RegisterType((*CMsgClientEmoticonList_Emoticon)(nil), "CMsgClientEmoticonList.Emoticon")
|
||||
proto.RegisterType((*CMsgClientEmoticonList_Sticker)(nil), "CMsgClientEmoticonList.Sticker")
|
||||
proto.RegisterType((*CMsgClientEmoticonList_Effect)(nil), "CMsgClientEmoticonList.Effect")
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -2216,106 +2360,141 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_4f7c18b08a29999e = []byte{
|
||||
// 1607 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x57, 0x4b, 0x73, 0x1b, 0xc7,
|
||||
0x11, 0xce, 0x8a, 0x24, 0x1e, 0x0d, 0x82, 0xa4, 0x96, 0x0f, 0xad, 0x40, 0x3d, 0x90, 0xb5, 0xab,
|
||||
0x8c, 0x4a, 0x25, 0x70, 0x8a, 0x2a, 0xd9, 0x8e, 0x2a, 0x0f, 0xd9, 0x54, 0x2c, 0x2a, 0x32, 0x1d,
|
||||
0x95, 0x94, 0xf2, 0x25, 0x87, 0xa9, 0xc1, 0x6e, 0x13, 0x98, 0xd2, 0xee, 0x2c, 0x3c, 0x33, 0x4b,
|
||||
0x07, 0xb7, 0x54, 0x8e, 0xf9, 0x0f, 0xf9, 0x1f, 0xa9, 0xdc, 0xf3, 0x27, 0x72, 0xc9, 0x3d, 0x97,
|
||||
0xfc, 0x82, 0x54, 0xa5, 0xa6, 0x67, 0x16, 0x5c, 0x10, 0x00, 0x69, 0xdf, 0x80, 0x9e, 0xe9, 0xaf,
|
||||
0xbf, 0xee, 0xe9, 0xd7, 0xc2, 0x40, 0x1b, 0xe4, 0x79, 0x8e, 0x5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 0x04,
|
||||
0x0b, 0x01, 0xbe, 0x2d, 0x51, 0xcd, 0x1c, 0xc7, 0x83, 0xca, 0xab, 0x6a, 0x00, 0xeb, 0xa2, 0x54,
|
||||
0x09, 0x46, 0xf7, 0x29, 0x40, 0xfb, 0xd0, 0xe1, 0x97, 0xdc, 0x70, 0xc5, 0x26, 0x5c, 0x4f, 0xa2,
|
||||
0xc7, 0x34, 0xe6, 0xf7, 0xa1, 0x93, 0x71, 0x6d, 0x58, 0x56, 0x8c, 0x8b, 0x8b, 0x8b, 0xe8, 0x67,
|
||||
0x84, 0x10, 0x02, 0xcc, 0x85, 0x32, 0x1a, 0x56, 0x31, 0x21, 0x99, 0x46, 0x94, 0xcc, 0xb9, 0x19,
|
||||
0x7d, 0x4c, 0x27, 0x77, 0xa1, 0x9d, 0x64, 0x5c, 0x32, 0xc5, 0xe5, 0xfb, 0xe8, 0xa4, 0x12, 0x51,
|
||||
0x00, 0x89, 0xe9, 0xa7, 0xc4, 0x74, 0x07, 0x1a, 0x56, 0x24, 0xd2, 0xe8, 0x33, 0x62, 0x53, 0xc5,
|
||||
0x3e, 0xe5, 0x86, 0xb3, 0x51, 0x56, 0x8c, 0xa2, 0x5f, 0x12, 0xa1, 0x67, 0x1e, 0xcd, 0xca, 0xa3,
|
||||
0xe7, 0xfd, 0x60, 0xd0, 0x39, 0xf9, 0xe8, 0xe6, 0xb4, 0x18, 0x9e, 0x66, 0x5c, 0x52, 0x9d, 0xef,
|
||||
0x41, 0x8b, 0x74, 0x0d, 0x1f, 0x47, 0x9f, 0x93, 0xd5, 0xcf, 0xa0, 0xab, 0x44, 0x62, 0x0b, 0x0c,
|
||||
0x35, 0xca, 0x04, 0xa3, 0x97, 0x94, 0x68, 0x3f, 0xbe, 0x05, 0xf1, 0xf5, 0x37, 0x34, 0x9f, 0x54,
|
||||
0xc1, 0xd3, 0xc4, 0x3a, 0x2d, 0xd2, 0xe8, 0xac, 0x4a, 0x32, 0x62, 0x9d, 0x15, 0xa3,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x7c, 0x74, 0x0b, 0xd0, 0x7a, 0x12, 0xc7, 0x6e,
|
||||
0x2f, 0x70, 0xba, 0x2f, 0xd1, 0xfc, 0x36, 0x2f, 0x8c, 0x48, 0x0a, 0x69, 0xb7, 0xc6, 0xf8, 0xef,
|
||||
0x0b, 0x6b, 0x52, 0xfd, 0x28, 0x7c, 0x02, 0x6d, 0xf4, 0xff, 0xed, 0xbc, 0xb7, 0x5d, 0xb7, 0x3f,
|
||||
0x5c, 0x7d, 0x77, 0x58, 0xfd, 0xe9, 0x09, 0x68, 0x55, 0xbf, 0xed, 0xd7, 0x14, 0xbd, 0xff, 0xbc,
|
||||
0x13, 0xb9, 0xaf, 0x18, 0xf7, 0x31, 0x7b, 0x04, 0x3b, 0x54, 0xfe, 0x34, 0x92, 0x4a, 0x5d, 0x6f,
|
||||
0x00, 0xa5, 0xc6, 0x85, 0x0f, 0x9e, 0x43, 0xe8, 0xd2, 0x55, 0x85, 0x09, 0x0a, 0x9b, 0x10, 0x34,
|
||||
0xc9, 0xbf, 0xd8, 0x3a, 0x0b, 0xfe, 0x1c, 0xfc, 0xe8, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbe,
|
||||
0x80, 0x1e, 0x5f, 0x36, 0x10, 0x00, 0x00,
|
||||
// 2171 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xdd, 0x6e, 0x1b, 0xb9,
|
||||
0x15, 0xae, 0xe4, 0x3f, 0xf9, 0x48, 0x72, 0x36, 0x74, 0xe2, 0x4c, 0x94, 0x6c, 0xe2, 0x4c, 0xd2,
|
||||
0xc6, 0x68, 0xb3, 0x6a, 0xea, 0x14, 0xbb, 0xc1, 0x36, 0xd8, 0xc6, 0xb1, 0xe3, 0x44, 0x1b, 0x7b,
|
||||
0xd7, 0x18, 0x39, 0x41, 0xb1, 0x40, 0x31, 0xa0, 0x66, 0x28, 0x89, 0xf0, 0xfc, 0x68, 0x49, 0xca,
|
||||
0xbb, 0xba, 0x6a, 0x9f, 0xa0, 0xe8, 0x03, 0xf4, 0xa6, 0x17, 0xbd, 0xe8, 0x4b, 0xf4, 0xa2, 0x6f,
|
||||
0xd0, 0x9b, 0x3e, 0x46, 0x81, 0x02, 0x7d, 0x80, 0xe2, 0x90, 0x9c, 0xd1, 0x8c, 0x25, 0xff, 0xf4,
|
||||
0xe7, 0x6e, 0xf8, 0x9d, 0xff, 0x43, 0x9e, 0xc3, 0xc3, 0x81, 0x2d, 0xa9, 0x18, 0x8d, 0x63, 0x26,
|
||||
0x25, 0x1d, 0x30, 0xe9, 0x07, 0x11, 0x67, 0x89, 0x92, 0x4c, 0x9c, 0x32, 0xe1, 0xf7, 0x05, 0x67,
|
||||
0x49, 0x28, 0xdb, 0x23, 0x91, 0xaa, 0xb4, 0xe5, 0x94, 0x39, 0x7b, 0x54, 0x32, 0x43, 0x71, 0xff,
|
||||
0x56, 0x81, 0xf5, 0xdd, 0x43, 0x39, 0xd8, 0xd5, 0xc2, 0xfb, 0x5a, 0xea, 0x50, 0x0e, 0x88, 0x03,
|
||||
0x2b, 0x5a, 0x86, 0x87, 0x4e, 0x65, 0xb3, 0xb2, 0xb5, 0xec, 0x65, 0x4b, 0xf2, 0x23, 0xb8, 0x16,
|
||||
0x0c, 0xa9, 0xf2, 0x59, 0xa2, 0xc4, 0xc4, 0x57, 0x93, 0x11, 0x73, 0xaa, 0x9b, 0x95, 0xad, 0x25,
|
||||
0xaf, 0x89, 0xf0, 0x6b, 0x44, 0x8f, 0x27, 0x23, 0x86, 0x1a, 0xac, 0x41, 0x67, 0x61, 0xb3, 0xb2,
|
||||
0xd5, 0xf0, 0xb2, 0x25, 0x79, 0x0e, 0x8e, 0x50, 0x3c, 0x66, 0xcf, 0xb6, 0x7d, 0xeb, 0x2d, 0xae,
|
||||
0xa4, 0xa2, 0xf1, 0xc8, 0x59, 0xdc, 0xac, 0x6c, 0xad, 0x78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, 0x6f, 0xa9,
|
||||
0x1c, 0x22, 0x43, 0x44, 0xa5, 0xf2, 0xa3, 0x74, 0x90, 0xf6, 0xfb, 0xce, 0x27, 0xda, 0x0e, 0x20,
|
||||
0x74, 0xa0, 0x11, 0xf4, 0x23, 0x67, 0x48, 0x9c, 0xb6, 0xf1, 0x23, 0xa3, 0x27, 0xb8, 0x15, 0x9a,
|
||||
0x2c, 0x19, 0x4b, 0x7c, 0x93, 0x1a, 0xe7, 0xa7, 0x66, 0x2b, 0x10, 0xef, 0x32, 0x96, 0x7c, 0xad,
|
||||
0x51, 0x72, 0x07, 0x56, 0x83, 0x88, 0x26, 0xbe, 0xa0, 0xc9, 0x89, 0xb3, 0xad, 0x59, 0x6a, 0x08,
|
||||
0x78, 0x34, 0x39, 0x41, 0xa2, 0xde, 0x51, 0x9d, 0x8c, 0xcf, 0x4c, 0x13, 0x46, 0x40, 0xa7, 0x62,
|
||||
0x03, 0x96, 0xf1, 0x9b, 0x87, 0xce, 0x73, 0x1d, 0xa3, 0x5d, 0xe5, 0x87, 0x25, 0xa4, 0x8a, 0xfa,
|
||||
0xbd, 0x28, 0xed, 0x39, 0x2f, 0x74, 0x7c, 0xfa, 0xb0, 0x60, 0x7b, 0x7d, 0x15, 0xa5, 0x3d, 0xb2,
|
||||
0x67, 0xed, 0x22, 0x97, 0xf3, 0x72, 0xb3, 0xb2, 0x55, 0xdf, 0x7e, 0x7c, 0x71, 0x1d, 0xb4, 0x77,
|
||||
0x23, 0x9a, 0xa0, 0xbc, 0x71, 0x50, 0x37, 0xea, 0xdb, 0xa0, 0xbf, 0x7d, 0x45, 0x07, 0xce, 0x8e,
|
||||
0xf6, 0x6f, 0x05, 0xd7, 0xc7, 0x74, 0x40, 0xf6, 0xa1, 0x29, 0x78, 0x80, 0xbd, 0x8d, 0x49, 0x96,
|
||||
0x04, 0xcc, 0x79, 0xa3, 0x8b, 0xed, 0xc1, 0x25, 0x46, 0xde, 0x7d, 0xf0, 0x1a, 0x28, 0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0x29, 0x8d, 0xc6, 0x59,
|
||||
0xa3, 0x36, 0x0b, 0x77, 0x6f, 0x76, 0x1e, 0x3e, 0x12, 0x69, 0x9f, 0x47, 0xac, 0x93, 0xf4, 0xd3,
|
||||
0x62, 0xa1, 0x9a, 0xbe, 0x69, 0xbb, 0x68, 0x33, 0x7f, 0xe5, 0x22, 0xe8, 0xfe, 0xa5, 0x5a, 0x9c,
|
||||
0x34, 0x66, 0xd4, 0x5c, 0xed, 0x19, 0x37, 0x6b, 0xab, 0x3a, 0xc7, 0x16, 0x1e, 0x34, 0x7c, 0xbe,
|
||||
0xfa, 0x81, 0x60, 0x78, 0x41, 0xdb, 0x5e, 0x5c, 0x47, 0x6c, 0xd7, 0x40, 0x58, 0x8f, 0x82, 0xd1,
|
||||
0xc8, 0xd4, 0xe3, 0xa2, 0xa9, 0x47, 0x04, 0x74, 0x3d, 0x62, 0x25, 0x73, 0x35, 0x31, 0xc4, 0x25,
|
||||
0x43, 0x44, 0x20, 0xeb, 0x5b, 0xa6, 0xd3, 0x6a, 0xea, 0xb2, 0xa6, 0xae, 0x6a, 0x44, 0x93, 0x1f,
|
||||
0x40, 0x43, 0x1f, 0x33, 0x61, 0xc5, 0x57, 0x34, 0x43, 0xdd, 0x62, 0x9a, 0xa5, 0x05, 0xb5, 0x21,
|
||||
0xa3, 0xa1, 0x6e, 0x25, 0x35, 0xa3, 0x3d, 0x5b, 0xeb, 0x29, 0x6e, 0x1c, 0xc7, 0x54, 0x4c, 0x9c,
|
||||
0x55, 0x53, 0x85, 0x76, 0xe9, 0xfe, 0xa6, 0x38, 0xee, 0x9a, 0x30, 0x8a, 0xb3, 0xfd, 0x05, 0xf3,
|
||||
0xdf, 0x5d, 0x58, 0xd5, 0xa7, 0xa1, 0x70, 0x07, 0x4f, 0x01, 0xf2, 0x18, 0xae, 0x95, 0x73, 0x6a,
|
||||
0x06, 0xde, 0x65, 0x6f, 0xad, 0x94, 0x54, 0xe9, 0x7e, 0x03, 0x8f, 0x2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 0x2d, 0xbd, 0xad, 0xfc, 0xb6, 0xf2, 0x83, 0x7f, 0x07, 0x00,
|
||||
0x00, 0xff, 0xff, 0xc5, 0x50, 0x67, 0x9b, 0xd4, 0x17, 0x00, 0x00,
|
||||
}
|
||||
|
||||
680
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/client_server_login.pb.go
generated
vendored
680
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/client_server_login.pb.go
generated
vendored
@@ -52,7 +52,7 @@ func (m *CMsgClientHeartBeat) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_CMsgClientHeartBeat proto.InternalMessageInfo
|
||||
|
||||
type CMsgClientServerTimestampRequest struct {
|
||||
ClientRequestTimestamp *uint64 `protobuf:"varint,1,opt,name=client_request_timestamp" json:"client_request_timestamp,omitempty"`
|
||||
ClientRequestTimestamp *uint64 `protobuf:"varint,1,opt,name=client_request_timestamp,json=clientRequestTimestamp" json:"client_request_timestamp,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -91,8 +91,8 @@ func (m *CMsgClientServerTimestampRequest) GetClientRequestTimestamp() uint64 {
|
||||
}
|
||||
|
||||
type CMsgClientServerTimestampResponse struct {
|
||||
ClientRequestTimestamp *uint64 `protobuf:"varint,1,opt,name=client_request_timestamp" json:"client_request_timestamp,omitempty"`
|
||||
ServerTimestampMs *uint64 `protobuf:"varint,2,opt,name=server_timestamp_ms" json:"server_timestamp_ms,omitempty"`
|
||||
ClientRequestTimestamp *uint64 `protobuf:"varint,1,opt,name=client_request_timestamp,json=clientRequestTimestamp" json:"client_request_timestamp,omitempty"`
|
||||
ServerTimestampMs *uint64 `protobuf:"varint,2,opt,name=server_timestamp_ms,json=serverTimestampMs" json:"server_timestamp_ms,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -137,66 +137,141 @@ func (m *CMsgClientServerTimestampResponse) GetServerTimestampMs() uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
type CMsgClientSecret struct {
|
||||
Version *uint32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
|
||||
Appid *uint32 `protobuf:"varint,2,opt,name=appid" json:"appid,omitempty"`
|
||||
Deviceid *uint32 `protobuf:"varint,3,opt,name=deviceid" json:"deviceid,omitempty"`
|
||||
Nonce *uint64 `protobuf:"fixed64,4,opt,name=nonce" json:"nonce,omitempty"`
|
||||
Hmac []byte `protobuf:"bytes,5,opt,name=hmac" json:"hmac,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CMsgClientSecret) Reset() { *m = CMsgClientSecret{} }
|
||||
func (m *CMsgClientSecret) String() string { return proto.CompactTextString(m) }
|
||||
func (*CMsgClientSecret) ProtoMessage() {}
|
||||
func (*CMsgClientSecret) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c98cb07f62c057af, []int{3}
|
||||
}
|
||||
|
||||
func (m *CMsgClientSecret) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CMsgClientSecret.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CMsgClientSecret) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CMsgClientSecret.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CMsgClientSecret) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CMsgClientSecret.Merge(m, src)
|
||||
}
|
||||
func (m *CMsgClientSecret) XXX_Size() int {
|
||||
return xxx_messageInfo_CMsgClientSecret.Size(m)
|
||||
}
|
||||
func (m *CMsgClientSecret) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CMsgClientSecret.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CMsgClientSecret proto.InternalMessageInfo
|
||||
|
||||
func (m *CMsgClientSecret) GetVersion() uint32 {
|
||||
if m != nil && m.Version != nil {
|
||||
return *m.Version
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientSecret) GetAppid() uint32 {
|
||||
if m != nil && m.Appid != nil {
|
||||
return *m.Appid
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientSecret) GetDeviceid() uint32 {
|
||||
if m != nil && m.Deviceid != nil {
|
||||
return *m.Deviceid
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientSecret) GetNonce() uint64 {
|
||||
if m != nil && m.Nonce != nil {
|
||||
return *m.Nonce
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientSecret) GetHmac() []byte {
|
||||
if m != nil {
|
||||
return m.Hmac
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CMsgClientLogon struct {
|
||||
ProtocolVersion *uint32 `protobuf:"varint,1,opt,name=protocol_version" json:"protocol_version,omitempty"`
|
||||
ObfustucatedPrivateIp *uint32 `protobuf:"varint,2,opt,name=obfustucated_private_ip" json:"obfustucated_private_ip,omitempty"`
|
||||
CellId *uint32 `protobuf:"varint,3,opt,name=cell_id" json:"cell_id,omitempty"`
|
||||
LastSessionId *uint32 `protobuf:"varint,4,opt,name=last_session_id" json:"last_session_id,omitempty"`
|
||||
ClientPackageVersion *uint32 `protobuf:"varint,5,opt,name=client_package_version" json:"client_package_version,omitempty"`
|
||||
ClientLanguage *string `protobuf:"bytes,6,opt,name=client_language" json:"client_language,omitempty"`
|
||||
ClientOsType *uint32 `protobuf:"varint,7,opt,name=client_os_type" json:"client_os_type,omitempty"`
|
||||
ShouldRememberPassword *bool `protobuf:"varint,8,opt,name=should_remember_password,def=0" json:"should_remember_password,omitempty"`
|
||||
WineVersion *string `protobuf:"bytes,9,opt,name=wine_version" json:"wine_version,omitempty"`
|
||||
PingMsFromCellSearch *uint32 `protobuf:"varint,10,opt,name=ping_ms_from_cell_search" json:"ping_ms_from_cell_search,omitempty"`
|
||||
PublicIp *uint32 `protobuf:"varint,20,opt,name=public_ip" json:"public_ip,omitempty"`
|
||||
QosLevel *uint32 `protobuf:"varint,21,opt,name=qos_level" json:"qos_level,omitempty"`
|
||||
ClientSuppliedSteamId *uint64 `protobuf:"fixed64,22,opt,name=client_supplied_steam_id" json:"client_supplied_steam_id,omitempty"`
|
||||
MachineId []byte `protobuf:"bytes,30,opt,name=machine_id" json:"machine_id,omitempty"`
|
||||
LauncherType *uint32 `protobuf:"varint,31,opt,name=launcher_type,def=0" json:"launcher_type,omitempty"`
|
||||
UiMode *uint32 `protobuf:"varint,32,opt,name=ui_mode,def=0" json:"ui_mode,omitempty"`
|
||||
ChatMode *uint32 `protobuf:"varint,33,opt,name=chat_mode,def=0" json:"chat_mode,omitempty"`
|
||||
Steam2AuthTicket []byte `protobuf:"bytes,41,opt,name=steam2_auth_ticket" json:"steam2_auth_ticket,omitempty"`
|
||||
EmailAddress *string `protobuf:"bytes,42,opt,name=email_address" json:"email_address,omitempty"`
|
||||
Rtime32AccountCreation *uint32 `protobuf:"fixed32,43,opt,name=rtime32_account_creation" json:"rtime32_account_creation,omitempty"`
|
||||
AccountName *string `protobuf:"bytes,50,opt,name=account_name" json:"account_name,omitempty"`
|
||||
Password *string `protobuf:"bytes,51,opt,name=password" json:"password,omitempty"`
|
||||
GameServerToken *string `protobuf:"bytes,52,opt,name=game_server_token" json:"game_server_token,omitempty"`
|
||||
LoginKey *string `protobuf:"bytes,60,opt,name=login_key" json:"login_key,omitempty"`
|
||||
WasConvertedDeprecatedMsg *bool `protobuf:"varint,70,opt,name=was_converted_deprecated_msg,def=0" json:"was_converted_deprecated_msg,omitempty"`
|
||||
AnonUserTargetAccountName *string `protobuf:"bytes,80,opt,name=anon_user_target_account_name" json:"anon_user_target_account_name,omitempty"`
|
||||
ResolvedUserSteamId *uint64 `protobuf:"fixed64,81,opt,name=resolved_user_steam_id" json:"resolved_user_steam_id,omitempty"`
|
||||
EresultSentryfile *int32 `protobuf:"varint,82,opt,name=eresult_sentryfile" json:"eresult_sentryfile,omitempty"`
|
||||
ShaSentryfile []byte `protobuf:"bytes,83,opt,name=sha_sentryfile" json:"sha_sentryfile,omitempty"`
|
||||
AuthCode *string `protobuf:"bytes,84,opt,name=auth_code" json:"auth_code,omitempty"`
|
||||
OtpType *int32 `protobuf:"varint,85,opt,name=otp_type" json:"otp_type,omitempty"`
|
||||
OtpValue *uint32 `protobuf:"varint,86,opt,name=otp_value" json:"otp_value,omitempty"`
|
||||
OtpIdentifier *string `protobuf:"bytes,87,opt,name=otp_identifier" json:"otp_identifier,omitempty"`
|
||||
Steam2TicketRequest *bool `protobuf:"varint,88,opt,name=steam2_ticket_request" json:"steam2_ticket_request,omitempty"`
|
||||
SonyPsnTicket []byte `protobuf:"bytes,90,opt,name=sony_psn_ticket" json:"sony_psn_ticket,omitempty"`
|
||||
SonyPsnServiceId *string `protobuf:"bytes,91,opt,name=sony_psn_service_id" json:"sony_psn_service_id,omitempty"`
|
||||
CreateNewPsnLinkedAccountIfNeeded *bool `protobuf:"varint,92,opt,name=create_new_psn_linked_account_if_needed,def=0" json:"create_new_psn_linked_account_if_needed,omitempty"`
|
||||
SonyPsnName *string `protobuf:"bytes,93,opt,name=sony_psn_name" json:"sony_psn_name,omitempty"`
|
||||
GameServerAppId *int32 `protobuf:"varint,94,opt,name=game_server_app_id" json:"game_server_app_id,omitempty"`
|
||||
SteamguardDontRememberComputer *bool `protobuf:"varint,95,opt,name=steamguard_dont_remember_computer" json:"steamguard_dont_remember_computer,omitempty"`
|
||||
MachineName *string `protobuf:"bytes,96,opt,name=machine_name" json:"machine_name,omitempty"`
|
||||
MachineNameUserchosen *string `protobuf:"bytes,97,opt,name=machine_name_userchosen" json:"machine_name_userchosen,omitempty"`
|
||||
CountryOverride *string `protobuf:"bytes,98,opt,name=country_override" json:"country_override,omitempty"`
|
||||
IsSteamBox *bool `protobuf:"varint,99,opt,name=is_steam_box" json:"is_steam_box,omitempty"`
|
||||
ClientInstanceId *uint64 `protobuf:"varint,100,opt,name=client_instance_id" json:"client_instance_id,omitempty"`
|
||||
TwoFactorCode *string `protobuf:"bytes,101,opt,name=two_factor_code" json:"two_factor_code,omitempty"`
|
||||
SupportsRateLimitResponse *bool `protobuf:"varint,102,opt,name=supports_rate_limit_response" json:"supports_rate_limit_response,omitempty"`
|
||||
WebLogonNonce *string `protobuf:"bytes,103,opt,name=web_logon_nonce" json:"web_logon_nonce,omitempty"`
|
||||
PriorityReason *int32 `protobuf:"varint,104,opt,name=priority_reason" json:"priority_reason,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
ProtocolVersion *uint32 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion" json:"protocol_version,omitempty"`
|
||||
DeprecatedObfustucatedPrivateIp *uint32 `protobuf:"varint,2,opt,name=deprecated_obfustucated_private_ip,json=deprecatedObfustucatedPrivateIp" json:"deprecated_obfustucated_private_ip,omitempty"`
|
||||
CellId *uint32 `protobuf:"varint,3,opt,name=cell_id,json=cellId" json:"cell_id,omitempty"`
|
||||
LastSessionId *uint32 `protobuf:"varint,4,opt,name=last_session_id,json=lastSessionId" json:"last_session_id,omitempty"`
|
||||
ClientPackageVersion *uint32 `protobuf:"varint,5,opt,name=client_package_version,json=clientPackageVersion" json:"client_package_version,omitempty"`
|
||||
ClientLanguage *string `protobuf:"bytes,6,opt,name=client_language,json=clientLanguage" json:"client_language,omitempty"`
|
||||
ClientOsType *uint32 `protobuf:"varint,7,opt,name=client_os_type,json=clientOsType" json:"client_os_type,omitempty"`
|
||||
ShouldRememberPassword *bool `protobuf:"varint,8,opt,name=should_remember_password,json=shouldRememberPassword,def=0" json:"should_remember_password,omitempty"`
|
||||
WineVersion *string `protobuf:"bytes,9,opt,name=wine_version,json=wineVersion" json:"wine_version,omitempty"`
|
||||
Deprecated_10 *uint32 `protobuf:"varint,10,opt,name=deprecated_10,json=deprecated10" json:"deprecated_10,omitempty"`
|
||||
ObfuscatedPrivateIp *CMsgIPAddress `protobuf:"bytes,11,opt,name=obfuscated_private_ip,json=obfuscatedPrivateIp" json:"obfuscated_private_ip,omitempty"`
|
||||
DeprecatedPublicIp *uint32 `protobuf:"varint,20,opt,name=deprecated_public_ip,json=deprecatedPublicIp" json:"deprecated_public_ip,omitempty"`
|
||||
QosLevel *uint32 `protobuf:"varint,21,opt,name=qos_level,json=qosLevel" json:"qos_level,omitempty"`
|
||||
ClientSuppliedSteamId *uint64 `protobuf:"fixed64,22,opt,name=client_supplied_steam_id,json=clientSuppliedSteamId" json:"client_supplied_steam_id,omitempty"`
|
||||
PublicIp *CMsgIPAddress `protobuf:"bytes,23,opt,name=public_ip,json=publicIp" json:"public_ip,omitempty"`
|
||||
MachineId []byte `protobuf:"bytes,30,opt,name=machine_id,json=machineId" json:"machine_id,omitempty"`
|
||||
LauncherType *uint32 `protobuf:"varint,31,opt,name=launcher_type,json=launcherType,def=0" json:"launcher_type,omitempty"`
|
||||
UiMode *uint32 `protobuf:"varint,32,opt,name=ui_mode,json=uiMode,def=0" json:"ui_mode,omitempty"`
|
||||
ChatMode *uint32 `protobuf:"varint,33,opt,name=chat_mode,json=chatMode,def=0" json:"chat_mode,omitempty"`
|
||||
Steam2AuthTicket []byte `protobuf:"bytes,41,opt,name=steam2_auth_ticket,json=steam2AuthTicket" json:"steam2_auth_ticket,omitempty"`
|
||||
EmailAddress *string `protobuf:"bytes,42,opt,name=email_address,json=emailAddress" json:"email_address,omitempty"`
|
||||
Rtime32AccountCreation *uint32 `protobuf:"fixed32,43,opt,name=rtime32_account_creation,json=rtime32AccountCreation" json:"rtime32_account_creation,omitempty"`
|
||||
AccountName *string `protobuf:"bytes,50,opt,name=account_name,json=accountName" json:"account_name,omitempty"`
|
||||
Password *string `protobuf:"bytes,51,opt,name=password" json:"password,omitempty"`
|
||||
GameServerToken *string `protobuf:"bytes,52,opt,name=game_server_token,json=gameServerToken" json:"game_server_token,omitempty"`
|
||||
LoginKey *string `protobuf:"bytes,60,opt,name=login_key,json=loginKey" json:"login_key,omitempty"`
|
||||
WasConvertedDeprecatedMsg *bool `protobuf:"varint,70,opt,name=was_converted_deprecated_msg,json=wasConvertedDeprecatedMsg,def=0" json:"was_converted_deprecated_msg,omitempty"`
|
||||
AnonUserTargetAccountName *string `protobuf:"bytes,80,opt,name=anon_user_target_account_name,json=anonUserTargetAccountName" json:"anon_user_target_account_name,omitempty"`
|
||||
ResolvedUserSteamId *uint64 `protobuf:"fixed64,81,opt,name=resolved_user_steam_id,json=resolvedUserSteamId" json:"resolved_user_steam_id,omitempty"`
|
||||
EresultSentryfile *int32 `protobuf:"varint,82,opt,name=eresult_sentryfile,json=eresultSentryfile" json:"eresult_sentryfile,omitempty"`
|
||||
ShaSentryfile []byte `protobuf:"bytes,83,opt,name=sha_sentryfile,json=shaSentryfile" json:"sha_sentryfile,omitempty"`
|
||||
AuthCode *string `protobuf:"bytes,84,opt,name=auth_code,json=authCode" json:"auth_code,omitempty"`
|
||||
OtpType *int32 `protobuf:"varint,85,opt,name=otp_type,json=otpType" json:"otp_type,omitempty"`
|
||||
OtpValue *uint32 `protobuf:"varint,86,opt,name=otp_value,json=otpValue" json:"otp_value,omitempty"`
|
||||
OtpIdentifier *string `protobuf:"bytes,87,opt,name=otp_identifier,json=otpIdentifier" json:"otp_identifier,omitempty"`
|
||||
Steam2TicketRequest *bool `protobuf:"varint,88,opt,name=steam2_ticket_request,json=steam2TicketRequest" json:"steam2_ticket_request,omitempty"`
|
||||
SonyPsnTicket []byte `protobuf:"bytes,90,opt,name=sony_psn_ticket,json=sonyPsnTicket" json:"sony_psn_ticket,omitempty"`
|
||||
SonyPsnServiceId *string `protobuf:"bytes,91,opt,name=sony_psn_service_id,json=sonyPsnServiceId" json:"sony_psn_service_id,omitempty"`
|
||||
CreateNewPsnLinkedAccountIfNeeded *bool `protobuf:"varint,92,opt,name=create_new_psn_linked_account_if_needed,json=createNewPsnLinkedAccountIfNeeded,def=0" json:"create_new_psn_linked_account_if_needed,omitempty"`
|
||||
SonyPsnName *string `protobuf:"bytes,93,opt,name=sony_psn_name,json=sonyPsnName" json:"sony_psn_name,omitempty"`
|
||||
GameServerAppId *int32 `protobuf:"varint,94,opt,name=game_server_app_id,json=gameServerAppId" json:"game_server_app_id,omitempty"`
|
||||
SteamguardDontRememberComputer *bool `protobuf:"varint,95,opt,name=steamguard_dont_remember_computer,json=steamguardDontRememberComputer" json:"steamguard_dont_remember_computer,omitempty"`
|
||||
MachineName *string `protobuf:"bytes,96,opt,name=machine_name,json=machineName" json:"machine_name,omitempty"`
|
||||
MachineNameUserchosen *string `protobuf:"bytes,97,opt,name=machine_name_userchosen,json=machineNameUserchosen" json:"machine_name_userchosen,omitempty"`
|
||||
CountryOverride *string `protobuf:"bytes,98,opt,name=country_override,json=countryOverride" json:"country_override,omitempty"`
|
||||
IsSteamBox *bool `protobuf:"varint,99,opt,name=is_steam_box,json=isSteamBox" json:"is_steam_box,omitempty"`
|
||||
ClientInstanceId *uint64 `protobuf:"varint,100,opt,name=client_instance_id,json=clientInstanceId" json:"client_instance_id,omitempty"`
|
||||
TwoFactorCode *string `protobuf:"bytes,101,opt,name=two_factor_code,json=twoFactorCode" json:"two_factor_code,omitempty"`
|
||||
SupportsRateLimitResponse *bool `protobuf:"varint,102,opt,name=supports_rate_limit_response,json=supportsRateLimitResponse" json:"supports_rate_limit_response,omitempty"`
|
||||
WebLogonNonce *string `protobuf:"bytes,103,opt,name=web_logon_nonce,json=webLogonNonce" json:"web_logon_nonce,omitempty"`
|
||||
PriorityReason *int32 `protobuf:"varint,104,opt,name=priority_reason,json=priorityReason" json:"priority_reason,omitempty"`
|
||||
EmbeddedClientSecret *CMsgClientSecret `protobuf:"bytes,105,opt,name=embedded_client_secret,json=embeddedClientSecret" json:"embedded_client_secret,omitempty"`
|
||||
DisablePartnerAutogrants *bool `protobuf:"varint,106,opt,name=disable_partner_autogrants,json=disablePartnerAutogrants" json:"disable_partner_autogrants,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogon) Reset() { *m = CMsgClientLogon{} }
|
||||
func (m *CMsgClientLogon) String() string { return proto.CompactTextString(m) }
|
||||
func (*CMsgClientLogon) ProtoMessage() {}
|
||||
func (*CMsgClientLogon) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c98cb07f62c057af, []int{3}
|
||||
return fileDescriptor_c98cb07f62c057af, []int{4}
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogon) XXX_Unmarshal(b []byte) error {
|
||||
@@ -231,9 +306,9 @@ func (m *CMsgClientLogon) GetProtocolVersion() uint32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogon) GetObfustucatedPrivateIp() uint32 {
|
||||
if m != nil && m.ObfustucatedPrivateIp != nil {
|
||||
return *m.ObfustucatedPrivateIp
|
||||
func (m *CMsgClientLogon) GetDeprecatedObfustucatedPrivateIp() uint32 {
|
||||
if m != nil && m.DeprecatedObfustucatedPrivateIp != nil {
|
||||
return *m.DeprecatedObfustucatedPrivateIp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -287,16 +362,23 @@ func (m *CMsgClientLogon) GetWineVersion() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogon) GetPingMsFromCellSearch() uint32 {
|
||||
if m != nil && m.PingMsFromCellSearch != nil {
|
||||
return *m.PingMsFromCellSearch
|
||||
func (m *CMsgClientLogon) GetDeprecated_10() uint32 {
|
||||
if m != nil && m.Deprecated_10 != nil {
|
||||
return *m.Deprecated_10
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogon) GetPublicIp() uint32 {
|
||||
if m != nil && m.PublicIp != nil {
|
||||
return *m.PublicIp
|
||||
func (m *CMsgClientLogon) GetObfuscatedPrivateIp() *CMsgIPAddress {
|
||||
if m != nil {
|
||||
return m.ObfuscatedPrivateIp
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogon) GetDeprecatedPublicIp() uint32 {
|
||||
if m != nil && m.DeprecatedPublicIp != nil {
|
||||
return *m.DeprecatedPublicIp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -315,6 +397,13 @@ func (m *CMsgClientLogon) GetClientSuppliedSteamId() uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogon) GetPublicIp() *CMsgIPAddress {
|
||||
if m != nil {
|
||||
return m.PublicIp
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogon) GetMachineId() []byte {
|
||||
if m != nil {
|
||||
return m.MachineId
|
||||
@@ -567,40 +656,55 @@ func (m *CMsgClientLogon) GetPriorityReason() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogon) GetEmbeddedClientSecret() *CMsgClientSecret {
|
||||
if m != nil {
|
||||
return m.EmbeddedClientSecret
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogon) GetDisablePartnerAutogrants() bool {
|
||||
if m != nil && m.DisablePartnerAutogrants != nil {
|
||||
return *m.DisablePartnerAutogrants
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type CMsgClientLogonResponse struct {
|
||||
Eresult *int32 `protobuf:"varint,1,opt,name=eresult,def=2" json:"eresult,omitempty"`
|
||||
OutOfGameHeartbeatSeconds *int32 `protobuf:"varint,2,opt,name=out_of_game_heartbeat_seconds" json:"out_of_game_heartbeat_seconds,omitempty"`
|
||||
InGameHeartbeatSeconds *int32 `protobuf:"varint,3,opt,name=in_game_heartbeat_seconds" json:"in_game_heartbeat_seconds,omitempty"`
|
||||
PublicIp *uint32 `protobuf:"varint,4,opt,name=public_ip" json:"public_ip,omitempty"`
|
||||
Rtime32ServerTime *uint32 `protobuf:"fixed32,5,opt,name=rtime32_server_time" json:"rtime32_server_time,omitempty"`
|
||||
AccountFlags *uint32 `protobuf:"varint,6,opt,name=account_flags" json:"account_flags,omitempty"`
|
||||
CellId *uint32 `protobuf:"varint,7,opt,name=cell_id" json:"cell_id,omitempty"`
|
||||
EmailDomain *string `protobuf:"bytes,8,opt,name=email_domain" json:"email_domain,omitempty"`
|
||||
Steam2Ticket []byte `protobuf:"bytes,9,opt,name=steam2_ticket" json:"steam2_ticket,omitempty"`
|
||||
EresultExtended *int32 `protobuf:"varint,10,opt,name=eresult_extended" json:"eresult_extended,omitempty"`
|
||||
WebapiAuthenticateUserNonce *string `protobuf:"bytes,11,opt,name=webapi_authenticate_user_nonce" json:"webapi_authenticate_user_nonce,omitempty"`
|
||||
CellIdPingThreshold *uint32 `protobuf:"varint,12,opt,name=cell_id_ping_threshold" json:"cell_id_ping_threshold,omitempty"`
|
||||
UsePics *bool `protobuf:"varint,13,opt,name=use_pics" json:"use_pics,omitempty"`
|
||||
VanityUrl *string `protobuf:"bytes,14,opt,name=vanity_url" json:"vanity_url,omitempty"`
|
||||
ClientSuppliedSteamid *uint64 `protobuf:"fixed64,20,opt,name=client_supplied_steamid" json:"client_supplied_steamid,omitempty"`
|
||||
IpCountryCode *string `protobuf:"bytes,21,opt,name=ip_country_code" json:"ip_country_code,omitempty"`
|
||||
ParentalSettings []byte `protobuf:"bytes,22,opt,name=parental_settings" json:"parental_settings,omitempty"`
|
||||
ParentalSettingSignature []byte `protobuf:"bytes,23,opt,name=parental_setting_signature" json:"parental_setting_signature,omitempty"`
|
||||
CountLoginfailuresToMigrate *int32 `protobuf:"varint,24,opt,name=count_loginfailures_to_migrate" json:"count_loginfailures_to_migrate,omitempty"`
|
||||
CountDisconnectsToMigrate *int32 `protobuf:"varint,25,opt,name=count_disconnects_to_migrate" json:"count_disconnects_to_migrate,omitempty"`
|
||||
OgsDataReportTimeWindow *int32 `protobuf:"varint,26,opt,name=ogs_data_report_time_window" json:"ogs_data_report_time_window,omitempty"`
|
||||
ClientInstanceId *uint64 `protobuf:"varint,27,opt,name=client_instance_id" json:"client_instance_id,omitempty"`
|
||||
ForceClientUpdateCheck *bool `protobuf:"varint,28,opt,name=force_client_update_check" json:"force_client_update_check,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Eresult *int32 `protobuf:"varint,1,opt,name=eresult,def=2" json:"eresult,omitempty"`
|
||||
OutOfGameHeartbeatSeconds *int32 `protobuf:"varint,2,opt,name=out_of_game_heartbeat_seconds,json=outOfGameHeartbeatSeconds" json:"out_of_game_heartbeat_seconds,omitempty"`
|
||||
InGameHeartbeatSeconds *int32 `protobuf:"varint,3,opt,name=in_game_heartbeat_seconds,json=inGameHeartbeatSeconds" json:"in_game_heartbeat_seconds,omitempty"`
|
||||
DeprecatedPublicIp *uint32 `protobuf:"varint,4,opt,name=deprecated_public_ip,json=deprecatedPublicIp" json:"deprecated_public_ip,omitempty"`
|
||||
Rtime32ServerTime *uint32 `protobuf:"fixed32,5,opt,name=rtime32_server_time,json=rtime32ServerTime" json:"rtime32_server_time,omitempty"`
|
||||
AccountFlags *uint32 `protobuf:"varint,6,opt,name=account_flags,json=accountFlags" json:"account_flags,omitempty"`
|
||||
CellId *uint32 `protobuf:"varint,7,opt,name=cell_id,json=cellId" json:"cell_id,omitempty"`
|
||||
EmailDomain *string `protobuf:"bytes,8,opt,name=email_domain,json=emailDomain" json:"email_domain,omitempty"`
|
||||
Steam2Ticket []byte `protobuf:"bytes,9,opt,name=steam2_ticket,json=steam2Ticket" json:"steam2_ticket,omitempty"`
|
||||
EresultExtended *int32 `protobuf:"varint,10,opt,name=eresult_extended,json=eresultExtended" json:"eresult_extended,omitempty"`
|
||||
WebapiAuthenticateUserNonce *string `protobuf:"bytes,11,opt,name=webapi_authenticate_user_nonce,json=webapiAuthenticateUserNonce" json:"webapi_authenticate_user_nonce,omitempty"`
|
||||
CellIdPingThreshold *uint32 `protobuf:"varint,12,opt,name=cell_id_ping_threshold,json=cellIdPingThreshold" json:"cell_id_ping_threshold,omitempty"`
|
||||
DeprecatedUsePics *bool `protobuf:"varint,13,opt,name=deprecated_use_pics,json=deprecatedUsePics" json:"deprecated_use_pics,omitempty"`
|
||||
VanityUrl *string `protobuf:"bytes,14,opt,name=vanity_url,json=vanityUrl" json:"vanity_url,omitempty"`
|
||||
PublicIp *CMsgIPAddress `protobuf:"bytes,15,opt,name=public_ip,json=publicIp" json:"public_ip,omitempty"`
|
||||
ClientSuppliedSteamid *uint64 `protobuf:"fixed64,20,opt,name=client_supplied_steamid,json=clientSuppliedSteamid" json:"client_supplied_steamid,omitempty"`
|
||||
IpCountryCode *string `protobuf:"bytes,21,opt,name=ip_country_code,json=ipCountryCode" json:"ip_country_code,omitempty"`
|
||||
ParentalSettings []byte `protobuf:"bytes,22,opt,name=parental_settings,json=parentalSettings" json:"parental_settings,omitempty"`
|
||||
ParentalSettingSignature []byte `protobuf:"bytes,23,opt,name=parental_setting_signature,json=parentalSettingSignature" json:"parental_setting_signature,omitempty"`
|
||||
CountLoginfailuresToMigrate *int32 `protobuf:"varint,24,opt,name=count_loginfailures_to_migrate,json=countLoginfailuresToMigrate" json:"count_loginfailures_to_migrate,omitempty"`
|
||||
CountDisconnectsToMigrate *int32 `protobuf:"varint,25,opt,name=count_disconnects_to_migrate,json=countDisconnectsToMigrate" json:"count_disconnects_to_migrate,omitempty"`
|
||||
OgsDataReportTimeWindow *int32 `protobuf:"varint,26,opt,name=ogs_data_report_time_window,json=ogsDataReportTimeWindow" json:"ogs_data_report_time_window,omitempty"`
|
||||
ClientInstanceId *uint64 `protobuf:"varint,27,opt,name=client_instance_id,json=clientInstanceId" json:"client_instance_id,omitempty"`
|
||||
ForceClientUpdateCheck *bool `protobuf:"varint,28,opt,name=force_client_update_check,json=forceClientUpdateCheck" json:"force_client_update_check,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogonResponse) Reset() { *m = CMsgClientLogonResponse{} }
|
||||
func (m *CMsgClientLogonResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*CMsgClientLogonResponse) ProtoMessage() {}
|
||||
func (*CMsgClientLogonResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c98cb07f62c057af, []int{4}
|
||||
return fileDescriptor_c98cb07f62c057af, []int{5}
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogonResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -644,9 +748,9 @@ func (m *CMsgClientLogonResponse) GetInGameHeartbeatSeconds() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogonResponse) GetPublicIp() uint32 {
|
||||
if m != nil && m.PublicIp != nil {
|
||||
return *m.PublicIp
|
||||
func (m *CMsgClientLogonResponse) GetDeprecatedPublicIp() uint32 {
|
||||
if m != nil && m.DeprecatedPublicIp != nil {
|
||||
return *m.DeprecatedPublicIp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -707,9 +811,9 @@ func (m *CMsgClientLogonResponse) GetCellIdPingThreshold() uint32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogonResponse) GetUsePics() bool {
|
||||
if m != nil && m.UsePics != nil {
|
||||
return *m.UsePics
|
||||
func (m *CMsgClientLogonResponse) GetDeprecatedUsePics() bool {
|
||||
if m != nil && m.DeprecatedUsePics != nil {
|
||||
return *m.DeprecatedUsePics
|
||||
}
|
||||
return false
|
||||
}
|
||||
@@ -721,6 +825,13 @@ func (m *CMsgClientLogonResponse) GetVanityUrl() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogonResponse) GetPublicIp() *CMsgIPAddress {
|
||||
if m != nil {
|
||||
return m.PublicIp
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogonResponse) GetClientSuppliedSteamid() uint64 {
|
||||
if m != nil && m.ClientSuppliedSteamid != nil {
|
||||
return *m.ClientSuppliedSteamid
|
||||
@@ -785,7 +896,7 @@ func (m *CMsgClientLogonResponse) GetForceClientUpdateCheck() bool {
|
||||
}
|
||||
|
||||
type CMsgClientRequestWebAPIAuthenticateUserNonce struct {
|
||||
TokenType *int32 `protobuf:"varint,1,opt,name=token_type,def=-1" json:"token_type,omitempty"`
|
||||
TokenType *int32 `protobuf:"varint,1,opt,name=token_type,json=tokenType,def=-1" json:"token_type,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -799,7 +910,7 @@ func (m *CMsgClientRequestWebAPIAuthenticateUserNonce) String() string {
|
||||
}
|
||||
func (*CMsgClientRequestWebAPIAuthenticateUserNonce) ProtoMessage() {}
|
||||
func (*CMsgClientRequestWebAPIAuthenticateUserNonce) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c98cb07f62c057af, []int{5}
|
||||
return fileDescriptor_c98cb07f62c057af, []int{6}
|
||||
}
|
||||
|
||||
func (m *CMsgClientRequestWebAPIAuthenticateUserNonce) XXX_Unmarshal(b []byte) error {
|
||||
@@ -831,8 +942,8 @@ func (m *CMsgClientRequestWebAPIAuthenticateUserNonce) GetTokenType() int32 {
|
||||
|
||||
type CMsgClientRequestWebAPIAuthenticateUserNonceResponse struct {
|
||||
Eresult *int32 `protobuf:"varint,1,opt,name=eresult,def=2" json:"eresult,omitempty"`
|
||||
WebapiAuthenticateUserNonce *string `protobuf:"bytes,11,opt,name=webapi_authenticate_user_nonce" json:"webapi_authenticate_user_nonce,omitempty"`
|
||||
TokenType *int32 `protobuf:"varint,3,opt,name=token_type,def=-1" json:"token_type,omitempty"`
|
||||
WebapiAuthenticateUserNonce *string `protobuf:"bytes,11,opt,name=webapi_authenticate_user_nonce,json=webapiAuthenticateUserNonce" json:"webapi_authenticate_user_nonce,omitempty"`
|
||||
TokenType *int32 `protobuf:"varint,3,opt,name=token_type,json=tokenType,def=-1" json:"token_type,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -846,7 +957,7 @@ func (m *CMsgClientRequestWebAPIAuthenticateUserNonceResponse) String() string {
|
||||
}
|
||||
func (*CMsgClientRequestWebAPIAuthenticateUserNonceResponse) ProtoMessage() {}
|
||||
func (*CMsgClientRequestWebAPIAuthenticateUserNonceResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c98cb07f62c057af, []int{6}
|
||||
return fileDescriptor_c98cb07f62c057af, []int{7}
|
||||
}
|
||||
|
||||
func (m *CMsgClientRequestWebAPIAuthenticateUserNonceResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -901,7 +1012,7 @@ func (m *CMsgClientLogOff) Reset() { *m = CMsgClientLogOff{} }
|
||||
func (m *CMsgClientLogOff) String() string { return proto.CompactTextString(m) }
|
||||
func (*CMsgClientLogOff) ProtoMessage() {}
|
||||
func (*CMsgClientLogOff) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c98cb07f62c057af, []int{7}
|
||||
return fileDescriptor_c98cb07f62c057af, []int{8}
|
||||
}
|
||||
|
||||
func (m *CMsgClientLogOff) XXX_Unmarshal(b []byte) error {
|
||||
@@ -933,7 +1044,7 @@ func (m *CMsgClientLoggedOff) Reset() { *m = CMsgClientLoggedOff{} }
|
||||
func (m *CMsgClientLoggedOff) String() string { return proto.CompactTextString(m) }
|
||||
func (*CMsgClientLoggedOff) ProtoMessage() {}
|
||||
func (*CMsgClientLoggedOff) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c98cb07f62c057af, []int{8}
|
||||
return fileDescriptor_c98cb07f62c057af, []int{9}
|
||||
}
|
||||
|
||||
func (m *CMsgClientLoggedOff) XXX_Unmarshal(b []byte) error {
|
||||
@@ -964,8 +1075,8 @@ func (m *CMsgClientLoggedOff) GetEresult() int32 {
|
||||
}
|
||||
|
||||
type CMsgClientNewLoginKey struct {
|
||||
UniqueId *uint32 `protobuf:"varint,1,opt,name=unique_id" json:"unique_id,omitempty"`
|
||||
LoginKey *string `protobuf:"bytes,2,opt,name=login_key" json:"login_key,omitempty"`
|
||||
UniqueId *uint32 `protobuf:"varint,1,opt,name=unique_id,json=uniqueId" json:"unique_id,omitempty"`
|
||||
LoginKey *string `protobuf:"bytes,2,opt,name=login_key,json=loginKey" json:"login_key,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -975,7 +1086,7 @@ func (m *CMsgClientNewLoginKey) Reset() { *m = CMsgClientNewLoginKey{} }
|
||||
func (m *CMsgClientNewLoginKey) String() string { return proto.CompactTextString(m) }
|
||||
func (*CMsgClientNewLoginKey) ProtoMessage() {}
|
||||
func (*CMsgClientNewLoginKey) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c98cb07f62c057af, []int{9}
|
||||
return fileDescriptor_c98cb07f62c057af, []int{10}
|
||||
}
|
||||
|
||||
func (m *CMsgClientNewLoginKey) XXX_Unmarshal(b []byte) error {
|
||||
@@ -1011,7 +1122,7 @@ func (m *CMsgClientNewLoginKey) GetLoginKey() string {
|
||||
}
|
||||
|
||||
type CMsgClientNewLoginKeyAccepted struct {
|
||||
UniqueId *uint32 `protobuf:"varint,1,opt,name=unique_id" json:"unique_id,omitempty"`
|
||||
UniqueId *uint32 `protobuf:"varint,1,opt,name=unique_id,json=uniqueId" json:"unique_id,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -1021,7 +1132,7 @@ func (m *CMsgClientNewLoginKeyAccepted) Reset() { *m = CMsgClientNewLogi
|
||||
func (m *CMsgClientNewLoginKeyAccepted) String() string { return proto.CompactTextString(m) }
|
||||
func (*CMsgClientNewLoginKeyAccepted) ProtoMessage() {}
|
||||
func (*CMsgClientNewLoginKeyAccepted) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c98cb07f62c057af, []int{10}
|
||||
return fileDescriptor_c98cb07f62c057af, []int{11}
|
||||
}
|
||||
|
||||
func (m *CMsgClientNewLoginKeyAccepted) XXX_Unmarshal(b []byte) error {
|
||||
@@ -1050,18 +1161,18 @@ func (m *CMsgClientNewLoginKeyAccepted) GetUniqueId() uint32 {
|
||||
}
|
||||
|
||||
type CMsgClientAccountInfo struct {
|
||||
PersonaName *string `protobuf:"bytes,1,opt,name=persona_name" json:"persona_name,omitempty"`
|
||||
IpCountry *string `protobuf:"bytes,2,opt,name=ip_country" json:"ip_country,omitempty"`
|
||||
CountAuthedComputers *int32 `protobuf:"varint,5,opt,name=count_authed_computers" json:"count_authed_computers,omitempty"`
|
||||
AccountFlags *uint32 `protobuf:"varint,7,opt,name=account_flags" json:"account_flags,omitempty"`
|
||||
FacebookId *uint64 `protobuf:"varint,8,opt,name=facebook_id" json:"facebook_id,omitempty"`
|
||||
FacebookName *string `protobuf:"bytes,9,opt,name=facebook_name" json:"facebook_name,omitempty"`
|
||||
SteamguardNotifyNewmachines *bool `protobuf:"varint,14,opt,name=steamguard_notify_newmachines" json:"steamguard_notify_newmachines,omitempty"`
|
||||
SteamguardMachineNameUserChosen *string `protobuf:"bytes,15,opt,name=steamguard_machine_name_user_chosen" json:"steamguard_machine_name_user_chosen,omitempty"`
|
||||
IsPhoneVerified *bool `protobuf:"varint,16,opt,name=is_phone_verified" json:"is_phone_verified,omitempty"`
|
||||
TwoFactorState *uint32 `protobuf:"varint,17,opt,name=two_factor_state" json:"two_factor_state,omitempty"`
|
||||
IsPhoneIdentifying *bool `protobuf:"varint,18,opt,name=is_phone_identifying" json:"is_phone_identifying,omitempty"`
|
||||
IsPhoneNeedingReverify *bool `protobuf:"varint,19,opt,name=is_phone_needing_reverify" json:"is_phone_needing_reverify,omitempty"`
|
||||
PersonaName *string `protobuf:"bytes,1,opt,name=persona_name,json=personaName" json:"persona_name,omitempty"`
|
||||
IpCountry *string `protobuf:"bytes,2,opt,name=ip_country,json=ipCountry" json:"ip_country,omitempty"`
|
||||
CountAuthedComputers *int32 `protobuf:"varint,5,opt,name=count_authed_computers,json=countAuthedComputers" json:"count_authed_computers,omitempty"`
|
||||
AccountFlags *uint32 `protobuf:"varint,7,opt,name=account_flags,json=accountFlags" json:"account_flags,omitempty"`
|
||||
FacebookId *uint64 `protobuf:"varint,8,opt,name=facebook_id,json=facebookId" json:"facebook_id,omitempty"`
|
||||
FacebookName *string `protobuf:"bytes,9,opt,name=facebook_name,json=facebookName" json:"facebook_name,omitempty"`
|
||||
SteamguardNotifyNewmachines *bool `protobuf:"varint,14,opt,name=steamguard_notify_newmachines,json=steamguardNotifyNewmachines" json:"steamguard_notify_newmachines,omitempty"`
|
||||
SteamguardMachineNameUserChosen *string `protobuf:"bytes,15,opt,name=steamguard_machine_name_user_chosen,json=steamguardMachineNameUserChosen" json:"steamguard_machine_name_user_chosen,omitempty"`
|
||||
IsPhoneVerified *bool `protobuf:"varint,16,opt,name=is_phone_verified,json=isPhoneVerified" json:"is_phone_verified,omitempty"`
|
||||
TwoFactorState *uint32 `protobuf:"varint,17,opt,name=two_factor_state,json=twoFactorState" json:"two_factor_state,omitempty"`
|
||||
IsPhoneIdentifying *bool `protobuf:"varint,18,opt,name=is_phone_identifying,json=isPhoneIdentifying" json:"is_phone_identifying,omitempty"`
|
||||
IsPhoneNeedingReverify *bool `protobuf:"varint,19,opt,name=is_phone_needing_reverify,json=isPhoneNeedingReverify" json:"is_phone_needing_reverify,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -1071,7 +1182,7 @@ func (m *CMsgClientAccountInfo) Reset() { *m = CMsgClientAccountInfo{} }
|
||||
func (m *CMsgClientAccountInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*CMsgClientAccountInfo) ProtoMessage() {}
|
||||
func (*CMsgClientAccountInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c98cb07f62c057af, []int{11}
|
||||
return fileDescriptor_c98cb07f62c057af, []int{12}
|
||||
}
|
||||
|
||||
func (m *CMsgClientAccountInfo) XXX_Unmarshal(b []byte) error {
|
||||
@@ -1176,10 +1287,89 @@ func (m *CMsgClientAccountInfo) GetIsPhoneNeedingReverify() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
type CMsgClientChallengeRequest struct {
|
||||
Steamid *uint64 `protobuf:"fixed64,1,opt,name=steamid" json:"steamid,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CMsgClientChallengeRequest) Reset() { *m = CMsgClientChallengeRequest{} }
|
||||
func (m *CMsgClientChallengeRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CMsgClientChallengeRequest) ProtoMessage() {}
|
||||
func (*CMsgClientChallengeRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c98cb07f62c057af, []int{13}
|
||||
}
|
||||
|
||||
func (m *CMsgClientChallengeRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CMsgClientChallengeRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CMsgClientChallengeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CMsgClientChallengeRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CMsgClientChallengeRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CMsgClientChallengeRequest.Merge(m, src)
|
||||
}
|
||||
func (m *CMsgClientChallengeRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_CMsgClientChallengeRequest.Size(m)
|
||||
}
|
||||
func (m *CMsgClientChallengeRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CMsgClientChallengeRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CMsgClientChallengeRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *CMsgClientChallengeRequest) GetSteamid() uint64 {
|
||||
if m != nil && m.Steamid != nil {
|
||||
return *m.Steamid
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type CMsgClientChallengeResponse struct {
|
||||
Challenge *uint64 `protobuf:"fixed64,1,opt,name=challenge" json:"challenge,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CMsgClientChallengeResponse) Reset() { *m = CMsgClientChallengeResponse{} }
|
||||
func (m *CMsgClientChallengeResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*CMsgClientChallengeResponse) ProtoMessage() {}
|
||||
func (*CMsgClientChallengeResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c98cb07f62c057af, []int{14}
|
||||
}
|
||||
|
||||
func (m *CMsgClientChallengeResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CMsgClientChallengeResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CMsgClientChallengeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CMsgClientChallengeResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CMsgClientChallengeResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CMsgClientChallengeResponse.Merge(m, src)
|
||||
}
|
||||
func (m *CMsgClientChallengeResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_CMsgClientChallengeResponse.Size(m)
|
||||
}
|
||||
func (m *CMsgClientChallengeResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CMsgClientChallengeResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CMsgClientChallengeResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *CMsgClientChallengeResponse) GetChallenge() uint64 {
|
||||
if m != nil && m.Challenge != nil {
|
||||
return *m.Challenge
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*CMsgClientHeartBeat)(nil), "CMsgClientHeartBeat")
|
||||
proto.RegisterType((*CMsgClientServerTimestampRequest)(nil), "CMsgClientServerTimestampRequest")
|
||||
proto.RegisterType((*CMsgClientServerTimestampResponse)(nil), "CMsgClientServerTimestampResponse")
|
||||
proto.RegisterType((*CMsgClientSecret)(nil), "CMsgClientSecret")
|
||||
proto.RegisterType((*CMsgClientLogon)(nil), "CMsgClientLogon")
|
||||
proto.RegisterType((*CMsgClientLogonResponse)(nil), "CMsgClientLogonResponse")
|
||||
proto.RegisterType((*CMsgClientRequestWebAPIAuthenticateUserNonce)(nil), "CMsgClientRequestWebAPIAuthenticateUserNonce")
|
||||
@@ -1189,6 +1379,8 @@ func init() {
|
||||
proto.RegisterType((*CMsgClientNewLoginKey)(nil), "CMsgClientNewLoginKey")
|
||||
proto.RegisterType((*CMsgClientNewLoginKeyAccepted)(nil), "CMsgClientNewLoginKeyAccepted")
|
||||
proto.RegisterType((*CMsgClientAccountInfo)(nil), "CMsgClientAccountInfo")
|
||||
proto.RegisterType((*CMsgClientChallengeRequest)(nil), "CMsgClientChallengeRequest")
|
||||
proto.RegisterType((*CMsgClientChallengeResponse)(nil), "CMsgClientChallengeResponse")
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -1196,99 +1388,151 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_c98cb07f62c057af = []byte{
|
||||
// 1495 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0x5b, 0x73, 0x13, 0x47,
|
||||
0x16, 0x5e, 0x01, 0xc2, 0xd6, 0xc1, 0xc6, 0xf2, 0xd8, 0xb2, 0xdb, 0x57, 0x64, 0x71, 0x33, 0xcb,
|
||||
0xee, 0xd6, 0xae, 0xa1, 0xf6, 0x81, 0x4a, 0x1e, 0x0c, 0x29, 0x0a, 0x2a, 0x04, 0x08, 0x97, 0x90,
|
||||
0xca, 0xad, 0xd3, 0xea, 0x39, 0x33, 0xea, 0xf2, 0x4c, 0xf7, 0xd0, 0xdd, 0x23, 0xa1, 0xb7, 0x3c,
|
||||
0xe7, 0xcf, 0xe4, 0x7f, 0xe4, 0xc7, 0xe4, 0x37, 0xa4, 0xfa, 0x8c, 0x46, 0x92, 0xc1, 0x21, 0xc9,
|
||||
0xeb, 0xe9, 0xd3, 0xe7, 0xfa, 0x7d, 0x5f, 0x37, 0xdc, 0x70, 0x1e, 0x45, 0x9e, 0xa3, 0x73, 0x22,
|
||||
0x45, 0xc7, 0x65, 0xa6, 0x50, 0x7b, 0x87, 0x76, 0x88, 0x96, 0x67, 0x26, 0x55, 0xfa, 0x3f, 0x85,
|
||||
0x35, 0xde, 0x6c, 0xb3, 0xd3, 0x7e, 0x7d, 0xe1, 0xb0, 0x3a, 0xe9, 0x75, 0x60, 0xed, 0xc1, 0x17,
|
||||
0x2e, 0x7d, 0x40, 0x37, 0x1f, 0xa1, 0xb0, 0xfe, 0x3e, 0x0a, 0xdf, 0xfb, 0x0c, 0xba, 0x33, 0xf3,
|
||||
0x4b, 0x0a, 0xf8, 0x4a, 0xe5, 0xe8, 0xbc, 0x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 0x66, 0x8b, 0xdd, 0xc6, 0xe1, 0xe2, 0xbd, 0x66, 0x22, 0x32,
|
||||
0x87, 0xd1, 0x3a, 0x2c, 0x8d, 0x94, 0x9e, 0xe5, 0x6b, 0x51, 0xd8, 0x2e, 0xb0, 0x42, 0xe9, 0x94,
|
||||
0xe7, 0x8e, 0x27, 0xd6, 0xe4, 0x9c, 0xda, 0x70, 0x28, 0xac, 0x1c, 0x30, 0xa0, 0x04, 0xab, 0xd0,
|
||||
0x2a, 0xca, 0x7e, 0xa6, 0x64, 0x68, 0x77, 0xbd, 0x36, 0xbd, 0x35, 0x8e, 0x67, 0x38, 0xc4, 0x8c,
|
||||
0x75, 0xc8, 0x34, 0xdb, 0x87, 0x2b, 0x8b, 0x22, 0x53, 0x18, 0x73, 0x42, 0x4f, 0xe8, 0x7c, 0xa3,
|
||||
0xdb, 0x38, 0xbc, 0x18, 0x45, 0x00, 0xb9, 0x90, 0x83, 0x50, 0x82, 0x8a, 0xd9, 0x7e, 0xb7, 0x71,
|
||||
0xb8, 0x14, 0x31, 0x58, 0xce, 0x44, 0xa9, 0xe5, 0x20, 0x6c, 0x29, 0xf4, 0x74, 0x25, 0x04, 0xbb,
|
||||
0xd7, 0xf8, 0x6f, 0x14, 0xc1, 0x42, 0xa9, 0x78, 0x6e, 0x62, 0x64, 0xdd, 0xda, 0xb6, 0x0e, 0x2d,
|
||||
0x39, 0x10, 0xbe, 0xb2, 0x1e, 0xd4, 0xd6, 0x6d, 0x88, 0x28, 0xd3, 0x11, 0x17, 0xa5, 0x1f, 0x70,
|
||||
0xaf, 0xe4, 0x09, 0x7a, 0x76, 0x8b, 0xe2, 0x77, 0x60, 0x19, 0x73, 0xa1, 0x32, 0x2e, 0xe2, 0xd8,
|
||||
0xa2, 0x73, 0xec, 0x9f, 0x75, 0xd3, 0x36, 0x80, 0xe2, 0xce, 0x11, 0x17, 0x52, 0x9a, 0x52, 0x7b,
|
||||
0x2e, 0x2d, 0x0a, 0x1f, 0xc6, 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x41, 0x67, 0xb2, 0xa2, 0x6a, 0x3b, 0x35, 0x67, 0xd9, 0xd7, 0xa1, 0xe1, 0x80, 0x79, 0x67,
|
||||
0xf4, 0x98, 0x17, 0x4e, 0xd7, 0xeb, 0xfb, 0x86, 0xea, 0x08, 0x14, 0xae, 0x0f, 0xc2, 0x84, 0x95,
|
||||
0x24, 0xec, 0x7c, 0x4b, 0x41, 0xff, 0x0f, 0x37, 0x69, 0x69, 0xc8, 0x35, 0x8e, 0xc8, 0x25, 0x53,
|
||||
0xfa, 0x04, 0xe3, 0xe9, 0x90, 0x54, 0xc2, 0x35, 0x62, 0x8c, 0x31, 0xfb, 0x6e, 0x7e, 0xae, 0x1d,
|
||||
0x58, 0x9e, 0x06, 0xa5, 0x39, 0x7e, 0x4f, 0xe1, 0xb6, 0x21, 0x9a, 0xdf, 0xa4, 0x28, 0x42, 0x1f,
|
||||
0xec, 0x07, 0x6a, 0xf5, 0x16, 0x1c, 0x50, 0xfd, 0x69, 0x29, 0x6c, 0xcc, 0x63, 0x43, 0xaa, 0x33,
|
||||
0x21, 0x9b, 0x34, 0x79, 0x51, 0x7a, 0xb4, 0x8c, 0x53, 0x2f, 0xeb, 0xb0, 0x54, 0xa3, 0x9c, 0x82,
|
||||
0xff, 0x48, 0xc1, 0xaf, 0xc0, 0xe6, 0xbc, 0x95, 0x16, 0x25, 0x07, 0xc6, 0xa1, 0x66, 0x82, 0x1c,
|
||||
0x18, 0xb4, 0xa9, 0x68, 0x3b, 0xe6, 0x66, 0x88, 0xd6, 0xaa, 0x18, 0x59, 0x9f, 0x4e, 0xd6, 0x61,
|
||||
0x49, 0xb9, 0xc9, 0x52, 0xfb, 0xe6, 0x1d, 0x93, 0x94, 0x66, 0x1b, 0xa2, 0x09, 0xdd, 0x94, 0x76,
|
||||
0x5e, 0xe8, 0x6a, 0x30, 0x31, 0x09, 0xdf, 0x26, 0xac, 0xf8, 0x91, 0xe1, 0x89, 0x90, 0xde, 0xd8,
|
||||
0x6a, 0x87, 0x48, 0xa1, 0xae, 0xc1, 0x6e, 0x20, 0xa7, 0xb1, 0xde, 0x71, 0x1b, 0x06, 0x97, 0xa9,
|
||||
0x5c, 0x85, 0x56, 0x2a, 0x4d, 0x65, 0x49, 0xbd, 0x8d, 0x11, 0xf6, 0xc3, 0x43, 0x60, 0x34, 0xd7,
|
||||
0x46, 0x4b, 0x64, 0x29, 0x5d, 0xdf, 0x84, 0x95, 0xc2, 0x2a, 0x63, 0x95, 0x1f, 0x73, 0x8b, 0xc2,
|
||||
0x19, 0xcd, 0x06, 0x61, 0x3c, 0xbd, 0x5f, 0x9a, 0xb0, 0xf9, 0x9e, 0x98, 0x4e, 0x75, 0x3a, 0x82,
|
||||
0x85, 0x09, 0xfc, 0x48, 0x4b, 0x9b, 0xf7, 0x1a, 0x47, 0x01, 0xd9, 0xa6, 0xf4, 0xdc, 0x24, 0x9c,
|
||||
0x26, 0x3e, 0x08, 0xef, 0x47, 0x1f, 0x45, 0x00, 0xa8, 0x34, 0x3a, 0xae, 0x34, 0xba, 0x19, 0x1d,
|
||||
0xc0, 0x96, 0xd2, 0x7f, 0xe4, 0x72, 0xbe, 0xc6, 0xe0, 0x4c, 0x9b, 0x2a, 0x81, 0xdd, 0x81, 0xb5,
|
||||
0x9a, 0xdb, 0x73, 0xf2, 0x4f, 0xea, 0xba, 0x10, 0x76, 0x5f, 0xa3, 0x23, 0xc9, 0x44, 0xea, 0x48,
|
||||
0x5b, 0x4f, 0xc9, 0x77, 0x25, 0xaa, 0xeb, 0xb0, 0x54, 0xe9, 0x46, 0x6c, 0x72, 0xa1, 0x34, 0x09,
|
||||
0x69, 0x8b, 0x90, 0x33, 0x0f, 0x63, 0x92, 0xd0, 0x20, 0x62, 0xed, 0x9a, 0x61, 0xf8, 0xce, 0xa3,
|
||||
0x0e, 0x88, 0x03, 0x2a, 0xef, 0x06, 0xec, 0x8f, 0xb0, 0x2f, 0x0a, 0x45, 0xd2, 0x14, 0x48, 0x11,
|
||||
0xb8, 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 0x48, 0xec, 0x1b, 0x73,
|
||||
0x12, 0xea, 0x59, 0x24, 0xe4, 0x74, 0x60, 0x79, 0x6a, 0xa4, 0xb4, 0xd5, 0x1f, 0xe9, 0x3a, 0xec,
|
||||
0xcd, 0xc9, 0xbf, 0x36, 0x5e, 0x25, 0xe3, 0xf0, 0xe8, 0x4c, 0x24, 0xdd, 0x11, 0xff, 0x16, 0xa3,
|
||||
0xdb, 0x70, 0x75, 0xce, 0xed, 0x03, 0xbd, 0xe7, 0x13, 0xc1, 0x5f, 0xa9, 0x29, 0xa7, 0x1c, 0x2f,
|
||||
0x06, 0xa6, 0xfa, 0x91, 0x85, 0xd7, 0x32, 0x66, 0x6d, 0x8a, 0xc3, 0xa0, 0x3d, 0xa7, 0xdf, 0xce,
|
||||
0x07, 0x6a, 0xac, 0x52, 0xd1, 0xbb, 0xb0, 0x3e, 0xbd, 0x34, 0x79, 0x64, 0xc7, 0x4a, 0xa7, 0x2c,
|
||||
0xa2, 0x7b, 0x41, 0x2f, 0xeb, 0xd3, 0xf0, 0xf0, 0x05, 0xaa, 0x5a, 0xa4, 0xe0, 0x63, 0xb6, 0x16,
|
||||
0x5c, 0xee, 0x37, 0x1f, 0x35, 0x7e, 0x6a, 0xfc, 0xe3, 0xf7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb8,
|
||||
0x55, 0x41, 0x55, 0x01, 0x0c, 0x00, 0x00,
|
||||
// 2325 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x5b, 0x77, 0x1b, 0xb7,
|
||||
0xd5, 0xfd, 0x98, 0x58, 0x96, 0x08, 0x51, 0xb7, 0xd1, 0x0d, 0x92, 0x7c, 0x91, 0x98, 0xaf, 0x8e,
|
||||
0x12, 0x27, 0x5e, 0x8e, 0x9c, 0x95, 0x36, 0xa9, 0xd7, 0x4a, 0x65, 0xb9, 0x4e, 0xb8, 0xa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7, 0xd7, 0x3b, 0xd1, 0xed,
|
||||
0x3f, 0x37, 0xc8, 0x72, 0x3d, 0x9f, 0x28, 0x07, 0x13, 0x50, 0x32, 0x7b, 0x0d, 0xb9, 0x16, 0x4a,
|
||||
0xe2, 0x6a, 0x0b, 0x61, 0xf9, 0x19, 0xac, 0x91, 0x19, 0x9e, 0x65, 0x22, 0xc6, 0x09, 0x17, 0x42,
|
||||
0xf7, 0x11, 0x6c, 0x93, 0xb9, 0x18, 0xae, 0x45, 0x04, 0x22, 0xa6, 0xef, 0x62, 0xa0, 0xfa, 0xb6,
|
||||
0x23, 0xa4, 0x92, 0x11, 0xd0, 0x5b, 0xbb, 0x8d, 0xfd, 0xdb, 0xa1, 0xfb, 0x08, 0x02, 0x72, 0x6b,
|
||||
0x30, 0xe4, 0x11, 0x9d, 0xd9, 0x6d, 0xec, 0xb7, 0x42, 0xfc, 0xbb, 0xfd, 0xd7, 0x55, 0xb2, 0x34,
|
||||
0x49, 0xe5, 0x58, 0x25, 0x4a, 0x06, 0x1f, 0x90, 0x65, 0x2c, 0x56, 0xa4, 0x52, 0x36, 0x9d, 0xd2,
|
||||
0x52, 0x89, 0xbf, 0xf4, 0xa9, 0x7d, 0x43, 0xda, 0x31, 0x64, 0x39, 0x44, 0xdc, 0x40, 0xcc, 0x54,
|
||||
0xaf, 0x5f, 0x68, 0x53, 0xb8, 0x8f, 0x2c, 0x17, 0xd7, 0xdc, 0x00, 0x13, 0x99, 0xcf, 0xfb, 0xfe,
|
||||
0x84, 0x79, 0x56, 0x23, 0x76, 0x1d, 0xaf, 0x93, 0x05, 0x9b, 0x64, 0x36, 0x82, 0x34, 0x65, 0xd5,
|
||||
0x86, 0x6e, 0xdb, 0xcf, 0x4e, 0x1c, 0x3c, 0x20, 0x4b, 0x29, 0xd7, 0x86, 0x69, 0xd0, 0x76, 0x55,
|
||||
0x4b, 0xb8, 0x85, 0x84, 0x05, 0x0b, 0x9f, 0x3b, 0xb4, 0x13, 0x07, 0x9f,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0x4c, 0xc2, 0x08, 0x07, 0xa5, 0x42, 0x5e, 0x41, 0x5c, 0x15, 0x56, 0xf4,
|
||||
0x99, 0x04, 0x88, 0x21, 0xa6, 0xdf, 0xd7, 0x65, 0xb2, 0xe7, 0x46, 0x9d, 0xc2, 0xa8, 0xab, 0xe5,
|
||||
0x31, 0x0e, 0xf1, 0x85, 0xee, 0xf4, 0x4f, 0x91, 0x1f, 0xb4, 0xc9, 0x42, 0x95, 0x09, 0xca, 0xe3,
|
||||
0x77, 0x4e, 0xff, 0x3e, 0x07, 0x14, 0xc4, 0x43, 0x12, 0xd4, 0x35, 0xce, 0x33, 0x7b, 0x78, 0xf4,
|
||||
0xf7, 0x78, 0xe4, 0x35, 0x91, 0x1f, 0x66, 0x59, 0x27, 0x0e, 0x3a, 0x64, 0x0f, 0x4f, 0x26, 0x29,
|
||||
0x78, 0x1e, 0xb3, 0x58, 0xa1, 0x63, 0xf0, 0xad, 0x3e, 0x52, 0xc3, 0xac, 0x30, 0x90, 0x53, 0x86,
|
||||
0x47, 0x78, 0x6f, 0x42, 0x7c, 0xae, 0xac, 0x73, 0x70, 0xb4, 0x23, 0xcf, 0xb2, 0x57, 0xb3, 0x6c,
|
||||
0x55, 0x98, 0xda, 0x1f, 0x5c, 0x6a, 0x1e, 0xc3, 0xd4, 0x3e, 0x23, 0x9b, 0x75, 0x0a, 0xea, 0x35,
|
||||
0x1a, 0x28, 0x0d, 0x92, 0x72, 0x64, 0xaf, 0xd7, 0xd8, 0x97, 0x55, 0xd0, 0xbe, 0xe2, 0x78, 0x0e,
|
||||
0xf9, 0x98, 0xa9, 0x6b, 0xc8, 0x73, 0x11, 0x03, 0xed, 0xb9, 0x5b, 0xeb, 0xf1, 0x33, 0x0f, 0x07,
|
||||
0xbb, 0xa4, 0x25, 0xb4, 0xbf, 0x03, 0x3d, 0xf5, 0x03, 0x8d, 0x30, 0x77, 0x22, 0x34, 0x4a, 0xff,
|
||||
0x99, 0xfa, 0xc1, 0xf6, 0x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0xf3, 0x35, 0x57, 0x56, 0xed, 0x79, 0x87, 0xcc, 0xfa, 0x66, 0x83, 0xa6, 0x6c, 0xe6,
|
||||
0x8b, 0xc6, 0x41, 0x58, 0x22, 0xb6, 0x35, 0xaa, 0xc2, 0x30, 0xd5, 0x67, 0x28, 0xe7, 0x81, 0x35,
|
||||
0xd8, 0x3d, 0xe0, 0xb8, 0x0b, 0x25, 0x63, 0xe7, 0x49, 0x67, 0xc2, 0x2d, 0x55, 0x98, 0xb3, 0xfe,
|
||||
0x57, 0x7c, 0x08, 0x5f, 0x97, 0x8c, 0x73, 0x47, 0x08, 0x3e, 0x27, 0x5b, 0x42, 0xbe, 0x69, 0xf4,
|
||||
0xbb, 0x38, 0x7a, 0x43, 0xc8, 0x1b, 0x87, 0xbe, 0xc9, 0x2c, 0xdc, 0x7a, 0xa3, 0x59, 0x78, 0x44,
|
||||
0x56, 0xcb, 0x37, 0xad, 0x66, 0xa0, 0xd1, 0xad, 0xcd, 0x86, 0x2b, 0x3e, 0x34, 0xf1, 0xeb, 0xf6,
|
||||
0xa1, 0x2c, 0xfb, 0x41, 0x3f, 0xe5, 0x89, 0x46, 0xa3, 0xb6, 0x10, 0x96, 0xcf, 0xdb, 0x0b, 0x8b,
|
||||
0xd5, 0x6d, 0xe4, 0xec, 0x94, 0x8d, 0xdc, 0x23, 0xee, 0x45, 0x65, 0xb1, 0x1a, 0x72, 0x21, 0xd1,
|
||||
0x8d, 0x35, 0xc3, 0x79, 0xc4, 0x9e, 0x23, 0x64, 0x17, 0x98, 0xea, 0x88, 0x68, 0xbe, 0x5a, 0x61,
|
||||
0xab, 0xde, 0x09, 0xed, 0xcd, 0x2a, 0x1f, 0x02, 0xf8, 0xc1, 0x80, 0xb4, 0x4d, 0x89, 0xb8, 0x56,
|
||||
0xe1, 0xf1, 0x5f, 0x7a, 0x38, 0x38, 0x22, 0xf7, 0x46, 0xd0, 0xe3, 0x99, 0x40, 0x1f, 0x60, 0x1b,
|
||||
0xaf, 0x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 0x00, 0xff, 0xff, 0xa0, 0x4a, 0xca,
|
||||
0x5a, 0xd7, 0x14, 0x00, 0x00,
|
||||
}
|
||||
|
||||
64
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/client_site_license.pb.go
generated
vendored
64
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/client_site_license.pb.go
generated
vendored
@@ -21,9 +21,9 @@ var _ = math.Inf
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type CMsgClientSiteInfo struct {
|
||||
SiteId *uint64 `protobuf:"varint,1,opt,name=site_id" json:"site_id,omitempty"`
|
||||
SiteName *string `protobuf:"bytes,2,opt,name=site_name" json:"site_name,omitempty"`
|
||||
AllowCachedCredentials *bool `protobuf:"varint,3,opt,name=allow_cached_credentials" json:"allow_cached_credentials,omitempty"`
|
||||
SiteId *uint64 `protobuf:"varint,1,opt,name=site_id,json=siteId" json:"site_id,omitempty"`
|
||||
SiteName *string `protobuf:"bytes,2,opt,name=site_name,json=siteName" json:"site_name,omitempty"`
|
||||
AllowCachedCredentials *bool `protobuf:"varint,3,opt,name=allow_cached_credentials,json=allowCachedCredentials" json:"allow_cached_credentials,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -283,11 +283,11 @@ func (m *CMsgClientSiteLicenseGetContentCacheInfo) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_CMsgClientSiteLicenseGetContentCacheInfo proto.InternalMessageInfo
|
||||
|
||||
type CMsgClientSiteLicenseGetContentCacheInfoResponse struct {
|
||||
UseCache *bool `protobuf:"varint,1,opt,name=use_cache" json:"use_cache,omitempty"`
|
||||
Ipv4Address *uint32 `protobuf:"varint,2,opt,name=ipv4_address" json:"ipv4_address,omitempty"`
|
||||
PortNumber *uint32 `protobuf:"varint,3,opt,name=port_number" json:"port_number,omitempty"`
|
||||
P2PGroup *uint32 `protobuf:"varint,4,opt,name=p2p_group" json:"p2p_group,omitempty"`
|
||||
IpAddress *string `protobuf:"bytes,5,opt,name=ip_address" json:"ip_address,omitempty"`
|
||||
UseCache *bool `protobuf:"varint,1,opt,name=use_cache,json=useCache" json:"use_cache,omitempty"`
|
||||
Ipv4Address *uint32 `protobuf:"varint,2,opt,name=ipv4_address,json=ipv4Address" json:"ipv4_address,omitempty"`
|
||||
PortNumber *uint32 `protobuf:"varint,3,opt,name=port_number,json=portNumber" json:"port_number,omitempty"`
|
||||
P2PGroup *uint32 `protobuf:"varint,4,opt,name=p2p_group,json=p2pGroup" json:"p2p_group,omitempty"`
|
||||
IpAddress *string `protobuf:"bytes,5,opt,name=ip_address,json=ipAddress" json:"ip_address,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -372,26 +372,30 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_0a32817a56a37a6e = []byte{
|
||||
// 335 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4b, 0xfb, 0x40,
|
||||
0x14, 0xc4, 0xff, 0xfb, 0xb7, 0xa1, 0xed, 0xd3, 0x20, 0x5d, 0x3d, 0x04, 0x41, 0x08, 0x81, 0x4a,
|
||||
0xf0, 0x50, 0xa4, 0x08, 0x82, 0x9e, 0x34, 0x07, 0x15, 0xf4, 0x62, 0x6f, 0x5e, 0xc2, 0x36, 0x79,
|
||||
0xb6, 0x8b, 0x9b, 0xdd, 0x25, 0x6f, 0x53, 0xaf, 0x7e, 0x0b, 0xbf, 0xae, 0x64, 0x5b, 0x0a, 0x15,
|
||||
0x2d, 0xbd, 0xee, 0xce, 0x6f, 0x66, 0x98, 0x07, 0x43, 0x72, 0x28, 0xaa, 0x0a, 0x89, 0xc4, 0x0c,
|
||||
0x29, 0x27, 0xe9, 0x50, 0xc9, 0x02, 0x35, 0x61, 0xa1, 0x24, 0x6a, 0x37, 0xb2, 0xb5, 0x71, 0xe6,
|
||||
0x24, 0xda, 0x94, 0x4d, 0x05, 0xe1, 0xf2, 0x27, 0x79, 0x05, 0x9e, 0x3d, 0xd3, 0x2c, 0xf3, 0xea,
|
||||
0x89, 0x74, 0xf8, 0xa8, 0xdf, 0x0c, 0x3f, 0x84, 0x6e, 0x6b, 0x95, 0xcb, 0x32, 0x62, 0x31, 0x4b,
|
||||
0x3b, 0x7c, 0x00, 0x7d, 0xff, 0xa0, 0x45, 0x85, 0xd1, 0xff, 0x98, 0xa5, 0x7d, 0x1e, 0x43, 0x24,
|
||||
0x94, 0x32, 0x1f, 0x79, 0x21, 0x8a, 0x39, 0x96, 0x79, 0x51, 0x63, 0x89, 0xda, 0x49, 0xa1, 0x28,
|
||||
0xda, 0x8b, 0x59, 0xda, 0x4b, 0x46, 0x70, 0xba, 0xe9, 0xfd, 0xb4, 0xac, 0x96, 0xcd, 0xb1, 0x78,
|
||||
0x37, 0x8d, 0xe3, 0x21, 0x04, 0xc2, 0xda, 0x55, 0x48, 0x98, 0xdc, 0xc0, 0x70, 0xab, 0xfe, 0x05,
|
||||
0xc9, 0x1a, 0x4d, 0xc8, 0x39, 0x74, 0xb1, 0x46, 0x6a, 0x94, 0xf3, 0x64, 0x70, 0xcd, 0xc6, 0xc9,
|
||||
0x15, 0x9c, 0xfd, 0x0a, 0xdf, 0xa3, 0xbb, 0x5d, 0x08, 0xa9, 0xc4, 0x54, 0xe1, 0x04, 0x85, 0xa3,
|
||||
0x9f, 0xa9, 0x13, 0x18, 0xed, 0x06, 0x6e, 0x8b, 0x6f, 0x4d, 0xa9, 0x15, 0xf9, 0x71, 0xc2, 0xe4,
|
||||
0x1c, 0xd2, 0xbf, 0x4c, 0x33, 0xa3, 0x1d, 0x6a, 0x97, 0xb5, 0xab, 0xb5, 0x63, 0x27, 0x5f, 0x0c,
|
||||
0x2e, 0x76, 0x15, 0xaf, 0x3b, 0x0c, 0xa0, 0xdf, 0x10, 0x2e, 0xb7, 0xf7, 0x2d, 0x7a, 0xfc, 0x18,
|
||||
0x0e, 0xa4, 0x5d, 0x5c, 0xe6, 0xa2, 0x2c, 0x6b, 0xa4, 0x55, 0x13, 0x7e, 0x04, 0xfb, 0xd6, 0xd4,
|
||||
0x2e, 0xd7, 0x4d, 0x35, 0xc5, 0xda, 0x5f, 0x26, 0x6c, 0x69, 0x3b, 0xb6, 0xf9, 0xac, 0x36, 0x8d,
|
||||
0x8d, 0x3a, 0xfe, 0x89, 0x03, 0x48, 0xbb, 0x66, 0x83, 0xf6, 0xc4, 0x77, 0xc1, 0x03, 0xfb, 0x64,
|
||||
0xff, 0xbe, 0x03, 0x00, 0x00, 0xff, 0xff, 0x09, 0x2f, 0x9f, 0xe9, 0x65, 0x02, 0x00, 0x00,
|
||||
// 393 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x4f, 0x8b, 0xd3, 0x40,
|
||||
0x14, 0x77, 0x74, 0xe3, 0x26, 0x6f, 0xed, 0x65, 0x10, 0x0d, 0x2e, 0x8b, 0x35, 0xb0, 0x12, 0x3c,
|
||||
0x2c, 0x52, 0x14, 0xc4, 0x83, 0xb0, 0x46, 0x58, 0x17, 0xb4, 0x87, 0xe9, 0x07, 0x08, 0xd3, 0xe4,
|
||||
0xd9, 0x0e, 0x4e, 0x66, 0x86, 0xbc, 0x49, 0xbd, 0x7a, 0xf0, 0xfb, 0xf9, 0x95, 0x64, 0x26, 0xad,
|
||||
0x5a, 0xb0, 0xd2, 0xe3, 0xef, 0xcf, 0xfc, 0xde, 0x2f, 0xef, 0x05, 0x2e, 0xc9, 0xa3, 0xec, 0x3a,
|
||||
0x24, 0x92, 0x2b, 0xa4, 0x9a, 0x94, 0x47, 0xad, 0x1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aa, 0x4e, 0x18, 0x42, 0xc1, 0x1d, 0xd7, 0x3b, 0x11, 0x23,
|
||||
0x28, 0x5e, 0x40, 0x79, 0x68, 0x48, 0x65, 0x8d, 0x47, 0xe3, 0xe3, 0x56, 0xc3, 0xf5, 0x8a, 0x9f,
|
||||
0x0c, 0x5e, 0x1e, 0x6b, 0xfe, 0xab, 0x53, 0x36, 0x10, 0x8e, 0xa7, 0x8b, 0xad, 0x52, 0x91, 0x0e,
|
||||
0x84, 0xd1, 0xc8, 0x9f, 0xc1, 0x03, 0xe5, 0x36, 0xaf, 0x6a, 0xd9, 0xb6, 0x3d, 0xd2, 0xae, 0xda,
|
||||
0x59, 0xe0, 0xae, 0x47, 0x8a, 0x3f, 0x85, 0x33, 0x67, 0x7b, 0x5f, 0x9b, 0xa1, 0x5b, 0x62, 0x1f,
|
||||
0xef, 0x3d, 0x11, 0x10, 0xa8, 0x79, 0x64, 0xc2, 0x00, 0x37, 0x73, 0xf5, 0xaa, 0xb7, 0x83, 0xcb,
|
||||
0x4f, 0xa2, 0x9c, 0xba, 0x99, 0xbb, 0x09, 0x98, 0x5f, 0x00, 0x28, 0xf7, 0x3b, 0x3e, 0x89, 0x3f,
|
||||
0x56, 0xa6, 0xdc, 0x36, 0xfc, 0x7d, 0xf2, 0x91, 0x7d, 0x67, 0x77, 0x7e, 0x05, 0x00, 0x00, 0xff,
|
||||
0xff, 0x35, 0x87, 0xfb, 0x5f, 0xef, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
180
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/content_manifest.pb.go
generated
vendored
180
vendor/github.com/Philipp15b/go-steam/protocol/protobuf/content_manifest.pb.go
generated
vendored
@@ -20,6 +20,46 @@ var _ = math.Inf
|
||||
// proto package protobuf to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type EContentDeltaChunkDataLocation int32
|
||||
|
||||
const (
|
||||
EContentDeltaChunkDataLocation_k_EContentDeltaChunkDataLocationInProtobuf EContentDeltaChunkDataLocation = 0
|
||||
EContentDeltaChunkDataLocation_k_EContentDeltaChunkDataLocationAfterProtobuf EContentDeltaChunkDataLocation = 1
|
||||
)
|
||||
|
||||
var EContentDeltaChunkDataLocation_name = map[int32]string{
|
||||
0: "k_EContentDeltaChunkDataLocationInProtobuf",
|
||||
1: "k_EContentDeltaChunkDataLocationAfterProtobuf",
|
||||
}
|
||||
|
||||
var EContentDeltaChunkDataLocation_value = map[string]int32{
|
||||
"k_EContentDeltaChunkDataLocationInProtobuf": 0,
|
||||
"k_EContentDeltaChunkDataLocationAfterProtobuf": 1,
|
||||
}
|
||||
|
||||
func (x EContentDeltaChunkDataLocation) Enum() *EContentDeltaChunkDataLocation {
|
||||
p := new(EContentDeltaChunkDataLocation)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x EContentDeltaChunkDataLocation) String() string {
|
||||
return proto.EnumName(EContentDeltaChunkDataLocation_name, int32(x))
|
||||
}
|
||||
|
||||
func (x *EContentDeltaChunkDataLocation) UnmarshalJSON(data []byte) error {
|
||||
value, err := proto.UnmarshalJSONEnum(EContentDeltaChunkDataLocation_value, data, "EContentDeltaChunkDataLocation")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*x = EContentDeltaChunkDataLocation(value)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (EContentDeltaChunkDataLocation) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e3cda137a29253ba, []int{0}
|
||||
}
|
||||
|
||||
type ContentManifestPayload struct {
|
||||
Mappings []*ContentManifestPayload_FileMapping `protobuf:"bytes,1,rep,name=mappings" json:"mappings,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
@@ -63,8 +103,8 @@ type ContentManifestPayload_FileMapping struct {
|
||||
Filename *string `protobuf:"bytes,1,opt,name=filename" json:"filename,omitempty"`
|
||||
Size *uint64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
|
||||
Flags *uint32 `protobuf:"varint,3,opt,name=flags" json:"flags,omitempty"`
|
||||
ShaFilename []byte `protobuf:"bytes,4,opt,name=sha_filename" json:"sha_filename,omitempty"`
|
||||
ShaContent []byte `protobuf:"bytes,5,opt,name=sha_content" json:"sha_content,omitempty"`
|
||||
ShaFilename []byte `protobuf:"bytes,4,opt,name=sha_filename,json=shaFilename" json:"sha_filename,omitempty"`
|
||||
ShaContent []byte `protobuf:"bytes,5,opt,name=sha_content,json=shaContent" json:"sha_content,omitempty"`
|
||||
Chunks []*ContentManifestPayload_FileMapping_ChunkData `protobuf:"bytes,6,rep,name=chunks" json:"chunks,omitempty"`
|
||||
Linktarget *string `protobuf:"bytes,7,opt,name=linktarget" json:"linktarget,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
@@ -150,8 +190,8 @@ type ContentManifestPayload_FileMapping_ChunkData struct {
|
||||
Sha []byte `protobuf:"bytes,1,opt,name=sha" json:"sha,omitempty"`
|
||||
Crc *uint32 `protobuf:"fixed32,2,opt,name=crc" json:"crc,omitempty"`
|
||||
Offset *uint64 `protobuf:"varint,3,opt,name=offset" json:"offset,omitempty"`
|
||||
CbOriginal *uint32 `protobuf:"varint,4,opt,name=cb_original" json:"cb_original,omitempty"`
|
||||
CbCompressed *uint32 `protobuf:"varint,5,opt,name=cb_compressed" json:"cb_compressed,omitempty"`
|
||||
CbOriginal *uint32 `protobuf:"varint,4,opt,name=cb_original,json=cbOriginal" json:"cb_original,omitempty"`
|
||||
CbCompressed *uint32 `protobuf:"varint,5,opt,name=cb_compressed,json=cbCompressed" json:"cb_compressed,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -222,15 +262,15 @@ func (m *ContentManifestPayload_FileMapping_ChunkData) GetCbCompressed() uint32
|
||||
}
|
||||
|
||||
type ContentManifestMetadata struct {
|
||||
DepotId *uint32 `protobuf:"varint,1,opt,name=depot_id" json:"depot_id,omitempty"`
|
||||
GidManifest *uint64 `protobuf:"varint,2,opt,name=gid_manifest" json:"gid_manifest,omitempty"`
|
||||
CreationTime *uint32 `protobuf:"varint,3,opt,name=creation_time" json:"creation_time,omitempty"`
|
||||
FilenamesEncrypted *bool `protobuf:"varint,4,opt,name=filenames_encrypted" json:"filenames_encrypted,omitempty"`
|
||||
CbDiskOriginal *uint64 `protobuf:"varint,5,opt,name=cb_disk_original" json:"cb_disk_original,omitempty"`
|
||||
CbDiskCompressed *uint64 `protobuf:"varint,6,opt,name=cb_disk_compressed" json:"cb_disk_compressed,omitempty"`
|
||||
UniqueChunks *uint32 `protobuf:"varint,7,opt,name=unique_chunks" json:"unique_chunks,omitempty"`
|
||||
CrcEncrypted *uint32 `protobuf:"varint,8,opt,name=crc_encrypted" json:"crc_encrypted,omitempty"`
|
||||
CrcClear *uint32 `protobuf:"varint,9,opt,name=crc_clear" json:"crc_clear,omitempty"`
|
||||
DepotId *uint32 `protobuf:"varint,1,opt,name=depot_id,json=depotId" json:"depot_id,omitempty"`
|
||||
GidManifest *uint64 `protobuf:"varint,2,opt,name=gid_manifest,json=gidManifest" json:"gid_manifest,omitempty"`
|
||||
CreationTime *uint32 `protobuf:"varint,3,opt,name=creation_time,json=creationTime" json:"creation_time,omitempty"`
|
||||
FilenamesEncrypted *bool `protobuf:"varint,4,opt,name=filenames_encrypted,json=filenamesEncrypted" json:"filenames_encrypted,omitempty"`
|
||||
CbDiskOriginal *uint64 `protobuf:"varint,5,opt,name=cb_disk_original,json=cbDiskOriginal" json:"cb_disk_original,omitempty"`
|
||||
CbDiskCompressed *uint64 `protobuf:"varint,6,opt,name=cb_disk_compressed,json=cbDiskCompressed" json:"cb_disk_compressed,omitempty"`
|
||||
UniqueChunks *uint32 `protobuf:"varint,7,opt,name=unique_chunks,json=uniqueChunks" json:"unique_chunks,omitempty"`
|
||||
CrcEncrypted *uint32 `protobuf:"varint,8,opt,name=crc_encrypted,json=crcEncrypted" json:"crc_encrypted,omitempty"`
|
||||
CrcClear *uint32 `protobuf:"varint,9,opt,name=crc_clear,json=crcClear" json:"crc_clear,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -364,10 +404,11 @@ func (m *ContentManifestSignature) GetSignature() []byte {
|
||||
}
|
||||
|
||||
type ContentDeltaChunks struct {
|
||||
DepotId *uint32 `protobuf:"varint,1,opt,name=depot_id" json:"depot_id,omitempty"`
|
||||
ManifestIdSource *uint64 `protobuf:"varint,2,opt,name=manifest_id_source" json:"manifest_id_source,omitempty"`
|
||||
ManifestIdTarget *uint64 `protobuf:"varint,3,opt,name=manifest_id_target" json:"manifest_id_target,omitempty"`
|
||||
DepotId *uint32 `protobuf:"varint,1,opt,name=depot_id,json=depotId" json:"depot_id,omitempty"`
|
||||
ManifestIdSource *uint64 `protobuf:"varint,2,opt,name=manifest_id_source,json=manifestIdSource" json:"manifest_id_source,omitempty"`
|
||||
ManifestIdTarget *uint64 `protobuf:"varint,3,opt,name=manifest_id_target,json=manifestIdTarget" json:"manifest_id_target,omitempty"`
|
||||
DeltaChunks []*ContentDeltaChunks_DeltaChunk `protobuf:"bytes,4,rep,name=deltaChunks" json:"deltaChunks,omitempty"`
|
||||
ChunkDataLocation *EContentDeltaChunkDataLocation `protobuf:"varint,5,opt,name=chunk_data_location,json=chunkDataLocation,enum=EContentDeltaChunkDataLocation,def=0" json:"chunk_data_location,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -398,6 +439,8 @@ func (m *ContentDeltaChunks) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_ContentDeltaChunks proto.InternalMessageInfo
|
||||
|
||||
const Default_ContentDeltaChunks_ChunkDataLocation EContentDeltaChunkDataLocation = EContentDeltaChunkDataLocation_k_EContentDeltaChunkDataLocationInProtobuf
|
||||
|
||||
func (m *ContentDeltaChunks) GetDepotId() uint32 {
|
||||
if m != nil && m.DepotId != nil {
|
||||
return *m.DepotId
|
||||
@@ -426,12 +469,20 @@ func (m *ContentDeltaChunks) GetDeltaChunks() []*ContentDeltaChunks_DeltaChunk {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ContentDeltaChunks) GetChunkDataLocation() EContentDeltaChunkDataLocation {
|
||||
if m != nil && m.ChunkDataLocation != nil {
|
||||
return *m.ChunkDataLocation
|
||||
}
|
||||
return Default_ContentDeltaChunks_ChunkDataLocation
|
||||
}
|
||||
|
||||
type ContentDeltaChunks_DeltaChunk struct {
|
||||
ShaSource []byte `protobuf:"bytes,1,opt,name=sha_source" json:"sha_source,omitempty"`
|
||||
ShaTarget []byte `protobuf:"bytes,2,opt,name=sha_target" json:"sha_target,omitempty"`
|
||||
SizeOriginal *uint32 `protobuf:"varint,3,opt,name=size_original" json:"size_original,omitempty"`
|
||||
PatchMethod *uint32 `protobuf:"varint,4,opt,name=patch_method" json:"patch_method,omitempty"`
|
||||
ShaSource []byte `protobuf:"bytes,1,opt,name=sha_source,json=shaSource" json:"sha_source,omitempty"`
|
||||
ShaTarget []byte `protobuf:"bytes,2,opt,name=sha_target,json=shaTarget" json:"sha_target,omitempty"`
|
||||
SizeOriginal *uint32 `protobuf:"varint,3,opt,name=size_original,json=sizeOriginal" json:"size_original,omitempty"`
|
||||
PatchMethod *uint32 `protobuf:"varint,4,opt,name=patch_method,json=patchMethod" json:"patch_method,omitempty"`
|
||||
Chunk []byte `protobuf:"bytes,5,opt,name=chunk" json:"chunk,omitempty"`
|
||||
SizeDelta *uint32 `protobuf:"varint,6,opt,name=size_delta,json=sizeDelta" json:"size_delta,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -497,7 +548,15 @@ func (m *ContentDeltaChunks_DeltaChunk) GetChunk() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ContentDeltaChunks_DeltaChunk) GetSizeDelta() uint32 {
|
||||
if m != nil && m.SizeDelta != nil {
|
||||
return *m.SizeDelta
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("EContentDeltaChunkDataLocation", EContentDeltaChunkDataLocation_name, EContentDeltaChunkDataLocation_value)
|
||||
proto.RegisterType((*ContentManifestPayload)(nil), "ContentManifestPayload")
|
||||
proto.RegisterType((*ContentManifestPayload_FileMapping)(nil), "ContentManifestPayload.FileMapping")
|
||||
proto.RegisterType((*ContentManifestPayload_FileMapping_ChunkData)(nil), "ContentManifestPayload.FileMapping.ChunkData")
|
||||
@@ -510,37 +569,52 @@ func init() {
|
||||
func init() { proto.RegisterFile("content_manifest.proto", fileDescriptor_e3cda137a29253ba) }
|
||||
|
||||
var fileDescriptor_e3cda137a29253ba = []byte{
|
||||
// 508 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcd, 0x8e, 0xd3, 0x30,
|
||||
0x10, 0xc7, 0x49, 0xbf, 0x3b, 0x6d, 0x50, 0xf1, 0xb2, 0x8b, 0x55, 0x24, 0x54, 0x95, 0x4b, 0x2f,
|
||||
0x9b, 0x03, 0x88, 0x23, 0x17, 0x76, 0x85, 0xb8, 0x54, 0x42, 0xe2, 0x01, 0x2c, 0xd7, 0x76, 0x53,
|
||||
0xab, 0x89, 0x1d, 0x6c, 0xe7, 0xb0, 0x9c, 0xb8, 0xf0, 0x18, 0xbc, 0x21, 0x12, 0xaf, 0x80, 0xec,
|
||||
0x38, 0x4d, 0x55, 0xf6, 0xb0, 0xb7, 0xcc, 0x47, 0x3c, 0xbf, 0xf9, 0xcf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 0x2b, 0x5c, 0x80, 0x1e, 0x78, 0x3c,
|
||||
0xb6, 0x23, 0xda, 0xc8, 0x5c, 0x2a, 0x5a, 0x04, 0xe6, 0x14, 0x5d, 0x43, 0xca, 0x76, 0x84, 0xe9,
|
||||
0xb2, 0x32, 0xc2, 0x5a, 0xc1, 0x03, 0x75, 0xba, 0xfe, 0x93, 0xc0, 0xab, 0x0b, 0xce, 0xad, 0x70,
|
||||
0x94, 0xfb, 0x89, 0x0b, 0x98, 0x70, 0x51, 0x69, 0x47, 0x24, 0x0f, 0x63, 0x83, 0x1c, 0xb9, 0xe4,
|
||||
0xa7, 0xab, 0x45, 0xcd, 0xfc, 0xd3, 0x46, 0x50, 0x27, 0xb5, 0x22, 0x4e, 0x96, 0x22, 0x6a, 0xf7,
|
||||
0x1a, 0xae, 0x5a, 0xdd, 0x2c, 0x11, 0x8a, 0x99, 0x87, 0xca, 0x09, 0x1e, 0x70, 0x26, 0x08, 0xc3,
|
||||
0x82, 0xed, 0x08, 0x97, 0xf6, 0xd8, 0x81, 0x0e, 0xc3, 0x6b, 0x4b, 0x40, 0x6d, 0xe5, 0x8c, 0x76,
|
||||
0xd4, 0x4e, 0xaa, 0x95, 0xfc, 0x5e, 0x0b, 0x12, 0xa5, 0x1e, 0x9f, 0x76, 0x33, 0xec, 0x6c, 0xc6,
|
||||
0x24, 0xa4, 0x5f, 0xc0, 0xd4, 0xa7, 0x59, 0x21, 0xa8, 0xc1, 0xd3, 0xb0, 0xee, 0x2d, 0xe0, 0x8b,
|
||||
0x6d, 0xbf, 0xc9, 0x5c, 0x51, 0x57, 0x1b, 0xe1, 0xdb, 0x6d, 0x1b, 0x34, 0x32, 0xaf, 0x7f, 0xf5,
|
||||
0x00, 0xc5, 0xfe, 0x7b, 0x51, 0x38, 0x1a, 0xae, 0x61, 0x1f, 0x11, 0x66, 0x09, 0xa8, 0x15, 0x85,
|
||||
0x48, 0x4e, 0xac, 0xae, 0x0d, 0x6b, 0x2d, 0x75, 0x51, 0x8b, 0x17, 0x6e, 0x4e, 0xf5, 0x1e, 0x66,
|
||||
0xbc, 0x7b, 0x18, 0x0f, 0x82, 0x73, 0xde, 0x64, 0xff, 0xcf, 0xcc, 0xba, 0xef, 0x65, 0x05, 0xd0,
|
||||
0x45, 0xde, 0x38, 0xde, 0x8c, 0x71, 0x64, 0x63, 0x8f, 0x98, 0x8b, 0xa3, 0x7a, 0x21, 0x77, 0x0d,
|
||||
0xa9, 0xf7, 0x79, 0x27, 0xf7, 0xc9, 0xe1, 0x15, 0x75, 0xec, 0x40, 0x4a, 0xe1, 0x0e, 0x9a, 0x47,
|
||||
0xb7, 0xa4, 0x30, 0x0c, 0x0a, 0x37, 0xde, 0xfe, 0x34, 0xfc, 0x92, 0xfc, 0x4c, 0x9e, 0xfd, 0x0b,
|
||||
0x00, 0x00, 0xff, 0xff, 0x00, 0x92, 0x22, 0xd7, 0xb7, 0x03, 0x00, 0x00,
|
||||
// 742 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x6f, 0xd3, 0x4e,
|
||||
0x10, 0xad, 0x9b, 0xff, 0x93, 0xa4, 0xca, 0x6f, 0xfb, 0x53, 0x31, 0x01, 0xda, 0x34, 0xbd, 0x44,
|
||||
0x55, 0x6b, 0x44, 0x4f, 0x88, 0x0b, 0x7f, 0xd2, 0x56, 0x54, 0x22, 0xa2, 0xda, 0xf6, 0xbe, 0xda,
|
||||
0xac, 0x37, 0xf1, 0x2a, 0x8e, 0x1d, 0xbc, 0x9b, 0x43, 0xcb, 0x05, 0x89, 0x33, 0x9c, 0xf8, 0x4e,
|
||||
0x7c, 0x17, 0xc4, 0x87, 0x40, 0xbb, 0x5e, 0xdb, 0x51, 0x8a, 0x0a, 0xdc, 0x3c, 0x33, 0x6f, 0xd6,
|
||||
0xef, 0xbd, 0x99, 0x5d, 0xd8, 0x61, 0x71, 0xa4, 0x78, 0xa4, 0xc8, 0x9c, 0x46, 0x62, 0xc2, 0xa5,
|
||||
0xf2, 0x16, 0x49, 0xac, 0xe2, 0xfe, 0x8f, 0x12, 0xec, 0x0c, 0xd3, 0xd2, 0xc8, 0x56, 0x2e, 0xe9,
|
||||
0x4d, 0x18, 0x53, 0x1f, 0xbd, 0x84, 0xfa, 0x9c, 0x2e, 0x16, 0x22, 0x9a, 0x4a, 0xd7, 0xe9, 0x95,
|
||||
0x06, 0xcd, 0x93, 0x03, 0xef, 0xf7, 0x50, 0xef, 0x5c, 0x84, 0x7c, 0x94, 0x62, 0x71, 0xde, 0xd4,
|
||||
0xfd, 0x5a, 0x82, 0xe6, 0x4a, 0x05, 0x75, 0xa1, 0x3e, 0x11, 0x21, 0x8f, 0xe8, 0x9c, 0xbb, 0x4e,
|
||||
0xcf, 0x19, 0x34, 0x70, 0x1e, 0x23, 0x04, 0x65, 0x29, 0x6e, 0xb9, 0xbb, 0xd9, 0x73, 0x06, 0x65,
|
||||
0x6c, 0xbe, 0xd1, 0xff, 0x50, 0x99, 0x84, 0x74, 0x2a, 0xdd, 0x52, 0xcf, 0x19, 0xb4, 0x71, 0x1a,
|
||||
0xa0, 0x7d, 0x68, 0xc9, 0x80, 0x92, 0xfc, 0xa4, 0x72, 0xcf, 0x19, 0xb4, 0x70, 0x53, 0x06, 0xf4,
|
||||
0x3c, 0x3b, 0x6c, 0x0f, 0x74, 0x48, 0xac, 0x64, 0xb7, 0x62, 0x10, 0x20, 0x03, 0x6a, 0xe9, 0xa3,
|
||||
0x33, 0xa8, 0xb2, 0x60, 0x19, 0xcd, 0xa4, 0x5b, 0x35, 0xc2, 0x8e, 0xff, 0x42, 0x98, 0x37, 0xd4,
|
||||
0x1d, 0xa7, 0x54, 0x51, 0x6c, 0x9b, 0xd1, 0x2e, 0x40, 0x28, 0xa2, 0x99, 0xa2, 0xc9, 0x94, 0x2b,
|
||||
0xb7, 0x66, 0x24, 0xad, 0x64, 0xba, 0x5f, 0x1c,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, 0x97, 0x13, 0xfc, 0x1f, 0x5b, 0x2f, 0x76, 0xbf, 0x3b, 0x00, 0x45, 0x1f, 0x7a,
|
||||
0x02, 0xfa, 0x25, 0xc8, 0x1c, 0xca, 0xac, 0x0f, 0xa8, 0xb5, 0xc6, 0x96, 0xad, 0x25, 0x9b, 0x79,
|
||||
0xd9, 0x7a, 0x71, 0x00, 0x6d, 0xfd, 0x36, 0x15, 0xfb, 0x68, 0x17, 0x5d, 0x27, 0xf3, 0x6d, 0xdc,
|
||||
0x87, 0xd6, 0x82, 0x2a, 0x16, 0x90, 0x39, 0x57, 0x41, 0xec, 0xdb, 0xeb, 0xda, 0x34, 0xb9, 0x91,
|
||||
0x49, 0xe9, 0xb7, 0xcd, 0x30, 0xb5, 0x8f, 0x53, 0x1a, 0x98, 0x9f, 0xeb, 0xd3, 0x8d, 0x77, 0x66,
|
||||
0x7d, 0xdb, 0x7a, 0x2d, 0x6e, 0xb9, 0xe1, 0x7f, 0xf8, 0xd9, 0x81, 0xdd, 0xfb, 0x9d, 0x40, 0x1e,
|
||||
0xfc, 0x83, 0x5b, 0x9d, 0x0d, 0xf4, 0x0c, 0x8e, 0xff, 0x84, 0x7f, 0x3d, 0x51, 0x3c, 0xc9, 0x5b,
|
||||
0x9c, 0x37, 0x95, 0xb7, 0xce, 0x27, 0x67, 0xe3, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x9c,
|
||||
0xf1, 0x49, 0x52, 0x06, 0x00, 0x00,
|
||||
}
|
||||
|
||||
669
vendor/github.com/Philipp15b/go-steam/protocol/steamlang/enums.go
generated
vendored
669
vendor/github.com/Philipp15b/go-steam/protocol/steamlang/enums.go
generated
vendored
@@ -400,6 +400,7 @@ const (
|
||||
EMsg_FBSBootstrapperGetPackageChunkResponse EMsg = 1131
|
||||
EMsg_FBSBootstrapperPackageTransferProgress EMsg = 1132
|
||||
EMsg_FBSRestartBootstrapper EMsg = 1133
|
||||
EMsg_FBSPauseFrozenDumps EMsg = 1134
|
||||
EMsg_BaseFileXfer EMsg = 1200
|
||||
EMsg_FileXferRequest EMsg = 1200
|
||||
EMsg_FileXferResponse EMsg = 1201
|
||||
@@ -416,6 +417,8 @@ const (
|
||||
EMsg_BaseBS EMsg = 1400
|
||||
EMsg_BSPurchaseStart EMsg = 1401
|
||||
EMsg_BSPurchaseResponse EMsg = 1402
|
||||
EMsg_BSAuthenticateCCTrans EMsg = 1403
|
||||
EMsg_BSAuthenticateCCTransResponse EMsg = 1404
|
||||
EMsg_BSSettleComplete EMsg = 1406
|
||||
EMsg_BSInitPayPalTxn EMsg = 1408
|
||||
EMsg_BSInitPayPalTxnResponse EMsg = 1409
|
||||
@@ -979,6 +982,8 @@ const (
|
||||
EMsg_AMFundedPayment EMsg = 4418
|
||||
EMsg_AMFundedPaymentResponse EMsg = 4419
|
||||
EMsg_AMRequestPersonaUpdateForChatServer EMsg = 4420
|
||||
EMsg_AMPerfectWorldPayment EMsg = 4421
|
||||
EMsg_AMPerfectWorldPaymentResponse EMsg = 4422
|
||||
EMsg_BasePSRange EMsg = 5000
|
||||
EMsg_PSCreateShoppingCart EMsg = 5001
|
||||
EMsg_PSCreateShoppingCartResponse EMsg = 5002
|
||||
@@ -1238,6 +1243,9 @@ const (
|
||||
EMsg_ClientNetworkingCertRequestResponse EMsg = 5622
|
||||
EMsg_ClientChallengeRequest EMsg = 5623
|
||||
EMsg_ClientChallengeResponse EMsg = 5624
|
||||
EMsg_BadgeCraftedNotification EMsg = 5625
|
||||
EMsg_ClientNetworkingMobileCertRequest EMsg = 5626
|
||||
EMsg_ClientNetworkingMobileCertRequestResponse EMsg = 5627
|
||||
EMsg_BaseMDS EMsg = 5800
|
||||
EMsg_AMToMDSGetDepotDecryptionKey EMsg = 5812
|
||||
EMsg_MDSToAMGetDepotDecryptionKeyResponse EMsg = 5813
|
||||
@@ -1303,6 +1311,8 @@ const (
|
||||
EMsg_ClientMMSSetRatelimitPolicyOnClient EMsg = 6625
|
||||
EMsg_ClientMMSGetLobbyStatus EMsg = 6626
|
||||
EMsg_ClientMMSGetLobbyStatusResponse EMsg = 6627
|
||||
EMsg_MMSGetLobbyList EMsg = 6628
|
||||
EMsg_MMSGetLobbyListResponse EMsg = 6629
|
||||
EMsg_NonStdMsgBase EMsg = 6800
|
||||
EMsg_NonStdMsgMemcached EMsg = 6801
|
||||
EMsg_NonStdMsgHTTPServer EMsg = 6802
|
||||
@@ -1318,6 +1328,7 @@ const (
|
||||
EMsg_NonStdMsgSteam2Emulator EMsg = 6812
|
||||
EMsg_NonStdMsgRTMPServer EMsg = 6813
|
||||
EMsg_NonStdMsgWebSocket EMsg = 6814
|
||||
EMsg_NonStdMsgRedis EMsg = 6815
|
||||
EMsg_UDSBase EMsg = 7000
|
||||
EMsg_ClientUDSP2PSessionStarted EMsg = 7001
|
||||
EMsg_ClientUDSP2PSessionEnded EMsg = 7002
|
||||
@@ -2072,6 +2083,7 @@ var EMsg_name = map[EMsg]string{
|
||||
1131: "EMsg_FBSBootstrapperGetPackageChunkResponse",
|
||||
1132: "EMsg_FBSBootstrapperPackageTransferProgress",
|
||||
1133: "EMsg_FBSRestartBootstrapper",
|
||||
1134: "EMsg_FBSPauseFrozenDumps",
|
||||
1200: "EMsg_BaseFileXfer",
|
||||
1201: "EMsg_FileXferResponse",
|
||||
1202: "EMsg_FileXferData",
|
||||
@@ -2086,7 +2098,8 @@ var EMsg_name = map[EMsg]string{
|
||||
1400: "EMsg_BaseBS",
|
||||
1401: "EMsg_BSPurchaseStart",
|
||||
1402: "EMsg_BSPurchaseResponse",
|
||||
1404: "EMsg_BSSettleNOVA",
|
||||
1403: "EMsg_BSAuthenticateCCTrans",
|
||||
1404: "EMsg_BSAuthenticateCCTransResponse",
|
||||
1406: "EMsg_BSSettleComplete",
|
||||
1407: "EMsg_BSBannedRequest",
|
||||
1408: "EMsg_BSInitPayPalTxn",
|
||||
@@ -2772,6 +2785,8 @@ var EMsg_name = map[EMsg]string{
|
||||
4418: "EMsg_AMFundedPayment",
|
||||
4419: "EMsg_AMFundedPaymentResponse",
|
||||
4420: "EMsg_AMRequestPersonaUpdateForChatServer",
|
||||
4421: "EMsg_AMPerfectWorldPayment",
|
||||
4422: "EMsg_AMPerfectWorldPaymentResponse",
|
||||
5000: "EMsg_BasePSRange",
|
||||
5001: "EMsg_PSCreateShoppingCart",
|
||||
5002: "EMsg_PSCreateShoppingCartResponse",
|
||||
@@ -3041,6 +3056,9 @@ var EMsg_name = map[EMsg]string{
|
||||
5622: "EMsg_ClientNetworkingCertRequestResponse",
|
||||
5623: "EMsg_ClientChallengeRequest",
|
||||
5624: "EMsg_ClientChallengeResponse",
|
||||
5625: "EMsg_BadgeCraftedNotification",
|
||||
5626: "EMsg_ClientNetworkingMobileCertRequest",
|
||||
5627: "EMsg_ClientNetworkingMobileCertRequestResponse",
|
||||
5800: "EMsg_BaseMDS",
|
||||
5801: "EMsg_ClientMDSLoginRequest",
|
||||
5802: "EMsg_ClientMDSLoginResponse",
|
||||
@@ -3136,6 +3154,8 @@ var EMsg_name = map[EMsg]string{
|
||||
6625: "EMsg_ClientMMSSetRatelimitPolicyOnClient",
|
||||
6626: "EMsg_ClientMMSGetLobbyStatus",
|
||||
6627: "EMsg_ClientMMSGetLobbyStatusResponse",
|
||||
6628: "EMsg_MMSGetLobbyList",
|
||||
6629: "EMsg_MMSGetLobbyListResponse",
|
||||
6800: "EMsg_NonStdMsgBase",
|
||||
6801: "EMsg_NonStdMsgMemcached",
|
||||
6802: "EMsg_NonStdMsgHTTPServer",
|
||||
@@ -3151,6 +3171,7 @@ var EMsg_name = map[EMsg]string{
|
||||
6812: "EMsg_NonStdMsgSteam2Emulator",
|
||||
6813: "EMsg_NonStdMsgRTMPServer",
|
||||
6814: "EMsg_NonStdMsgWebSocket",
|
||||
6815: "EMsg_NonStdMsgRedis",
|
||||
7000: "EMsg_UDSBase",
|
||||
7001: "EMsg_ClientUDSP2PSessionStarted",
|
||||
7002: "EMsg_ClientUDSP2PSessionEnded",
|
||||
@@ -3487,119 +3508,122 @@ func (e EMsg) String() string {
|
||||
type EResult int32
|
||||
|
||||
const (
|
||||
EResult_Invalid EResult = 0
|
||||
EResult_OK EResult = 1
|
||||
EResult_Fail EResult = 2
|
||||
EResult_NoConnection EResult = 3
|
||||
EResult_InvalidPassword EResult = 5
|
||||
EResult_LoggedInElsewhere EResult = 6
|
||||
EResult_InvalidProtocolVer EResult = 7
|
||||
EResult_InvalidParam EResult = 8
|
||||
EResult_FileNotFound EResult = 9
|
||||
EResult_Busy EResult = 10
|
||||
EResult_InvalidState EResult = 11
|
||||
EResult_InvalidName EResult = 12
|
||||
EResult_InvalidEmail EResult = 13
|
||||
EResult_DuplicateName EResult = 14
|
||||
EResult_AccessDenied EResult = 15
|
||||
EResult_Timeout EResult = 16
|
||||
EResult_Banned EResult = 17
|
||||
EResult_AccountNotFound EResult = 18
|
||||
EResult_InvalidSteamID EResult = 19
|
||||
EResult_ServiceUnavailable EResult = 20
|
||||
EResult_NotLoggedOn EResult = 21
|
||||
EResult_Pending EResult = 22
|
||||
EResult_EncryptionFailure EResult = 23
|
||||
EResult_InsufficientPrivilege EResult = 24
|
||||
EResult_LimitExceeded EResult = 25
|
||||
EResult_Revoked EResult = 26
|
||||
EResult_Expired EResult = 27
|
||||
EResult_AlreadyRedeemed EResult = 28
|
||||
EResult_DuplicateRequest EResult = 29
|
||||
EResult_AlreadyOwned EResult = 30
|
||||
EResult_IPNotFound EResult = 31
|
||||
EResult_PersistFailed EResult = 32
|
||||
EResult_LockingFailed EResult = 33
|
||||
EResult_LogonSessionReplaced EResult = 34
|
||||
EResult_ConnectFailed EResult = 35
|
||||
EResult_HandshakeFailed EResult = 36
|
||||
EResult_IOFailure EResult = 37
|
||||
EResult_RemoteDisconnect EResult = 38
|
||||
EResult_ShoppingCartNotFound EResult = 39
|
||||
EResult_Blocked EResult = 40
|
||||
EResult_Ignored EResult = 41
|
||||
EResult_NoMatch EResult = 42
|
||||
EResult_AccountDisabled EResult = 43
|
||||
EResult_ServiceReadOnly EResult = 44
|
||||
EResult_AccountNotFeatured EResult = 45
|
||||
EResult_AdministratorOK EResult = 46
|
||||
EResult_ContentVersion EResult = 47
|
||||
EResult_TryAnotherCM EResult = 48
|
||||
EResult_PasswordRequiredToKickSession EResult = 49
|
||||
EResult_AlreadyLoggedInElsewhere EResult = 50
|
||||
EResult_Suspended EResult = 51
|
||||
EResult_Cancelled EResult = 52
|
||||
EResult_DataCorruption EResult = 53
|
||||
EResult_DiskFull EResult = 54
|
||||
EResult_RemoteCallFailed EResult = 55
|
||||
EResult_PasswordUnset EResult = 56
|
||||
EResult_ExternalAccountUnlinked EResult = 57
|
||||
EResult_PSNTicketInvalid EResult = 58
|
||||
EResult_ExternalAccountAlreadyLinked EResult = 59
|
||||
EResult_RemoteFileConflict EResult = 60
|
||||
EResult_IllegalPassword EResult = 61
|
||||
EResult_SameAsPreviousValue EResult = 62
|
||||
EResult_AccountLogonDenied EResult = 63
|
||||
EResult_CannotUseOldPassword EResult = 64
|
||||
EResult_InvalidLoginAuthCode EResult = 65
|
||||
EResult_AccountLogonDeniedNoMail EResult = 66
|
||||
EResult_HardwareNotCapableOfIPT EResult = 67
|
||||
EResult_IPTInitError EResult = 68
|
||||
EResult_ParentalControlRestricted EResult = 69
|
||||
EResult_FacebookQueryError EResult = 70
|
||||
EResult_ExpiredLoginAuthCode EResult = 71
|
||||
EResult_IPLoginRestrictionFailed EResult = 72
|
||||
EResult_AccountLockedDown EResult = 73
|
||||
EResult_AccountLogonDeniedVerifiedEmailRequired EResult = 74
|
||||
EResult_NoMatchingURL EResult = 75
|
||||
EResult_BadResponse EResult = 76
|
||||
EResult_RequirePasswordReEntry EResult = 77
|
||||
EResult_ValueOutOfRange EResult = 78
|
||||
EResult_UnexpectedError EResult = 79
|
||||
EResult_Disabled EResult = 80
|
||||
EResult_InvalidCEGSubmission EResult = 81
|
||||
EResult_RestrictedDevice EResult = 82
|
||||
EResult_RegionLocked EResult = 83
|
||||
EResult_RateLimitExceeded EResult = 84
|
||||
EResult_AccountLoginDeniedNeedTwoFactor EResult = 85
|
||||
EResult_ItemDeleted EResult = 86
|
||||
EResult_AccountLoginDeniedThrottle EResult = 87
|
||||
EResult_TwoFactorCodeMismatch EResult = 88
|
||||
EResult_TwoFactorActivationCodeMismatch EResult = 89
|
||||
EResult_AccountAssociatedToMultiplePartners EResult = 90
|
||||
EResult_NotModified EResult = 91
|
||||
EResult_NoMobileDevice EResult = 92
|
||||
EResult_TimeNotSynced EResult = 93
|
||||
EResult_SMSCodeFailed EResult = 94
|
||||
EResult_AccountLimitExceeded EResult = 95
|
||||
EResult_AccountActivityLimitExceeded EResult = 96
|
||||
EResult_PhoneActivityLimitExceeded EResult = 97
|
||||
EResult_RefundToWallet EResult = 98
|
||||
EResult_EmailSendFailure EResult = 99
|
||||
EResult_NotSettled EResult = 100
|
||||
EResult_NeedCaptcha EResult = 101
|
||||
EResult_GSLTDenied EResult = 102
|
||||
EResult_GSOwnerDenied EResult = 103
|
||||
EResult_InvalidItemType EResult = 104
|
||||
EResult_IPBanned EResult = 105
|
||||
EResult_GSLTExpired EResult = 106
|
||||
EResult_InsufficientFunds EResult = 107
|
||||
EResult_TooManyPending EResult = 108
|
||||
EResult_NoSiteLicensesFound EResult = 109
|
||||
EResult_WGNetworkSendExceeded EResult = 110
|
||||
EResult_AccountNotFriends EResult = 111
|
||||
EResult_LimitedUserAccount EResult = 112
|
||||
EResult_CantRemoveItem EResult = 113
|
||||
EResult_Invalid EResult = 0
|
||||
EResult_OK EResult = 1
|
||||
EResult_Fail EResult = 2
|
||||
EResult_NoConnection EResult = 3
|
||||
EResult_InvalidPassword EResult = 5
|
||||
EResult_LoggedInElsewhere EResult = 6
|
||||
EResult_InvalidProtocolVer EResult = 7
|
||||
EResult_InvalidParam EResult = 8
|
||||
EResult_FileNotFound EResult = 9
|
||||
EResult_Busy EResult = 10
|
||||
EResult_InvalidState EResult = 11
|
||||
EResult_InvalidName EResult = 12
|
||||
EResult_InvalidEmail EResult = 13
|
||||
EResult_DuplicateName EResult = 14
|
||||
EResult_AccessDenied EResult = 15
|
||||
EResult_Timeout EResult = 16
|
||||
EResult_Banned EResult = 17
|
||||
EResult_AccountNotFound EResult = 18
|
||||
EResult_InvalidSteamID EResult = 19
|
||||
EResult_ServiceUnavailable EResult = 20
|
||||
EResult_NotLoggedOn EResult = 21
|
||||
EResult_Pending EResult = 22
|
||||
EResult_EncryptionFailure EResult = 23
|
||||
EResult_InsufficientPrivilege EResult = 24
|
||||
EResult_LimitExceeded EResult = 25
|
||||
EResult_Revoked EResult = 26
|
||||
EResult_Expired EResult = 27
|
||||
EResult_AlreadyRedeemed EResult = 28
|
||||
EResult_DuplicateRequest EResult = 29
|
||||
EResult_AlreadyOwned EResult = 30
|
||||
EResult_IPNotFound EResult = 31
|
||||
EResult_PersistFailed EResult = 32
|
||||
EResult_LockingFailed EResult = 33
|
||||
EResult_LogonSessionReplaced EResult = 34
|
||||
EResult_ConnectFailed EResult = 35
|
||||
EResult_HandshakeFailed EResult = 36
|
||||
EResult_IOFailure EResult = 37
|
||||
EResult_RemoteDisconnect EResult = 38
|
||||
EResult_ShoppingCartNotFound EResult = 39
|
||||
EResult_Blocked EResult = 40
|
||||
EResult_Ignored EResult = 41
|
||||
EResult_NoMatch EResult = 42
|
||||
EResult_AccountDisabled EResult = 43
|
||||
EResult_ServiceReadOnly EResult = 44
|
||||
EResult_AccountNotFeatured EResult = 45
|
||||
EResult_AdministratorOK EResult = 46
|
||||
EResult_ContentVersion EResult = 47
|
||||
EResult_TryAnotherCM EResult = 48
|
||||
EResult_PasswordRequiredToKickSession EResult = 49
|
||||
EResult_AlreadyLoggedInElsewhere EResult = 50
|
||||
EResult_Suspended EResult = 51
|
||||
EResult_Cancelled EResult = 52
|
||||
EResult_DataCorruption EResult = 53
|
||||
EResult_DiskFull EResult = 54
|
||||
EResult_RemoteCallFailed EResult = 55
|
||||
EResult_PasswordUnset EResult = 56
|
||||
EResult_ExternalAccountUnlinked EResult = 57
|
||||
EResult_PSNTicketInvalid EResult = 58
|
||||
EResult_ExternalAccountAlreadyLinked EResult = 59
|
||||
EResult_RemoteFileConflict EResult = 60
|
||||
EResult_IllegalPassword EResult = 61
|
||||
EResult_SameAsPreviousValue EResult = 62
|
||||
EResult_AccountLogonDenied EResult = 63
|
||||
EResult_CannotUseOldPassword EResult = 64
|
||||
EResult_InvalidLoginAuthCode EResult = 65
|
||||
EResult_AccountLogonDeniedNoMail EResult = 66
|
||||
EResult_HardwareNotCapableOfIPT EResult = 67
|
||||
EResult_IPTInitError EResult = 68
|
||||
EResult_ParentalControlRestricted EResult = 69
|
||||
EResult_FacebookQueryError EResult = 70
|
||||
EResult_ExpiredLoginAuthCode EResult = 71
|
||||
EResult_IPLoginRestrictionFailed EResult = 72
|
||||
EResult_AccountLockedDown EResult = 73
|
||||
EResult_AccountLogonDeniedVerifiedEmailRequired EResult = 74
|
||||
EResult_NoMatchingURL EResult = 75
|
||||
EResult_BadResponse EResult = 76
|
||||
EResult_RequirePasswordReEntry EResult = 77
|
||||
EResult_ValueOutOfRange EResult = 78
|
||||
EResult_UnexpectedError EResult = 79
|
||||
EResult_Disabled EResult = 80
|
||||
EResult_InvalidCEGSubmission EResult = 81
|
||||
EResult_RestrictedDevice EResult = 82
|
||||
EResult_RegionLocked EResult = 83
|
||||
EResult_RateLimitExceeded EResult = 84
|
||||
EResult_AccountLoginDeniedNeedTwoFactor EResult = 85
|
||||
EResult_ItemDeleted EResult = 86
|
||||
EResult_AccountLoginDeniedThrottle EResult = 87
|
||||
EResult_TwoFactorCodeMismatch EResult = 88
|
||||
EResult_TwoFactorActivationCodeMismatch EResult = 89
|
||||
EResult_AccountAssociatedToMultiplePartners EResult = 90
|
||||
EResult_NotModified EResult = 91
|
||||
EResult_NoMobileDevice EResult = 92
|
||||
EResult_TimeNotSynced EResult = 93
|
||||
EResult_SMSCodeFailed EResult = 94
|
||||
EResult_AccountLimitExceeded EResult = 95
|
||||
EResult_AccountActivityLimitExceeded EResult = 96
|
||||
EResult_PhoneActivityLimitExceeded EResult = 97
|
||||
EResult_RefundToWallet EResult = 98
|
||||
EResult_EmailSendFailure EResult = 99
|
||||
EResult_NotSettled EResult = 100
|
||||
EResult_NeedCaptcha EResult = 101
|
||||
EResult_GSLTDenied EResult = 102
|
||||
EResult_GSOwnerDenied EResult = 103
|
||||
EResult_InvalidItemType EResult = 104
|
||||
EResult_IPBanned EResult = 105
|
||||
EResult_GSLTExpired EResult = 106
|
||||
EResult_InsufficientFunds EResult = 107
|
||||
EResult_TooManyPending EResult = 108
|
||||
EResult_NoSiteLicensesFound EResult = 109
|
||||
EResult_WGNetworkSendExceeded EResult = 110
|
||||
EResult_AccountNotFriends EResult = 111
|
||||
EResult_LimitedUserAccount EResult = 112
|
||||
EResult_CantRemoveItem EResult = 113
|
||||
EResult_AccountHasBeenDeleted EResult = 114
|
||||
EResult_AccountHasAnExistingUserCancelledLicense EResult = 115
|
||||
EResult_DeniedDueToCommunityCooldown EResult = 116
|
||||
)
|
||||
|
||||
var EResult_name = map[EResult]string{
|
||||
@@ -3716,6 +3740,9 @@ var EResult_name = map[EResult]string{
|
||||
111: "EResult_AccountNotFriends",
|
||||
112: "EResult_LimitedUserAccount",
|
||||
113: "EResult_CantRemoveItem",
|
||||
114: "EResult_AccountHasBeenDeleted",
|
||||
115: "EResult_AccountHasAnExistingUserCancelledLicense",
|
||||
116: "EResult_DeniedDueToCommunityCooldown",
|
||||
}
|
||||
|
||||
func (e EResult) String() string {
|
||||
@@ -3743,7 +3770,6 @@ const (
|
||||
EUniverse_Beta EUniverse = 2
|
||||
EUniverse_Internal EUniverse = 3
|
||||
EUniverse_Dev EUniverse = 4
|
||||
EUniverse_Max EUniverse = 5
|
||||
)
|
||||
|
||||
var EUniverse_name = map[EUniverse]string{
|
||||
@@ -3752,7 +3778,6 @@ var EUniverse_name = map[EUniverse]string{
|
||||
2: "EUniverse_Beta",
|
||||
3: "EUniverse_Internal",
|
||||
4: "EUniverse_Dev",
|
||||
5: "EUniverse_Max",
|
||||
}
|
||||
|
||||
func (e EUniverse) String() string {
|
||||
@@ -3836,7 +3861,6 @@ const (
|
||||
EPersonaState_LookingToTrade EPersonaState = 5
|
||||
EPersonaState_LookingToPlay EPersonaState = 6
|
||||
EPersonaState_Invisible EPersonaState = 7
|
||||
EPersonaState_Max EPersonaState = 8
|
||||
)
|
||||
|
||||
var EPersonaState_name = map[EPersonaState]string{
|
||||
@@ -3848,7 +3872,6 @@ var EPersonaState_name = map[EPersonaState]string{
|
||||
5: "EPersonaState_LookingToTrade",
|
||||
6: "EPersonaState_LookingToPlay",
|
||||
7: "EPersonaState_Invisible",
|
||||
8: "EPersonaState_Max",
|
||||
}
|
||||
|
||||
func (e EPersonaState) String() string {
|
||||
@@ -3882,7 +3905,6 @@ const (
|
||||
EAccountType_Chat EAccountType = 8
|
||||
EAccountType_ConsoleUser EAccountType = 9
|
||||
EAccountType_AnonUser EAccountType = 10
|
||||
EAccountType_Max EAccountType = 11
|
||||
)
|
||||
|
||||
var EAccountType_name = map[EAccountType]string{
|
||||
@@ -3897,7 +3919,6 @@ var EAccountType_name = map[EAccountType]string{
|
||||
8: "EAccountType_Chat",
|
||||
9: "EAccountType_ConsoleUser",
|
||||
10: "EAccountType_AnonUser",
|
||||
11: "EAccountType_Max",
|
||||
}
|
||||
|
||||
func (e EAccountType) String() string {
|
||||
@@ -3927,7 +3948,6 @@ const (
|
||||
EFriendRelationship_RequestInitiator EFriendRelationship = 4
|
||||
EFriendRelationship_Ignored EFriendRelationship = 5
|
||||
EFriendRelationship_IgnoredFriend EFriendRelationship = 6
|
||||
EFriendRelationship_Max EFriendRelationship = 8
|
||||
)
|
||||
|
||||
var EFriendRelationship_name = map[EFriendRelationship]string{
|
||||
@@ -3939,7 +3959,6 @@ var EFriendRelationship_name = map[EFriendRelationship]string{
|
||||
5: "EFriendRelationship_Ignored",
|
||||
6: "EFriendRelationship_IgnoredFriend",
|
||||
7: "EFriendRelationship_SuggestedFriend",
|
||||
8: "EFriendRelationship_Max",
|
||||
}
|
||||
|
||||
func (e EFriendRelationship) String() string {
|
||||
@@ -4212,6 +4231,7 @@ const (
|
||||
EPersonaStateFlag_HasRichPresence EPersonaStateFlag = 1
|
||||
EPersonaStateFlag_InJoinableGame EPersonaStateFlag = 2
|
||||
EPersonaStateFlag_Golden EPersonaStateFlag = 4
|
||||
EPersonaStateFlag_RemotePlayTogether EPersonaStateFlag = 8
|
||||
EPersonaStateFlag_ClientTypeWeb EPersonaStateFlag = 256
|
||||
EPersonaStateFlag_ClientTypeMobile EPersonaStateFlag = 512
|
||||
EPersonaStateFlag_ClientTypeTenfoot EPersonaStateFlag = 1024
|
||||
@@ -4224,6 +4244,7 @@ var EPersonaStateFlag_name = map[EPersonaStateFlag]string{
|
||||
1: "EPersonaStateFlag_HasRichPresence",
|
||||
2: "EPersonaStateFlag_InJoinableGame",
|
||||
4: "EPersonaStateFlag_Golden",
|
||||
8: "EPersonaStateFlag_RemotePlayTogether",
|
||||
256: "EPersonaStateFlag_OnlineUsingWeb",
|
||||
512: "EPersonaStateFlag_OnlineUsingMobile",
|
||||
1024: "EPersonaStateFlag_OnlineUsingBigPicture",
|
||||
@@ -4524,6 +4545,7 @@ const (
|
||||
EPaymentMethod_Valve EPaymentMethod = 129
|
||||
EPaymentMethod_MasterComp EPaymentMethod = 130
|
||||
EPaymentMethod_Promotional EPaymentMethod = 131
|
||||
EPaymentMethod_MasterSubscription EPaymentMethod = 134
|
||||
EPaymentMethod_OEMTicket EPaymentMethod = 256
|
||||
EPaymentMethod_Split EPaymentMethod = 512
|
||||
EPaymentMethod_Complimentary EPaymentMethod = 1024
|
||||
@@ -4613,6 +4635,7 @@ var EPaymentMethod_name = map[EPaymentMethod]string{
|
||||
129: "EPaymentMethod_Valve",
|
||||
130: "EPaymentMethod_SteamPressMaster",
|
||||
131: "EPaymentMethod_StorePromotion",
|
||||
134: "EPaymentMethod_MasterSubscription",
|
||||
256: "EPaymentMethod_OEMTicket",
|
||||
512: "EPaymentMethod_Split",
|
||||
1024: "EPaymentMethod_Complimentary",
|
||||
@@ -4706,6 +4729,22 @@ const (
|
||||
EPurchaseResultDetail_PurchaseCannotBeReplayed EPurchaseResultDetail = 65
|
||||
EPurchaseResultDetail_DelayedCompletion EPurchaseResultDetail = 66
|
||||
EPurchaseResultDetail_BundleTypeCannotBeGifted EPurchaseResultDetail = 67
|
||||
EPurchaseResultDetail_BlockedByUSGov EPurchaseResultDetail = 68
|
||||
EPurchaseResultDetail_ItemsReservedForCommercialUse EPurchaseResultDetail = 69
|
||||
EPurchaseResultDetail_GiftAlreadyOwned EPurchaseResultDetail = 70
|
||||
EPurchaseResultDetail_GiftInvalidForRecipientRegion EPurchaseResultDetail = 71
|
||||
EPurchaseResultDetail_GiftPricingImbalance EPurchaseResultDetail = 72
|
||||
EPurchaseResultDetail_GiftRecipientNotSpecified EPurchaseResultDetail = 73
|
||||
EPurchaseResultDetail_ItemsNotAllowedForCommercialUse EPurchaseResultDetail = 74
|
||||
EPurchaseResultDetail_BusinessStoreCountryCodeMismatch EPurchaseResultDetail = 75
|
||||
EPurchaseResultDetail_UserAssociatedWithManyCafes EPurchaseResultDetail = 76
|
||||
EPurchaseResultDetail_UserNotAssociatedWithCafe EPurchaseResultDetail = 77
|
||||
EPurchaseResultDetail_AddressInvalid EPurchaseResultDetail = 78
|
||||
EPurchaseResultDetail_CreditCardNumberInvalid EPurchaseResultDetail = 79
|
||||
EPurchaseResultDetail_CannotShipToMilitaryPostOffice EPurchaseResultDetail = 80
|
||||
EPurchaseResultDetail_BillingNameInvalidResemblesCreditCard EPurchaseResultDetail = 81
|
||||
EPurchaseResultDetail_PaymentMethodTemporarilyUnavailable EPurchaseResultDetail = 82
|
||||
EPurchaseResultDetail_PaymentMethodNotSupportedForProduct EPurchaseResultDetail = 83
|
||||
)
|
||||
|
||||
var EPurchaseResultDetail_name = map[EPurchaseResultDetail]string{
|
||||
@@ -4777,6 +4816,22 @@ var EPurchaseResultDetail_name = map[EPurchaseResultDetail]string{
|
||||
65: "EPurchaseResultDetail_PurchaseCannotBeReplayed",
|
||||
66: "EPurchaseResultDetail_DelayedCompletion",
|
||||
67: "EPurchaseResultDetail_BundleTypeCannotBeGifted",
|
||||
68: "EPurchaseResultDetail_BlockedByUSGov",
|
||||
69: "EPurchaseResultDetail_ItemsReservedForCommercialUse",
|
||||
70: "EPurchaseResultDetail_GiftAlreadyOwned",
|
||||
71: "EPurchaseResultDetail_GiftInvalidForRecipientRegion",
|
||||
72: "EPurchaseResultDetail_GiftPricingImbalance",
|
||||
73: "EPurchaseResultDetail_GiftRecipientNotSpecified",
|
||||
74: "EPurchaseResultDetail_ItemsNotAllowedForCommercialUse",
|
||||
75: "EPurchaseResultDetail_BusinessStoreCountryCodeMismatch",
|
||||
76: "EPurchaseResultDetail_UserAssociatedWithManyCafes",
|
||||
77: "EPurchaseResultDetail_UserNotAssociatedWithCafe",
|
||||
78: "EPurchaseResultDetail_AddressInvalid",
|
||||
79: "EPurchaseResultDetail_CreditCardNumberInvalid",
|
||||
80: "EPurchaseResultDetail_CannotShipToMilitaryPostOffice",
|
||||
81: "EPurchaseResultDetail_BillingNameInvalidResemblesCreditCard",
|
||||
82: "EPurchaseResultDetail_PaymentMethodTemporarilyUnavailable",
|
||||
83: "EPurchaseResultDetail_PaymentMethodNotSupportedForProduct",
|
||||
}
|
||||
|
||||
func (e EPurchaseResultDetail) String() string {
|
||||
@@ -5275,7 +5330,8 @@ const (
|
||||
EAppInfoSection_Store EAppInfoSection = 16
|
||||
EAppInfoSection_Localization EAppInfoSection = 17
|
||||
EAppInfoSection_Broadcastgamedata EAppInfoSection = 18
|
||||
EAppInfoSection_Max EAppInfoSection = 19
|
||||
EAppInfoSection_Computed EAppInfoSection = 19
|
||||
EAppInfoSection_Albummetadata EAppInfoSection = 20
|
||||
)
|
||||
|
||||
var EAppInfoSection_name = map[EAppInfoSection]string{
|
||||
@@ -5298,7 +5354,8 @@ var EAppInfoSection_name = map[EAppInfoSection]string{
|
||||
16: "EAppInfoSection_Store",
|
||||
17: "EAppInfoSection_Localization",
|
||||
18: "EAppInfoSection_Broadcastgamedata",
|
||||
19: "EAppInfoSection_Max",
|
||||
19: "EAppInfoSection_Computed",
|
||||
20: "EAppInfoSection_Albummetadata",
|
||||
}
|
||||
|
||||
func (e EAppInfoSection) String() string {
|
||||
@@ -5330,7 +5387,7 @@ const (
|
||||
EContentDownloadSourceType_SLS EContentDownloadSourceType = 6
|
||||
EContentDownloadSourceType_SteamCache EContentDownloadSourceType = 7
|
||||
EContentDownloadSourceType_OpenCache EContentDownloadSourceType = 8
|
||||
EContentDownloadSourceType_Max EContentDownloadSourceType = 9
|
||||
EContentDownloadSourceType_LANCache EContentDownloadSourceType = 9
|
||||
)
|
||||
|
||||
var EContentDownloadSourceType_name = map[EContentDownloadSourceType]string{
|
||||
@@ -5343,7 +5400,7 @@ var EContentDownloadSourceType_name = map[EContentDownloadSourceType]string{
|
||||
6: "EContentDownloadSourceType_SLS",
|
||||
7: "EContentDownloadSourceType_SteamCache",
|
||||
8: "EContentDownloadSourceType_OpenCache",
|
||||
9: "EContentDownloadSourceType_Max",
|
||||
9: "EContentDownloadSourceType_LANCache",
|
||||
}
|
||||
|
||||
func (e EContentDownloadSourceType) String() string {
|
||||
@@ -5373,7 +5430,6 @@ const (
|
||||
EPlatformType_OSX EPlatformType = 4
|
||||
EPlatformType_PS3 EPlatformType = 5
|
||||
EPlatformType_Linux32 EPlatformType = 6
|
||||
EPlatformType_Max EPlatformType = 7
|
||||
)
|
||||
|
||||
var EPlatformType_name = map[EPlatformType]string{
|
||||
@@ -5384,7 +5440,6 @@ var EPlatformType_name = map[EPlatformType]string{
|
||||
4: "EPlatformType_OSX",
|
||||
5: "EPlatformType_PS3",
|
||||
6: "EPlatformType_Linux32",
|
||||
7: "EPlatformType_Max",
|
||||
}
|
||||
|
||||
func (e EPlatformType) String() string {
|
||||
@@ -5462,6 +5517,7 @@ const (
|
||||
EOSType_MacOS1012 EOSType = -85
|
||||
EOSType_Macos1013 EOSType = -84
|
||||
EOSType_Macos1014 EOSType = -83
|
||||
EOSType_Macos1015 EOSType = -82
|
||||
EOSType_MacOSMax EOSType = -1
|
||||
EOSType_LinuxUnknown EOSType = -203
|
||||
EOSType_Linux22 EOSType = -202
|
||||
@@ -5501,7 +5557,6 @@ const (
|
||||
EOSType_Windows10 EOSType = 16
|
||||
EOSType_Win2016 EOSType = 17
|
||||
EOSType_WinMAX EOSType = 18
|
||||
EOSType_Max EOSType = 26
|
||||
)
|
||||
|
||||
var EOSType_name = map[EOSType]string{
|
||||
@@ -5560,6 +5615,7 @@ var EOSType_name = map[EOSType]string{
|
||||
-85: "EOSType_MacOS1012",
|
||||
-84: "EOSType_Macos1013",
|
||||
-83: "EOSType_Macos1014",
|
||||
-82: "EOSType_Macos1015",
|
||||
-203: "EOSType_LinuxUnknown",
|
||||
-202: "EOSType_Linux22",
|
||||
-201: "EOSType_Linux24",
|
||||
@@ -5597,7 +5653,6 @@ var EOSType_name = map[EOSType]string{
|
||||
16: "EOSType_Win10",
|
||||
17: "EOSType_Win2016",
|
||||
18: "EOSType_WinMAX",
|
||||
26: "EOSType_Max",
|
||||
}
|
||||
|
||||
func (e EOSType) String() string {
|
||||
@@ -5734,7 +5789,19 @@ const (
|
||||
EServerType_TimeMachine EServerType = 111
|
||||
EServerType_VACDBMaster EServerType = 112
|
||||
EServerType_ContentServerConfig EServerType = 113
|
||||
EServerType_Max EServerType = 114
|
||||
EServerType_Minigame EServerType = 114
|
||||
EServerType_MLTrain EServerType = 115
|
||||
EServerType_VACTest EServerType = 116
|
||||
EServerType_TaxService EServerType = 117
|
||||
EServerType_MLInference EServerType = 118
|
||||
EServerType_UGSAggregate EServerType = 119
|
||||
EServerType_TURN EServerType = 120
|
||||
EServerType_RemoteClient EServerType = 121
|
||||
EServerType_BroadcastOrigin EServerType = 122
|
||||
EServerType_BroadcastChannel EServerType = 123
|
||||
EServerType_SteamAR EServerType = 124
|
||||
EServerType_China EServerType = 125
|
||||
EServerType_CrashDump EServerType = 126
|
||||
)
|
||||
|
||||
var EServerType_name = map[EServerType]string{
|
||||
@@ -5856,7 +5923,19 @@ var EServerType_name = map[EServerType]string{
|
||||
111: "EServerType_TimeMachine",
|
||||
112: "EServerType_VACDBMaster",
|
||||
113: "EServerType_ContentServerConfig",
|
||||
114: "EServerType_Max",
|
||||
114: "EServerType_Minigame",
|
||||
115: "EServerType_MLTrain",
|
||||
116: "EServerType_VACTest",
|
||||
117: "EServerType_TaxService",
|
||||
118: "EServerType_MLInference",
|
||||
119: "EServerType_UGSAggregate",
|
||||
120: "EServerType_TURN",
|
||||
121: "EServerType_RemoteClient",
|
||||
122: "EServerType_BroadcastOrigin",
|
||||
123: "EServerType_BroadcastChannel",
|
||||
124: "EServerType_SteamAR",
|
||||
125: "EServerType_China",
|
||||
126: "EServerType_CrashDump",
|
||||
}
|
||||
|
||||
func (e EServerType) String() string {
|
||||
@@ -6102,7 +6181,6 @@ const (
|
||||
ECurrencyCode_QAR ECurrencyCode = 39
|
||||
ECurrencyCode_CRC ECurrencyCode = 40
|
||||
ECurrencyCode_UYU ECurrencyCode = 41
|
||||
ECurrencyCode_Max ECurrencyCode = 42
|
||||
)
|
||||
|
||||
var ECurrencyCode_name = map[ECurrencyCode]string{
|
||||
@@ -6147,7 +6225,6 @@ var ECurrencyCode_name = map[ECurrencyCode]string{
|
||||
39: "ECurrencyCode_QAR",
|
||||
40: "ECurrencyCode_CRC",
|
||||
41: "ECurrencyCode_UYU",
|
||||
42: "ECurrencyCode_Max",
|
||||
}
|
||||
|
||||
func (e ECurrencyCode) String() string {
|
||||
@@ -6302,7 +6379,6 @@ const (
|
||||
EWorkshopFileType_SteamworksAccessInvite EWorkshopFileType = 13
|
||||
EWorkshopFileType_SteamVideo EWorkshopFileType = 14
|
||||
EWorkshopFileType_GameManagedItem EWorkshopFileType = 15
|
||||
EWorkshopFileType_Max EWorkshopFileType = 16
|
||||
)
|
||||
|
||||
var EWorkshopFileType_name = map[EWorkshopFileType]string{
|
||||
@@ -6322,7 +6398,6 @@ var EWorkshopFileType_name = map[EWorkshopFileType]string{
|
||||
13: "EWorkshopFileType_SteamworksAccessInvite",
|
||||
14: "EWorkshopFileType_SteamVideo",
|
||||
15: "EWorkshopFileType_GameManagedItem",
|
||||
16: "EWorkshopFileType_Max",
|
||||
}
|
||||
|
||||
func (e EWorkshopFileType) String() string {
|
||||
@@ -6548,21 +6623,19 @@ const (
|
||||
ESystemIMType_GiftRevoked ESystemIMType = 7
|
||||
ESystemIMType_SupportMessage ESystemIMType = 8
|
||||
ESystemIMType_SupportMessageClearAlert ESystemIMType = 9
|
||||
ESystemIMType_Max ESystemIMType = 10
|
||||
)
|
||||
|
||||
var ESystemIMType_name = map[ESystemIMType]string{
|
||||
0: "ESystemIMType_RawText",
|
||||
1: "ESystemIMType_InvalidCard",
|
||||
2: "ESystemIMType_RecurringPurchaseFailed",
|
||||
3: "ESystemIMType_CardWillExpire",
|
||||
4: "ESystemIMType_SubscriptionExpired",
|
||||
5: "ESystemIMType_GuestPassReceived",
|
||||
6: "ESystemIMType_GuestPassGranted",
|
||||
7: "ESystemIMType_GiftRevoked",
|
||||
8: "ESystemIMType_SupportMessage",
|
||||
9: "ESystemIMType_SupportMessageClearAlert",
|
||||
10: "ESystemIMType_Max",
|
||||
0: "ESystemIMType_RawText",
|
||||
1: "ESystemIMType_InvalidCard",
|
||||
2: "ESystemIMType_RecurringPurchaseFailed",
|
||||
3: "ESystemIMType_CardWillExpire",
|
||||
4: "ESystemIMType_SubscriptionExpired",
|
||||
5: "ESystemIMType_GuestPassReceived",
|
||||
6: "ESystemIMType_GuestPassGranted",
|
||||
7: "ESystemIMType_GiftRevoked",
|
||||
8: "ESystemIMType_SupportMessage",
|
||||
9: "ESystemIMType_SupportMessageClearAlert",
|
||||
}
|
||||
|
||||
func (e ESystemIMType) String() string {
|
||||
@@ -6618,15 +6691,15 @@ func (e EChatFlags) String() string {
|
||||
type ERemoteStoragePlatform int32
|
||||
|
||||
const (
|
||||
ERemoteStoragePlatform_None ERemoteStoragePlatform = 0
|
||||
ERemoteStoragePlatform_Windows ERemoteStoragePlatform = 1
|
||||
ERemoteStoragePlatform_OSX ERemoteStoragePlatform = 2
|
||||
ERemoteStoragePlatform_PS3 ERemoteStoragePlatform = 4
|
||||
ERemoteStoragePlatform_Linux ERemoteStoragePlatform = 8
|
||||
ERemoteStoragePlatform_Reserved2 ERemoteStoragePlatform = 16
|
||||
ERemoteStoragePlatform_Android ERemoteStoragePlatform = 32
|
||||
ERemoteStoragePlatform_IPhoneOS ERemoteStoragePlatform = 64
|
||||
ERemoteStoragePlatform_All ERemoteStoragePlatform = -1
|
||||
ERemoteStoragePlatform_None ERemoteStoragePlatform = 0
|
||||
ERemoteStoragePlatform_Windows ERemoteStoragePlatform = 1
|
||||
ERemoteStoragePlatform_OSX ERemoteStoragePlatform = 2
|
||||
ERemoteStoragePlatform_PS3 ERemoteStoragePlatform = 4
|
||||
ERemoteStoragePlatform_Linux ERemoteStoragePlatform = 8
|
||||
ERemoteStoragePlatform_Switch ERemoteStoragePlatform = 16
|
||||
ERemoteStoragePlatform_Android ERemoteStoragePlatform = 32
|
||||
ERemoteStoragePlatform_IPhoneOS ERemoteStoragePlatform = 64
|
||||
ERemoteStoragePlatform_All ERemoteStoragePlatform = -1
|
||||
)
|
||||
|
||||
var ERemoteStoragePlatform_name = map[ERemoteStoragePlatform]string{
|
||||
@@ -6635,7 +6708,7 @@ var ERemoteStoragePlatform_name = map[ERemoteStoragePlatform]string{
|
||||
2: "ERemoteStoragePlatform_OSX",
|
||||
4: "ERemoteStoragePlatform_PS3",
|
||||
8: "ERemoteStoragePlatform_Linux",
|
||||
16: "ERemoteStoragePlatform_Reserved2",
|
||||
16: "ERemoteStoragePlatform_Switch",
|
||||
32: "ERemoteStoragePlatform_Android",
|
||||
64: "ERemoteStoragePlatform_IPhoneOS",
|
||||
-1: "ERemoteStoragePlatform_All",
|
||||
@@ -6780,7 +6853,6 @@ const (
|
||||
EClientStat_P2PGameConnections EClientStat = 2
|
||||
EClientStat_P2PVoiceConnections EClientStat = 3
|
||||
EClientStat_BytesDownloaded EClientStat = 4
|
||||
EClientStat_Max EClientStat = 5
|
||||
)
|
||||
|
||||
var EClientStat_name = map[EClientStat]string{
|
||||
@@ -6789,7 +6861,6 @@ var EClientStat_name = map[EClientStat]string{
|
||||
2: "EClientStat_P2PGameConnections",
|
||||
3: "EClientStat_P2PVoiceConnections",
|
||||
4: "EClientStat_BytesDownloaded",
|
||||
5: "EClientStat_Max",
|
||||
}
|
||||
|
||||
func (e EClientStat) String() string {
|
||||
@@ -7106,6 +7177,7 @@ type EPublishedFileInappropriateResult int32
|
||||
const (
|
||||
EPublishedFileInappropriateResult_NotScanned EPublishedFileInappropriateResult = 0
|
||||
EPublishedFileInappropriateResult_VeryUnlikely EPublishedFileInappropriateResult = 1
|
||||
EPublishedFileInappropriateResult_Unlikely EPublishedFileInappropriateResult = 30
|
||||
EPublishedFileInappropriateResult_Possible EPublishedFileInappropriateResult = 50
|
||||
EPublishedFileInappropriateResult_Likely EPublishedFileInappropriateResult = 75
|
||||
EPublishedFileInappropriateResult_VeryLikely EPublishedFileInappropriateResult = 100
|
||||
@@ -7114,6 +7186,7 @@ const (
|
||||
var EPublishedFileInappropriateResult_name = map[EPublishedFileInappropriateResult]string{
|
||||
0: "EPublishedFileInappropriateResult_NotScanned",
|
||||
1: "EPublishedFileInappropriateResult_VeryUnlikely",
|
||||
30: "EPublishedFileInappropriateResult_Unlikely",
|
||||
50: "EPublishedFileInappropriateResult_Possible",
|
||||
75: "EPublishedFileInappropriateResult_Likely",
|
||||
100: "EPublishedFileInappropriateResult_VeryLikely",
|
||||
@@ -7723,6 +7796,282 @@ func (e ETradeOfferConfirmationMethod) String() string {
|
||||
return strings.Join(flags, " | ")
|
||||
}
|
||||
|
||||
type ELobbyType int32
|
||||
|
||||
const (
|
||||
ELobbyType_Private ELobbyType = 0
|
||||
ELobbyType_FriendsOnly ELobbyType = 1
|
||||
ELobbyType_Public ELobbyType = 2
|
||||
ELobbyType_Invisible ELobbyType = 3
|
||||
ELobbyType_PrivateUnique ELobbyType = 4
|
||||
)
|
||||
|
||||
var ELobbyType_name = map[ELobbyType]string{
|
||||
0: "ELobbyType_Private",
|
||||
1: "ELobbyType_FriendsOnly",
|
||||
2: "ELobbyType_Public",
|
||||
3: "ELobbyType_Invisible",
|
||||
4: "ELobbyType_PrivateUnique",
|
||||
}
|
||||
|
||||
func (e ELobbyType) String() string {
|
||||
if s, ok := ELobbyType_name[e]; ok {
|
||||
return s
|
||||
}
|
||||
var flags []string
|
||||
for k, v := range ELobbyType_name {
|
||||
if e&k != 0 {
|
||||
flags = append(flags, v)
|
||||
}
|
||||
}
|
||||
if len(flags) == 0 {
|
||||
return fmt.Sprintf("%d", e)
|
||||
}
|
||||
sort.Strings(flags)
|
||||
return strings.Join(flags, " | ")
|
||||
}
|
||||
|
||||
type ELobbyFilterType int32
|
||||
|
||||
const (
|
||||
ELobbyFilterType_String ELobbyFilterType = 0
|
||||
ELobbyFilterType_Numerical ELobbyFilterType = 1
|
||||
ELobbyFilterType_SlotsAvailable ELobbyFilterType = 2
|
||||
ELobbyFilterType_NearValue ELobbyFilterType = 3
|
||||
ELobbyFilterType_Distance ELobbyFilterType = 4
|
||||
)
|
||||
|
||||
var ELobbyFilterType_name = map[ELobbyFilterType]string{
|
||||
0: "ELobbyFilterType_String",
|
||||
1: "ELobbyFilterType_Numerical",
|
||||
2: "ELobbyFilterType_SlotsAvailable",
|
||||
3: "ELobbyFilterType_NearValue",
|
||||
4: "ELobbyFilterType_Distance",
|
||||
}
|
||||
|
||||
func (e ELobbyFilterType) String() string {
|
||||
if s, ok := ELobbyFilterType_name[e]; ok {
|
||||
return s
|
||||
}
|
||||
var flags []string
|
||||
for k, v := range ELobbyFilterType_name {
|
||||
if e&k != 0 {
|
||||
flags = append(flags, v)
|
||||
}
|
||||
}
|
||||
if len(flags) == 0 {
|
||||
return fmt.Sprintf("%d", e)
|
||||
}
|
||||
sort.Strings(flags)
|
||||
return strings.Join(flags, " | ")
|
||||
}
|
||||
|
||||
type ELobbyComparison int32
|
||||
|
||||
const (
|
||||
ELobbyComparison_EqualToOrLessThan ELobbyComparison = -2
|
||||
ELobbyComparison_LessThan ELobbyComparison = -1
|
||||
ELobbyComparison_Equal ELobbyComparison = 0
|
||||
ELobbyComparison_GreaterThan ELobbyComparison = 1
|
||||
ELobbyComparison_EqualToOrGreaterThan ELobbyComparison = 2
|
||||
ELobbyComparison_NotEqual ELobbyComparison = 3
|
||||
)
|
||||
|
||||
var ELobbyComparison_name = map[ELobbyComparison]string{
|
||||
-2: "ELobbyComparison_EqualToOrLessThan",
|
||||
-1: "ELobbyComparison_LessThan",
|
||||
0: "ELobbyComparison_Equal",
|
||||
1: "ELobbyComparison_GreaterThan",
|
||||
2: "ELobbyComparison_EqualToOrGreaterThan",
|
||||
3: "ELobbyComparison_NotEqual",
|
||||
}
|
||||
|
||||
func (e ELobbyComparison) String() string {
|
||||
if s, ok := ELobbyComparison_name[e]; ok {
|
||||
return s
|
||||
}
|
||||
var flags []string
|
||||
for k, v := range ELobbyComparison_name {
|
||||
if e&k != 0 {
|
||||
flags = append(flags, v)
|
||||
}
|
||||
}
|
||||
if len(flags) == 0 {
|
||||
return fmt.Sprintf("%d", e)
|
||||
}
|
||||
sort.Strings(flags)
|
||||
return strings.Join(flags, " | ")
|
||||
}
|
||||
|
||||
type ELobbyDistanceFilter int32
|
||||
|
||||
const (
|
||||
ELobbyDistanceFilter_Close ELobbyDistanceFilter = 0
|
||||
ELobbyDistanceFilter_Default ELobbyDistanceFilter = 1
|
||||
ELobbyDistanceFilter_Far ELobbyDistanceFilter = 2
|
||||
ELobbyDistanceFilter_Worldwide ELobbyDistanceFilter = 3
|
||||
)
|
||||
|
||||
var ELobbyDistanceFilter_name = map[ELobbyDistanceFilter]string{
|
||||
0: "ELobbyDistanceFilter_Close",
|
||||
1: "ELobbyDistanceFilter_Default",
|
||||
2: "ELobbyDistanceFilter_Far",
|
||||
3: "ELobbyDistanceFilter_Worldwide",
|
||||
}
|
||||
|
||||
func (e ELobbyDistanceFilter) String() string {
|
||||
if s, ok := ELobbyDistanceFilter_name[e]; ok {
|
||||
return s
|
||||
}
|
||||
var flags []string
|
||||
for k, v := range ELobbyDistanceFilter_name {
|
||||
if e&k != 0 {
|
||||
flags = append(flags, v)
|
||||
}
|
||||
}
|
||||
if len(flags) == 0 {
|
||||
return fmt.Sprintf("%d", e)
|
||||
}
|
||||
sort.Strings(flags)
|
||||
return strings.Join(flags, " | ")
|
||||
}
|
||||
|
||||
type ESteamIPv6ConnectivityProtocol int32
|
||||
|
||||
const (
|
||||
ESteamIPv6ConnectivityProtocol_Invalid ESteamIPv6ConnectivityProtocol = 0
|
||||
ESteamIPv6ConnectivityProtocol_Http ESteamIPv6ConnectivityProtocol = 1
|
||||
ESteamIPv6ConnectivityProtocol_Udp ESteamIPv6ConnectivityProtocol = 2
|
||||
)
|
||||
|
||||
var ESteamIPv6ConnectivityProtocol_name = map[ESteamIPv6ConnectivityProtocol]string{
|
||||
0: "ESteamIPv6ConnectivityProtocol_Invalid",
|
||||
1: "ESteamIPv6ConnectivityProtocol_Http",
|
||||
2: "ESteamIPv6ConnectivityProtocol_Udp",
|
||||
}
|
||||
|
||||
func (e ESteamIPv6ConnectivityProtocol) String() string {
|
||||
if s, ok := ESteamIPv6ConnectivityProtocol_name[e]; ok {
|
||||
return s
|
||||
}
|
||||
var flags []string
|
||||
for k, v := range ESteamIPv6ConnectivityProtocol_name {
|
||||
if e&k != 0 {
|
||||
flags = append(flags, v)
|
||||
}
|
||||
}
|
||||
if len(flags) == 0 {
|
||||
return fmt.Sprintf("%d", e)
|
||||
}
|
||||
sort.Strings(flags)
|
||||
return strings.Join(flags, " | ")
|
||||
}
|
||||
|
||||
type ESteamIPv6ConnectivityState int32
|
||||
|
||||
const (
|
||||
ESteamIPv6ConnectivityState_Unknown ESteamIPv6ConnectivityState = 0
|
||||
ESteamIPv6ConnectivityState_Good ESteamIPv6ConnectivityState = 1
|
||||
ESteamIPv6ConnectivityState_Bad ESteamIPv6ConnectivityState = 2
|
||||
)
|
||||
|
||||
var ESteamIPv6ConnectivityState_name = map[ESteamIPv6ConnectivityState]string{
|
||||
0: "ESteamIPv6ConnectivityState_Unknown",
|
||||
1: "ESteamIPv6ConnectivityState_Good",
|
||||
2: "ESteamIPv6ConnectivityState_Bad",
|
||||
}
|
||||
|
||||
func (e ESteamIPv6ConnectivityState) String() string {
|
||||
if s, ok := ESteamIPv6ConnectivityState_name[e]; ok {
|
||||
return s
|
||||
}
|
||||
var flags []string
|
||||
for k, v := range ESteamIPv6ConnectivityState_name {
|
||||
if e&k != 0 {
|
||||
flags = append(flags, v)
|
||||
}
|
||||
}
|
||||
if len(flags) == 0 {
|
||||
return fmt.Sprintf("%d", e)
|
||||
}
|
||||
sort.Strings(flags)
|
||||
return strings.Join(flags, " | ")
|
||||
}
|
||||
|
||||
type ESteamRealm int32
|
||||
|
||||
const (
|
||||
ESteamRealm_Unknown ESteamRealm = 0
|
||||
ESteamRealm_SteamGlobal ESteamRealm = 1
|
||||
ESteamRealm_SteamChina ESteamRealm = 2
|
||||
)
|
||||
|
||||
var ESteamRealm_name = map[ESteamRealm]string{
|
||||
0: "ESteamRealm_Unknown",
|
||||
1: "ESteamRealm_SteamGlobal",
|
||||
2: "ESteamRealm_SteamChina",
|
||||
}
|
||||
|
||||
func (e ESteamRealm) String() string {
|
||||
if s, ok := ESteamRealm_name[e]; ok {
|
||||
return s
|
||||
}
|
||||
var flags []string
|
||||
for k, v := range ESteamRealm_name {
|
||||
if e&k != 0 {
|
||||
flags = append(flags, v)
|
||||
}
|
||||
}
|
||||
if len(flags) == 0 {
|
||||
return fmt.Sprintf("%d", e)
|
||||
}
|
||||
sort.Strings(flags)
|
||||
return strings.Join(flags, " | ")
|
||||
}
|
||||
|
||||
type ELauncherType int32
|
||||
|
||||
const (
|
||||
ELauncherType_Default ELauncherType = 0
|
||||
ELauncherType_PerfectWorld ELauncherType = 1
|
||||
ELauncherType_Nexon ELauncherType = 2
|
||||
ELauncherType_CmdLine ELauncherType = 3
|
||||
ELauncherType_CSGO ELauncherType = 4
|
||||
ELauncherType_ClientUI ELauncherType = 5
|
||||
ELauncherType_Headless ELauncherType = 6
|
||||
ELauncherType_SteamChina ELauncherType = 7
|
||||
ELauncherType_SingleApp ELauncherType = 8
|
||||
)
|
||||
|
||||
var ELauncherType_name = map[ELauncherType]string{
|
||||
0: "ELauncherType_Default",
|
||||
1: "ELauncherType_PerfectWorld",
|
||||
2: "ELauncherType_Nexon",
|
||||
3: "ELauncherType_CmdLine",
|
||||
4: "ELauncherType_CSGO",
|
||||
5: "ELauncherType_ClientUI",
|
||||
6: "ELauncherType_Headless",
|
||||
7: "ELauncherType_SteamChina",
|
||||
8: "ELauncherType_SingleApp",
|
||||
}
|
||||
|
||||
func (e ELauncherType) String() string {
|
||||
if s, ok := ELauncherType_name[e]; ok {
|
||||
return s
|
||||
}
|
||||
var flags []string
|
||||
for k, v := range ELauncherType_name {
|
||||
if e&k != 0 {
|
||||
flags = append(flags, v)
|
||||
}
|
||||
}
|
||||
if len(flags) == 0 {
|
||||
return fmt.Sprintf("%d", e)
|
||||
}
|
||||
sort.Strings(flags)
|
||||
return strings.Join(flags, " | ")
|
||||
}
|
||||
|
||||
type EUdpPacketType uint8
|
||||
|
||||
const (
|
||||
|
||||
27
vendor/github.com/Philipp15b/go-steam/social.go
generated
vendored
27
vendor/github.com/Philipp15b/go-steam/social.go
generated
vendored
@@ -84,14 +84,14 @@ func (s *Social) SetPersonaState(state EPersonaState) {
|
||||
|
||||
// Sends a chat message to ether a room or friend
|
||||
func (s *Social) SendMessage(to SteamId, entryType EChatEntryType, message string) {
|
||||
//Friend
|
||||
// Friend
|
||||
if to.GetAccountType() == int32(EAccountType_Individual) || to.GetAccountType() == int32(EAccountType_ConsoleUser) {
|
||||
s.client.Write(NewClientMsgProtobuf(EMsg_ClientFriendMsg, &CMsgClientFriendMsg{
|
||||
Steamid: proto.Uint64(to.ToUint64()),
|
||||
ChatEntryType: proto.Int32(int32(entryType)),
|
||||
Message: []byte(message),
|
||||
}))
|
||||
//Chat room
|
||||
// Chat room
|
||||
} else if to.GetAccountType() == int32(EAccountType_Clan) || to.GetAccountType() == int32(EAccountType_Chat) {
|
||||
chatId := to.ClanToChat()
|
||||
s.client.Write(NewClientMsg(&MsgClientChatMsg{
|
||||
@@ -119,9 +119,9 @@ func (s *Social) RemoveFriend(id SteamId) {
|
||||
|
||||
// Ignores or unignores a friend on Steam
|
||||
func (s *Social) IgnoreFriend(id SteamId, setIgnore bool) {
|
||||
ignore := uint8(1) //True
|
||||
ignore := uint8(1) // True
|
||||
if !setIgnore {
|
||||
ignore = uint8(0) //False
|
||||
ignore = uint8(0) // False
|
||||
}
|
||||
s.client.Write(NewClientMsg(&MsgClientSetIgnoreFriend{
|
||||
MySteamId: s.client.SteamId(),
|
||||
@@ -244,7 +244,7 @@ func (s *Social) HandlePacket(packet *Packet) {
|
||||
}
|
||||
|
||||
func (s *Social) handleAccountInfo(packet *Packet) {
|
||||
//Just fire the personainfo, Auth handles the callback
|
||||
// Just fire the personainfo, Auth handles the callback
|
||||
flags := EClientPersonaStateFlag_PlayerName | EClientPersonaStateFlag_Presence | EClientPersonaStateFlag_SourceID
|
||||
s.RequestFriendInfo(s.client.SteamId(), EClientPersonaStateFlag(flags))
|
||||
}
|
||||
@@ -302,7 +302,7 @@ func (s *Social) handlePersonaState(packet *Packet) {
|
||||
flags := EClientPersonaStateFlag(list.GetStatusFlags())
|
||||
for _, friend := range list.GetFriends() {
|
||||
id := SteamId(friend.GetFriendid())
|
||||
if id == s.client.SteamId() { //this is our client id
|
||||
if id == s.client.SteamId() { // this is our client id
|
||||
s.mutex.Lock()
|
||||
if friend.GetPlayerName() != "" {
|
||||
s.name = friend.GetPlayerName()
|
||||
@@ -364,7 +364,6 @@ func (s *Social) handlePersonaState(packet *Packet) {
|
||||
ClanRank: friend.GetClanRank(),
|
||||
ClanTag: friend.GetClanTag(),
|
||||
OnlineSessionInstances: friend.GetOnlineSessionInstances(),
|
||||
PublishedSessionId: friend.GetPublishedInstanceId(),
|
||||
PersonaSetByUser: friend.GetPersonaSetByUser(),
|
||||
})
|
||||
}
|
||||
@@ -407,7 +406,7 @@ func (s *Social) handleClanState(packet *Packet) {
|
||||
})
|
||||
}
|
||||
|
||||
//Add stuff to group
|
||||
// Add stuff to group
|
||||
clanid := SteamId(body.GetSteamidClan())
|
||||
if body.NameInfo != nil {
|
||||
info := body.NameInfo
|
||||
@@ -473,14 +472,14 @@ func (s *Social) handleChatEnter(packet *Packet) {
|
||||
payload := packet.ReadClientMsg(body).Payload
|
||||
reader := bytes.NewBuffer(payload)
|
||||
name, _ := ReadString(reader)
|
||||
ReadByte(reader) //0
|
||||
ReadByte(reader) // 0
|
||||
count := body.NumMembers
|
||||
chatId := SteamId(body.SteamIdChat)
|
||||
clanId := SteamId(body.SteamIdClan)
|
||||
s.Chats.Add(socialcache.Chat{SteamId: chatId, GroupId: clanId})
|
||||
for i := 0; i < int(count); i++ {
|
||||
id, chatPerm, clanPerm := readChatMember(reader)
|
||||
ReadBytes(reader, 6) //No idea what this is
|
||||
ReadBytes(reader, 6) // No idea what this is
|
||||
s.Chats.AddChatMember(chatId, socialcache.ChatMember{
|
||||
SteamId: SteamId(id),
|
||||
ChatPermissions: chatPerm,
|
||||
@@ -508,7 +507,7 @@ func (s *Social) handleChatMemberInfo(packet *Packet) {
|
||||
actedOn, _ := ReadUint64(reader)
|
||||
state, _ := ReadInt32(reader)
|
||||
actedBy, _ := ReadUint64(reader)
|
||||
ReadByte(reader) //0
|
||||
ReadByte(reader) // 0
|
||||
stateChange := EChatMemberStateChange(state)
|
||||
if stateChange == EChatMemberStateChange_Entered {
|
||||
_, chatPerm, clanPerm := readChatMember(reader)
|
||||
@@ -537,13 +536,13 @@ func (s *Social) handleChatMemberInfo(packet *Packet) {
|
||||
func readChatMember(r io.Reader) (SteamId, EChatPermission, EClanPermission) {
|
||||
ReadString(r) // MessageObject
|
||||
ReadByte(r) // 7
|
||||
ReadString(r) //steamid
|
||||
ReadString(r) // steamid
|
||||
id, _ := ReadUint64(r)
|
||||
ReadByte(r) // 2
|
||||
ReadString(r) //Permissions
|
||||
ReadString(r) // Permissions
|
||||
chat, _ := ReadInt32(r)
|
||||
ReadByte(r) // 2
|
||||
ReadString(r) //Details
|
||||
ReadString(r) // Details
|
||||
clan, _ := ReadInt32(r)
|
||||
return SteamId(id), EChatPermission(chat), EClanPermission(clan)
|
||||
}
|
||||
|
||||
1
vendor/github.com/Philipp15b/go-steam/social_events.go
generated
vendored
1
vendor/github.com/Philipp15b/go-steam/social_events.go
generated
vendored
@@ -48,7 +48,6 @@ type PersonaStateEvent struct {
|
||||
ClanRank uint32
|
||||
ClanTag string
|
||||
OnlineSessionInstances uint32
|
||||
PublishedSessionId uint32
|
||||
PersonaSetByUser bool
|
||||
}
|
||||
|
||||
|
||||
4
vendor/github.com/Rhymen/go-whatsapp/README.md
generated
vendored
4
vendor/github.com/Rhymen/go-whatsapp/README.md
generated
vendored
@@ -74,6 +74,10 @@ func (myHandler) HandleBatteryMessage(msg whatsapp.BatteryMessage) {
|
||||
fmt.Println(message)
|
||||
}
|
||||
|
||||
func (myHandler) HandleNewContact(contact whatsapp.Contact) {
|
||||
fmt.Println(contact)
|
||||
}
|
||||
|
||||
wac.AddHandler(myHandler{})
|
||||
```
|
||||
The message handlers are all optional, you don't need to implement anything but the error handler to implement the interface. The ImageMessage, VideoMessage, AudioMessage and DocumentMessage provide a Download function to get the media data.
|
||||
|
||||
23
vendor/github.com/Rhymen/go-whatsapp/handler.go
generated
vendored
23
vendor/github.com/Rhymen/go-whatsapp/handler.go
generated
vendored
@@ -141,6 +141,14 @@ type BatteryMessageHandler interface {
|
||||
HandleBatteryMessage(battery BatteryMessage)
|
||||
}
|
||||
|
||||
/**
|
||||
The NewContactHandler interface needs to be implemented to receive the contact's name for the first time.
|
||||
*/
|
||||
type NewContactHandler interface {
|
||||
Handler
|
||||
HandleNewContact(contact Contact)
|
||||
}
|
||||
|
||||
/*
|
||||
AddHandler adds an handler to the list of handler that receive dispatched messages.
|
||||
The provided handler must at least implement the Handler interface. Additionally implemented
|
||||
@@ -304,6 +312,17 @@ func (wac *Conn) handleWithCustomHandlers(message interface{}, handlers []Handle
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
case Contact:
|
||||
for _, h := range handlers {
|
||||
if x, ok := h.(NewContactHandler); ok {
|
||||
if wac.shouldCallSynchronously(h) {
|
||||
x.HandleNewContact(m)
|
||||
} else {
|
||||
go x.HandleNewContact(m)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
case *proto.WebMessageInfo:
|
||||
for _, h := range handlers {
|
||||
@@ -397,6 +416,10 @@ func (wac *Conn) dispatch(msg interface{}) {
|
||||
wac.handle(v)
|
||||
wac.handle(ParseProtoMessage(v))
|
||||
}
|
||||
|
||||
if v, ok := con[a].(binary.Node); ok {
|
||||
wac.handle(ParseNodeMessage(v))
|
||||
}
|
||||
}
|
||||
} else if con, ok := message.Content.([]binary.Node); ok {
|
||||
for a := range con {
|
||||
|
||||
16
vendor/github.com/Rhymen/go-whatsapp/media.go
generated
vendored
16
vendor/github.com/Rhymen/go-whatsapp/media.go
generated
vendored
@@ -129,7 +129,17 @@ func (wac *Conn) queryMediaConn() (hostname, auth string, ttl int, err error) {
|
||||
return "", "", 0, fmt.Errorf("query media conn responded with %d", resp.Status)
|
||||
}
|
||||
|
||||
return resp.MediaConn.Hosts[0].Hostname, resp.MediaConn.Auth, resp.MediaConn.TTL, nil
|
||||
var host string
|
||||
for _, h := range resp.MediaConn.Hosts {
|
||||
if h.Hostname!="" {
|
||||
host = h.Hostname
|
||||
break
|
||||
}
|
||||
}
|
||||
if host == "" {
|
||||
return "", "", 0, fmt.Errorf("query media conn responded with no host")
|
||||
}
|
||||
return host, resp.MediaConn.Auth, resp.MediaConn.TTL, nil
|
||||
}
|
||||
|
||||
var mediaTypeMap = map[MediaType]string{
|
||||
@@ -173,6 +183,10 @@ func (wac *Conn) Upload(reader io.Reader, appInfo MediaType) (downloadURL string
|
||||
fileEncSha256 = sha.Sum(nil)
|
||||
|
||||
hostname, auth, _, err := wac.queryMediaConn()
|
||||
if err != nil {
|
||||
return "", nil, nil, nil, 0, err
|
||||
}
|
||||
|
||||
token := base64.URLEncoding.EncodeToString(fileEncSha256)
|
||||
q := url.Values{
|
||||
"auth": []string{auth},
|
||||
|
||||
10
vendor/github.com/Rhymen/go-whatsapp/message.go
generated
vendored
10
vendor/github.com/Rhymen/go-whatsapp/message.go
generated
vendored
@@ -867,11 +867,21 @@ func getBatteryMessage(msg map[string]string) BatteryMessage {
|
||||
return batteryMessage
|
||||
}
|
||||
|
||||
func getNewContact(msg map[string]string) Contact {
|
||||
contact := Contact{
|
||||
Jid: msg["jid"],
|
||||
Notify: msg["notify"],
|
||||
}
|
||||
|
||||
return contact
|
||||
}
|
||||
|
||||
func ParseNodeMessage(msg binary.Node) interface{} {
|
||||
switch msg.Description {
|
||||
case "battery":
|
||||
return getBatteryMessage(msg.Attributes)
|
||||
case "user":
|
||||
return getNewContact(msg.Attributes)
|
||||
default:
|
||||
//cannot match message
|
||||
}
|
||||
|
||||
6
vendor/github.com/Rhymen/go-whatsapp/session.go
generated
vendored
6
vendor/github.com/Rhymen/go-whatsapp/session.go
generated
vendored
@@ -18,7 +18,7 @@ import (
|
||||
)
|
||||
|
||||
//represents the WhatsAppWeb client version
|
||||
var waVersion = []int{2, 2033, 7}
|
||||
var waVersion = []int{2, 2039, 9}
|
||||
|
||||
/*
|
||||
Session contains session individual information. To be able to resume the connection without scanning the qr code
|
||||
@@ -141,11 +141,11 @@ func CheckCurrentServerVersion() ([]int, error) {
|
||||
SetClientName sets the long and short client names that are sent to WhatsApp when logging in and displayed in the
|
||||
WhatsApp Web device list. As the values are only sent when logging in, changing them after logging in is not possible.
|
||||
*/
|
||||
func (wac *Conn) SetClientName(long, short string) error {
|
||||
func (wac *Conn) SetClientName(long, short string, version string) error {
|
||||
if wac.session != nil && (wac.session.EncKey != nil || wac.session.MacKey != nil) {
|
||||
return fmt.Errorf("cannot change client name after logging in")
|
||||
}
|
||||
wac.longClientName, wac.shortClientName = long, short
|
||||
wac.longClientName, wac.shortClientName, wac.clientVersion = long, short, version
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
4
vendor/github.com/d5/tengo/v2/compiler.go
generated
vendored
4
vendor/github.com/d5/tengo/v2/compiler.go
generated
vendored
@@ -323,7 +323,7 @@ func (c *Compiler) Compile(node parser.Node) error {
|
||||
return err
|
||||
}
|
||||
case *parser.Ident:
|
||||
symbol, _, ok := c.symbolTable.Resolve(node.Name)
|
||||
symbol, _, ok := c.symbolTable.Resolve(node.Name, false)
|
||||
if !ok {
|
||||
return c.errorf(node, "unresolved reference '%s'", node.Name)
|
||||
}
|
||||
@@ -659,7 +659,7 @@ func (c *Compiler) compileAssign(
|
||||
return c.errorf(node, "operator ':=' not allowed with selector")
|
||||
}
|
||||
|
||||
symbol, depth, exists := c.symbolTable.Resolve(ident)
|
||||
symbol, depth, exists := c.symbolTable.Resolve(ident, false)
|
||||
if op == token.Define {
|
||||
if depth == 0 && exists {
|
||||
return c.errorf(node, "'%s' redeclared in this block", ident)
|
||||
|
||||
2
vendor/github.com/d5/tengo/v2/script.go
generated
vendored
2
vendor/github.com/d5/tengo/v2/script.go
generated
vendored
@@ -116,7 +116,7 @@ func (s *Script) Compile() (*Compiled, error) {
|
||||
// global symbol names to indexes
|
||||
globalIndexes := make(map[string]int, len(globals))
|
||||
for _, name := range symbolTable.Names() {
|
||||
symbol, _, _ := symbolTable.Resolve(name)
|
||||
symbol, _, _ := symbolTable.Resolve(name, false)
|
||||
if symbol.Scope == ScopeGlobal {
|
||||
globalIndexes[name] = symbol.Index
|
||||
}
|
||||
|
||||
56
vendor/github.com/d5/tengo/v2/symbol_table.go
generated
vendored
56
vendor/github.com/d5/tengo/v2/symbol_table.go
generated
vendored
@@ -44,6 +44,17 @@ func (t *SymbolTable) Define(name string) *Symbol {
|
||||
|
||||
if t.Parent(true) == nil {
|
||||
symbol.Scope = ScopeGlobal
|
||||
|
||||
// if symbol is defined in a block of global scope, symbol index must
|
||||
// be tracked at the root-level table instead.
|
||||
if p := t.parent; p != nil {
|
||||
for p.parent != nil {
|
||||
p = p.parent
|
||||
}
|
||||
t.numDefinition--
|
||||
p.numDefinition++
|
||||
}
|
||||
|
||||
} else {
|
||||
symbol.Scope = ScopeLocal
|
||||
}
|
||||
@@ -71,25 +82,36 @@ func (t *SymbolTable) DefineBuiltin(index int, name string) *Symbol {
|
||||
// Resolve resolves a symbol with a given name.
|
||||
func (t *SymbolTable) Resolve(
|
||||
name string,
|
||||
) (symbol *Symbol, depth int, ok bool) {
|
||||
symbol, ok = t.store[name]
|
||||
if !ok && t.parent != nil {
|
||||
symbol, depth, ok = t.parent.Resolve(name)
|
||||
if !ok {
|
||||
return
|
||||
recur bool,
|
||||
) (*Symbol, int, bool) {
|
||||
symbol, ok := t.store[name]
|
||||
if ok {
|
||||
// symbol can be used if
|
||||
if symbol.Scope != ScopeLocal || // it's not of local scope, OR,
|
||||
symbol.LocalAssigned || // it's assigned at least once, OR,
|
||||
recur { // it's defined in higher level
|
||||
return symbol, 0, true
|
||||
}
|
||||
depth++
|
||||
|
||||
// if symbol is defined in parent table and if it's not global/builtin
|
||||
// then it's free variable.
|
||||
if !t.block && depth > 0 &&
|
||||
symbol.Scope != ScopeGlobal &&
|
||||
symbol.Scope != ScopeBuiltin {
|
||||
return t.defineFree(symbol), depth, true
|
||||
}
|
||||
return
|
||||
}
|
||||
return
|
||||
|
||||
if t.parent == nil {
|
||||
return nil, 0, false
|
||||
}
|
||||
|
||||
symbol, depth, ok := t.parent.Resolve(name, true)
|
||||
if !ok {
|
||||
return nil, 0, false
|
||||
}
|
||||
depth++
|
||||
|
||||
// if symbol is defined in parent table and if it's not global/builtin
|
||||
// then it's free variable.
|
||||
if !t.block && depth > 0 &&
|
||||
symbol.Scope != ScopeGlobal &&
|
||||
symbol.Scope != ScopeBuiltin {
|
||||
return t.defineFree(symbol), depth, true
|
||||
}
|
||||
return symbol, depth, true
|
||||
}
|
||||
|
||||
// Fork creates a new symbol table for a new scope.
|
||||
|
||||
73
vendor/github.com/go-asn1-ber/asn1-ber/.travis.yml
generated
vendored
73
vendor/github.com/go-asn1-ber/asn1-ber/.travis.yml
generated
vendored
@@ -1,38 +1,39 @@
|
||||
language: go
|
||||
matrix:
|
||||
include:
|
||||
- go: 1.2.x
|
||||
env: GOOS=linux GOARCH=amd64
|
||||
- go: 1.2.x
|
||||
env: GOOS=linux GOARCH=386
|
||||
- go: 1.2.x
|
||||
env: GOOS=windows GOARCH=amd64
|
||||
- go: 1.2.x
|
||||
env: GOOS=windows GOARCH=386
|
||||
- go: 1.3.x
|
||||
- go: 1.4.x
|
||||
- go: 1.5.x
|
||||
- go: 1.6.x
|
||||
- go: 1.7.x
|
||||
- go: 1.8.x
|
||||
- go: 1.9.x
|
||||
- go: 1.10.x
|
||||
- go: 1.11.x
|
||||
- go: 1.12.x
|
||||
- go: 1.13.x
|
||||
env: GOOS=linux GOARCH=amd64
|
||||
- go: 1.13.x
|
||||
env: GOOS=linux GOARCH=386
|
||||
- go: 1.13.x
|
||||
env: GOOS=windows GOARCH=amd64
|
||||
- go: 1.13.x
|
||||
env: GOOS=windows GOARCH=386
|
||||
- go: tip
|
||||
go_import_path: gopkg.in/asn-ber.v1
|
||||
install:
|
||||
- go list -f '{{range .Imports}}{{.}} {{end}}' ./... | xargs go get -v
|
||||
- go list -f '{{range .TestImports}}{{.}} {{end}}' ./... | xargs go get -v
|
||||
- go get code.google.com/p/go.tools/cmd/cover || go get golang.org/x/tools/cmd/cover
|
||||
- go build -v ./...
|
||||
|
||||
go:
|
||||
- 1.2.x
|
||||
- 1.6.x
|
||||
- 1.9.x
|
||||
- 1.10.x
|
||||
- 1.11.x
|
||||
- 1.12.x
|
||||
- 1.14.x
|
||||
- tip
|
||||
|
||||
os:
|
||||
- linux
|
||||
|
||||
arch:
|
||||
- amd64
|
||||
|
||||
dist: xenial
|
||||
|
||||
env:
|
||||
- GOARCH=amd64
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- os: windows
|
||||
go: 1.14.x
|
||||
- os: osx
|
||||
go: 1.14.x
|
||||
- os: linux
|
||||
go: 1.14.x
|
||||
arch: arm64
|
||||
- os: linux
|
||||
go: 1.14.x
|
||||
env:
|
||||
- GOARCH=386
|
||||
|
||||
script:
|
||||
- go test -v -cover ./... || go test -v ./...
|
||||
- go test -v -cover ./... || go test -v ./...
|
||||
|
||||
198
vendor/github.com/go-asn1-ber/asn1-ber/ber.go
generated
vendored
198
vendor/github.com/go-asn1-ber/asn1-ber/ber.go
generated
vendored
@@ -8,6 +8,8 @@ import (
|
||||
"math"
|
||||
"os"
|
||||
"reflect"
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
||||
// MaxPacketLengthBytes specifies the maximum allowed packet size when calling ReadPacket or DecodePacket. Set to 0 for
|
||||
@@ -143,20 +145,20 @@ var TypeMap = map[Type]string{
|
||||
TypeConstructed: "Constructed",
|
||||
}
|
||||
|
||||
var Debug bool = false
|
||||
var Debug = false
|
||||
|
||||
func PrintBytes(out io.Writer, buf []byte, indent string) {
|
||||
data_lines := make([]string, (len(buf)/30)+1)
|
||||
num_lines := make([]string, (len(buf)/30)+1)
|
||||
dataLines := make([]string, (len(buf)/30)+1)
|
||||
numLines := make([]string, (len(buf)/30)+1)
|
||||
|
||||
for i, b := range buf {
|
||||
data_lines[i/30] += fmt.Sprintf("%02x ", b)
|
||||
num_lines[i/30] += fmt.Sprintf("%02d ", (i+1)%100)
|
||||
dataLines[i/30] += fmt.Sprintf("%02x ", b)
|
||||
numLines[i/30] += fmt.Sprintf("%02d ", (i+1)%100)
|
||||
}
|
||||
|
||||
for i := 0; i < len(data_lines); i++ {
|
||||
out.Write([]byte(indent + data_lines[i] + "\n"))
|
||||
out.Write([]byte(indent + num_lines[i] + "\n\n"))
|
||||
for i := 0; i < len(dataLines); i++ {
|
||||
_, _ = out.Write([]byte(indent + dataLines[i] + "\n"))
|
||||
_, _ = out.Write([]byte(indent + numLines[i] + "\n\n"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,20 +171,20 @@ func PrintPacket(p *Packet) {
|
||||
}
|
||||
|
||||
func printPacket(out io.Writer, p *Packet, indent int, printBytes bool) {
|
||||
indent_str := ""
|
||||
indentStr := ""
|
||||
|
||||
for len(indent_str) != indent {
|
||||
indent_str += " "
|
||||
for len(indentStr) != indent {
|
||||
indentStr += " "
|
||||
}
|
||||
|
||||
class_str := ClassMap[p.ClassType]
|
||||
classStr := ClassMap[p.ClassType]
|
||||
|
||||
tagtype_str := TypeMap[p.TagType]
|
||||
tagTypeStr := TypeMap[p.TagType]
|
||||
|
||||
tag_str := fmt.Sprintf("0x%02X", p.Tag)
|
||||
tagStr := fmt.Sprintf("0x%02X", p.Tag)
|
||||
|
||||
if p.ClassType == ClassUniversal {
|
||||
tag_str = tagMap[p.Tag]
|
||||
tagStr = tagMap[p.Tag]
|
||||
}
|
||||
|
||||
value := fmt.Sprint(p.Value)
|
||||
@@ -192,10 +194,10 @@ func printPacket(out io.Writer, p *Packet, indent int, printBytes bool) {
|
||||
description = p.Description + ": "
|
||||
}
|
||||
|
||||
fmt.Fprintf(out, "%s%s(%s, %s, %s) Len=%d %q\n", indent_str, description, class_str, tagtype_str, tag_str, p.Data.Len(), value)
|
||||
_, _ = fmt.Fprintf(out, "%s%s(%s, %s, %s) Len=%d %q\n", indentStr, description, classStr, tagTypeStr, tagStr, p.Data.Len(), value)
|
||||
|
||||
if printBytes {
|
||||
PrintBytes(out, p.Bytes(), indent_str)
|
||||
PrintBytes(out, p.Bytes(), indentStr)
|
||||
}
|
||||
|
||||
for _, child := range p.Children {
|
||||
@@ -203,7 +205,7 @@ func printPacket(out io.Writer, p *Packet, indent int, printBytes bool) {
|
||||
}
|
||||
}
|
||||
|
||||
// ReadPacket reads a single Packet from the reader
|
||||
// ReadPacket reads a single Packet from the reader.
|
||||
func ReadPacket(reader io.Reader) (*Packet, error) {
|
||||
p, _, err := readPacket(reader)
|
||||
if err != nil {
|
||||
@@ -239,7 +241,7 @@ func encodeInteger(i int64) []byte {
|
||||
|
||||
var j int
|
||||
for ; n > 0; n-- {
|
||||
out[j] = (byte(i >> uint((n-1)*8)))
|
||||
out[j] = byte(i >> uint((n-1)*8))
|
||||
j++
|
||||
}
|
||||
|
||||
@@ -271,7 +273,7 @@ func DecodePacket(data []byte) *Packet {
|
||||
}
|
||||
|
||||
// DecodePacketErr decodes the given bytes into a single Packet
|
||||
// If a decode error is encountered, nil is returned
|
||||
// If a decode error is encountered, nil is returned.
|
||||
func DecodePacketErr(data []byte) (*Packet, error) {
|
||||
p, _, err := readPacket(bytes.NewBuffer(data))
|
||||
if err != nil {
|
||||
@@ -280,7 +282,7 @@ func DecodePacketErr(data []byte) (*Packet, error) {
|
||||
return p, nil
|
||||
}
|
||||
|
||||
// readPacket reads a single Packet from the reader, returning the number of bytes read
|
||||
// readPacket reads a single Packet from the reader, returning the number of bytes read.
|
||||
func readPacket(reader io.Reader) (*Packet, int, error) {
|
||||
identifier, length, read, err := readHeader(reader)
|
||||
if err != nil {
|
||||
@@ -342,7 +344,7 @@ func readPacket(reader io.Reader) (*Packet, int, error) {
|
||||
if MaxPacketLengthBytes > 0 && int64(length) > MaxPacketLengthBytes {
|
||||
return nil, read, fmt.Errorf("length %d greater than maximum %d", length, MaxPacketLengthBytes)
|
||||
}
|
||||
content := make([]byte, length, length)
|
||||
content := make([]byte, length)
|
||||
if length > 0 {
|
||||
_, err := io.ReadFull(reader, content)
|
||||
if err != nil {
|
||||
@@ -377,22 +379,42 @@ func readPacket(reader io.Reader) (*Packet, int, error) {
|
||||
case TagObjectDescriptor:
|
||||
case TagExternal:
|
||||
case TagRealFloat:
|
||||
p.Value, err = ParseReal(content)
|
||||
case TagEnumerated:
|
||||
p.Value, _ = ParseInt64(content)
|
||||
case TagEmbeddedPDV:
|
||||
case TagUTF8String:
|
||||
p.Value = DecodeString(content)
|
||||
val := DecodeString(content)
|
||||
if !utf8.Valid([]byte(val)) {
|
||||
err = errors.New("invalid UTF-8 string")
|
||||
} else {
|
||||
p.Value = val
|
||||
}
|
||||
case TagRelativeOID:
|
||||
case TagSequence:
|
||||
case TagSet:
|
||||
case TagNumericString:
|
||||
case TagPrintableString:
|
||||
p.Value = DecodeString(content)
|
||||
val := DecodeString(content)
|
||||
if err = isPrintableString(val); err == nil {
|
||||
p.Value = val
|
||||
}
|
||||
case TagT61String:
|
||||
case TagVideotexString:
|
||||
case TagIA5String:
|
||||
val := DecodeString(content)
|
||||
for i, c := range val {
|
||||
if c >= 0x7F {
|
||||
err = fmt.Errorf("invalid character for IA5String at pos %d: %c", i, c)
|
||||
break
|
||||
}
|
||||
}
|
||||
if err == nil {
|
||||
p.Value = val
|
||||
}
|
||||
case TagUTCTime:
|
||||
case TagGeneralizedTime:
|
||||
p.Value, err = ParseGeneralizedTime(content)
|
||||
case TagGraphicString:
|
||||
case TagVisibleString:
|
||||
case TagGeneralString:
|
||||
@@ -404,7 +426,24 @@ func readPacket(reader io.Reader) (*Packet, int, error) {
|
||||
p.Data.Write(content)
|
||||
}
|
||||
|
||||
return p, read, nil
|
||||
return p, read, err
|
||||
}
|
||||
|
||||
func isPrintableString(val string) error {
|
||||
for i, c := range val {
|
||||
switch {
|
||||
case c >= 'a' && c <= 'z':
|
||||
case c >= 'A' && c <= 'Z':
|
||||
case c >= '0' && c <= '9':
|
||||
default:
|
||||
switch c {
|
||||
case '\'', '(', ')', '+', ',', '-', '.', '=', '/', ':', '?', ' ':
|
||||
default:
|
||||
return fmt.Errorf("invalid character in position %d", i)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *Packet) Bytes() []byte {
|
||||
@@ -422,77 +461,99 @@ func (p *Packet) AppendChild(child *Packet) {
|
||||
p.Children = append(p.Children, child)
|
||||
}
|
||||
|
||||
func Encode(ClassType Class, TagType Type, Tag Tag, Value interface{}, Description string) *Packet {
|
||||
func Encode(classType Class, tagType Type, tag Tag, value interface{}, description string) *Packet {
|
||||
p := new(Packet)
|
||||
|
||||
p.ClassType = ClassType
|
||||
p.TagType = TagType
|
||||
p.Tag = Tag
|
||||
p.ClassType = classType
|
||||
p.TagType = tagType
|
||||
p.Tag = tag
|
||||
p.Data = new(bytes.Buffer)
|
||||
|
||||
p.Children = make([]*Packet, 0, 2)
|
||||
|
||||
p.Value = Value
|
||||
p.Description = Description
|
||||
p.Value = value
|
||||
p.Description = description
|
||||
|
||||
if Value != nil {
|
||||
v := reflect.ValueOf(Value)
|
||||
if value != nil {
|
||||
v := reflect.ValueOf(value)
|
||||
|
||||
if ClassType == ClassUniversal {
|
||||
switch Tag {
|
||||
if classType == ClassUniversal {
|
||||
switch tag {
|
||||
case TagOctetString:
|
||||
sv, ok := v.Interface().(string)
|
||||
|
||||
if ok {
|
||||
p.Data.Write([]byte(sv))
|
||||
}
|
||||
case TagEnumerated:
|
||||
bv, ok := v.Interface().([]byte)
|
||||
if ok {
|
||||
p.Data.Write(bv)
|
||||
}
|
||||
case TagEmbeddedPDV:
|
||||
bv, ok := v.Interface().([]byte)
|
||||
if ok {
|
||||
p.Data.Write(bv)
|
||||
}
|
||||
}
|
||||
} else if classType == ClassContext {
|
||||
switch tag {
|
||||
case TagEnumerated:
|
||||
bv, ok := v.Interface().([]byte)
|
||||
if ok {
|
||||
p.Data.Write(bv)
|
||||
}
|
||||
case TagEmbeddedPDV:
|
||||
bv, ok := v.Interface().([]byte)
|
||||
if ok {
|
||||
p.Data.Write(bv)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return p
|
||||
}
|
||||
|
||||
func NewSequence(Description string) *Packet {
|
||||
return Encode(ClassUniversal, TypeConstructed, TagSequence, nil, Description)
|
||||
func NewSequence(description string) *Packet {
|
||||
return Encode(ClassUniversal, TypeConstructed, TagSequence, nil, description)
|
||||
}
|
||||
|
||||
func NewBoolean(ClassType Class, TagType Type, Tag Tag, Value bool, Description string) *Packet {
|
||||
func NewBoolean(classType Class, tagType Type, tag Tag, value bool, description string) *Packet {
|
||||
intValue := int64(0)
|
||||
|
||||
if Value {
|
||||
if value {
|
||||
intValue = 1
|
||||
}
|
||||
|
||||
p := Encode(ClassType, TagType, Tag, nil, Description)
|
||||
p := Encode(classType, tagType, tag, nil, description)
|
||||
|
||||
p.Value = Value
|
||||
p.Value = value
|
||||
p.Data.Write(encodeInteger(intValue))
|
||||
|
||||
return p
|
||||
}
|
||||
|
||||
// NewLDAPBoolean returns a RFC 4511-compliant Boolean packet
|
||||
func NewLDAPBoolean(Value bool, Description string) *Packet {
|
||||
// NewLDAPBoolean returns a RFC 4511-compliant Boolean packet.
|
||||
func NewLDAPBoolean(classType Class, tagType Type, tag Tag, value bool, description string) *Packet {
|
||||
intValue := int64(0)
|
||||
|
||||
if Value {
|
||||
if value {
|
||||
intValue = 255
|
||||
}
|
||||
|
||||
p := Encode(ClassUniversal, TypePrimitive, TagBoolean, nil, Description)
|
||||
p := Encode(classType, tagType, tag, nil, description)
|
||||
|
||||
p.Value = Value
|
||||
p.Value = value
|
||||
p.Data.Write(encodeInteger(intValue))
|
||||
|
||||
return p
|
||||
}
|
||||
|
||||
func NewInteger(ClassType Class, TagType Type, Tag Tag, Value interface{}, Description string) *Packet {
|
||||
p := Encode(ClassType, TagType, Tag, nil, Description)
|
||||
func NewInteger(classType Class, tagType Type, tag Tag, value interface{}, description string) *Packet {
|
||||
p := Encode(classType, tagType, tag, nil, description)
|
||||
|
||||
p.Value = Value
|
||||
switch v := Value.(type) {
|
||||
p.Value = value
|
||||
switch v := value.(type) {
|
||||
case int:
|
||||
p.Data.Write(encodeInteger(int64(v)))
|
||||
case uint:
|
||||
@@ -522,11 +583,38 @@ func NewInteger(ClassType Class, TagType Type, Tag Tag, Value interface{}, Descr
|
||||
return p
|
||||
}
|
||||
|
||||
func NewString(ClassType Class, TagType Type, Tag Tag, Value, Description string) *Packet {
|
||||
p := Encode(ClassType, TagType, Tag, nil, Description)
|
||||
func NewString(classType Class, tagType Type, tag Tag, value, description string) *Packet {
|
||||
p := Encode(classType, tagType, tag, nil, description)
|
||||
|
||||
p.Value = Value
|
||||
p.Data.Write([]byte(Value))
|
||||
p.Value = value
|
||||
p.Data.Write([]byte(value))
|
||||
|
||||
return p
|
||||
}
|
||||
|
||||
func NewGeneralizedTime(classType Class, tagType Type, tag Tag, value time.Time, description string) *Packet {
|
||||
p := Encode(classType, tagType, tag, nil, description)
|
||||
var s string
|
||||
if value.Nanosecond() != 0 {
|
||||
s = value.Format(`20060102150405.000000000Z`)
|
||||
} else {
|
||||
s = value.Format(`20060102150405Z`)
|
||||
}
|
||||
p.Value = s
|
||||
p.Data.Write([]byte(s))
|
||||
return p
|
||||
}
|
||||
|
||||
func NewReal(classType Class, tagType Type, tag Tag, value interface{}, description string) *Packet {
|
||||
p := Encode(classType, tagType, tag, nil, description)
|
||||
|
||||
switch v := value.(type) {
|
||||
case float64:
|
||||
p.Data.Write(encodeFloat(v))
|
||||
case float32:
|
||||
p.Data.Write(encodeFloat(float64(v)))
|
||||
default:
|
||||
panic(fmt.Sprintf("Invalid type %T, expected float{64|32}", v))
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
2
vendor/github.com/go-asn1-ber/asn1-ber/content_int.go
generated
vendored
2
vendor/github.com/go-asn1-ber/asn1-ber/content_int.go
generated
vendored
@@ -6,7 +6,7 @@ func encodeUnsignedInteger(i uint64) []byte {
|
||||
|
||||
var j int
|
||||
for ; n > 0; n-- {
|
||||
out[j] = (byte(i >> uint((n-1)*8)))
|
||||
out[j] = byte(i >> uint((n-1)*8))
|
||||
j++
|
||||
}
|
||||
|
||||
|
||||
105
vendor/github.com/go-asn1-ber/asn1-ber/generalizedTime.go
generated
vendored
Normal file
105
vendor/github.com/go-asn1-ber/asn1-ber/generalizedTime.go
generated
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
package ber
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
// ErrInvalidTimeFormat is returned when the generalizedTime string was not correct.
|
||||
var ErrInvalidTimeFormat = errors.New("invalid time format")
|
||||
|
||||
var zeroTime = time.Time{}
|
||||
|
||||
// ParseGeneralizedTime parses a string value and if it conforms to
|
||||
// GeneralizedTime[^0] format, will return a time.Time for that value.
|
||||
//
|
||||
// [^0]: https://www.itu.int/rec/T-REC-X.690-201508-I/en Section 11.7
|
||||
func ParseGeneralizedTime(v []byte) (time.Time, error) {
|
||||
var format string
|
||||
var fract time.Duration
|
||||
|
||||
str := []byte(DecodeString(v))
|
||||
tzIndex := bytes.IndexAny(str, "Z+-")
|
||||
if tzIndex < 0 {
|
||||
return zeroTime, ErrInvalidTimeFormat
|
||||
}
|
||||
|
||||
dot := bytes.IndexAny(str, ".,")
|
||||
switch dot {
|
||||
case -1:
|
||||
switch tzIndex {
|
||||
case 10:
|
||||
format = `2006010215Z`
|
||||
case 12:
|
||||
format = `200601021504Z`
|
||||
case 14:
|
||||
format = `20060102150405Z`
|
||||
default:
|
||||
return zeroTime, ErrInvalidTimeFormat
|
||||
}
|
||||
|
||||
case 10, 12:
|
||||
if tzIndex < dot {
|
||||
return zeroTime, ErrInvalidTimeFormat
|
||||
}
|
||||
// a "," is also allowed, but would not be parsed by time.Parse():
|
||||
str[dot] = '.'
|
||||
|
||||
// If <minute> is omitted, then <fraction> represents a fraction of an
|
||||
// hour; otherwise, if <second> and <leap-second> are omitted, then
|
||||
// <fraction> represents a fraction of a minute; otherwise, <fraction>
|
||||
// represents a fraction of a second.
|
||||
|
||||
// parse as float from dot to timezone
|
||||
f, err := strconv.ParseFloat(string(str[dot:tzIndex]), 64)
|
||||
if err != nil {
|
||||
return zeroTime, fmt.Errorf("failed to parse float: %s", err)
|
||||
}
|
||||
// ...and strip that part
|
||||
str = append(str[:dot], str[tzIndex:]...)
|
||||
tzIndex = dot
|
||||
|
||||
if dot == 10 {
|
||||
fract = time.Duration(int64(f * float64(time.Hour)))
|
||||
format = `2006010215Z`
|
||||
} else {
|
||||
fract = time.Duration(int64(f * float64(time.Minute)))
|
||||
format = `200601021504Z`
|
||||
}
|
||||
|
||||
case 14:
|
||||
if tzIndex < dot {
|
||||
return zeroTime, ErrInvalidTimeFormat
|
||||
}
|
||||
str[dot] = '.'
|
||||
// no need for fractional seconds, time.Parse() handles that
|
||||
format = `20060102150405Z`
|
||||
|
||||
default:
|
||||
return zeroTime, ErrInvalidTimeFormat
|
||||
}
|
||||
|
||||
l := len(str)
|
||||
switch l - tzIndex {
|
||||
case 1:
|
||||
if str[l-1] != 'Z' {
|
||||
return zeroTime, ErrInvalidTimeFormat
|
||||
}
|
||||
case 3:
|
||||
format += `0700`
|
||||
str = append(str, []byte("00")...)
|
||||
case 5:
|
||||
format += `0700`
|
||||
default:
|
||||
return zeroTime, ErrInvalidTimeFormat
|
||||
}
|
||||
|
||||
t, err := time.Parse(format, string(str))
|
||||
if err != nil {
|
||||
return zeroTime, fmt.Errorf("%s: %s", ErrInvalidTimeFormat, err)
|
||||
}
|
||||
return t.Add(fract), nil
|
||||
}
|
||||
23
vendor/github.com/go-asn1-ber/asn1-ber/header.go
generated
vendored
23
vendor/github.com/go-asn1-ber/asn1-ber/header.go
generated
vendored
@@ -7,19 +7,22 @@ import (
|
||||
)
|
||||
|
||||
func readHeader(reader io.Reader) (identifier Identifier, length int, read int, err error) {
|
||||
if i, c, err := readIdentifier(reader); err != nil {
|
||||
return Identifier{}, 0, read, err
|
||||
} else {
|
||||
identifier = i
|
||||
read += c
|
||||
}
|
||||
var (
|
||||
c, l int
|
||||
i Identifier
|
||||
)
|
||||
|
||||
if l, c, err := readLength(reader); err != nil {
|
||||
if i, c, err = readIdentifier(reader); err != nil {
|
||||
return Identifier{}, 0, read, err
|
||||
} else {
|
||||
length = l
|
||||
read += c
|
||||
}
|
||||
identifier = i
|
||||
read += c
|
||||
|
||||
if l, c, err = readLength(reader); err != nil {
|
||||
return Identifier{}, 0, read, err
|
||||
}
|
||||
length = l
|
||||
read += c
|
||||
|
||||
// Validate length type with identifier (x.600, 8.1.3.2.a)
|
||||
if length == LengthIndefinite && identifier.TagType == TypePrimitive {
|
||||
|
||||
12
vendor/github.com/go-asn1-ber/asn1-ber/length.go
generated
vendored
12
vendor/github.com/go-asn1-ber/asn1-ber/length.go
generated
vendored
@@ -71,11 +71,11 @@ func readLength(reader io.Reader) (length int, read int, err error) {
|
||||
}
|
||||
|
||||
func encodeLength(length int) []byte {
|
||||
length_bytes := encodeUnsignedInteger(uint64(length))
|
||||
if length > 127 || len(length_bytes) > 1 {
|
||||
longFormBytes := []byte{(LengthLongFormBitmask | byte(len(length_bytes)))}
|
||||
longFormBytes = append(longFormBytes, length_bytes...)
|
||||
length_bytes = longFormBytes
|
||||
lengthBytes := encodeUnsignedInteger(uint64(length))
|
||||
if length > 127 || len(lengthBytes) > 1 {
|
||||
longFormBytes := []byte{LengthLongFormBitmask | byte(len(lengthBytes))}
|
||||
longFormBytes = append(longFormBytes, lengthBytes...)
|
||||
lengthBytes = longFormBytes
|
||||
}
|
||||
return length_bytes
|
||||
return lengthBytes
|
||||
}
|
||||
|
||||
157
vendor/github.com/go-asn1-ber/asn1-ber/real.go
generated
vendored
Normal file
157
vendor/github.com/go-asn1-ber/asn1-ber/real.go
generated
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
package ber
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func encodeFloat(v float64) []byte {
|
||||
switch {
|
||||
case math.IsInf(v, 1):
|
||||
return []byte{0x40}
|
||||
case math.IsInf(v, -1):
|
||||
return []byte{0x41}
|
||||
case math.IsNaN(v):
|
||||
return []byte{0x42}
|
||||
case v == 0.0:
|
||||
if math.Signbit(v) {
|
||||
return []byte{0x43}
|
||||
}
|
||||
return []byte{}
|
||||
default:
|
||||
// we take the easy part ;-)
|
||||
value := []byte(strconv.FormatFloat(v, 'G', -1, 64))
|
||||
var ret []byte
|
||||
if bytes.Contains(value, []byte{'E'}) {
|
||||
ret = []byte{0x03}
|
||||
} else {
|
||||
ret = []byte{0x02}
|
||||
}
|
||||
ret = append(ret, value...)
|
||||
return ret
|
||||
}
|
||||
}
|
||||
|
||||
func ParseReal(v []byte) (val float64, err error) {
|
||||
if len(v) == 0 {
|
||||
return 0.0, nil
|
||||
}
|
||||
switch {
|
||||
case v[0]&0x80 == 0x80:
|
||||
val, err = parseBinaryFloat(v)
|
||||
case v[0]&0xC0 == 0x40:
|
||||
val, err = parseSpecialFloat(v)
|
||||
case v[0]&0xC0 == 0x0:
|
||||
val, err = parseDecimalFloat(v)
|
||||
default:
|
||||
return 0.0, fmt.Errorf("invalid info block")
|
||||
}
|
||||
if err != nil {
|
||||
return 0.0, err
|
||||
}
|
||||
|
||||
if val == 0.0 && !math.Signbit(val) {
|
||||
return 0.0, errors.New("REAL value +0 must be encoded with zero-length value block")
|
||||
}
|
||||
return val, nil
|
||||
}
|
||||
|
||||
func parseBinaryFloat(v []byte) (float64, error) {
|
||||
var info byte
|
||||
var buf []byte
|
||||
|
||||
info, v = v[0], v[1:]
|
||||
|
||||
var base int
|
||||
switch info & 0x30 {
|
||||
case 0x00:
|
||||
base = 2
|
||||
case 0x10:
|
||||
base = 8
|
||||
case 0x20:
|
||||
base = 16
|
||||
case 0x30:
|
||||
return 0.0, errors.New("bits 6 and 5 of information octet for REAL are equal to 11")
|
||||
}
|
||||
|
||||
scale := uint((info & 0x0c) >> 2)
|
||||
|
||||
var expLen int
|
||||
switch info & 0x03 {
|
||||
case 0x00:
|
||||
expLen = 1
|
||||
case 0x01:
|
||||
expLen = 2
|
||||
case 0x02:
|
||||
expLen = 3
|
||||
case 0x03:
|
||||
expLen = int(v[0])
|
||||
if expLen > 8 {
|
||||
return 0.0, errors.New("too big value of exponent")
|
||||
}
|
||||
v = v[1:]
|
||||
}
|
||||
buf, v = v[:expLen], v[expLen:]
|
||||
exponent, err := ParseInt64(buf)
|
||||
if err != nil {
|
||||
return 0.0, err
|
||||
}
|
||||
|
||||
if len(v) > 8 {
|
||||
return 0.0, errors.New("too big value of mantissa")
|
||||
}
|
||||
|
||||
mant, err := ParseInt64(v)
|
||||
if err != nil {
|
||||
return 0.0, err
|
||||
}
|
||||
mantissa := mant << scale
|
||||
|
||||
if info&0x40 == 0x40 {
|
||||
mantissa = -mantissa
|
||||
}
|
||||
|
||||
return float64(mantissa) * math.Pow(float64(base), float64(exponent)), nil
|
||||
}
|
||||
|
||||
func parseDecimalFloat(v []byte) (val float64, err error) {
|
||||
switch v[0] & 0x3F {
|
||||
case 0x01: // NR form 1
|
||||
var iVal int64
|
||||
iVal, err = strconv.ParseInt(strings.TrimLeft(string(v[1:]), " "), 10, 64)
|
||||
val = float64(iVal)
|
||||
case 0x02, 0x03: // NR form 2, 3
|
||||
val, err = strconv.ParseFloat(strings.Replace(strings.TrimLeft(string(v[1:]), " "), ",", ".", -1), 64)
|
||||
default:
|
||||
err = errors.New("incorrect NR form")
|
||||
}
|
||||
if err != nil {
|
||||
return 0.0, err
|
||||
}
|
||||
|
||||
if val == 0.0 && math.Signbit(val) {
|
||||
return 0.0, errors.New("REAL value -0 must be encoded as a special value")
|
||||
}
|
||||
return val, nil
|
||||
}
|
||||
|
||||
func parseSpecialFloat(v []byte) (float64, error) {
|
||||
if len(v) != 1 {
|
||||
return 0.0, errors.New(`encoding of "special value" must not contain exponent and mantissa`)
|
||||
}
|
||||
switch v[0] {
|
||||
case 0x40:
|
||||
return math.Inf(1), nil
|
||||
case 0x41:
|
||||
return math.Inf(-1), nil
|
||||
case 0x42:
|
||||
return math.NaN(), nil
|
||||
case 0x43:
|
||||
return math.Copysign(0, -1), nil
|
||||
}
|
||||
return 0.0, errors.New(`encoding of "special value" not from ASN.1 standard`)
|
||||
}
|
||||
2
vendor/github.com/go-asn1-ber/asn1-ber/util.go
generated
vendored
2
vendor/github.com/go-asn1-ber/asn1-ber/util.go
generated
vendored
@@ -3,7 +3,7 @@ package ber
|
||||
import "io"
|
||||
|
||||
func readByte(reader io.Reader) (byte, error) {
|
||||
bytes := make([]byte, 1, 1)
|
||||
bytes := make([]byte, 1)
|
||||
_, err := io.ReadFull(reader, bytes)
|
||||
if err != nil {
|
||||
if err == io.EOF {
|
||||
|
||||
354
vendor/github.com/hashicorp/errwrap/LICENSE
generated
vendored
Normal file
354
vendor/github.com/hashicorp/errwrap/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,354 @@
|
||||
Mozilla Public License, version 2.0
|
||||
|
||||
1. Definitions
|
||||
|
||||
1.1. “Contributor”
|
||||
|
||||
means each individual or legal entity that creates, contributes to the
|
||||
creation of, or owns Covered Software.
|
||||
|
||||
1.2. “Contributor Version”
|
||||
|
||||
means the combination of the Contributions of others (if any) used by a
|
||||
Contributor and that particular Contributor’s Contribution.
|
||||
|
||||
1.3. “Contribution”
|
||||
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. “Covered Software”
|
||||
|
||||
means Source Code Form to which the initial Contributor has attached the
|
||||
notice in Exhibit A, the Executable Form of such Source Code Form, and
|
||||
Modifications of such Source Code Form, in each case including portions
|
||||
thereof.
|
||||
|
||||
1.5. “Incompatible With Secondary Licenses”
|
||||
means
|
||||
|
||||
a. that the initial Contributor has attached the notice described in
|
||||
Exhibit B to the Covered Software; or
|
||||
|
||||
b. that the Covered Software was made available under the terms of version
|
||||
1.1 or earlier of the License, but not also under the terms of a
|
||||
Secondary License.
|
||||
|
||||
1.6. “Executable Form”
|
||||
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. “Larger Work”
|
||||
|
||||
means a work that combines Covered Software with other material, in a separate
|
||||
file or files, that is not Covered Software.
|
||||
|
||||
1.8. “License”
|
||||
|
||||
means this document.
|
||||
|
||||
1.9. “Licensable”
|
||||
|
||||
means having the right to grant, to the maximum extent possible, whether at the
|
||||
time of the initial grant or subsequently, any and all of the rights conveyed by
|
||||
this License.
|
||||
|
||||
1.10. “Modifications”
|
||||
|
||||
means any of the following:
|
||||
|
||||
a. any file in Source Code Form that results from an addition to, deletion
|
||||
from, or modification of the contents of Covered Software; or
|
||||
|
||||
b. any new file in Source Code Form that contains any Covered Software.
|
||||
|
||||
1.11. “Patent Claims” of a Contributor
|
||||
|
||||
means any patent claim(s), including without limitation, method, process,
|
||||
and apparatus claims, in any patent Licensable by such Contributor that
|
||||
would be infringed, but for the grant of the License, by the making,
|
||||
using, selling, offering for sale, having made, import, or transfer of
|
||||
either its Contributions or its Contributor Version.
|
||||
|
||||
1.12. “Secondary License”
|
||||
|
||||
means either the GNU General Public License, Version 2.0, the GNU Lesser
|
||||
General Public License, Version 2.1, the GNU Affero General Public
|
||||
License, Version 3.0, or any later versions of those licenses.
|
||||
|
||||
1.13. “Source Code Form”
|
||||
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. “You” (or “Your”)
|
||||
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, “You” includes any entity that controls, is
|
||||
controlled by, or is under common control with You. For purposes of this
|
||||
definition, “control” means (a) the power, direct or indirect, to cause
|
||||
the direction or management of such entity, whether by contract or
|
||||
otherwise, or (b) ownership of more than fifty percent (50%) of the
|
||||
outstanding shares or beneficial ownership of such entity.
|
||||
|
||||
|
||||
2. License Grants and Conditions
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
a. under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or as
|
||||
part of a Larger Work; and
|
||||
|
||||
b. under Patent Claims of such Contributor to make, use, sell, offer for
|
||||
sale, have made, import, and otherwise transfer either its Contributions
|
||||
or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution become
|
||||
effective for each Contribution on the date the Contributor first distributes
|
||||
such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under this
|
||||
License. No additional rights or licenses will be implied from the distribution
|
||||
or licensing of Covered Software under this License. Notwithstanding Section
|
||||
2.1(b) above, no patent license is granted by a Contributor:
|
||||
|
||||
a. for any code that a Contributor has removed from Covered Software; or
|
||||
|
||||
b. for infringements caused by: (i) Your and any other third party’s
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
c. under Patent Claims infringed by Covered Software in the absence of its
|
||||
Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks, or
|
||||
logos of any Contributor (except as may be necessary to comply with the
|
||||
notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this License
|
||||
(see Section 10.2) or under the terms of a Secondary License (if permitted
|
||||
under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its Contributions
|
||||
are its original creation(s) or it has sufficient rights to grant the
|
||||
rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under applicable
|
||||
copyright doctrines of fair use, fair dealing, or other equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
|
||||
Section 2.1.
|
||||
|
||||
|
||||
3. Responsibilities
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under the
|
||||
terms of this License. You must inform recipients that the Source Code Form
|
||||
of the Covered Software is governed by the terms of this License, and how
|
||||
they can obtain a copy of this License. You may not attempt to alter or
|
||||
restrict the recipients’ rights in the Source Code Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
a. such Covered Software must also be made available in Source Code Form,
|
||||
as described in Section 3.1, and You must inform recipients of the
|
||||
Executable Form how they can obtain a copy of such Source Code Form by
|
||||
reasonable means in a timely manner, at a charge no more than the cost
|
||||
of distribution to the recipient; and
|
||||
|
||||
b. You may distribute such Executable Form under the terms of this License,
|
||||
or sublicense it under different terms, provided that the license for
|
||||
the Executable Form does not attempt to limit or alter the recipients’
|
||||
rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for the
|
||||
Covered Software. If the Larger Work is a combination of Covered Software
|
||||
with a work governed by one or more Secondary Licenses, and the Covered
|
||||
Software is not Incompatible With Secondary Licenses, this License permits
|
||||
You to additionally distribute such Covered Software under the terms of
|
||||
such Secondary License(s), so that the recipient of the Larger Work may, at
|
||||
their option, further distribute the Covered Software under the terms of
|
||||
either this License or such Secondary License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices (including
|
||||
copyright notices, patent notices, disclaimers of warranty, or limitations
|
||||
of liability) contained within the Source Code Form of the Covered
|
||||
Software, except that You may alter any license notices to the extent
|
||||
required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on behalf
|
||||
of any Contributor. You must make it absolutely clear that any such
|
||||
warranty, support, indemnity, or liability obligation is offered by You
|
||||
alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this License
|
||||
with respect to some or all of the Covered Software due to statute, judicial
|
||||
order, or regulation then You must: (a) comply with the terms of this License
|
||||
to the maximum extent possible; and (b) describe the limitations and the code
|
||||
they affect. Such description must be placed in a text file included with all
|
||||
distributions of the Covered Software under this License. Except to the
|
||||
extent prohibited by statute or regulation, such description must be
|
||||
sufficiently detailed for a recipient of ordinary skill to be able to
|
||||
understand it.
|
||||
|
||||
5. Termination
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically if You
|
||||
fail to comply with any of its terms. However, if You become compliant,
|
||||
then the rights granted under this License from a particular Contributor
|
||||
are reinstated (a) provisionally, unless and until such Contributor
|
||||
explicitly and finally terminates Your grants, and (b) on an ongoing basis,
|
||||
if such Contributor fails to notify You of the non-compliance by some
|
||||
reasonable means prior to 60 days after You have come back into compliance.
|
||||
Moreover, Your grants from a particular Contributor are reinstated on an
|
||||
ongoing basis if such Contributor notifies You of the non-compliance by
|
||||
some reasonable means, this is the first time You have received notice of
|
||||
non-compliance with this License from such Contributor, and You become
|
||||
compliant prior to 30 days after Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions, counter-claims,
|
||||
and cross-claims) alleging that a Contributor Version directly or
|
||||
indirectly infringes any patent, then the rights granted to You by any and
|
||||
all Contributors for the Covered Software under Section 2.1 of this License
|
||||
shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
|
||||
license agreements (excluding distributors and resellers) which have been
|
||||
validly granted by You or Your distributors under this License prior to
|
||||
termination shall survive termination.
|
||||
|
||||
6. Disclaimer of Warranty
|
||||
|
||||
Covered Software is provided under this License on an “as is” basis, without
|
||||
warranty of any kind, either expressed, implied, or statutory, including,
|
||||
without limitation, warranties that the Covered Software is free of defects,
|
||||
merchantable, fit for a particular purpose or non-infringing. The entire
|
||||
risk as to the quality and performance of the Covered Software is with You.
|
||||
Should any Covered Software prove defective in any respect, You (not any
|
||||
Contributor) assume the cost of any necessary servicing, repair, or
|
||||
correction. This disclaimer of warranty constitutes an essential part of this
|
||||
License. No use of any Covered Software is authorized under this License
|
||||
except under this disclaimer.
|
||||
|
||||
7. Limitation of Liability
|
||||
|
||||
Under no circumstances and under no legal theory, whether tort (including
|
||||
negligence), contract, or otherwise, shall any Contributor, or anyone who
|
||||
distributes Covered Software as permitted above, be liable to You for any
|
||||
direct, indirect, special, incidental, or consequential damages of any
|
||||
character including, without limitation, damages for lost profits, loss of
|
||||
goodwill, work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses, even if such party shall have been
|
||||
informed of the possibility of such damages. This limitation of liability
|
||||
shall not apply to liability for death or personal injury resulting from such
|
||||
party’s negligence to the extent applicable law prohibits such limitation.
|
||||
Some jurisdictions do not allow the exclusion or limitation of incidental or
|
||||
consequential damages, so this exclusion and limitation may not apply to You.
|
||||
|
||||
8. Litigation
|
||||
|
||||
Any litigation relating to this License may be brought only in the courts of
|
||||
a jurisdiction where the defendant maintains its principal place of business
|
||||
and such litigation shall be governed by laws of that jurisdiction, without
|
||||
reference to its conflict-of-law provisions. Nothing in this Section shall
|
||||
prevent a party’s ability to bring cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
|
||||
This License represents the complete agreement concerning the subject matter
|
||||
hereof. If any provision of this License is held to be unenforceable, such
|
||||
provision shall be reformed only to the extent necessary to make it
|
||||
enforceable. Any law or regulation which provides that the language of a
|
||||
contract shall be construed against the drafter shall not be used to construe
|
||||
this License against a Contributor.
|
||||
|
||||
|
||||
10. Versions of the License
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version of
|
||||
the License under which You originally received the Covered Software, or
|
||||
under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a modified
|
||||
version of this License if you rename the license and remove any
|
||||
references to the name of the license steward (except to note that such
|
||||
modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
|
||||
This Source Code Form is subject to the
|
||||
terms of the Mozilla Public License, v.
|
||||
2.0. If a copy of the MPL was not
|
||||
distributed with this file, You can
|
||||
obtain one at
|
||||
http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular file, then
|
||||
You may include the notice in a location (such as a LICENSE file in a relevant
|
||||
directory) where a recipient would be likely to look for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - “Incompatible With Secondary Licenses” Notice
|
||||
|
||||
This Source Code Form is “Incompatible
|
||||
With Secondary Licenses”, as defined by
|
||||
the Mozilla Public License, v. 2.0.
|
||||
|
||||
89
vendor/github.com/hashicorp/errwrap/README.md
generated
vendored
Normal file
89
vendor/github.com/hashicorp/errwrap/README.md
generated
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
# errwrap
|
||||
|
||||
`errwrap` is a package for Go that formalizes the pattern of wrapping errors
|
||||
and checking if an error contains another error.
|
||||
|
||||
There is a common pattern in Go of taking a returned `error` value and
|
||||
then wrapping it (such as with `fmt.Errorf`) before returning it. The problem
|
||||
with this pattern is that you completely lose the original `error` structure.
|
||||
|
||||
Arguably the _correct_ approach is that you should make a custom structure
|
||||
implementing the `error` interface, and have the original error as a field
|
||||
on that structure, such [as this example](http://golang.org/pkg/os/#PathError).
|
||||
This is a good approach, but you have to know the entire chain of possible
|
||||
rewrapping that happens, when you might just care about one.
|
||||
|
||||
`errwrap` formalizes this pattern (it doesn't matter what approach you use
|
||||
above) by giving a single interface for wrapping errors, checking if a specific
|
||||
error is wrapped, and extracting that error.
|
||||
|
||||
## Installation and Docs
|
||||
|
||||
Install using `go get github.com/hashicorp/errwrap`.
|
||||
|
||||
Full documentation is available at
|
||||
http://godoc.org/github.com/hashicorp/errwrap
|
||||
|
||||
## Usage
|
||||
|
||||
#### Basic Usage
|
||||
|
||||
Below is a very basic example of its usage:
|
||||
|
||||
```go
|
||||
// A function that always returns an error, but wraps it, like a real
|
||||
// function might.
|
||||
func tryOpen() error {
|
||||
_, err := os.Open("/i/dont/exist")
|
||||
if err != nil {
|
||||
return errwrap.Wrapf("Doesn't exist: {{err}}", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func main() {
|
||||
err := tryOpen()
|
||||
|
||||
// We can use the Contains helpers to check if an error contains
|
||||
// another error. It is safe to do this with a nil error, or with
|
||||
// an error that doesn't even use the errwrap package.
|
||||
if errwrap.Contains(err, "does not exist") {
|
||||
// Do something
|
||||
}
|
||||
if errwrap.ContainsType(err, new(os.PathError)) {
|
||||
// Do something
|
||||
}
|
||||
|
||||
// Or we can use the associated `Get` functions to just extract
|
||||
// a specific error. This would return nil if that specific error doesn't
|
||||
// exist.
|
||||
perr := errwrap.GetType(err, new(os.PathError))
|
||||
}
|
||||
```
|
||||
|
||||
#### Custom Types
|
||||
|
||||
If you're already making custom types that properly wrap errors, then
|
||||
you can get all the functionality of `errwraps.Contains` and such by
|
||||
implementing the `Wrapper` interface with just one function. Example:
|
||||
|
||||
```go
|
||||
type AppError {
|
||||
Code ErrorCode
|
||||
Err error
|
||||
}
|
||||
|
||||
func (e *AppError) WrappedErrors() []error {
|
||||
return []error{e.Err}
|
||||
}
|
||||
```
|
||||
|
||||
Now this works:
|
||||
|
||||
```go
|
||||
err := &AppError{Err: fmt.Errorf("an error")}
|
||||
if errwrap.ContainsType(err, fmt.Errorf("")) {
|
||||
// This will work!
|
||||
}
|
||||
```
|
||||
169
vendor/github.com/hashicorp/errwrap/errwrap.go
generated
vendored
Normal file
169
vendor/github.com/hashicorp/errwrap/errwrap.go
generated
vendored
Normal file
@@ -0,0 +1,169 @@
|
||||
// Package errwrap implements methods to formalize error wrapping in Go.
|
||||
//
|
||||
// All of the top-level functions that take an `error` are built to be able
|
||||
// to take any error, not just wrapped errors. This allows you to use errwrap
|
||||
// without having to type-check and type-cast everywhere.
|
||||
package errwrap
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"reflect"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// WalkFunc is the callback called for Walk.
|
||||
type WalkFunc func(error)
|
||||
|
||||
// Wrapper is an interface that can be implemented by custom types to
|
||||
// have all the Contains, Get, etc. functions in errwrap work.
|
||||
//
|
||||
// When Walk reaches a Wrapper, it will call the callback for every
|
||||
// wrapped error in addition to the wrapper itself. Since all the top-level
|
||||
// functions in errwrap use Walk, this means that all those functions work
|
||||
// with your custom type.
|
||||
type Wrapper interface {
|
||||
WrappedErrors() []error
|
||||
}
|
||||
|
||||
// Wrap defines that outer wraps inner, returning an error type that
|
||||
// can be cleanly used with the other methods in this package, such as
|
||||
// Contains, GetAll, etc.
|
||||
//
|
||||
// This function won't modify the error message at all (the outer message
|
||||
// will be used).
|
||||
func Wrap(outer, inner error) error {
|
||||
return &wrappedError{
|
||||
Outer: outer,
|
||||
Inner: inner,
|
||||
}
|
||||
}
|
||||
|
||||
// Wrapf wraps an error with a formatting message. This is similar to using
|
||||
// `fmt.Errorf` to wrap an error. If you're using `fmt.Errorf` to wrap
|
||||
// errors, you should replace it with this.
|
||||
//
|
||||
// format is the format of the error message. The string '{{err}}' will
|
||||
// be replaced with the original error message.
|
||||
func Wrapf(format string, err error) error {
|
||||
outerMsg := "<nil>"
|
||||
if err != nil {
|
||||
outerMsg = err.Error()
|
||||
}
|
||||
|
||||
outer := errors.New(strings.Replace(
|
||||
format, "{{err}}", outerMsg, -1))
|
||||
|
||||
return Wrap(outer, err)
|
||||
}
|
||||
|
||||
// Contains checks if the given error contains an error with the
|
||||
// message msg. If err is not a wrapped error, this will always return
|
||||
// false unless the error itself happens to match this msg.
|
||||
func Contains(err error, msg string) bool {
|
||||
return len(GetAll(err, msg)) > 0
|
||||
}
|
||||
|
||||
// ContainsType checks if the given error contains an error with
|
||||
// the same concrete type as v. If err is not a wrapped error, this will
|
||||
// check the err itself.
|
||||
func ContainsType(err error, v interface{}) bool {
|
||||
return len(GetAllType(err, v)) > 0
|
||||
}
|
||||
|
||||
// Get is the same as GetAll but returns the deepest matching error.
|
||||
func Get(err error, msg string) error {
|
||||
es := GetAll(err, msg)
|
||||
if len(es) > 0 {
|
||||
return es[len(es)-1]
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetType is the same as GetAllType but returns the deepest matching error.
|
||||
func GetType(err error, v interface{}) error {
|
||||
es := GetAllType(err, v)
|
||||
if len(es) > 0 {
|
||||
return es[len(es)-1]
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetAll gets all the errors that might be wrapped in err with the
|
||||
// given message. The order of the errors is such that the outermost
|
||||
// matching error (the most recent wrap) is index zero, and so on.
|
||||
func GetAll(err error, msg string) []error {
|
||||
var result []error
|
||||
|
||||
Walk(err, func(err error) {
|
||||
if err.Error() == msg {
|
||||
result = append(result, err)
|
||||
}
|
||||
})
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
// GetAllType gets all the errors that are the same type as v.
|
||||
//
|
||||
// The order of the return value is the same as described in GetAll.
|
||||
func GetAllType(err error, v interface{}) []error {
|
||||
var result []error
|
||||
|
||||
var search string
|
||||
if v != nil {
|
||||
search = reflect.TypeOf(v).String()
|
||||
}
|
||||
Walk(err, func(err error) {
|
||||
var needle string
|
||||
if err != nil {
|
||||
needle = reflect.TypeOf(err).String()
|
||||
}
|
||||
|
||||
if needle == search {
|
||||
result = append(result, err)
|
||||
}
|
||||
})
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
// Walk walks all the wrapped errors in err and calls the callback. If
|
||||
// err isn't a wrapped error, this will be called once for err. If err
|
||||
// is a wrapped error, the callback will be called for both the wrapper
|
||||
// that implements error as well as the wrapped error itself.
|
||||
func Walk(err error, cb WalkFunc) {
|
||||
if err == nil {
|
||||
return
|
||||
}
|
||||
|
||||
switch e := err.(type) {
|
||||
case *wrappedError:
|
||||
cb(e.Outer)
|
||||
Walk(e.Inner, cb)
|
||||
case Wrapper:
|
||||
cb(err)
|
||||
|
||||
for _, err := range e.WrappedErrors() {
|
||||
Walk(err, cb)
|
||||
}
|
||||
default:
|
||||
cb(err)
|
||||
}
|
||||
}
|
||||
|
||||
// wrappedError is an implementation of error that has both the
|
||||
// outer and inner errors.
|
||||
type wrappedError struct {
|
||||
Outer error
|
||||
Inner error
|
||||
}
|
||||
|
||||
func (w *wrappedError) Error() string {
|
||||
return w.Outer.Error()
|
||||
}
|
||||
|
||||
func (w *wrappedError) WrappedErrors() []error {
|
||||
return []error{w.Outer, w.Inner}
|
||||
}
|
||||
1
vendor/github.com/hashicorp/errwrap/go.mod
generated
vendored
Normal file
1
vendor/github.com/hashicorp/errwrap/go.mod
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module github.com/hashicorp/errwrap
|
||||
12
vendor/github.com/hashicorp/go-multierror/.travis.yml
generated
vendored
Normal file
12
vendor/github.com/hashicorp/go-multierror/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
sudo: false
|
||||
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.x
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
script: env GO111MODULE=on make test testrace
|
||||
353
vendor/github.com/hashicorp/go-multierror/LICENSE
generated
vendored
Normal file
353
vendor/github.com/hashicorp/go-multierror/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,353 @@
|
||||
Mozilla Public License, version 2.0
|
||||
|
||||
1. Definitions
|
||||
|
||||
1.1. “Contributor”
|
||||
|
||||
means each individual or legal entity that creates, contributes to the
|
||||
creation of, or owns Covered Software.
|
||||
|
||||
1.2. “Contributor Version”
|
||||
|
||||
means the combination of the Contributions of others (if any) used by a
|
||||
Contributor and that particular Contributor’s Contribution.
|
||||
|
||||
1.3. “Contribution”
|
||||
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. “Covered Software”
|
||||
|
||||
means Source Code Form to which the initial Contributor has attached the
|
||||
notice in Exhibit A, the Executable Form of such Source Code Form, and
|
||||
Modifications of such Source Code Form, in each case including portions
|
||||
thereof.
|
||||
|
||||
1.5. “Incompatible With Secondary Licenses”
|
||||
means
|
||||
|
||||
a. that the initial Contributor has attached the notice described in
|
||||
Exhibit B to the Covered Software; or
|
||||
|
||||
b. that the Covered Software was made available under the terms of version
|
||||
1.1 or earlier of the License, but not also under the terms of a
|
||||
Secondary License.
|
||||
|
||||
1.6. “Executable Form”
|
||||
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. “Larger Work”
|
||||
|
||||
means a work that combines Covered Software with other material, in a separate
|
||||
file or files, that is not Covered Software.
|
||||
|
||||
1.8. “License”
|
||||
|
||||
means this document.
|
||||
|
||||
1.9. “Licensable”
|
||||
|
||||
means having the right to grant, to the maximum extent possible, whether at the
|
||||
time of the initial grant or subsequently, any and all of the rights conveyed by
|
||||
this License.
|
||||
|
||||
1.10. “Modifications”
|
||||
|
||||
means any of the following:
|
||||
|
||||
a. any file in Source Code Form that results from an addition to, deletion
|
||||
from, or modification of the contents of Covered Software; or
|
||||
|
||||
b. any new file in Source Code Form that contains any Covered Software.
|
||||
|
||||
1.11. “Patent Claims” of a Contributor
|
||||
|
||||
means any patent claim(s), including without limitation, method, process,
|
||||
and apparatus claims, in any patent Licensable by such Contributor that
|
||||
would be infringed, but for the grant of the License, by the making,
|
||||
using, selling, offering for sale, having made, import, or transfer of
|
||||
either its Contributions or its Contributor Version.
|
||||
|
||||
1.12. “Secondary License”
|
||||
|
||||
means either the GNU General Public License, Version 2.0, the GNU Lesser
|
||||
General Public License, Version 2.1, the GNU Affero General Public
|
||||
License, Version 3.0, or any later versions of those licenses.
|
||||
|
||||
1.13. “Source Code Form”
|
||||
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. “You” (or “Your”)
|
||||
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, “You” includes any entity that controls, is
|
||||
controlled by, or is under common control with You. For purposes of this
|
||||
definition, “control” means (a) the power, direct or indirect, to cause
|
||||
the direction or management of such entity, whether by contract or
|
||||
otherwise, or (b) ownership of more than fifty percent (50%) of the
|
||||
outstanding shares or beneficial ownership of such entity.
|
||||
|
||||
|
||||
2. License Grants and Conditions
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
a. under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or as
|
||||
part of a Larger Work; and
|
||||
|
||||
b. under Patent Claims of such Contributor to make, use, sell, offer for
|
||||
sale, have made, import, and otherwise transfer either its Contributions
|
||||
or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution become
|
||||
effective for each Contribution on the date the Contributor first distributes
|
||||
such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under this
|
||||
License. No additional rights or licenses will be implied from the distribution
|
||||
or licensing of Covered Software under this License. Notwithstanding Section
|
||||
2.1(b) above, no patent license is granted by a Contributor:
|
||||
|
||||
a. for any code that a Contributor has removed from Covered Software; or
|
||||
|
||||
b. for infringements caused by: (i) Your and any other third party’s
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
c. under Patent Claims infringed by Covered Software in the absence of its
|
||||
Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks, or
|
||||
logos of any Contributor (except as may be necessary to comply with the
|
||||
notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this License
|
||||
(see Section 10.2) or under the terms of a Secondary License (if permitted
|
||||
under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its Contributions
|
||||
are its original creation(s) or it has sufficient rights to grant the
|
||||
rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under applicable
|
||||
copyright doctrines of fair use, fair dealing, or other equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
|
||||
Section 2.1.
|
||||
|
||||
|
||||
3. Responsibilities
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under the
|
||||
terms of this License. You must inform recipients that the Source Code Form
|
||||
of the Covered Software is governed by the terms of this License, and how
|
||||
they can obtain a copy of this License. You may not attempt to alter or
|
||||
restrict the recipients’ rights in the Source Code Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
a. such Covered Software must also be made available in Source Code Form,
|
||||
as described in Section 3.1, and You must inform recipients of the
|
||||
Executable Form how they can obtain a copy of such Source Code Form by
|
||||
reasonable means in a timely manner, at a charge no more than the cost
|
||||
of distribution to the recipient; and
|
||||
|
||||
b. You may distribute such Executable Form under the terms of this License,
|
||||
or sublicense it under different terms, provided that the license for
|
||||
the Executable Form does not attempt to limit or alter the recipients’
|
||||
rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for the
|
||||
Covered Software. If the Larger Work is a combination of Covered Software
|
||||
with a work governed by one or more Secondary Licenses, and the Covered
|
||||
Software is not Incompatible With Secondary Licenses, this License permits
|
||||
You to additionally distribute such Covered Software under the terms of
|
||||
such Secondary License(s), so that the recipient of the Larger Work may, at
|
||||
their option, further distribute the Covered Software under the terms of
|
||||
either this License or such Secondary License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices (including
|
||||
copyright notices, patent notices, disclaimers of warranty, or limitations
|
||||
of liability) contained within the Source Code Form of the Covered
|
||||
Software, except that You may alter any license notices to the extent
|
||||
required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on behalf
|
||||
of any Contributor. You must make it absolutely clear that any such
|
||||
warranty, support, indemnity, or liability obligation is offered by You
|
||||
alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this License
|
||||
with respect to some or all of the Covered Software due to statute, judicial
|
||||
order, or regulation then You must: (a) comply with the terms of this License
|
||||
to the maximum extent possible; and (b) describe the limitations and the code
|
||||
they affect. Such description must be placed in a text file included with all
|
||||
distributions of the Covered Software under this License. Except to the
|
||||
extent prohibited by statute or regulation, such description must be
|
||||
sufficiently detailed for a recipient of ordinary skill to be able to
|
||||
understand it.
|
||||
|
||||
5. Termination
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically if You
|
||||
fail to comply with any of its terms. However, if You become compliant,
|
||||
then the rights granted under this License from a particular Contributor
|
||||
are reinstated (a) provisionally, unless and until such Contributor
|
||||
explicitly and finally terminates Your grants, and (b) on an ongoing basis,
|
||||
if such Contributor fails to notify You of the non-compliance by some
|
||||
reasonable means prior to 60 days after You have come back into compliance.
|
||||
Moreover, Your grants from a particular Contributor are reinstated on an
|
||||
ongoing basis if such Contributor notifies You of the non-compliance by
|
||||
some reasonable means, this is the first time You have received notice of
|
||||
non-compliance with this License from such Contributor, and You become
|
||||
compliant prior to 30 days after Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions, counter-claims,
|
||||
and cross-claims) alleging that a Contributor Version directly or
|
||||
indirectly infringes any patent, then the rights granted to You by any and
|
||||
all Contributors for the Covered Software under Section 2.1 of this License
|
||||
shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
|
||||
license agreements (excluding distributors and resellers) which have been
|
||||
validly granted by You or Your distributors under this License prior to
|
||||
termination shall survive termination.
|
||||
|
||||
6. Disclaimer of Warranty
|
||||
|
||||
Covered Software is provided under this License on an “as is” basis, without
|
||||
warranty of any kind, either expressed, implied, or statutory, including,
|
||||
without limitation, warranties that the Covered Software is free of defects,
|
||||
merchantable, fit for a particular purpose or non-infringing. The entire
|
||||
risk as to the quality and performance of the Covered Software is with You.
|
||||
Should any Covered Software prove defective in any respect, You (not any
|
||||
Contributor) assume the cost of any necessary servicing, repair, or
|
||||
correction. This disclaimer of warranty constitutes an essential part of this
|
||||
License. No use of any Covered Software is authorized under this License
|
||||
except under this disclaimer.
|
||||
|
||||
7. Limitation of Liability
|
||||
|
||||
Under no circumstances and under no legal theory, whether tort (including
|
||||
negligence), contract, or otherwise, shall any Contributor, or anyone who
|
||||
distributes Covered Software as permitted above, be liable to You for any
|
||||
direct, indirect, special, incidental, or consequential damages of any
|
||||
character including, without limitation, damages for lost profits, loss of
|
||||
goodwill, work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses, even if such party shall have been
|
||||
informed of the possibility of such damages. This limitation of liability
|
||||
shall not apply to liability for death or personal injury resulting from such
|
||||
party’s negligence to the extent applicable law prohibits such limitation.
|
||||
Some jurisdictions do not allow the exclusion or limitation of incidental or
|
||||
consequential damages, so this exclusion and limitation may not apply to You.
|
||||
|
||||
8. Litigation
|
||||
|
||||
Any litigation relating to this License may be brought only in the courts of
|
||||
a jurisdiction where the defendant maintains its principal place of business
|
||||
and such litigation shall be governed by laws of that jurisdiction, without
|
||||
reference to its conflict-of-law provisions. Nothing in this Section shall
|
||||
prevent a party’s ability to bring cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
|
||||
This License represents the complete agreement concerning the subject matter
|
||||
hereof. If any provision of this License is held to be unenforceable, such
|
||||
provision shall be reformed only to the extent necessary to make it
|
||||
enforceable. Any law or regulation which provides that the language of a
|
||||
contract shall be construed against the drafter shall not be used to construe
|
||||
this License against a Contributor.
|
||||
|
||||
|
||||
10. Versions of the License
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version of
|
||||
the License under which You originally received the Covered Software, or
|
||||
under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a modified
|
||||
version of this License if you rename the license and remove any
|
||||
references to the name of the license steward (except to note that such
|
||||
modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
|
||||
This Source Code Form is subject to the
|
||||
terms of the Mozilla Public License, v.
|
||||
2.0. If a copy of the MPL was not
|
||||
distributed with this file, You can
|
||||
obtain one at
|
||||
http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular file, then
|
||||
You may include the notice in a location (such as a LICENSE file in a relevant
|
||||
directory) where a recipient would be likely to look for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - “Incompatible With Secondary Licenses” Notice
|
||||
|
||||
This Source Code Form is “Incompatible
|
||||
With Secondary Licenses”, as defined by
|
||||
the Mozilla Public License, v. 2.0.
|
||||
31
vendor/github.com/hashicorp/go-multierror/Makefile
generated
vendored
Normal file
31
vendor/github.com/hashicorp/go-multierror/Makefile
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
TEST?=./...
|
||||
|
||||
default: test
|
||||
|
||||
# test runs the test suite and vets the code.
|
||||
test: generate
|
||||
@echo "==> Running tests..."
|
||||
@go list $(TEST) \
|
||||
| grep -v "/vendor/" \
|
||||
| xargs -n1 go test -timeout=60s -parallel=10 ${TESTARGS}
|
||||
|
||||
# testrace runs the race checker
|
||||
testrace: generate
|
||||
@echo "==> Running tests (race)..."
|
||||
@go list $(TEST) \
|
||||
| grep -v "/vendor/" \
|
||||
| xargs -n1 go test -timeout=60s -race ${TESTARGS}
|
||||
|
||||
# updatedeps installs all the dependencies needed to run and build.
|
||||
updatedeps:
|
||||
@sh -c "'${CURDIR}/scripts/deps.sh' '${NAME}'"
|
||||
|
||||
# generate runs `go generate` to build the dynamically generated source files.
|
||||
generate:
|
||||
@echo "==> Generating..."
|
||||
@find . -type f -name '.DS_Store' -delete
|
||||
@go list ./... \
|
||||
| grep -v "/vendor/" \
|
||||
| xargs -n1 go generate
|
||||
|
||||
.PHONY: default test testrace updatedeps generate
|
||||
131
vendor/github.com/hashicorp/go-multierror/README.md
generated
vendored
Normal file
131
vendor/github.com/hashicorp/go-multierror/README.md
generated
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
# go-multierror
|
||||
|
||||
[][travis]
|
||||
[][godocs]
|
||||
|
||||
[travis]: https://travis-ci.org/hashicorp/go-multierror
|
||||
[godocs]: https://godoc.org/github.com/hashicorp/go-multierror
|
||||
|
||||
`go-multierror` is a package for Go that provides a mechanism for
|
||||
representing a list of `error` values as a single `error`.
|
||||
|
||||
This allows a function in Go to return an `error` that might actually
|
||||
be a list of errors. If the caller knows this, they can unwrap the
|
||||
list and access the errors. If the caller doesn't know, the error
|
||||
formats to a nice human-readable format.
|
||||
|
||||
`go-multierror` is fully compatible with the Go standard library
|
||||
[errors](https://golang.org/pkg/errors/) package, including the
|
||||
functions `As`, `Is`, and `Unwrap`. This provides a standardized approach
|
||||
for introspecting on error values.
|
||||
|
||||
## Installation and Docs
|
||||
|
||||
Install using `go get github.com/hashicorp/go-multierror`.
|
||||
|
||||
Full documentation is available at
|
||||
http://godoc.org/github.com/hashicorp/go-multierror
|
||||
|
||||
## Usage
|
||||
|
||||
go-multierror is easy to use and purposely built to be unobtrusive in
|
||||
existing Go applications/libraries that may not be aware of it.
|
||||
|
||||
**Building a list of errors**
|
||||
|
||||
The `Append` function is used to create a list of errors. This function
|
||||
behaves a lot like the Go built-in `append` function: it doesn't matter
|
||||
if the first argument is nil, a `multierror.Error`, or any other `error`,
|
||||
the function behaves as you would expect.
|
||||
|
||||
```go
|
||||
var result error
|
||||
|
||||
if err := step1(); err != nil {
|
||||
result = multierror.Append(result, err)
|
||||
}
|
||||
if err := step2(); err != nil {
|
||||
result = multierror.Append(result, err)
|
||||
}
|
||||
|
||||
return result
|
||||
```
|
||||
|
||||
**Customizing the formatting of the errors**
|
||||
|
||||
By specifying a custom `ErrorFormat`, you can customize the format
|
||||
of the `Error() string` function:
|
||||
|
||||
```go
|
||||
var result *multierror.Error
|
||||
|
||||
// ... accumulate errors here, maybe using Append
|
||||
|
||||
if result != nil {
|
||||
result.ErrorFormat = func([]error) string {
|
||||
return "errors!"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Accessing the list of errors**
|
||||
|
||||
`multierror.Error` implements `error` so if the caller doesn't know about
|
||||
multierror, it will work just fine. But if you're aware a multierror might
|
||||
be returned, you can use type switches to access the list of errors:
|
||||
|
||||
```go
|
||||
if err := something(); err != nil {
|
||||
if merr, ok := err.(*multierror.Error); ok {
|
||||
// Use merr.Errors
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can also use the standard [`errors.Unwrap`](https://golang.org/pkg/errors/#Unwrap)
|
||||
function. This will continue to unwrap into subsequent errors until none exist.
|
||||
|
||||
**Extracting an error**
|
||||
|
||||
The standard library [`errors.As`](https://golang.org/pkg/errors/#As)
|
||||
function can be used directly with a multierror to extract a specific error:
|
||||
|
||||
```go
|
||||
// Assume err is a multierror value
|
||||
err := somefunc()
|
||||
|
||||
// We want to know if "err" has a "RichErrorType" in it and extract it.
|
||||
var errRich RichErrorType
|
||||
if errors.As(err, &errRich) {
|
||||
// It has it, and now errRich is populated.
|
||||
}
|
||||
```
|
||||
|
||||
**Checking for an exact error value**
|
||||
|
||||
Some errors are returned as exact errors such as the [`ErrNotExist`](https://golang.org/pkg/os/#pkg-variables)
|
||||
error in the `os` package. You can check if this error is present by using
|
||||
the standard [`errors.Is`](https://golang.org/pkg/errors/#Is) function.
|
||||
|
||||
```go
|
||||
// Assume err is a multierror value
|
||||
err := somefunc()
|
||||
if errors.Is(err, os.ErrNotExist) {
|
||||
// err contains os.ErrNotExist
|
||||
}
|
||||
```
|
||||
|
||||
**Returning a multierror only if there are errors**
|
||||
|
||||
If you build a `multierror.Error`, you can use the `ErrorOrNil` function
|
||||
to return an `error` implementation only if there are errors to return:
|
||||
|
||||
```go
|
||||
var result *multierror.Error
|
||||
|
||||
// ... accumulate errors here
|
||||
|
||||
// Return the `error` only if errors were added to the multierror, otherwise
|
||||
// return nil since there are no errors.
|
||||
return result.ErrorOrNil()
|
||||
```
|
||||
41
vendor/github.com/hashicorp/go-multierror/append.go
generated
vendored
Normal file
41
vendor/github.com/hashicorp/go-multierror/append.go
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
package multierror
|
||||
|
||||
// Append is a helper function that will append more errors
|
||||
// onto an Error in order to create a larger multi-error.
|
||||
//
|
||||
// If err is not a multierror.Error, then it will be turned into
|
||||
// one. If any of the errs are multierr.Error, they will be flattened
|
||||
// one level into err.
|
||||
func Append(err error, errs ...error) *Error {
|
||||
switch err := err.(type) {
|
||||
case *Error:
|
||||
// Typed nils can reach here, so initialize if we are nil
|
||||
if err == nil {
|
||||
err = new(Error)
|
||||
}
|
||||
|
||||
// Go through each error and flatten
|
||||
for _, e := range errs {
|
||||
switch e := e.(type) {
|
||||
case *Error:
|
||||
if e != nil {
|
||||
err.Errors = append(err.Errors, e.Errors...)
|
||||
}
|
||||
default:
|
||||
if e != nil {
|
||||
err.Errors = append(err.Errors, e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return err
|
||||
default:
|
||||
newErrs := make([]error, 0, len(errs)+1)
|
||||
if err != nil {
|
||||
newErrs = append(newErrs, err)
|
||||
}
|
||||
newErrs = append(newErrs, errs...)
|
||||
|
||||
return Append(&Error{}, newErrs...)
|
||||
}
|
||||
}
|
||||
26
vendor/github.com/hashicorp/go-multierror/flatten.go
generated
vendored
Normal file
26
vendor/github.com/hashicorp/go-multierror/flatten.go
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
package multierror
|
||||
|
||||
// Flatten flattens the given error, merging any *Errors together into
|
||||
// a single *Error.
|
||||
func Flatten(err error) error {
|
||||
// If it isn't an *Error, just return the error as-is
|
||||
if _, ok := err.(*Error); !ok {
|
||||
return err
|
||||
}
|
||||
|
||||
// Otherwise, make the result and flatten away!
|
||||
flatErr := new(Error)
|
||||
flatten(err, flatErr)
|
||||
return flatErr
|
||||
}
|
||||
|
||||
func flatten(err error, flatErr *Error) {
|
||||
switch err := err.(type) {
|
||||
case *Error:
|
||||
for _, e := range err.Errors {
|
||||
flatten(e, flatErr)
|
||||
}
|
||||
default:
|
||||
flatErr.Errors = append(flatErr.Errors, err)
|
||||
}
|
||||
}
|
||||
27
vendor/github.com/hashicorp/go-multierror/format.go
generated
vendored
Normal file
27
vendor/github.com/hashicorp/go-multierror/format.go
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
package multierror
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// ErrorFormatFunc is a function callback that is called by Error to
|
||||
// turn the list of errors into a string.
|
||||
type ErrorFormatFunc func([]error) string
|
||||
|
||||
// ListFormatFunc is a basic formatter that outputs the number of errors
|
||||
// that occurred along with a bullet point list of the errors.
|
||||
func ListFormatFunc(es []error) string {
|
||||
if len(es) == 1 {
|
||||
return fmt.Sprintf("1 error occurred:\n\t* %s\n\n", es[0])
|
||||
}
|
||||
|
||||
points := make([]string, len(es))
|
||||
for i, err := range es {
|
||||
points[i] = fmt.Sprintf("* %s", err)
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"%d errors occurred:\n\t%s\n\n",
|
||||
len(es), strings.Join(points, "\n\t"))
|
||||
}
|
||||
5
vendor/github.com/hashicorp/go-multierror/go.mod
generated
vendored
Normal file
5
vendor/github.com/hashicorp/go-multierror/go.mod
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
module github.com/hashicorp/go-multierror
|
||||
|
||||
go 1.14
|
||||
|
||||
require github.com/hashicorp/errwrap v1.0.0
|
||||
2
vendor/github.com/hashicorp/go-multierror/go.sum
generated
vendored
Normal file
2
vendor/github.com/hashicorp/go-multierror/go.sum
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
38
vendor/github.com/hashicorp/go-multierror/group.go
generated
vendored
Normal file
38
vendor/github.com/hashicorp/go-multierror/group.go
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
package multierror
|
||||
|
||||
import "sync"
|
||||
|
||||
// Group is a collection of goroutines which return errors that need to be
|
||||
// coalesced.
|
||||
type Group struct {
|
||||
mutex sync.Mutex
|
||||
err *Error
|
||||
wg sync.WaitGroup
|
||||
}
|
||||
|
||||
// Go calls the given function in a new goroutine.
|
||||
//
|
||||
// If the function returns an error it is added to the group multierror which
|
||||
// is returned by Wait.
|
||||
func (g *Group) Go(f func() error) {
|
||||
g.wg.Add(1)
|
||||
|
||||
go func() {
|
||||
defer g.wg.Done()
|
||||
|
||||
if err := f(); err != nil {
|
||||
g.mutex.Lock()
|
||||
g.err = Append(g.err, err)
|
||||
g.mutex.Unlock()
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
// Wait blocks until all function calls from the Go method have returned, then
|
||||
// returns the multierror.
|
||||
func (g *Group) Wait() *Error {
|
||||
g.wg.Wait()
|
||||
g.mutex.Lock()
|
||||
defer g.mutex.Unlock()
|
||||
return g.err
|
||||
}
|
||||
118
vendor/github.com/hashicorp/go-multierror/multierror.go
generated
vendored
Normal file
118
vendor/github.com/hashicorp/go-multierror/multierror.go
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
package multierror
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// Error is an error type to track multiple errors. This is used to
|
||||
// accumulate errors in cases and return them as a single "error".
|
||||
type Error struct {
|
||||
Errors []error
|
||||
ErrorFormat ErrorFormatFunc
|
||||
}
|
||||
|
||||
func (e *Error) Error() string {
|
||||
fn := e.ErrorFormat
|
||||
if fn == nil {
|
||||
fn = ListFormatFunc
|
||||
}
|
||||
|
||||
return fn(e.Errors)
|
||||
}
|
||||
|
||||
// ErrorOrNil returns an error interface if this Error represents
|
||||
// a list of errors, or returns nil if the list of errors is empty. This
|
||||
// function is useful at the end of accumulation to make sure that the value
|
||||
// returned represents the existence of errors.
|
||||
func (e *Error) ErrorOrNil() error {
|
||||
if e == nil {
|
||||
return nil
|
||||
}
|
||||
if len(e.Errors) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
return e
|
||||
}
|
||||
|
||||
func (e *Error) GoString() string {
|
||||
return fmt.Sprintf("*%#v", *e)
|
||||
}
|
||||
|
||||
// WrappedErrors returns the list of errors that this Error is wrapping.
|
||||
// It is an implementation of the errwrap.Wrapper interface so that
|
||||
// multierror.Error can be used with that library.
|
||||
//
|
||||
// This method is not safe to be called concurrently and is no different
|
||||
// than accessing the Errors field directly. It is implemented only to
|
||||
// satisfy the errwrap.Wrapper interface.
|
||||
func (e *Error) WrappedErrors() []error {
|
||||
return e.Errors
|
||||
}
|
||||
|
||||
// Unwrap returns an error from Error (or nil if there are no errors).
|
||||
// This error returned will further support Unwrap to get the next error,
|
||||
// etc. The order will match the order of Errors in the multierror.Error
|
||||
// at the time of calling.
|
||||
//
|
||||
// The resulting error supports errors.As/Is/Unwrap so you can continue
|
||||
// to use the stdlib errors package to introspect further.
|
||||
//
|
||||
// This will perform a shallow copy of the errors slice. Any errors appended
|
||||
// to this error after calling Unwrap will not be available until a new
|
||||
// Unwrap is called on the multierror.Error.
|
||||
func (e *Error) Unwrap() error {
|
||||
// If we have no errors then we do nothing
|
||||
if e == nil || len(e.Errors) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
// If we have exactly one error, we can just return that directly.
|
||||
if len(e.Errors) == 1 {
|
||||
return e.Errors[0]
|
||||
}
|
||||
|
||||
// Shallow copy the slice
|
||||
errs := make([]error, len(e.Errors))
|
||||
copy(errs, e.Errors)
|
||||
return chain(errs)
|
||||
}
|
||||
|
||||
// chain implements the interfaces necessary for errors.Is/As/Unwrap to
|
||||
// work in a deterministic way with multierror. A chain tracks a list of
|
||||
// errors while accounting for the current represented error. This lets
|
||||
// Is/As be meaningful.
|
||||
//
|
||||
// Unwrap returns the next error. In the cleanest form, Unwrap would return
|
||||
// the wrapped error here but we can't do that if we want to properly
|
||||
// get access to all the errors. Instead, users are recommended to use
|
||||
// Is/As to get the correct error type out.
|
||||
//
|
||||
// Precondition: []error is non-empty (len > 0)
|
||||
type chain []error
|
||||
|
||||
// Error implements the error interface
|
||||
func (e chain) Error() string {
|
||||
return e[0].Error()
|
||||
}
|
||||
|
||||
// Unwrap implements errors.Unwrap by returning the next error in the
|
||||
// chain or nil if there are no more errors.
|
||||
func (e chain) Unwrap() error {
|
||||
if len(e) == 1 {
|
||||
return nil
|
||||
}
|
||||
|
||||
return e[1:]
|
||||
}
|
||||
|
||||
// As implements errors.As by attempting to map to the current value.
|
||||
func (e chain) As(target interface{}) bool {
|
||||
return errors.As(e[0], target)
|
||||
}
|
||||
|
||||
// Is implements errors.Is by comparing the current value directly.
|
||||
func (e chain) Is(target error) bool {
|
||||
return errors.Is(e[0], target)
|
||||
}
|
||||
37
vendor/github.com/hashicorp/go-multierror/prefix.go
generated
vendored
Normal file
37
vendor/github.com/hashicorp/go-multierror/prefix.go
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
package multierror
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hashicorp/errwrap"
|
||||
)
|
||||
|
||||
// Prefix is a helper function that will prefix some text
|
||||
// to the given error. If the error is a multierror.Error, then
|
||||
// it will be prefixed to each wrapped error.
|
||||
//
|
||||
// This is useful to use when appending multiple multierrors
|
||||
// together in order to give better scoping.
|
||||
func Prefix(err error, prefix string) error {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
format := fmt.Sprintf("%s {{err}}", prefix)
|
||||
switch err := err.(type) {
|
||||
case *Error:
|
||||
// Typed nils can reach here, so initialize if we are nil
|
||||
if err == nil {
|
||||
err = new(Error)
|
||||
}
|
||||
|
||||
// Wrap each of the errors
|
||||
for i, e := range err.Errors {
|
||||
err.Errors[i] = errwrap.Wrapf(format, e)
|
||||
}
|
||||
|
||||
return err
|
||||
default:
|
||||
return errwrap.Wrapf(format, err)
|
||||
}
|
||||
}
|
||||
16
vendor/github.com/hashicorp/go-multierror/sort.go
generated
vendored
Normal file
16
vendor/github.com/hashicorp/go-multierror/sort.go
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
package multierror
|
||||
|
||||
// Len implements sort.Interface function for length
|
||||
func (err Error) Len() int {
|
||||
return len(err.Errors)
|
||||
}
|
||||
|
||||
// Swap implements sort.Interface function for swapping elements
|
||||
func (err Error) Swap(i, j int) {
|
||||
err.Errors[i], err.Errors[j] = err.Errors[j], err.Errors[i]
|
||||
}
|
||||
|
||||
// Less implements sort.Interface function for determining order
|
||||
func (err Error) Less(i, j int) bool {
|
||||
return err.Errors[i].Error() < err.Errors[j].Error()
|
||||
}
|
||||
1
vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod
generated
vendored
1
vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod
generated
vendored
@@ -1 +0,0 @@
|
||||
module github.com/konsorten/go-windows-terminal-sequences
|
||||
35
vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go
generated
vendored
35
vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go
generated
vendored
@@ -1,35 +0,0 @@
|
||||
// +build windows
|
||||
|
||||
package sequences
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
var (
|
||||
kernel32Dll *syscall.LazyDLL = syscall.NewLazyDLL("Kernel32.dll")
|
||||
setConsoleMode *syscall.LazyProc = kernel32Dll.NewProc("SetConsoleMode")
|
||||
)
|
||||
|
||||
func EnableVirtualTerminalProcessing(stream syscall.Handle, enable bool) error {
|
||||
const ENABLE_VIRTUAL_TERMINAL_PROCESSING uint32 = 0x4
|
||||
|
||||
var mode uint32
|
||||
err := syscall.GetConsoleMode(syscall.Stdout, &mode)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if enable {
|
||||
mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING
|
||||
} else {
|
||||
mode &^= ENABLE_VIRTUAL_TERMINAL_PROCESSING
|
||||
}
|
||||
|
||||
ret, _, err := setConsoleMode.Call(uintptr(stream), uintptr(mode))
|
||||
if ret == 0 {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
11
vendor/github.com/konsorten/go-windows-terminal-sequences/sequences_dummy.go
generated
vendored
11
vendor/github.com/konsorten/go-windows-terminal-sequences/sequences_dummy.go
generated
vendored
@@ -1,11 +0,0 @@
|
||||
// +build linux darwin
|
||||
|
||||
package sequences
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func EnableVirtualTerminalProcessing(stream uintptr, enable bool) error {
|
||||
return fmt.Errorf("windows only package")
|
||||
}
|
||||
36
vendor/github.com/mattermost/logr/.gitignore
generated
vendored
Normal file
36
vendor/github.com/mattermost/logr/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
debug
|
||||
dynip
|
||||
|
||||
# Test binary, build with `go test -c`
|
||||
*.test
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
# Output of profiler
|
||||
*.prof
|
||||
|
||||
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
|
||||
.glide/
|
||||
|
||||
# IntelliJ config
|
||||
.idea
|
||||
|
||||
# log files
|
||||
*.log
|
||||
|
||||
# transient directories
|
||||
vendor
|
||||
output
|
||||
build
|
||||
app
|
||||
logs
|
||||
|
||||
# test apps
|
||||
test/cmd/testapp1/testapp1
|
||||
test/cmd/simple/simple
|
||||
4
vendor/github.com/mattermost/logr/.travis.yml
generated
vendored
Normal file
4
vendor/github.com/mattermost/logr/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
language: go
|
||||
sudo: false
|
||||
go:
|
||||
- 1.x
|
||||
21
vendor/github.com/mattermost/logr/LICENSE
generated
vendored
Normal file
21
vendor/github.com/mattermost/logr/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 wiggin77
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
193
vendor/github.com/mattermost/logr/README.md
generated
vendored
Normal file
193
vendor/github.com/mattermost/logr/README.md
generated
vendored
Normal file
@@ -0,0 +1,193 @@
|
||||
# logr
|
||||
|
||||
[](http://godoc.org/github.com/mattermost/logr)
|
||||
[](https://goreportcard.com/report/github.com/mattermost/logr)
|
||||
|
||||
Logr is a fully asynchronous, contextual logger for Go.
|
||||
|
||||
It is very much inspired by [Logrus](https://github.com/sirupsen/logrus) but addresses two issues:
|
||||
|
||||
1. Logr is fully asynchronous, meaning that all formatting and writing is done in the background. Latency sensitive applications benefit from not waiting for logging to complete.
|
||||
|
||||
2. Logr provides custom filters which provide more flexibility than Trace, Debug, Info... levels. If you need to temporarily increase verbosity of logging while tracking down a problem you can avoid the fire-hose that typically comes from Debug or Trace by using custom filters.
|
||||
|
||||
## Concepts
|
||||
|
||||
<!-- markdownlint-disable MD033 -->
|
||||
| entity | description |
|
||||
| ------ | ----------- |
|
||||
| Logr | Engine instance typically instantiated once; used to configure logging.<br>```lgr := &Logr{}```|
|
||||
| Logger | Provides contextual logging via fields; lightweight, can be created once and accessed globally or create on demand.<br>```logger := lgr.NewLogger()```<br>```logger2 := logger.WithField("user", "Sam")```|
|
||||
| Target | A destination for log items such as console, file, database or just about anything that can be written to. Each target has its own filter/level and formatter, and any number of targets can be added to a Logr. Targets for syslog and any io.Writer are built-in and it is easy to create your own. You can also use any [Logrus hooks](https://github.com/sirupsen/logrus/wiki/Hooks) via a simple [adapter](https://github.com/wiggin77/logrus4logr).|
|
||||
| Filter | Determines which logging calls get written versus filtered out. Also determines which logging calls generate a stack trace.<br>```filter := &logr.StdFilter{Lvl: logr.Warn, Stacktrace: logr.Fatal}```|
|
||||
| Formatter | Formats the output. Logr includes built-in formatters for JSON and plain text with delimiters. It is easy to create your own formatters or you can also use any [Logrus formatters](https://github.com/sirupsen/logrus#formatters) via a simple [adapter](https://github.com/wiggin77/logrus4logr).<br>```formatter := &format.Plain{Delim: " \| "}```|
|
||||
|
||||
## Usage
|
||||
|
||||
```go
|
||||
// Create Logr instance.
|
||||
lgr := &logr.Logr{}
|
||||
|
||||
// Create a filter and formatter. Both can be shared by multiple
|
||||
// targets.
|
||||
filter := &logr.StdFilter{Lvl: logr.Warn, Stacktrace: logr.Error}
|
||||
formatter := &format.Plain{Delim: " | "}
|
||||
|
||||
// WriterTarget outputs to any io.Writer
|
||||
t := target.NewWriterTarget(filter, formatter, os.StdOut, 1000)
|
||||
lgr.AddTarget(t)
|
||||
|
||||
// One or more Loggers can be created, shared, used concurrently,
|
||||
// or created on demand.
|
||||
logger := lgr.NewLogger().WithField("user", "Sarah")
|
||||
|
||||
// Now we can log to the target(s).
|
||||
logger.Debug("login attempt")
|
||||
logger.Error("login failed")
|
||||
|
||||
// Ensure targets are drained before application exit.
|
||||
lgr.Shutdown()
|
||||
```
|
||||
|
||||
## Fields
|
||||
|
||||
Fields allow for contextual logging, meaning information can be added to log statements without changing the statements themselves. Information can be shared across multiple logging statements thus allowing log analysis tools to group them.
|
||||
|
||||
Fields are added via Loggers:
|
||||
|
||||
```go
|
||||
lgr := &Logr{}
|
||||
// ... add targets ...
|
||||
logger := lgr.NewLogger().WithFields(logr.Fields{
|
||||
"user": user,
|
||||
"role": role})
|
||||
logger.Info("login attempt")
|
||||
// ... later ...
|
||||
logger.Info("login successful")
|
||||
```
|
||||
|
||||
`Logger.WithFields` can be used to create additional Loggers that add more fields.
|
||||
|
||||
Logr fields are inspired by and work the same as [Logrus fields](https://github.com/sirupsen/logrus#fields).
|
||||
|
||||
## Filters
|
||||
|
||||
Logr supports the traditional seven log levels via `logr.StdFilter`: Panic, Fatal, Error, Warning, Info, Debug, and Trace.
|
||||
|
||||
```go
|
||||
// When added to a target, this filter will only allow
|
||||
// log statements with level severity Warn or higher.
|
||||
// It will also generate stack traces for Error or higher.
|
||||
filter := &logr.StdFilter{Lvl: logr.Warn, Stacktrace: logr.Error}
|
||||
```
|
||||
|
||||
Logr also supports custom filters (logr.CustomFilter) which allow fine grained inclusion of log items without turning on the fire-hose.
|
||||
|
||||
```go
|
||||
// create custom levels; use IDs > 10.
|
||||
LoginLevel := logr.Level{ID: 100, Name: "login ", Stacktrace: false}
|
||||
LogoutLevel := logr.Level{ID: 101, Name: "logout", Stacktrace: false}
|
||||
|
||||
lgr := &logr.Logr{}
|
||||
|
||||
// create a custom filter with custom levels.
|
||||
filter := &logr.CustomFilter{}
|
||||
filter.Add(LoginLevel, LogoutLevel)
|
||||
|
||||
formatter := &format.Plain{Delim: " | "}
|
||||
tgr := target.NewWriterTarget(filter, formatter, os.StdOut, 1000)
|
||||
lgr.AddTarget(tgr)
|
||||
logger := lgr.NewLogger().WithFields(logr.Fields{"user": "Bob", "role": "admin"})
|
||||
|
||||
logger.Log(LoginLevel, "this item will get logged")
|
||||
logger.Debug("won't be logged since Debug wasn't added to custom filter")
|
||||
```
|
||||
|
||||
Both filter types allow you to determine which levels require a stack trace to be output. Note that generating stack traces cannot happen fully asynchronously and thus add latency to the calling goroutine.
|
||||
|
||||
## Targets
|
||||
|
||||
There are built-in targets for outputting to syslog, file, or any `io.Writer`. More will be added.
|
||||
|
||||
You can use any [Logrus hooks](https://github.com/sirupsen/logrus/wiki/Hooks) via a simple [adapter](https://github.com/wiggin77/logrus4logr).
|
||||
|
||||
You can create your own target by implementing the [Target](./target.go) interface.
|
||||
|
||||
An easier method is to use the [logr.Basic](./target.go) type target and build your functionality on that. Basic handles all the queuing and other plumbing so you only need to implement two methods. Example target that outputs to `io.Writer`:
|
||||
|
||||
```go
|
||||
type Writer struct {
|
||||
logr.Basic
|
||||
out io.Writer
|
||||
}
|
||||
|
||||
func NewWriterTarget(filter logr.Filter, formatter logr.Formatter, out io.Writer, maxQueue int) *Writer {
|
||||
w := &Writer{out: out}
|
||||
w.Basic.Start(w, w, filter, formatter, maxQueue)
|
||||
return w
|
||||
}
|
||||
|
||||
// Write will always be called by a single goroutine, so no locking needed.
|
||||
// Just convert a log record to a []byte using the formatter and output the
|
||||
// bytes to your sink.
|
||||
func (w *Writer) Write(rec *logr.LogRec) error {
|
||||
_, stacktrace := w.IsLevelEnabled(rec.Level())
|
||||
|
||||
// take a buffer from the pool to avoid allocations or just allocate a new one.
|
||||
buf := rec.Logger().Logr().BorrowBuffer()
|
||||
defer rec.Logger().Logr().ReleaseBuffer(buf)
|
||||
|
||||
buf, err := w.Formatter().Format(rec, stacktrace, buf)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = w.out.Write(buf.Bytes())
|
||||
return err
|
||||
}
|
||||
```
|
||||
|
||||
## Formatters
|
||||
|
||||
Logr has two built-in formatters, one for JSON and the other plain, delimited text.
|
||||
|
||||
You can use any [Logrus formatters](https://github.com/sirupsen/logrus#formatters) via a simple [adapter](https://github.com/wiggin77/logrus4logr).
|
||||
|
||||
You can create your own formatter by implementing the [Formatter](./formatter.go) interface:
|
||||
|
||||
```go
|
||||
Format(rec *LogRec, stacktrace bool, buf *bytes.Buffer) (*bytes.Buffer, error)
|
||||
```
|
||||
|
||||
## Handlers
|
||||
|
||||
When creating the Logr instance, you can add several handlers that get called when exceptional events occur:
|
||||
|
||||
### ```Logr.OnLoggerError(err error)```
|
||||
|
||||
Called any time an internal logging error occurs. For example, this can happen when a target cannot connect to its data sink.
|
||||
|
||||
It may be tempting to log this error, however there is a danger that logging this will simply generate another error and so on. If you must log it, use a target and custom level specifically for this event and ensure it cannot generate more errors.
|
||||
|
||||
### ```Logr.OnQueueFull func(rec *LogRec, maxQueueSize int) bool```
|
||||
|
||||
Called on an attempt to add a log record to a full Logr queue. This generally means the Logr maximum queue size is too small, or at least one target is very slow. Logr maximum queue size can be changed before adding any targets via:
|
||||
|
||||
```go
|
||||
lgr := logr.Logr{MaxQueueSize: 10000}
|
||||
```
|
||||
|
||||
Returning true will drop the log record. False will block until the log record can be added, which creates a natural throttle at the expense of latency for the calling goroutine. The default is to block.
|
||||
|
||||
### ```Logr.OnTargetQueueFull func(target Target, rec *LogRec, maxQueueSize int) bool```
|
||||
|
||||
Called on an attempt to add a log record to a full target queue. This generally means your target's max queue size is too small, or the target is very slow to output.
|
||||
|
||||
As with the Logr queue, returning true will drop the log record. False will block until the log record can be added, which creates a natural throttle at the expense of latency for the calling goroutine. The default is to block.
|
||||
|
||||
### ```Logr.OnExit func(code int) and Logr.OnPanic func(err interface{})```
|
||||
|
||||
OnExit and OnPanic are called when the Logger.FatalXXX and Logger.PanicXXX functions are called respectively.
|
||||
|
||||
In both cases the default behavior is to shut down gracefully, draining all targets, and calling `os.Exit` or `panic` respectively.
|
||||
|
||||
When adding your own handlers, be sure to call `Logr.Shutdown` before exiting the application to avoid losing log records.
|
||||
11
vendor/github.com/mattermost/logr/config.go
generated
vendored
Normal file
11
vendor/github.com/mattermost/logr/config.go
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
package logr
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/wiggin77/cfg"
|
||||
)
|
||||
|
||||
func ConfigLogger(config *cfg.Config) error {
|
||||
return fmt.Errorf("Not implemented yet")
|
||||
}
|
||||
34
vendor/github.com/mattermost/logr/const.go
generated
vendored
Normal file
34
vendor/github.com/mattermost/logr/const.go
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
package logr
|
||||
|
||||
import "time"
|
||||
|
||||
// Defaults.
|
||||
const (
|
||||
// DefaultMaxQueueSize is the default maximum queue size for Logr instances.
|
||||
DefaultMaxQueueSize = 1000
|
||||
|
||||
// DefaultMaxStackFrames is the default maximum max number of stack frames collected
|
||||
// when generating stack traces for logging.
|
||||
DefaultMaxStackFrames = 30
|
||||
|
||||
// MaxLevelID is the maximum value of a level ID. Some level cache implementations will
|
||||
// allocate a cache of this size. Cannot exceed uint.
|
||||
MaxLevelID = 256
|
||||
|
||||
// DefaultEnqueueTimeout is the default amount of time a log record can take to be queued.
|
||||
// This only applies to blocking enqueue which happen after `logr.OnQueueFull` is called
|
||||
// and returns false.
|
||||
DefaultEnqueueTimeout = time.Second * 30
|
||||
|
||||
// DefaultShutdownTimeout is the default amount of time `logr.Shutdown` can execute before
|
||||
// timing out.
|
||||
DefaultShutdownTimeout = time.Second * 30
|
||||
|
||||
// DefaultFlushTimeout is the default amount of time `logr.Flush` can execute before
|
||||
// timing out.
|
||||
DefaultFlushTimeout = time.Second * 30
|
||||
|
||||
// DefaultMaxPooledBuffer is the maximum size a pooled buffer can be.
|
||||
// Buffers that grow beyond this size are garbage collected.
|
||||
DefaultMaxPooledBuffer = 1024 * 1024
|
||||
)
|
||||
26
vendor/github.com/mattermost/logr/filter.go
generated
vendored
Normal file
26
vendor/github.com/mattermost/logr/filter.go
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
package logr
|
||||
|
||||
// LevelID is the unique id of each level.
|
||||
type LevelID uint
|
||||
|
||||
// Level provides a mechanism to enable/disable specific log lines.
|
||||
type Level struct {
|
||||
ID LevelID
|
||||
Name string
|
||||
Stacktrace bool
|
||||
}
|
||||
|
||||
// String returns the name of this level.
|
||||
func (level Level) String() string {
|
||||
return level.Name
|
||||
}
|
||||
|
||||
// Filter allows targets to determine which Level(s) are active
|
||||
// for logging and which Level(s) require a stack trace to be output.
|
||||
// A default implementation using "panic, fatal..." is provided, and
|
||||
// a more flexible alternative implementation is also provided that
|
||||
// allows any number of custom levels.
|
||||
type Filter interface {
|
||||
IsEnabled(Level) bool
|
||||
IsStacktraceEnabled(Level) bool
|
||||
}
|
||||
273
vendor/github.com/mattermost/logr/format/json.go
generated
vendored
Normal file
273
vendor/github.com/mattermost/logr/format/json.go
generated
vendored
Normal file
@@ -0,0 +1,273 @@
|
||||
package format
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"runtime"
|
||||
"sort"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/francoispqt/gojay"
|
||||
"github.com/mattermost/logr"
|
||||
)
|
||||
|
||||
// ContextField is a name/value pair within the context fields.
|
||||
type ContextField struct {
|
||||
Key string
|
||||
Val interface{}
|
||||
}
|
||||
|
||||
// JSON formats log records as JSON.
|
||||
type JSON struct {
|
||||
// DisableTimestamp disables output of timestamp field.
|
||||
DisableTimestamp bool
|
||||
// DisableLevel disables output of level field.
|
||||
DisableLevel bool
|
||||
// DisableMsg disables output of msg field.
|
||||
DisableMsg bool
|
||||
// DisableContext disables output of all context fields.
|
||||
DisableContext bool
|
||||
// DisableStacktrace disables output of stack trace.
|
||||
DisableStacktrace bool
|
||||
|
||||
// TimestampFormat is an optional format for timestamps. If empty
|
||||
// then DefTimestampFormat is used.
|
||||
TimestampFormat string
|
||||
|
||||
// Deprecated: this has no effect.
|
||||
Indent string
|
||||
|
||||
// EscapeHTML determines if certain characters (e.g. `<`, `>`, `&`)
|
||||
// are escaped.
|
||||
EscapeHTML bool
|
||||
|
||||
// KeyTimestamp overrides the timestamp field key name.
|
||||
KeyTimestamp string
|
||||
|
||||
// KeyLevel overrides the level field key name.
|
||||
KeyLevel string
|
||||
|
||||
// KeyMsg overrides the msg field key name.
|
||||
KeyMsg string
|
||||
|
||||
// KeyContextFields when not empty will group all context fields
|
||||
// under this key.
|
||||
KeyContextFields string
|
||||
|
||||
// KeyStacktrace overrides the stacktrace field key name.
|
||||
KeyStacktrace string
|
||||
|
||||
// ContextSorter allows custom sorting for the context fields.
|
||||
ContextSorter func(fields logr.Fields) []ContextField
|
||||
|
||||
once sync.Once
|
||||
}
|
||||
|
||||
// Format converts a log record to bytes in JSON format.
|
||||
func (j *JSON) Format(rec *logr.LogRec, stacktrace bool, buf *bytes.Buffer) (*bytes.Buffer, error) {
|
||||
j.once.Do(j.applyDefaultKeyNames)
|
||||
|
||||
if buf == nil {
|
||||
buf = &bytes.Buffer{}
|
||||
}
|
||||
enc := gojay.BorrowEncoder(buf)
|
||||
defer func() {
|
||||
enc.Release()
|
||||
}()
|
||||
|
||||
sorter := j.ContextSorter
|
||||
if sorter == nil {
|
||||
sorter = j.defaultContextSorter
|
||||
}
|
||||
|
||||
jlr := JSONLogRec{
|
||||
LogRec: rec,
|
||||
JSON: j,
|
||||
stacktrace: stacktrace,
|
||||
sorter: sorter,
|
||||
}
|
||||
|
||||
err := enc.EncodeObject(jlr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
buf.WriteByte('\n')
|
||||
return buf, nil
|
||||
}
|
||||
|
||||
func (j *JSON) applyDefaultKeyNames() {
|
||||
if j.KeyTimestamp == "" {
|
||||
j.KeyTimestamp = "timestamp"
|
||||
}
|
||||
if j.KeyLevel == "" {
|
||||
j.KeyLevel = "level"
|
||||
}
|
||||
if j.KeyMsg == "" {
|
||||
j.KeyMsg = "msg"
|
||||
}
|
||||
if j.KeyStacktrace == "" {
|
||||
j.KeyStacktrace = "stacktrace"
|
||||
}
|
||||
}
|
||||
|
||||
// defaultContextSorter sorts the context fields alphabetically by key.
|
||||
func (j *JSON) defaultContextSorter(fields logr.Fields) []ContextField {
|
||||
keys := make([]string, 0, len(fields))
|
||||
for k := range fields {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
sort.Strings(keys)
|
||||
|
||||
cf := make([]ContextField, 0, len(keys))
|
||||
for _, k := range keys {
|
||||
cf = append(cf, ContextField{Key: k, Val: fields[k]})
|
||||
}
|
||||
return cf
|
||||
}
|
||||
|
||||
// JSONLogRec decorates a LogRec adding JSON encoding.
|
||||
type JSONLogRec struct {
|
||||
*logr.LogRec
|
||||
*JSON
|
||||
stacktrace bool
|
||||
sorter func(fields logr.Fields) []ContextField
|
||||
}
|
||||
|
||||
// MarshalJSONObject encodes the LogRec as JSON.
|
||||
func (rec JSONLogRec) MarshalJSONObject(enc *gojay.Encoder) {
|
||||
if !rec.DisableTimestamp {
|
||||
timestampFmt := rec.TimestampFormat
|
||||
if timestampFmt == "" {
|
||||
timestampFmt = logr.DefTimestampFormat
|
||||
}
|
||||
time := rec.Time()
|
||||
enc.AddTimeKey(rec.KeyTimestamp, &time, timestampFmt)
|
||||
}
|
||||
if !rec.DisableLevel {
|
||||
enc.AddStringKey(rec.KeyLevel, rec.Level().Name)
|
||||
}
|
||||
if !rec.DisableMsg {
|
||||
enc.AddStringKey(rec.KeyMsg, rec.Msg())
|
||||
}
|
||||
if !rec.DisableContext {
|
||||
ctxFields := rec.sorter(rec.Fields())
|
||||
if rec.KeyContextFields != "" {
|
||||
enc.AddObjectKey(rec.KeyContextFields, jsonFields(ctxFields))
|
||||
} else {
|
||||
if len(ctxFields) > 0 {
|
||||
for _, cf := range ctxFields {
|
||||
key := rec.prefixCollision(cf.Key)
|
||||
encodeField(enc, key, cf.Val)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if rec.stacktrace && !rec.DisableStacktrace {
|
||||
frames := rec.StackFrames()
|
||||
if len(frames) > 0 {
|
||||
enc.AddArrayKey(rec.KeyStacktrace, stackFrames(frames))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// IsNil returns true if the LogRec pointer is nil.
|
||||
func (rec JSONLogRec) IsNil() bool {
|
||||
return rec.LogRec == nil
|
||||
}
|
||||
|
||||
func (rec JSONLogRec) prefixCollision(key string) string {
|
||||
switch key {
|
||||
case rec.KeyTimestamp, rec.KeyLevel, rec.KeyMsg, rec.KeyStacktrace:
|
||||
return rec.prefixCollision("_" + key)
|
||||
}
|
||||
return key
|
||||
}
|
||||
|
||||
type stackFrames []runtime.Frame
|
||||
|
||||
// MarshalJSONArray encodes stackFrames slice as JSON.
|
||||
func (s stackFrames) MarshalJSONArray(enc *gojay.Encoder) {
|
||||
for _, frame := range s {
|
||||
enc.AddObject(stackFrame(frame))
|
||||
}
|
||||
}
|
||||
|
||||
// IsNil returns true if stackFrames is empty slice.
|
||||
func (s stackFrames) IsNil() bool {
|
||||
return len(s) == 0
|
||||
}
|
||||
|
||||
type stackFrame runtime.Frame
|
||||
|
||||
// MarshalJSONArray encodes stackFrame as JSON.
|
||||
func (f stackFrame) MarshalJSONObject(enc *gojay.Encoder) {
|
||||
enc.AddStringKey("Function", f.Function)
|
||||
enc.AddStringKey("File", f.File)
|
||||
enc.AddIntKey("Line", f.Line)
|
||||
}
|
||||
|
||||
func (f stackFrame) IsNil() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
type jsonFields []ContextField
|
||||
|
||||
// MarshalJSONObject encodes Fields map to JSON.
|
||||
func (f jsonFields) MarshalJSONObject(enc *gojay.Encoder) {
|
||||
for _, ctxField := range f {
|
||||
encodeField(enc, ctxField.Key, ctxField.Val)
|
||||
}
|
||||
}
|
||||
|
||||
// IsNil returns true if map is nil.
|
||||
func (f jsonFields) IsNil() bool {
|
||||
return f == nil
|
||||
}
|
||||
|
||||
func encodeField(enc *gojay.Encoder, key string, val interface{}) {
|
||||
switch vt := val.(type) {
|
||||
case gojay.MarshalerJSONObject:
|
||||
enc.AddObjectKey(key, vt)
|
||||
case gojay.MarshalerJSONArray:
|
||||
enc.AddArrayKey(key, vt)
|
||||
case string:
|
||||
enc.AddStringKey(key, vt)
|
||||
case error:
|
||||
enc.AddStringKey(key, vt.Error())
|
||||
case bool:
|
||||
enc.AddBoolKey(key, vt)
|
||||
case int:
|
||||
enc.AddIntKey(key, vt)
|
||||
case int64:
|
||||
enc.AddInt64Key(key, vt)
|
||||
case int32:
|
||||
enc.AddIntKey(key, int(vt))
|
||||
case int16:
|
||||
enc.AddIntKey(key, int(vt))
|
||||
case int8:
|
||||
enc.AddIntKey(key, int(vt))
|
||||
case uint64:
|
||||
enc.AddIntKey(key, int(vt))
|
||||
case uint32:
|
||||
enc.AddIntKey(key, int(vt))
|
||||
case uint16:
|
||||
enc.AddIntKey(key, int(vt))
|
||||
case uint8:
|
||||
enc.AddIntKey(key, int(vt))
|
||||
case float64:
|
||||
enc.AddFloatKey(key, vt)
|
||||
case float32:
|
||||
enc.AddFloat32Key(key, vt)
|
||||
case *gojay.EmbeddedJSON:
|
||||
enc.AddEmbeddedJSONKey(key, vt)
|
||||
case time.Time:
|
||||
enc.AddTimeKey(key, &vt, logr.DefTimestampFormat)
|
||||
case *time.Time:
|
||||
enc.AddTimeKey(key, vt, logr.DefTimestampFormat)
|
||||
default:
|
||||
s := fmt.Sprintf("%v", vt)
|
||||
enc.AddStringKey(key, s)
|
||||
}
|
||||
}
|
||||
75
vendor/github.com/mattermost/logr/format/plain.go
generated
vendored
Normal file
75
vendor/github.com/mattermost/logr/format/plain.go
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
package format
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"github.com/mattermost/logr"
|
||||
)
|
||||
|
||||
// Plain is the simplest formatter, outputting only text with
|
||||
// no colors.
|
||||
type Plain struct {
|
||||
// DisableTimestamp disables output of timestamp field.
|
||||
DisableTimestamp bool
|
||||
// DisableLevel disables output of level field.
|
||||
DisableLevel bool
|
||||
// DisableMsg disables output of msg field.
|
||||
DisableMsg bool
|
||||
// DisableContext disables output of all context fields.
|
||||
DisableContext bool
|
||||
// DisableStacktrace disables output of stack trace.
|
||||
DisableStacktrace bool
|
||||
|
||||
// Delim is an optional delimiter output between each log field.
|
||||
// Defaults to a single space.
|
||||
Delim string
|
||||
|
||||
// TimestampFormat is an optional format for timestamps. If empty
|
||||
// then DefTimestampFormat is used.
|
||||
TimestampFormat string
|
||||
}
|
||||
|
||||
// Format converts a log record to bytes.
|
||||
func (p *Plain) Format(rec *logr.LogRec, stacktrace bool, buf *bytes.Buffer) (*bytes.Buffer, error) {
|
||||
delim := p.Delim
|
||||
if delim == "" {
|
||||
delim = " "
|
||||
}
|
||||
if buf == nil {
|
||||
buf = &bytes.Buffer{}
|
||||
}
|
||||
|
||||
timestampFmt := p.TimestampFormat
|
||||
if timestampFmt == "" {
|
||||
timestampFmt = logr.DefTimestampFormat
|
||||
}
|
||||
|
||||
if !p.DisableTimestamp {
|
||||
var arr [128]byte
|
||||
tbuf := rec.Time().AppendFormat(arr[:0], timestampFmt)
|
||||
buf.Write(tbuf)
|
||||
buf.WriteString(delim)
|
||||
}
|
||||
if !p.DisableLevel {
|
||||
fmt.Fprintf(buf, "%v%s", rec.Level().Name, delim)
|
||||
}
|
||||
if !p.DisableMsg {
|
||||
fmt.Fprint(buf, rec.Msg(), delim)
|
||||
}
|
||||
if !p.DisableContext {
|
||||
ctx := rec.Fields()
|
||||
if len(ctx) > 0 {
|
||||
logr.WriteFields(buf, ctx, " ")
|
||||
}
|
||||
}
|
||||
if stacktrace && !p.DisableStacktrace {
|
||||
frames := rec.StackFrames()
|
||||
if len(frames) > 0 {
|
||||
buf.WriteString("\n")
|
||||
logr.WriteStacktrace(buf, rec.StackFrames())
|
||||
}
|
||||
}
|
||||
buf.WriteString("\n")
|
||||
return buf, nil
|
||||
}
|
||||
119
vendor/github.com/mattermost/logr/formatter.go
generated
vendored
Normal file
119
vendor/github.com/mattermost/logr/formatter.go
generated
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
package logr
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"runtime"
|
||||
"sort"
|
||||
)
|
||||
|
||||
// Formatter turns a LogRec into a formatted string.
|
||||
type Formatter interface {
|
||||
// Format converts a log record to bytes. If buf is not nil then it will be
|
||||
// be filled with the formatted results, otherwise a new buffer will be allocated.
|
||||
Format(rec *LogRec, stacktrace bool, buf *bytes.Buffer) (*bytes.Buffer, error)
|
||||
}
|
||||
|
||||
const (
|
||||
// DefTimestampFormat is the default time stamp format used by
|
||||
// Plain formatter and others.
|
||||
DefTimestampFormat = "2006-01-02 15:04:05.000 Z07:00"
|
||||
)
|
||||
|
||||
// DefaultFormatter is the default formatter, outputting only text with
|
||||
// no colors and a space delimiter. Use `format.Plain` instead.
|
||||
type DefaultFormatter struct {
|
||||
}
|
||||
|
||||
// Format converts a log record to bytes.
|
||||
func (p *DefaultFormatter) Format(rec *LogRec, stacktrace bool, buf *bytes.Buffer) (*bytes.Buffer, error) {
|
||||
if buf == nil {
|
||||
buf = &bytes.Buffer{}
|
||||
}
|
||||
delim := " "
|
||||
timestampFmt := DefTimestampFormat
|
||||
|
||||
fmt.Fprintf(buf, "%s%s", rec.Time().Format(timestampFmt), delim)
|
||||
fmt.Fprintf(buf, "%v%s", rec.Level(), delim)
|
||||
fmt.Fprint(buf, rec.Msg(), delim)
|
||||
|
||||
ctx := rec.Fields()
|
||||
if len(ctx) > 0 {
|
||||
WriteFields(buf, ctx, " ")
|
||||
}
|
||||
|
||||
if stacktrace {
|
||||
frames := rec.StackFrames()
|
||||
if len(frames) > 0 {
|
||||
buf.WriteString("\n")
|
||||
WriteStacktrace(buf, rec.StackFrames())
|
||||
}
|
||||
}
|
||||
buf.WriteString("\n")
|
||||
|
||||
return buf, nil
|
||||
}
|
||||
|
||||
// WriteFields writes zero or more name value pairs to the io.Writer.
|
||||
// The pairs are sorted by key name and output in key=value format
|
||||
// with optional separator between fields.
|
||||
func WriteFields(w io.Writer, flds Fields, separator string) {
|
||||
keys := make([]string, 0, len(flds))
|
||||
for k := range flds {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
sort.Strings(keys)
|
||||
sep := ""
|
||||
for _, key := range keys {
|
||||
writeField(w, key, flds[key], sep)
|
||||
sep = separator
|
||||
}
|
||||
}
|
||||
|
||||
func writeField(w io.Writer, key string, val interface{}, sep string) {
|
||||
var template string
|
||||
switch v := val.(type) {
|
||||
case error:
|
||||
val := v.Error()
|
||||
if shouldQuote(val) {
|
||||
template = "%s%s=%q"
|
||||
} else {
|
||||
template = "%s%s=%s"
|
||||
}
|
||||
case string:
|
||||
if shouldQuote(v) {
|
||||
template = "%s%s=%q"
|
||||
} else {
|
||||
template = "%s%s=%s"
|
||||
}
|
||||
default:
|
||||
template = "%s%s=%v"
|
||||
}
|
||||
fmt.Fprintf(w, template, sep, key, val)
|
||||
}
|
||||
|
||||
// shouldQuote returns true if val contains any characters that might be unsafe
|
||||
// when injecting log output into an aggregator, viewer or report.
|
||||
func shouldQuote(val string) bool {
|
||||
for _, c := range val {
|
||||
if !((c >= '0' && c <= '9') ||
|
||||
(c >= 'a' && c <= 'z') ||
|
||||
(c >= 'A' && c <= 'Z')) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// WriteStacktrace formats and outputs a stack trace to an io.Writer.
|
||||
func WriteStacktrace(w io.Writer, frames []runtime.Frame) {
|
||||
for _, frame := range frames {
|
||||
if frame.Function != "" {
|
||||
fmt.Fprintf(w, " %s\n", frame.Function)
|
||||
}
|
||||
if frame.File != "" {
|
||||
fmt.Fprintf(w, " %s:%d\n", frame.File, frame.Line)
|
||||
}
|
||||
}
|
||||
}
|
||||
11
vendor/github.com/mattermost/logr/go.mod
generated
vendored
Normal file
11
vendor/github.com/mattermost/logr/go.mod
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
module github.com/mattermost/logr
|
||||
|
||||
go 1.12
|
||||
|
||||
require (
|
||||
github.com/francoispqt/gojay v1.2.13
|
||||
github.com/stretchr/testify v1.2.2
|
||||
github.com/wiggin77/cfg v1.0.2
|
||||
github.com/wiggin77/merror v1.0.2
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0
|
||||
)
|
||||
174
vendor/github.com/mattermost/logr/go.sum
generated
vendored
Normal file
174
vendor/github.com/mattermost/logr/go.sum
generated
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo=
|
||||
dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU=
|
||||
dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU=
|
||||
dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=
|
||||
dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
|
||||
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
|
||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
|
||||
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||
github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk=
|
||||
github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
|
||||
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0/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.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
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/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY=
|
||||
github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
|
||||
github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
|
||||
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=
|
||||
github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=
|
||||
github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
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/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
||||
github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY=
|
||||
github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM=
|
||||
github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0=
|
||||
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
|
||||
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
|
||||
github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw=
|
||||
github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI=
|
||||
github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU=
|
||||
github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag=
|
||||
github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg=
|
||||
github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw=
|
||||
github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y=
|
||||
github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
|
||||
github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q=
|
||||
github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ=
|
||||
github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I=
|
||||
github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0=
|
||||
github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ=
|
||||
github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk=
|
||||
github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4=
|
||||
github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw=
|
||||
github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE=
|
||||
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=
|
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
|
||||
github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU=
|
||||
github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=
|
||||
github.com/wiggin77/cfg v1.0.2 h1:NBUX+iJRr+RTncTqTNvajHwzduqbhCQjEqxLHr6Fk7A=
|
||||
github.com/wiggin77/cfg v1.0.2/go.mod h1:b3gotba2e5bXTqTW48DwIFoLc+4lWKP7WPi/CdvZ4aE=
|
||||
github.com/wiggin77/merror v1.0.2 h1:V0nH9eFp64ASyaXC+pB5WpvBoCg7NUwvaCSKdzlcHqw=
|
||||
github.com/wiggin77/merror v1.0.2/go.mod h1:uQTcIU0Z6jRK4OwqganPYerzQxSFJ4GSHM3aurxxQpg=
|
||||
go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
|
||||
go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
|
||||
golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw=
|
||||
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/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/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
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-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/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-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
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=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
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=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/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-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/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-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
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/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/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
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=
|
||||
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.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y=
|
||||
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=
|
||||
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-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg=
|
||||
google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
|
||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
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=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
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-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck=
|
||||
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=
|
||||
98
vendor/github.com/mattermost/logr/levelcache.go
generated
vendored
Normal file
98
vendor/github.com/mattermost/logr/levelcache.go
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
package logr
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// LevelStatus represents whether a level is enabled and
|
||||
// requires a stack trace.
|
||||
type LevelStatus struct {
|
||||
Enabled bool
|
||||
Stacktrace bool
|
||||
empty bool
|
||||
}
|
||||
|
||||
type levelCache interface {
|
||||
setup()
|
||||
get(id LevelID) (LevelStatus, bool)
|
||||
put(id LevelID, status LevelStatus) error
|
||||
clear()
|
||||
}
|
||||
|
||||
// syncMapLevelCache uses sync.Map which may better handle large concurrency
|
||||
// scenarios.
|
||||
type syncMapLevelCache struct {
|
||||
m sync.Map
|
||||
}
|
||||
|
||||
func (c *syncMapLevelCache) setup() {
|
||||
c.clear()
|
||||
}
|
||||
|
||||
func (c *syncMapLevelCache) get(id LevelID) (LevelStatus, bool) {
|
||||
if id > MaxLevelID {
|
||||
return LevelStatus{}, false
|
||||
}
|
||||
s, _ := c.m.Load(id)
|
||||
status := s.(LevelStatus)
|
||||
return status, !status.empty
|
||||
}
|
||||
|
||||
func (c *syncMapLevelCache) put(id LevelID, status LevelStatus) error {
|
||||
if id > MaxLevelID {
|
||||
return fmt.Errorf("level id cannot exceed MaxLevelID (%d)", MaxLevelID)
|
||||
}
|
||||
c.m.Store(id, status)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *syncMapLevelCache) clear() {
|
||||
var i LevelID
|
||||
for i = 0; i < MaxLevelID; i++ {
|
||||
c.m.Store(i, LevelStatus{empty: true})
|
||||
}
|
||||
}
|
||||
|
||||
// arrayLevelCache using array and a mutex.
|
||||
type arrayLevelCache struct {
|
||||
arr [MaxLevelID + 1]LevelStatus
|
||||
mux sync.RWMutex
|
||||
}
|
||||
|
||||
func (c *arrayLevelCache) setup() {
|
||||
c.clear()
|
||||
}
|
||||
|
||||
//var dummy = LevelStatus{}
|
||||
|
||||
func (c *arrayLevelCache) get(id LevelID) (LevelStatus, bool) {
|
||||
if id > MaxLevelID {
|
||||
return LevelStatus{}, false
|
||||
}
|
||||
c.mux.RLock()
|
||||
status := c.arr[id]
|
||||
ok := !status.empty
|
||||
c.mux.RUnlock()
|
||||
return status, ok
|
||||
}
|
||||
|
||||
func (c *arrayLevelCache) put(id LevelID, status LevelStatus) error {
|
||||
if id > MaxLevelID {
|
||||
return fmt.Errorf("level id cannot exceed MaxLevelID (%d)", MaxLevelID)
|
||||
}
|
||||
c.mux.Lock()
|
||||
defer c.mux.Unlock()
|
||||
|
||||
c.arr[id] = status
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *arrayLevelCache) clear() {
|
||||
c.mux.Lock()
|
||||
defer c.mux.Unlock()
|
||||
|
||||
for i := range c.arr {
|
||||
c.arr[i] = LevelStatus{empty: true}
|
||||
}
|
||||
}
|
||||
45
vendor/github.com/mattermost/logr/levelcustom.go
generated
vendored
Normal file
45
vendor/github.com/mattermost/logr/levelcustom.go
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
package logr
|
||||
|
||||
import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
// CustomFilter allows targets to enable logging via a list of levels.
|
||||
type CustomFilter struct {
|
||||
mux sync.RWMutex
|
||||
levels map[LevelID]Level
|
||||
}
|
||||
|
||||
// IsEnabled returns true if the specified Level exists in this list.
|
||||
func (st *CustomFilter) IsEnabled(level Level) bool {
|
||||
st.mux.RLock()
|
||||
defer st.mux.RUnlock()
|
||||
_, ok := st.levels[level.ID]
|
||||
return ok
|
||||
}
|
||||
|
||||
// IsStacktraceEnabled returns true if the specified Level requires a stack trace.
|
||||
func (st *CustomFilter) IsStacktraceEnabled(level Level) bool {
|
||||
st.mux.RLock()
|
||||
defer st.mux.RUnlock()
|
||||
lvl, ok := st.levels[level.ID]
|
||||
if ok {
|
||||
return lvl.Stacktrace
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Add adds one or more levels to the list. Adding a level enables logging for
|
||||
// that level on any targets using this CustomFilter.
|
||||
func (st *CustomFilter) Add(levels ...Level) {
|
||||
st.mux.Lock()
|
||||
defer st.mux.Unlock()
|
||||
|
||||
if st.levels == nil {
|
||||
st.levels = make(map[LevelID]Level)
|
||||
}
|
||||
|
||||
for _, s := range levels {
|
||||
st.levels[s.ID] = s
|
||||
}
|
||||
}
|
||||
37
vendor/github.com/mattermost/logr/levelstd.go
generated
vendored
Normal file
37
vendor/github.com/mattermost/logr/levelstd.go
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
package logr
|
||||
|
||||
// StdFilter allows targets to filter via classic log levels where any level
|
||||
// beyond a certain verbosity/severity is enabled.
|
||||
type StdFilter struct {
|
||||
Lvl Level
|
||||
Stacktrace Level
|
||||
}
|
||||
|
||||
// IsEnabled returns true if the specified Level is at or above this verbosity. Also
|
||||
// determines if a stack trace is required.
|
||||
func (lt StdFilter) IsEnabled(level Level) bool {
|
||||
return level.ID <= lt.Lvl.ID
|
||||
}
|
||||
|
||||
// IsStacktraceEnabled returns true if the specified Level requires a stack trace.
|
||||
func (lt StdFilter) IsStacktraceEnabled(level Level) bool {
|
||||
return level.ID <= lt.Stacktrace.ID
|
||||
}
|
||||
|
||||
var (
|
||||
// Panic is the highest level of severity. Logs the message and then panics.
|
||||
Panic = Level{ID: 0, Name: "panic"}
|
||||
// Fatal designates a catastrophic error. Logs the message and then calls
|
||||
// `logr.Exit(1)`.
|
||||
Fatal = Level{ID: 1, Name: "fatal"}
|
||||
// Error designates a serious but possibly recoverable error.
|
||||
Error = Level{ID: 2, Name: "error"}
|
||||
// Warn designates non-critical error.
|
||||
Warn = Level{ID: 3, Name: "warn"}
|
||||
// Info designates information regarding application events.
|
||||
Info = Level{ID: 4, Name: "info"}
|
||||
// Debug designates verbose information typically used for debugging.
|
||||
Debug = Level{ID: 5, Name: "debug"}
|
||||
// Trace designates the highest verbosity of log output.
|
||||
Trace = Level{ID: 6, Name: "trace"}
|
||||
)
|
||||
218
vendor/github.com/mattermost/logr/logger.go
generated
vendored
Normal file
218
vendor/github.com/mattermost/logr/logger.go
generated
vendored
Normal file
@@ -0,0 +1,218 @@
|
||||
package logr
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// Fields type, used to pass to `WithFields`.
|
||||
type Fields map[string]interface{}
|
||||
|
||||
// Logger provides context for logging via fields.
|
||||
type Logger struct {
|
||||
logr *Logr
|
||||
fields Fields
|
||||
}
|
||||
|
||||
// Logr returns the `Logr` instance that created this `Logger`.
|
||||
func (logger Logger) Logr() *Logr {
|
||||
return logger.logr
|
||||
}
|
||||
|
||||
// WithField creates a new `Logger` with any existing fields
|
||||
// plus the new one.
|
||||
func (logger Logger) WithField(key string, value interface{}) Logger {
|
||||
return logger.WithFields(Fields{key: value})
|
||||
}
|
||||
|
||||
// WithFields creates a new `Logger` with any existing fields
|
||||
// plus the new ones.
|
||||
func (logger Logger) WithFields(fields Fields) Logger {
|
||||
l := Logger{logr: logger.logr}
|
||||
// if parent has no fields then avoid creating a new map.
|
||||
oldLen := len(logger.fields)
|
||||
if oldLen == 0 {
|
||||
l.fields = fields
|
||||
return l
|
||||
}
|
||||
|
||||
l.fields = make(Fields, len(fields)+oldLen)
|
||||
for k, v := range logger.fields {
|
||||
l.fields[k] = v
|
||||
}
|
||||
for k, v := range fields {
|
||||
l.fields[k] = v
|
||||
}
|
||||
return l
|
||||
}
|
||||
|
||||
// Log checks that the level matches one or more targets, and
|
||||
// if so, generates a log record that is added to the Logr queue.
|
||||
// Arguments are handled in the manner of fmt.Print.
|
||||
func (logger Logger) Log(lvl Level, args ...interface{}) {
|
||||
status := logger.logr.IsLevelEnabled(lvl)
|
||||
if status.Enabled {
|
||||
rec := NewLogRec(lvl, logger, "", args, status.Stacktrace)
|
||||
logger.logr.enqueue(rec)
|
||||
}
|
||||
}
|
||||
|
||||
// Trace is a convenience method equivalent to `Log(TraceLevel, args...)`.
|
||||
func (logger Logger) Trace(args ...interface{}) {
|
||||
logger.Log(Trace, args...)
|
||||
}
|
||||
|
||||
// Debug is a convenience method equivalent to `Log(DebugLevel, args...)`.
|
||||
func (logger Logger) Debug(args ...interface{}) {
|
||||
logger.Log(Debug, args...)
|
||||
}
|
||||
|
||||
// Print ensures compatibility with std lib logger.
|
||||
func (logger Logger) Print(args ...interface{}) {
|
||||
logger.Info(args...)
|
||||
}
|
||||
|
||||
// Info is a convenience method equivalent to `Log(InfoLevel, args...)`.
|
||||
func (logger Logger) Info(args ...interface{}) {
|
||||
logger.Log(Info, args...)
|
||||
}
|
||||
|
||||
// Warn is a convenience method equivalent to `Log(WarnLevel, args...)`.
|
||||
func (logger Logger) Warn(args ...interface{}) {
|
||||
logger.Log(Warn, args...)
|
||||
}
|
||||
|
||||
// Error is a convenience method equivalent to `Log(ErrorLevel, args...)`.
|
||||
func (logger Logger) Error(args ...interface{}) {
|
||||
logger.Log(Error, args...)
|
||||
}
|
||||
|
||||
// Fatal is a convenience method equivalent to `Log(FatalLevel, args...)`
|
||||
// followed by a call to os.Exit(1).
|
||||
func (logger Logger) Fatal(args ...interface{}) {
|
||||
logger.Log(Fatal, args...)
|
||||
logger.logr.exit(1)
|
||||
}
|
||||
|
||||
// Panic is a convenience method equivalent to `Log(PanicLevel, args...)`
|
||||
// followed by a call to panic().
|
||||
func (logger Logger) Panic(args ...interface{}) {
|
||||
logger.Log(Panic, args...)
|
||||
panic(fmt.Sprint(args...))
|
||||
}
|
||||
|
||||
//
|
||||
// Printf style
|
||||
//
|
||||
|
||||
// Logf checks that the level matches one or more targets, and
|
||||
// if so, generates a log record that is added to the main
|
||||
// queue (channel). Arguments are handled in the manner of fmt.Printf.
|
||||
func (logger Logger) Logf(lvl Level, format string, args ...interface{}) {
|
||||
status := logger.logr.IsLevelEnabled(lvl)
|
||||
if status.Enabled {
|
||||
rec := NewLogRec(lvl, logger, format, args, status.Stacktrace)
|
||||
logger.logr.enqueue(rec)
|
||||
}
|
||||
}
|
||||
|
||||
// Tracef is a convenience method equivalent to `Logf(TraceLevel, args...)`.
|
||||
func (logger Logger) Tracef(format string, args ...interface{}) {
|
||||
logger.Logf(Trace, format, args...)
|
||||
}
|
||||
|
||||
// Debugf is a convenience method equivalent to `Logf(DebugLevel, args...)`.
|
||||
func (logger Logger) Debugf(format string, args ...interface{}) {
|
||||
logger.Logf(Debug, format, args...)
|
||||
}
|
||||
|
||||
// Infof is a convenience method equivalent to `Logf(InfoLevel, args...)`.
|
||||
func (logger Logger) Infof(format string, args ...interface{}) {
|
||||
logger.Logf(Info, format, args...)
|
||||
}
|
||||
|
||||
// Printf ensures compatibility with std lib logger.
|
||||
func (logger Logger) Printf(format string, args ...interface{}) {
|
||||
logger.Infof(format, args...)
|
||||
}
|
||||
|
||||
// Warnf is a convenience method equivalent to `Logf(WarnLevel, args...)`.
|
||||
func (logger Logger) Warnf(format string, args ...interface{}) {
|
||||
logger.Logf(Warn, format, args...)
|
||||
}
|
||||
|
||||
// Errorf is a convenience method equivalent to `Logf(ErrorLevel, args...)`.
|
||||
func (logger Logger) Errorf(format string, args ...interface{}) {
|
||||
logger.Logf(Error, format, args...)
|
||||
}
|
||||
|
||||
// Fatalf is a convenience method equivalent to `Logf(FatalLevel, args...)`
|
||||
// followed by a call to os.Exit(1).
|
||||
func (logger Logger) Fatalf(format string, args ...interface{}) {
|
||||
logger.Logf(Fatal, format, args...)
|
||||
logger.logr.exit(1)
|
||||
}
|
||||
|
||||
// Panicf is a convenience method equivalent to `Logf(PanicLevel, args...)`
|
||||
// followed by a call to panic().
|
||||
func (logger Logger) Panicf(format string, args ...interface{}) {
|
||||
logger.Logf(Panic, format, args...)
|
||||
}
|
||||
|
||||
//
|
||||
// Println style
|
||||
//
|
||||
|
||||
// Logln checks that the level matches one or more targets, and
|
||||
// if so, generates a log record that is added to the main
|
||||
// queue (channel). Arguments are handled in the manner of fmt.Println.
|
||||
func (logger Logger) Logln(lvl Level, args ...interface{}) {
|
||||
status := logger.logr.IsLevelEnabled(lvl)
|
||||
if status.Enabled {
|
||||
rec := NewLogRec(lvl, logger, "", args, status.Stacktrace)
|
||||
rec.newline = true
|
||||
logger.logr.enqueue(rec)
|
||||
}
|
||||
}
|
||||
|
||||
// Traceln is a convenience method equivalent to `Logln(TraceLevel, args...)`.
|
||||
func (logger Logger) Traceln(args ...interface{}) {
|
||||
logger.Logln(Trace, args...)
|
||||
}
|
||||
|
||||
// Debugln is a convenience method equivalent to `Logln(DebugLevel, args...)`.
|
||||
func (logger Logger) Debugln(args ...interface{}) {
|
||||
logger.Logln(Debug, args...)
|
||||
}
|
||||
|
||||
// Infoln is a convenience method equivalent to `Logln(InfoLevel, args...)`.
|
||||
func (logger Logger) Infoln(args ...interface{}) {
|
||||
logger.Logln(Info, args...)
|
||||
}
|
||||
|
||||
// Println ensures compatibility with std lib logger.
|
||||
func (logger Logger) Println(args ...interface{}) {
|
||||
logger.Infoln(args...)
|
||||
}
|
||||
|
||||
// Warnln is a convenience method equivalent to `Logln(WarnLevel, args...)`.
|
||||
func (logger Logger) Warnln(args ...interface{}) {
|
||||
logger.Logln(Warn, args...)
|
||||
}
|
||||
|
||||
// Errorln is a convenience method equivalent to `Logln(ErrorLevel, args...)`.
|
||||
func (logger Logger) Errorln(args ...interface{}) {
|
||||
logger.Logln(Error, args...)
|
||||
}
|
||||
|
||||
// Fatalln is a convenience method equivalent to `Logln(FatalLevel, args...)`
|
||||
// followed by a call to os.Exit(1).
|
||||
func (logger Logger) Fatalln(args ...interface{}) {
|
||||
logger.Logln(Fatal, args...)
|
||||
logger.logr.exit(1)
|
||||
}
|
||||
|
||||
// Panicln is a convenience method equivalent to `Logln(PanicLevel, args...)`
|
||||
// followed by a call to panic().
|
||||
func (logger Logger) Panicln(args ...interface{}) {
|
||||
logger.Logln(Panic, args...)
|
||||
}
|
||||
664
vendor/github.com/mattermost/logr/logr.go
generated
vendored
Normal file
664
vendor/github.com/mattermost/logr/logr.go
generated
vendored
Normal file
@@ -0,0 +1,664 @@
|
||||
package logr
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/wiggin77/cfg"
|
||||
"github.com/wiggin77/merror"
|
||||
)
|
||||
|
||||
// Logr maintains a list of log targets and accepts incoming
|
||||
// log records.
|
||||
type Logr struct {
|
||||
tmux sync.RWMutex // target mutex
|
||||
targets []Target
|
||||
|
||||
mux sync.RWMutex
|
||||
maxQueueSizeActual int
|
||||
in chan *LogRec
|
||||
done chan struct{}
|
||||
once sync.Once
|
||||
shutdown bool
|
||||
lvlCache levelCache
|
||||
|
||||
metricsInitOnce sync.Once
|
||||
metricsCloseOnce sync.Once
|
||||
metricsDone chan struct{}
|
||||
metrics MetricsCollector
|
||||
queueSizeGauge Gauge
|
||||
loggedCounter Counter
|
||||
errorCounter Counter
|
||||
|
||||
bufferPool sync.Pool
|
||||
|
||||
// MaxQueueSize is the maximum number of log records that can be queued.
|
||||
// If exceeded, `OnQueueFull` is called which determines if the log
|
||||
// record will be dropped or block until add is successful.
|
||||
// If this is modified, it must be done before `Configure` or
|
||||
// `AddTarget`. Defaults to DefaultMaxQueueSize.
|
||||
MaxQueueSize int
|
||||
|
||||
// OnLoggerError, when not nil, is called any time an internal
|
||||
// logging error occurs. For example, this can happen when a
|
||||
// target cannot connect to its data sink.
|
||||
OnLoggerError func(error)
|
||||
|
||||
// OnQueueFull, when not nil, is called on an attempt to add
|
||||
// a log record to a full Logr queue.
|
||||
// `MaxQueueSize` can be used to modify the maximum queue size.
|
||||
// This function should return quickly, with a bool indicating whether
|
||||
// the log record should be dropped (true) or block until the log record
|
||||
// is successfully added (false). If nil then blocking (false) is assumed.
|
||||
OnQueueFull func(rec *LogRec, maxQueueSize int) bool
|
||||
|
||||
// OnTargetQueueFull, when not nil, is called on an attempt to add
|
||||
// a log record to a full target queue provided the target supports reporting
|
||||
// this condition.
|
||||
// This function should return quickly, with a bool indicating whether
|
||||
// the log record should be dropped (true) or block until the log record
|
||||
// is successfully added (false). If nil then blocking (false) is assumed.
|
||||
OnTargetQueueFull func(target Target, rec *LogRec, maxQueueSize int) bool
|
||||
|
||||
// OnExit, when not nil, is called when a FatalXXX style log API is called.
|
||||
// When nil, then the default behavior is to cleanly shut down this Logr and
|
||||
// call `os.Exit(code)`.
|
||||
OnExit func(code int)
|
||||
|
||||
// OnPanic, when not nil, is called when a PanicXXX style log API is called.
|
||||
// When nil, then the default behavior is to cleanly shut down this Logr and
|
||||
// call `panic(err)`.
|
||||
OnPanic func(err interface{})
|
||||
|
||||
// EnqueueTimeout is the amount of time a log record can take to be queued.
|
||||
// This only applies to blocking enqueue which happen after `logr.OnQueueFull`
|
||||
// is called and returns false.
|
||||
EnqueueTimeout time.Duration
|
||||
|
||||
// ShutdownTimeout is the amount of time `logr.Shutdown` can execute before
|
||||
// timing out.
|
||||
ShutdownTimeout time.Duration
|
||||
|
||||
// FlushTimeout is the amount of time `logr.Flush` can execute before
|
||||
// timing out.
|
||||
FlushTimeout time.Duration
|
||||
|
||||
// UseSyncMapLevelCache can be set to true before the first target is added
|
||||
// when high concurrency (e.g. >32 cores) is expected. This may improve
|
||||
// performance with large numbers of cores - benchmark for your use case.
|
||||
UseSyncMapLevelCache bool
|
||||
|
||||
// MaxPooledFormatBuffer determines the maximum size of a buffer that can be
|
||||
// pooled. To reduce allocations, the buffers needed during formatting (etc)
|
||||
// are pooled. A very large log item will grow a buffer that could stay in
|
||||
// memory indefinitely. This settings lets you control how big a pooled buffer
|
||||
// can be - anything larger will be garbage collected after use.
|
||||
// Defaults to 1MB.
|
||||
MaxPooledBuffer int
|
||||
|
||||
// DisableBufferPool when true disables the buffer pool. See MaxPooledBuffer.
|
||||
DisableBufferPool bool
|
||||
|
||||
// MetricsUpdateFreqMillis determines how often polled metrics are updated
|
||||
// when metrics are enabled.
|
||||
MetricsUpdateFreqMillis int64
|
||||
}
|
||||
|
||||
// Configure adds/removes targets via the supplied `Config`.
|
||||
func (logr *Logr) Configure(config *cfg.Config) error {
|
||||
// TODO
|
||||
return fmt.Errorf("not implemented yet")
|
||||
}
|
||||
|
||||
func (logr *Logr) ensureInit() {
|
||||
logr.once.Do(func() {
|
||||
defer func() {
|
||||
go logr.start()
|
||||
}()
|
||||
|
||||
logr.mux.Lock()
|
||||
defer logr.mux.Unlock()
|
||||
|
||||
logr.maxQueueSizeActual = logr.MaxQueueSize
|
||||
if logr.maxQueueSizeActual == 0 {
|
||||
logr.maxQueueSizeActual = DefaultMaxQueueSize
|
||||
}
|
||||
|
||||
if logr.maxQueueSizeActual < 0 {
|
||||
logr.maxQueueSizeActual = 0
|
||||
}
|
||||
|
||||
logr.in = make(chan *LogRec, logr.maxQueueSizeActual)
|
||||
logr.done = make(chan struct{})
|
||||
|
||||
if logr.UseSyncMapLevelCache {
|
||||
logr.lvlCache = &syncMapLevelCache{}
|
||||
} else {
|
||||
logr.lvlCache = &arrayLevelCache{}
|
||||
}
|
||||
|
||||
if logr.MaxPooledBuffer == 0 {
|
||||
logr.MaxPooledBuffer = DefaultMaxPooledBuffer
|
||||
}
|
||||
logr.bufferPool = sync.Pool{
|
||||
New: func() interface{} {
|
||||
return new(bytes.Buffer)
|
||||
},
|
||||
}
|
||||
|
||||
logr.lvlCache.setup()
|
||||
})
|
||||
}
|
||||
|
||||
// AddTarget adds one or more targets to the logger which will receive
|
||||
// log records for outputting.
|
||||
func (logr *Logr) AddTarget(targets ...Target) error {
|
||||
if logr.IsShutdown() {
|
||||
return fmt.Errorf("AddTarget called after Logr shut down")
|
||||
}
|
||||
|
||||
logr.ensureInit()
|
||||
metrics := logr.getMetricsCollector()
|
||||
defer logr.ResetLevelCache() // call this after tmux is released
|
||||
|
||||
logr.tmux.Lock()
|
||||
defer logr.tmux.Unlock()
|
||||
|
||||
errs := merror.New()
|
||||
for _, t := range targets {
|
||||
if t == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
logr.targets = append(logr.targets, t)
|
||||
if metrics != nil {
|
||||
if tm, ok := t.(TargetWithMetrics); ok {
|
||||
if err := tm.EnableMetrics(metrics, logr.MetricsUpdateFreqMillis); err != nil {
|
||||
errs.Append(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return errs.ErrorOrNil()
|
||||
}
|
||||
|
||||
// NewLogger creates a Logger using defaults. A `Logger` is light-weight
|
||||
// enough to create on-demand, but typically one or more Loggers are
|
||||
// created and re-used.
|
||||
func (logr *Logr) NewLogger() Logger {
|
||||
logger := Logger{logr: logr}
|
||||
return logger
|
||||
}
|
||||
|
||||
var levelStatusDisabled = LevelStatus{}
|
||||
|
||||
// IsLevelEnabled returns true if at least one target has the specified
|
||||
// level enabled. The result is cached so that subsequent checks are fast.
|
||||
func (logr *Logr) IsLevelEnabled(lvl Level) LevelStatus {
|
||||
status, ok := logr.isLevelEnabledFromCache(lvl)
|
||||
if ok {
|
||||
return status
|
||||
}
|
||||
|
||||
// Check each target.
|
||||
logr.tmux.RLock()
|
||||
for _, t := range logr.targets {
|
||||
e, s := t.IsLevelEnabled(lvl)
|
||||
if e {
|
||||
status.Enabled = true
|
||||
if s {
|
||||
status.Stacktrace = true
|
||||
break // if both enabled then no sense checking more targets
|
||||
}
|
||||
}
|
||||
}
|
||||
logr.tmux.RUnlock()
|
||||
|
||||
// Cache and return the result.
|
||||
if err := logr.updateLevelCache(lvl.ID, status); err != nil {
|
||||
logr.ReportError(err)
|
||||
return LevelStatus{}
|
||||
}
|
||||
return status
|
||||
}
|
||||
|
||||
func (logr *Logr) isLevelEnabledFromCache(lvl Level) (LevelStatus, bool) {
|
||||
logr.mux.RLock()
|
||||
defer logr.mux.RUnlock()
|
||||
|
||||
// Don't accept new log records after shutdown.
|
||||
if logr.shutdown {
|
||||
return levelStatusDisabled, true
|
||||
}
|
||||
|
||||
// Check cache. lvlCache may still be nil if no targets added.
|
||||
if logr.lvlCache == nil {
|
||||
return levelStatusDisabled, true
|
||||
}
|
||||
status, ok := logr.lvlCache.get(lvl.ID)
|
||||
if ok {
|
||||
return status, true
|
||||
}
|
||||
return LevelStatus{}, false
|
||||
}
|
||||
|
||||
func (logr *Logr) updateLevelCache(id LevelID, status LevelStatus) error {
|
||||
logr.mux.RLock()
|
||||
defer logr.mux.RUnlock()
|
||||
if logr.lvlCache != nil {
|
||||
return logr.lvlCache.put(id, status)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// HasTargets returns true only if at least one target exists within the Logr.
|
||||
func (logr *Logr) HasTargets() bool {
|
||||
logr.tmux.RLock()
|
||||
defer logr.tmux.RUnlock()
|
||||
return len(logr.targets) > 0
|
||||
}
|
||||
|
||||
// TargetInfo provides name and type for a Target.
|
||||
type TargetInfo struct {
|
||||
Name string
|
||||
Type string
|
||||
}
|
||||
|
||||
// TargetInfos enumerates all the targets added to this Logr.
|
||||
// The resulting slice represents a snapshot at time of calling.
|
||||
func (logr *Logr) TargetInfos() []TargetInfo {
|
||||
logr.tmux.RLock()
|
||||
defer logr.tmux.RUnlock()
|
||||
|
||||
infos := make([]TargetInfo, 0)
|
||||
|
||||
for _, t := range logr.targets {
|
||||
inf := TargetInfo{
|
||||
Name: fmt.Sprintf("%v", t),
|
||||
Type: fmt.Sprintf("%T", t),
|
||||
}
|
||||
infos = append(infos, inf)
|
||||
}
|
||||
return infos
|
||||
}
|
||||
|
||||
// RemoveTargets safely removes one or more targets based on the filtering method.
|
||||
// f should return true to delete the target, false to keep it.
|
||||
// When removing a target, best effort is made to write any queued log records before
|
||||
// closing, with cxt determining how much time can be spent in total.
|
||||
// Note, keep the timeout short since this method blocks certain logging operations.
|
||||
func (logr *Logr) RemoveTargets(cxt context.Context, f func(ti TargetInfo) bool) error {
|
||||
var removed bool
|
||||
defer func() {
|
||||
if removed {
|
||||
// call this after tmux is released since
|
||||
// it will lock mux and we don't want to
|
||||
// introduce possible deadlock.
|
||||
logr.ResetLevelCache()
|
||||
}
|
||||
}()
|
||||
|
||||
errs := merror.New()
|
||||
|
||||
logr.tmux.Lock()
|
||||
defer logr.tmux.Unlock()
|
||||
|
||||
cp := make([]Target, 0)
|
||||
|
||||
for _, t := range logr.targets {
|
||||
inf := TargetInfo{
|
||||
Name: fmt.Sprintf("%v", t),
|
||||
Type: fmt.Sprintf("%T", t),
|
||||
}
|
||||
if f(inf) {
|
||||
if err := t.Shutdown(cxt); err != nil {
|
||||
errs.Append(err)
|
||||
}
|
||||
removed = true
|
||||
} else {
|
||||
cp = append(cp, t)
|
||||
}
|
||||
}
|
||||
logr.targets = cp
|
||||
return errs.ErrorOrNil()
|
||||
}
|
||||
|
||||
// ResetLevelCache resets the cached results of `IsLevelEnabled`. This is
|
||||
// called any time a Target is added or a target's level is changed.
|
||||
func (logr *Logr) ResetLevelCache() {
|
||||
// Write lock so that new cache entries cannot be stored while we
|
||||
// clear the cache.
|
||||
logr.mux.Lock()
|
||||
defer logr.mux.Unlock()
|
||||
logr.resetLevelCache()
|
||||
}
|
||||
|
||||
// resetLevelCache empties the level cache without locking.
|
||||
// mux.Lock must be held before calling this function.
|
||||
func (logr *Logr) resetLevelCache() {
|
||||
// lvlCache may still be nil if no targets added.
|
||||
if logr.lvlCache != nil {
|
||||
logr.lvlCache.clear()
|
||||
}
|
||||
}
|
||||
|
||||
// enqueue adds a log record to the logr queue. If the queue is full then
|
||||
// this function either blocks or the log record is dropped, depending on
|
||||
// the result of calling `OnQueueFull`.
|
||||
func (logr *Logr) enqueue(rec *LogRec) {
|
||||
if logr.in == nil {
|
||||
logr.ReportError(fmt.Errorf("AddTarget or Configure must be called before enqueue"))
|
||||
}
|
||||
|
||||
select {
|
||||
case logr.in <- rec:
|
||||
default:
|
||||
if logr.OnQueueFull != nil && logr.OnQueueFull(rec, logr.maxQueueSizeActual) {
|
||||
return // drop the record
|
||||
}
|
||||
select {
|
||||
case <-time.After(logr.enqueueTimeout()):
|
||||
logr.ReportError(fmt.Errorf("enqueue timed out for log rec [%v]", rec))
|
||||
case logr.in <- rec: // block until success or timeout
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// exit is called by one of the FatalXXX style APIS. If `logr.OnExit` is not nil
|
||||
// then that method is called, otherwise the default behavior is to shut down this
|
||||
// Logr cleanly then call `os.Exit(code)`.
|
||||
func (logr *Logr) exit(code int) {
|
||||
if logr.OnExit != nil {
|
||||
logr.OnExit(code)
|
||||
return
|
||||
}
|
||||
|
||||
if err := logr.Shutdown(); err != nil {
|
||||
logr.ReportError(err)
|
||||
}
|
||||
os.Exit(code)
|
||||
}
|
||||
|
||||
// panic is called by one of the PanicXXX style APIS. If `logr.OnPanic` is not nil
|
||||
// then that method is called, otherwise the default behavior is to shut down this
|
||||
// Logr cleanly then call `panic(err)`.
|
||||
func (logr *Logr) panic(err interface{}) {
|
||||
if logr.OnPanic != nil {
|
||||
logr.OnPanic(err)
|
||||
return
|
||||
}
|
||||
|
||||
if err := logr.Shutdown(); err != nil {
|
||||
logr.ReportError(err)
|
||||
}
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// Flush blocks while flushing the logr queue and all target queues, by
|
||||
// writing existing log records to valid targets.
|
||||
// Any attempts to add new log records will block until flush is complete.
|
||||
// `logr.FlushTimeout` determines how long flush can execute before
|
||||
// timing out. Use `IsTimeoutError` to determine if the returned error is
|
||||
// due to a timeout.
|
||||
func (logr *Logr) Flush() error {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), logr.flushTimeout())
|
||||
defer cancel()
|
||||
return logr.FlushWithTimeout(ctx)
|
||||
}
|
||||
|
||||
// Flush blocks while flushing the logr queue and all target queues, by
|
||||
// writing existing log records to valid targets.
|
||||
// Any attempts to add new log records will block until flush is complete.
|
||||
// Use `IsTimeoutError` to determine if the returned error is
|
||||
// due to a timeout.
|
||||
func (logr *Logr) FlushWithTimeout(ctx context.Context) error {
|
||||
if !logr.HasTargets() {
|
||||
return nil
|
||||
}
|
||||
|
||||
if logr.IsShutdown() {
|
||||
return errors.New("Flush called on shut down Logr")
|
||||
}
|
||||
|
||||
rec := newFlushLogRec(logr.NewLogger())
|
||||
logr.enqueue(rec)
|
||||
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return newTimeoutError("logr queue shutdown timeout")
|
||||
case <-rec.flush:
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsShutdown returns true if this Logr instance has been shut down.
|
||||
// No further log records can be enqueued and no targets added after
|
||||
// shutdown.
|
||||
func (logr *Logr) IsShutdown() bool {
|
||||
logr.mux.Lock()
|
||||
defer logr.mux.Unlock()
|
||||
return logr.shutdown
|
||||
}
|
||||
|
||||
// Shutdown cleanly stops the logging engine after making best efforts
|
||||
// to flush all targets. Call this function right before application
|
||||
// exit - logr cannot be restarted once shut down.
|
||||
// `logr.ShutdownTimeout` determines how long shutdown can execute before
|
||||
// timing out. Use `IsTimeoutError` to determine if the returned error is
|
||||
// due to a timeout.
|
||||
func (logr *Logr) Shutdown() error {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), logr.shutdownTimeout())
|
||||
defer cancel()
|
||||
return logr.ShutdownWithTimeout(ctx)
|
||||
}
|
||||
|
||||
// Shutdown cleanly stops the logging engine after making best efforts
|
||||
// to flush all targets. Call this function right before application
|
||||
// exit - logr cannot be restarted once shut down.
|
||||
// Use `IsTimeoutError` to determine if the returned error is due to a
|
||||
// timeout.
|
||||
func (logr *Logr) ShutdownWithTimeout(ctx context.Context) error {
|
||||
logr.mux.Lock()
|
||||
if logr.shutdown {
|
||||
logr.mux.Unlock()
|
||||
return errors.New("Shutdown called again after shut down")
|
||||
}
|
||||
logr.shutdown = true
|
||||
logr.resetLevelCache()
|
||||
logr.mux.Unlock()
|
||||
|
||||
logr.metricsCloseOnce.Do(func() {
|
||||
if logr.metricsDone != nil {
|
||||
close(logr.metricsDone)
|
||||
}
|
||||
})
|
||||
|
||||
errs := merror.New()
|
||||
|
||||
// close the incoming channel and wait for read loop to exit.
|
||||
if logr.in != nil {
|
||||
close(logr.in)
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
errs.Append(newTimeoutError("logr queue shutdown timeout"))
|
||||
case <-logr.done:
|
||||
}
|
||||
}
|
||||
|
||||
// logr.in channel should now be drained to targets and no more log records
|
||||
// can be added.
|
||||
logr.tmux.RLock()
|
||||
defer logr.tmux.RUnlock()
|
||||
for _, t := range logr.targets {
|
||||
err := t.Shutdown(ctx)
|
||||
if err != nil {
|
||||
errs.Append(err)
|
||||
}
|
||||
}
|
||||
return errs.ErrorOrNil()
|
||||
}
|
||||
|
||||
// ReportError is used to notify the host application of any internal logging errors.
|
||||
// If `OnLoggerError` is not nil, it is called with the error, otherwise the error is
|
||||
// output to `os.Stderr`.
|
||||
func (logr *Logr) ReportError(err interface{}) {
|
||||
logr.incErrorCounter()
|
||||
|
||||
if logr.OnLoggerError == nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
return
|
||||
}
|
||||
logr.OnLoggerError(fmt.Errorf("%v", err))
|
||||
}
|
||||
|
||||
// BorrowBuffer borrows a buffer from the pool. Release the buffer to reduce garbage collection.
|
||||
func (logr *Logr) BorrowBuffer() *bytes.Buffer {
|
||||
if logr.DisableBufferPool {
|
||||
return &bytes.Buffer{}
|
||||
}
|
||||
return logr.bufferPool.Get().(*bytes.Buffer)
|
||||
}
|
||||
|
||||
// ReleaseBuffer returns a buffer to the pool to reduce garbage collection. The buffer is only
|
||||
// retained if less than MaxPooledBuffer.
|
||||
func (logr *Logr) ReleaseBuffer(buf *bytes.Buffer) {
|
||||
if !logr.DisableBufferPool && buf.Cap() < logr.MaxPooledBuffer {
|
||||
buf.Reset()
|
||||
logr.bufferPool.Put(buf)
|
||||
}
|
||||
}
|
||||
|
||||
// enqueueTimeout returns amount of time a log record can take to be queued.
|
||||
// This only applies to blocking enqueue which happen after `logr.OnQueueFull` is called
|
||||
// and returns false.
|
||||
func (logr *Logr) enqueueTimeout() time.Duration {
|
||||
if logr.EnqueueTimeout == 0 {
|
||||
return DefaultEnqueueTimeout
|
||||
}
|
||||
return logr.EnqueueTimeout
|
||||
}
|
||||
|
||||
// shutdownTimeout returns the timeout duration for `logr.Shutdown`.
|
||||
func (logr *Logr) shutdownTimeout() time.Duration {
|
||||
if logr.ShutdownTimeout == 0 {
|
||||
return DefaultShutdownTimeout
|
||||
}
|
||||
return logr.ShutdownTimeout
|
||||
}
|
||||
|
||||
// flushTimeout returns the timeout duration for `logr.Flush`.
|
||||
func (logr *Logr) flushTimeout() time.Duration {
|
||||
if logr.FlushTimeout == 0 {
|
||||
return DefaultFlushTimeout
|
||||
}
|
||||
return logr.FlushTimeout
|
||||
}
|
||||
|
||||
// start selects on incoming log records until done channel signals.
|
||||
// Incoming log records are fanned out to all log targets.
|
||||
func (logr *Logr) start() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
logr.ReportError(r)
|
||||
go logr.start()
|
||||
}
|
||||
}()
|
||||
|
||||
for rec := range logr.in {
|
||||
if rec.flush != nil {
|
||||
logr.flush(rec.flush)
|
||||
} else {
|
||||
rec.prep()
|
||||
logr.fanout(rec)
|
||||
}
|
||||
}
|
||||
close(logr.done)
|
||||
}
|
||||
|
||||
// startMetricsUpdater updates the metrics for any polled values every `MetricsUpdateFreqSecs` seconds until
|
||||
// logr is closed.
|
||||
func (logr *Logr) startMetricsUpdater() {
|
||||
for {
|
||||
updateFreq := logr.getMetricsUpdateFreqMillis()
|
||||
if updateFreq == 0 {
|
||||
updateFreq = DefMetricsUpdateFreqMillis
|
||||
}
|
||||
if updateFreq < 250 {
|
||||
updateFreq = 250 // don't peg the CPU
|
||||
}
|
||||
|
||||
select {
|
||||
case <-logr.metricsDone:
|
||||
return
|
||||
case <-time.After(time.Duration(updateFreq) * time.Millisecond):
|
||||
logr.setQueueSizeGauge(float64(len(logr.in)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (logr *Logr) getMetricsUpdateFreqMillis() int64 {
|
||||
logr.mux.RLock()
|
||||
defer logr.mux.RUnlock()
|
||||
return logr.MetricsUpdateFreqMillis
|
||||
}
|
||||
|
||||
// fanout pushes a LogRec to all targets.
|
||||
func (logr *Logr) fanout(rec *LogRec) {
|
||||
var target Target
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
logr.ReportError(fmt.Errorf("fanout failed for target %s, %v", target, r))
|
||||
}
|
||||
}()
|
||||
|
||||
var logged bool
|
||||
defer func() {
|
||||
if logged {
|
||||
logr.incLoggedCounter() // call this after tmux is released
|
||||
}
|
||||
}()
|
||||
|
||||
logr.tmux.RLock()
|
||||
defer logr.tmux.RUnlock()
|
||||
for _, target = range logr.targets {
|
||||
if enabled, _ := target.IsLevelEnabled(rec.Level()); enabled {
|
||||
target.Log(rec)
|
||||
logged = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// flush drains the queue and notifies when done.
|
||||
func (logr *Logr) flush(done chan<- struct{}) {
|
||||
// first drain the logr queue.
|
||||
loop:
|
||||
for {
|
||||
var rec *LogRec
|
||||
select {
|
||||
case rec = <-logr.in:
|
||||
if rec.flush == nil {
|
||||
rec.prep()
|
||||
logr.fanout(rec)
|
||||
}
|
||||
default:
|
||||
break loop
|
||||
}
|
||||
}
|
||||
|
||||
logger := logr.NewLogger()
|
||||
|
||||
// drain all the targets; block until finished.
|
||||
logr.tmux.RLock()
|
||||
defer logr.tmux.RUnlock()
|
||||
for _, target := range logr.targets {
|
||||
rec := newFlushLogRec(logger)
|
||||
target.Log(rec)
|
||||
<-rec.flush
|
||||
}
|
||||
done <- struct{}{}
|
||||
}
|
||||
189
vendor/github.com/mattermost/logr/logrec.go
generated
vendored
Normal file
189
vendor/github.com/mattermost/logr/logrec.go
generated
vendored
Normal file
@@ -0,0 +1,189 @@
|
||||
package logr
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
logrPkg string
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Calc current package name
|
||||
pcs := make([]uintptr, 2)
|
||||
_ = runtime.Callers(0, pcs)
|
||||
tmp := runtime.FuncForPC(pcs[1]).Name()
|
||||
logrPkg = getPackageName(tmp)
|
||||
}
|
||||
|
||||
// LogRec collects raw, unformatted data to be logged.
|
||||
// TODO: pool these? how to reliably know when targets are done with them? Copy for each target?
|
||||
type LogRec struct {
|
||||
mux sync.RWMutex
|
||||
time time.Time
|
||||
|
||||
level Level
|
||||
logger Logger
|
||||
|
||||
template string
|
||||
newline bool
|
||||
args []interface{}
|
||||
|
||||
stackPC []uintptr
|
||||
stackCount int
|
||||
|
||||
// flushes Logr and target queues when not nil.
|
||||
flush chan struct{}
|
||||
|
||||
// remaining fields calculated by `prep`
|
||||
msg string
|
||||
frames []runtime.Frame
|
||||
}
|
||||
|
||||
// NewLogRec creates a new LogRec with the current time and optional stack trace.
|
||||
func NewLogRec(lvl Level, logger Logger, template string, args []interface{}, incStacktrace bool) *LogRec {
|
||||
rec := &LogRec{time: time.Now(), logger: logger, level: lvl, template: template, args: args}
|
||||
if incStacktrace {
|
||||
rec.stackPC = make([]uintptr, DefaultMaxStackFrames)
|
||||
rec.stackCount = runtime.Callers(2, rec.stackPC)
|
||||
}
|
||||
return rec
|
||||
}
|
||||
|
||||
// newFlushLogRec creates a LogRec that flushes the Logr queue and
|
||||
// any target queues that support flushing.
|
||||
func newFlushLogRec(logger Logger) *LogRec {
|
||||
return &LogRec{logger: logger, flush: make(chan struct{})}
|
||||
}
|
||||
|
||||
// prep resolves all args and field values to strings, and
|
||||
// resolves stack trace to frames.
|
||||
func (rec *LogRec) prep() {
|
||||
rec.mux.Lock()
|
||||
defer rec.mux.Unlock()
|
||||
|
||||
// resolve args
|
||||
if rec.template == "" {
|
||||
if rec.newline {
|
||||
rec.msg = fmt.Sprintln(rec.args...)
|
||||
} else {
|
||||
rec.msg = fmt.Sprint(rec.args...)
|
||||
}
|
||||
} else {
|
||||
rec.msg = fmt.Sprintf(rec.template, rec.args...)
|
||||
}
|
||||
|
||||
// resolve stack trace
|
||||
if rec.stackCount > 0 {
|
||||
frames := runtime.CallersFrames(rec.stackPC[:rec.stackCount])
|
||||
for {
|
||||
f, more := frames.Next()
|
||||
rec.frames = append(rec.frames, f)
|
||||
if !more {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// remove leading logr package entries.
|
||||
var start int
|
||||
for i, frame := range rec.frames {
|
||||
pkg := getPackageName(frame.Function)
|
||||
if pkg != "" && pkg != logrPkg {
|
||||
start = i
|
||||
break
|
||||
}
|
||||
}
|
||||
rec.frames = rec.frames[start:]
|
||||
}
|
||||
}
|
||||
|
||||
// WithTime returns a shallow copy of the log record while replacing
|
||||
// the time. This can be used by targets and formatters to adjust
|
||||
// the time, or take ownership of the log record.
|
||||
func (rec *LogRec) WithTime(time time.Time) *LogRec {
|
||||
rec.mux.RLock()
|
||||
defer rec.mux.RUnlock()
|
||||
|
||||
return &LogRec{
|
||||
time: time,
|
||||
level: rec.level,
|
||||
logger: rec.logger,
|
||||
template: rec.template,
|
||||
newline: rec.newline,
|
||||
args: rec.args,
|
||||
msg: rec.msg,
|
||||
stackPC: rec.stackPC,
|
||||
stackCount: rec.stackCount,
|
||||
frames: rec.frames,
|
||||
}
|
||||
}
|
||||
|
||||
// Logger returns the `Logger` that created this `LogRec`.
|
||||
func (rec *LogRec) Logger() Logger {
|
||||
return rec.logger
|
||||
}
|
||||
|
||||
// Time returns this log record's time stamp.
|
||||
func (rec *LogRec) Time() time.Time {
|
||||
// no locking needed as this field is not mutated.
|
||||
return rec.time
|
||||
}
|
||||
|
||||
// Level returns this log record's Level.
|
||||
func (rec *LogRec) Level() Level {
|
||||
// no locking needed as this field is not mutated.
|
||||
return rec.level
|
||||
}
|
||||
|
||||
// Fields returns this log record's Fields.
|
||||
func (rec *LogRec) Fields() Fields {
|
||||
// no locking needed as this field is not mutated.
|
||||
return rec.logger.fields
|
||||
}
|
||||
|
||||
// Msg returns this log record's message text.
|
||||
func (rec *LogRec) Msg() string {
|
||||
rec.mux.RLock()
|
||||
defer rec.mux.RUnlock()
|
||||
return rec.msg
|
||||
}
|
||||
|
||||
// StackFrames returns this log record's stack frames or
|
||||
// nil if no stack trace was required.
|
||||
func (rec *LogRec) StackFrames() []runtime.Frame {
|
||||
rec.mux.RLock()
|
||||
defer rec.mux.RUnlock()
|
||||
return rec.frames
|
||||
}
|
||||
|
||||
// String returns a string representation of this log record.
|
||||
func (rec *LogRec) String() string {
|
||||
if rec.flush != nil {
|
||||
return "[flusher]"
|
||||
}
|
||||
|
||||
f := &DefaultFormatter{}
|
||||
buf := rec.logger.logr.BorrowBuffer()
|
||||
defer rec.logger.logr.ReleaseBuffer(buf)
|
||||
buf, _ = f.Format(rec, true, buf)
|
||||
return strings.TrimSpace(buf.String())
|
||||
}
|
||||
|
||||
// getPackageName reduces a fully qualified function name to the package name
|
||||
// By sirupsen: https://github.com/sirupsen/logrus/blob/master/entry.go
|
||||
func getPackageName(f string) string {
|
||||
for {
|
||||
lastPeriod := strings.LastIndex(f, ".")
|
||||
lastSlash := strings.LastIndex(f, "/")
|
||||
if lastPeriod > lastSlash {
|
||||
f = f[:lastPeriod]
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
return f
|
||||
}
|
||||
117
vendor/github.com/mattermost/logr/metrics.go
generated
vendored
Normal file
117
vendor/github.com/mattermost/logr/metrics.go
generated
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
package logr
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/wiggin77/merror"
|
||||
)
|
||||
|
||||
const (
|
||||
DefMetricsUpdateFreqMillis = 15000 // 15 seconds
|
||||
)
|
||||
|
||||
// Counter is a simple metrics sink that can only increment a value.
|
||||
// Implementations are external to Logr and provided via `MetricsCollector`.
|
||||
type Counter interface {
|
||||
// Inc increments the counter by 1. Use Add to increment it by arbitrary non-negative values.
|
||||
Inc()
|
||||
// Add adds the given value to the counter. It panics if the value is < 0.
|
||||
Add(float64)
|
||||
}
|
||||
|
||||
// Gauge is a simple metrics sink that can receive values and increase or decrease.
|
||||
// Implementations are external to Logr and provided via `MetricsCollector`.
|
||||
type Gauge interface {
|
||||
// Set sets the Gauge to an arbitrary value.
|
||||
Set(float64)
|
||||
// Add adds the given value to the Gauge. (The value can be negative, resulting in a decrease of the Gauge.)
|
||||
Add(float64)
|
||||
// Sub subtracts the given value from the Gauge. (The value can be negative, resulting in an increase of the Gauge.)
|
||||
Sub(float64)
|
||||
}
|
||||
|
||||
// MetricsCollector provides a way for users of this Logr package to have metrics pushed
|
||||
// in an efficient way to any backend, e.g. Prometheus.
|
||||
// For each target added to Logr, the supplied MetricsCollector will provide a Gauge
|
||||
// and Counters that will be called frequently as logging occurs.
|
||||
type MetricsCollector interface {
|
||||
// QueueSizeGauge returns a Gauge that will be updated by the named target.
|
||||
QueueSizeGauge(target string) (Gauge, error)
|
||||
// LoggedCounter returns a Counter that will be incremented by the named target.
|
||||
LoggedCounter(target string) (Counter, error)
|
||||
// ErrorCounter returns a Counter that will be incremented by the named target.
|
||||
ErrorCounter(target string) (Counter, error)
|
||||
// DroppedCounter returns a Counter that will be incremented by the named target.
|
||||
DroppedCounter(target string) (Counter, error)
|
||||
// BlockedCounter returns a Counter that will be incremented by the named target.
|
||||
BlockedCounter(target string) (Counter, error)
|
||||
}
|
||||
|
||||
// TargetWithMetrics is a target that provides metrics.
|
||||
type TargetWithMetrics interface {
|
||||
EnableMetrics(collector MetricsCollector, updateFreqMillis int64) error
|
||||
}
|
||||
|
||||
func (logr *Logr) getMetricsCollector() MetricsCollector {
|
||||
logr.mux.RLock()
|
||||
defer logr.mux.RUnlock()
|
||||
return logr.metrics
|
||||
}
|
||||
|
||||
// SetMetricsCollector enables metrics collection by supplying a MetricsCollector.
|
||||
// The MetricsCollector provides counters and gauges that are updated by log targets.
|
||||
func (logr *Logr) SetMetricsCollector(collector MetricsCollector) error {
|
||||
if collector == nil {
|
||||
return errors.New("collector cannot be nil")
|
||||
}
|
||||
|
||||
logr.mux.Lock()
|
||||
logr.metrics = collector
|
||||
logr.queueSizeGauge, _ = collector.QueueSizeGauge("_logr")
|
||||
logr.loggedCounter, _ = collector.LoggedCounter("_logr")
|
||||
logr.errorCounter, _ = collector.ErrorCounter("_logr")
|
||||
logr.mux.Unlock()
|
||||
|
||||
logr.metricsInitOnce.Do(func() {
|
||||
logr.metricsDone = make(chan struct{})
|
||||
go logr.startMetricsUpdater()
|
||||
})
|
||||
|
||||
merr := merror.New()
|
||||
|
||||
logr.tmux.RLock()
|
||||
defer logr.tmux.RUnlock()
|
||||
for _, target := range logr.targets {
|
||||
if tm, ok := target.(TargetWithMetrics); ok {
|
||||
if err := tm.EnableMetrics(collector, logr.MetricsUpdateFreqMillis); err != nil {
|
||||
merr.Append(err)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return merr.ErrorOrNil()
|
||||
}
|
||||
|
||||
func (logr *Logr) setQueueSizeGauge(val float64) {
|
||||
logr.mux.RLock()
|
||||
defer logr.mux.RUnlock()
|
||||
if logr.queueSizeGauge != nil {
|
||||
logr.queueSizeGauge.Set(val)
|
||||
}
|
||||
}
|
||||
|
||||
func (logr *Logr) incLoggedCounter() {
|
||||
logr.mux.RLock()
|
||||
defer logr.mux.RUnlock()
|
||||
if logr.loggedCounter != nil {
|
||||
logr.loggedCounter.Inc()
|
||||
}
|
||||
}
|
||||
|
||||
func (logr *Logr) incErrorCounter() {
|
||||
logr.mux.RLock()
|
||||
defer logr.mux.RUnlock()
|
||||
if logr.errorCounter != nil {
|
||||
logr.errorCounter.Inc()
|
||||
}
|
||||
}
|
||||
299
vendor/github.com/mattermost/logr/target.go
generated
vendored
Normal file
299
vendor/github.com/mattermost/logr/target.go
generated
vendored
Normal file
@@ -0,0 +1,299 @@
|
||||
package logr
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Target represents a destination for log records such as file,
|
||||
// database, TCP socket, etc.
|
||||
type Target interface {
|
||||
// SetName provides an optional name for the target.
|
||||
SetName(name string)
|
||||
|
||||
// IsLevelEnabled returns true if this target should emit
|
||||
// logs for the specified level. Also determines if
|
||||
// a stack trace is required.
|
||||
IsLevelEnabled(Level) (enabled bool, stacktrace bool)
|
||||
|
||||
// Formatter returns the Formatter associated with this Target.
|
||||
Formatter() Formatter
|
||||
|
||||
// Log outputs the log record to this target's destination.
|
||||
Log(rec *LogRec)
|
||||
|
||||
// Shutdown makes best effort to flush target queue and
|
||||
// frees/closes all resources.
|
||||
Shutdown(ctx context.Context) error
|
||||
}
|
||||
|
||||
// RecordWriter can convert a LogRecord to bytes and output to some data sink.
|
||||
type RecordWriter interface {
|
||||
Write(rec *LogRec) error
|
||||
}
|
||||
|
||||
// Basic provides the basic functionality of a Target that can be used
|
||||
// to more easily compose your own Targets. To use, just embed Basic
|
||||
// in your target type, implement `RecordWriter`, and call `(*Basic).Start`.
|
||||
type Basic struct {
|
||||
target Target
|
||||
|
||||
filter Filter
|
||||
formatter Formatter
|
||||
|
||||
in chan *LogRec
|
||||
done chan struct{}
|
||||
w RecordWriter
|
||||
|
||||
mux sync.RWMutex
|
||||
name string
|
||||
|
||||
metrics bool
|
||||
queueSizeGauge Gauge
|
||||
loggedCounter Counter
|
||||
errorCounter Counter
|
||||
droppedCounter Counter
|
||||
blockedCounter Counter
|
||||
|
||||
metricsUpdateFreqMillis int64
|
||||
}
|
||||
|
||||
// Start initializes this target helper and starts accepting log records for processing.
|
||||
func (b *Basic) Start(target Target, rw RecordWriter, filter Filter, formatter Formatter, maxQueued int) {
|
||||
if filter == nil {
|
||||
filter = &StdFilter{Lvl: Fatal}
|
||||
}
|
||||
if formatter == nil {
|
||||
formatter = &DefaultFormatter{}
|
||||
}
|
||||
|
||||
b.target = target
|
||||
b.filter = filter
|
||||
b.formatter = formatter
|
||||
b.in = make(chan *LogRec, maxQueued)
|
||||
b.done = make(chan struct{}, 1)
|
||||
b.w = rw
|
||||
go b.start()
|
||||
|
||||
if b.hasMetrics() {
|
||||
go b.startMetricsUpdater()
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Basic) SetName(name string) {
|
||||
b.mux.Lock()
|
||||
defer b.mux.Unlock()
|
||||
b.name = name
|
||||
}
|
||||
|
||||
// IsLevelEnabled returns true if this target should emit
|
||||
// logs for the specified level. Also determines if
|
||||
// a stack trace is required.
|
||||
func (b *Basic) IsLevelEnabled(lvl Level) (enabled bool, stacktrace bool) {
|
||||
return b.filter.IsEnabled(lvl), b.filter.IsStacktraceEnabled(lvl)
|
||||
}
|
||||
|
||||
// Formatter returns the Formatter associated with this Target.
|
||||
func (b *Basic) Formatter() Formatter {
|
||||
return b.formatter
|
||||
}
|
||||
|
||||
// Shutdown stops processing log records after making best
|
||||
// effort to flush queue.
|
||||
func (b *Basic) Shutdown(ctx context.Context) error {
|
||||
// close the incoming channel and wait for read loop to exit.
|
||||
close(b.in)
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
case <-b.done:
|
||||
}
|
||||
|
||||
// b.in channel should now be drained.
|
||||
return nil
|
||||
}
|
||||
|
||||
// Log outputs the log record to this targets destination.
|
||||
func (b *Basic) Log(rec *LogRec) {
|
||||
lgr := rec.Logger().Logr()
|
||||
select {
|
||||
case b.in <- rec:
|
||||
default:
|
||||
handler := lgr.OnTargetQueueFull
|
||||
if handler != nil && handler(b.target, rec, cap(b.in)) {
|
||||
b.incDroppedCounter()
|
||||
return // drop the record
|
||||
}
|
||||
b.incBlockedCounter()
|
||||
|
||||
select {
|
||||
case <-time.After(lgr.enqueueTimeout()):
|
||||
lgr.ReportError(fmt.Errorf("target enqueue timeout for log rec [%v]", rec))
|
||||
case b.in <- rec: // block until success or timeout
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Metrics enables metrics collection using the provided MetricsCollector.
|
||||
func (b *Basic) EnableMetrics(collector MetricsCollector, updateFreqMillis int64) error {
|
||||
name := fmt.Sprintf("%v", b)
|
||||
|
||||
b.mux.Lock()
|
||||
defer b.mux.Unlock()
|
||||
|
||||
b.metrics = true
|
||||
b.metricsUpdateFreqMillis = updateFreqMillis
|
||||
|
||||
var err error
|
||||
|
||||
if b.queueSizeGauge, err = collector.QueueSizeGauge(name); err != nil {
|
||||
return err
|
||||
}
|
||||
if b.loggedCounter, err = collector.LoggedCounter(name); err != nil {
|
||||
return err
|
||||
}
|
||||
if b.errorCounter, err = collector.ErrorCounter(name); err != nil {
|
||||
return err
|
||||
}
|
||||
if b.droppedCounter, err = collector.DroppedCounter(name); err != nil {
|
||||
return err
|
||||
}
|
||||
if b.blockedCounter, err = collector.BlockedCounter(name); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *Basic) hasMetrics() bool {
|
||||
b.mux.RLock()
|
||||
defer b.mux.RUnlock()
|
||||
return b.metrics
|
||||
}
|
||||
|
||||
func (b *Basic) setQueueSizeGauge(val float64) {
|
||||
b.mux.RLock()
|
||||
defer b.mux.RUnlock()
|
||||
if b.queueSizeGauge != nil {
|
||||
b.queueSizeGauge.Set(val)
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Basic) incLoggedCounter() {
|
||||
b.mux.RLock()
|
||||
defer b.mux.RUnlock()
|
||||
if b.loggedCounter != nil {
|
||||
b.loggedCounter.Inc()
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Basic) incErrorCounter() {
|
||||
b.mux.RLock()
|
||||
defer b.mux.RUnlock()
|
||||
if b.errorCounter != nil {
|
||||
b.errorCounter.Inc()
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Basic) incDroppedCounter() {
|
||||
b.mux.RLock()
|
||||
defer b.mux.RUnlock()
|
||||
if b.droppedCounter != nil {
|
||||
b.droppedCounter.Inc()
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Basic) incBlockedCounter() {
|
||||
b.mux.RLock()
|
||||
defer b.mux.RUnlock()
|
||||
if b.blockedCounter != nil {
|
||||
b.blockedCounter.Inc()
|
||||
}
|
||||
}
|
||||
|
||||
// String returns a name for this target. Use `SetName` to specify a name.
|
||||
func (b *Basic) String() string {
|
||||
b.mux.RLock()
|
||||
defer b.mux.RUnlock()
|
||||
|
||||
if b.name != "" {
|
||||
return b.name
|
||||
}
|
||||
return fmt.Sprintf("%T", b.target)
|
||||
}
|
||||
|
||||
// Start accepts log records via In channel and writes to the
|
||||
// supplied writer, until Done channel signaled.
|
||||
func (b *Basic) start() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
fmt.Fprintln(os.Stderr, "Basic.start -- ", r)
|
||||
go b.start()
|
||||
}
|
||||
}()
|
||||
|
||||
for rec := range b.in {
|
||||
if rec.flush != nil {
|
||||
b.flush(rec.flush)
|
||||
} else {
|
||||
err := b.w.Write(rec)
|
||||
if err != nil {
|
||||
b.incErrorCounter()
|
||||
rec.Logger().Logr().ReportError(err)
|
||||
} else {
|
||||
b.incLoggedCounter()
|
||||
}
|
||||
}
|
||||
}
|
||||
close(b.done)
|
||||
}
|
||||
|
||||
// startMetricsUpdater updates the metrics for any polled values every `MetricsUpdateFreqSecs` seconds until
|
||||
// target is closed.
|
||||
func (b *Basic) startMetricsUpdater() {
|
||||
for {
|
||||
updateFreq := b.getMetricsUpdateFreqMillis()
|
||||
if updateFreq == 0 {
|
||||
updateFreq = DefMetricsUpdateFreqMillis
|
||||
}
|
||||
if updateFreq < 250 {
|
||||
updateFreq = 250 // don't peg the CPU
|
||||
}
|
||||
|
||||
select {
|
||||
case <-b.done:
|
||||
return
|
||||
case <-time.After(time.Duration(updateFreq) * time.Millisecond):
|
||||
b.setQueueSizeGauge(float64(len(b.in)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Basic) getMetricsUpdateFreqMillis() int64 {
|
||||
b.mux.RLock()
|
||||
defer b.mux.RUnlock()
|
||||
return b.metricsUpdateFreqMillis
|
||||
}
|
||||
|
||||
// flush drains the queue and notifies when done.
|
||||
func (b *Basic) flush(done chan<- struct{}) {
|
||||
for {
|
||||
var rec *LogRec
|
||||
var err error
|
||||
select {
|
||||
case rec = <-b.in:
|
||||
// ignore any redundant flush records.
|
||||
if rec.flush == nil {
|
||||
err = b.w.Write(rec)
|
||||
if err != nil {
|
||||
b.incErrorCounter()
|
||||
rec.Logger().Logr().ReportError(err)
|
||||
}
|
||||
}
|
||||
default:
|
||||
done <- struct{}{}
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
87
vendor/github.com/mattermost/logr/target/file.go
generated
vendored
Normal file
87
vendor/github.com/mattermost/logr/target/file.go
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
package target
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
|
||||
"github.com/mattermost/logr"
|
||||
"github.com/wiggin77/merror"
|
||||
"gopkg.in/natefinch/lumberjack.v2"
|
||||
)
|
||||
|
||||
type FileOptions struct {
|
||||
// Filename is the file to write logs to. Backup log files will be retained
|
||||
// in the same directory. It uses <processname>-lumberjack.log in
|
||||
// os.TempDir() if empty.
|
||||
Filename string
|
||||
|
||||
// MaxSize is the maximum size in megabytes of the log file before it gets
|
||||
// rotated. It defaults to 100 megabytes.
|
||||
MaxSize int
|
||||
|
||||
// MaxAge is the maximum number of days to retain old log files based on the
|
||||
// timestamp encoded in their filename. Note that a day is defined as 24
|
||||
// hours and may not exactly correspond to calendar days due to daylight
|
||||
// savings, leap seconds, etc. The default is not to remove old log files
|
||||
// based on age.
|
||||
MaxAge int
|
||||
|
||||
// MaxBackups is the maximum number of old log files to retain. The default
|
||||
// is to retain all old log files (though MaxAge may still cause them to get
|
||||
// deleted.)
|
||||
MaxBackups int
|
||||
|
||||
// Compress determines if the rotated log files should be compressed
|
||||
// using gzip. The default is not to perform compression.
|
||||
Compress bool
|
||||
}
|
||||
|
||||
// File outputs log records to a file which can be log rotated based on size or age.
|
||||
// Uses `https://github.com/natefinch/lumberjack` for rotation.
|
||||
type File struct {
|
||||
logr.Basic
|
||||
out io.WriteCloser
|
||||
}
|
||||
|
||||
// NewFileTarget creates a target capable of outputting log records to a rotated file.
|
||||
func NewFileTarget(filter logr.Filter, formatter logr.Formatter, opts FileOptions, maxQueue int) *File {
|
||||
lumber := &lumberjack.Logger{
|
||||
Filename: opts.Filename,
|
||||
MaxSize: opts.MaxSize,
|
||||
MaxBackups: opts.MaxBackups,
|
||||
MaxAge: opts.MaxAge,
|
||||
Compress: opts.Compress,
|
||||
}
|
||||
f := &File{out: lumber}
|
||||
f.Basic.Start(f, f, filter, formatter, maxQueue)
|
||||
return f
|
||||
}
|
||||
|
||||
// Write converts the log record to bytes, via the Formatter,
|
||||
// and outputs to a file.
|
||||
func (f *File) Write(rec *logr.LogRec) error {
|
||||
_, stacktrace := f.IsLevelEnabled(rec.Level())
|
||||
|
||||
buf := rec.Logger().Logr().BorrowBuffer()
|
||||
defer rec.Logger().Logr().ReleaseBuffer(buf)
|
||||
|
||||
buf, err := f.Formatter().Format(rec, stacktrace, buf)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = f.out.Write(buf.Bytes())
|
||||
return err
|
||||
}
|
||||
|
||||
// Shutdown flushes any remaining log records and closes the file.
|
||||
func (f *File) Shutdown(ctx context.Context) error {
|
||||
errs := merror.New()
|
||||
|
||||
err := f.Basic.Shutdown(ctx)
|
||||
errs.Append(err)
|
||||
|
||||
err = f.out.Close()
|
||||
errs.Append(err)
|
||||
|
||||
return errs.ErrorOrNil()
|
||||
}
|
||||
89
vendor/github.com/mattermost/logr/target/syslog.go
generated
vendored
Normal file
89
vendor/github.com/mattermost/logr/target/syslog.go
generated
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
// +build !windows,!nacl,!plan9
|
||||
|
||||
package target
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log/syslog"
|
||||
|
||||
"github.com/mattermost/logr"
|
||||
"github.com/wiggin77/merror"
|
||||
)
|
||||
|
||||
// Syslog outputs log records to local or remote syslog.
|
||||
type Syslog struct {
|
||||
logr.Basic
|
||||
w *syslog.Writer
|
||||
}
|
||||
|
||||
// SyslogParams provides parameters for dialing a syslog daemon.
|
||||
type SyslogParams struct {
|
||||
Network string
|
||||
Raddr string
|
||||
Priority syslog.Priority
|
||||
Tag string
|
||||
}
|
||||
|
||||
// NewSyslogTarget creates a target capable of outputting log records to remote or local syslog.
|
||||
func NewSyslogTarget(filter logr.Filter, formatter logr.Formatter, params *SyslogParams, maxQueue int) (*Syslog, error) {
|
||||
writer, err := syslog.Dial(params.Network, params.Raddr, params.Priority, params.Tag)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
s := &Syslog{w: writer}
|
||||
s.Basic.Start(s, s, filter, formatter, maxQueue)
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
// Shutdown stops processing log records after making best
|
||||
// effort to flush queue.
|
||||
func (s *Syslog) Shutdown(ctx context.Context) error {
|
||||
errs := merror.New()
|
||||
|
||||
err := s.Basic.Shutdown(ctx)
|
||||
errs.Append(err)
|
||||
|
||||
err = s.w.Close()
|
||||
errs.Append(err)
|
||||
|
||||
return errs.ErrorOrNil()
|
||||
}
|
||||
|
||||
// Write converts the log record to bytes, via the Formatter,
|
||||
// and outputs to syslog.
|
||||
func (s *Syslog) Write(rec *logr.LogRec) error {
|
||||
_, stacktrace := s.IsLevelEnabled(rec.Level())
|
||||
|
||||
buf := rec.Logger().Logr().BorrowBuffer()
|
||||
defer rec.Logger().Logr().ReleaseBuffer(buf)
|
||||
|
||||
buf, err := s.Formatter().Format(rec, stacktrace, buf)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
txt := buf.String()
|
||||
|
||||
switch rec.Level() {
|
||||
case logr.Panic, logr.Fatal:
|
||||
err = s.w.Crit(txt)
|
||||
case logr.Error:
|
||||
err = s.w.Err(txt)
|
||||
case logr.Warn:
|
||||
err = s.w.Warning(txt)
|
||||
case logr.Debug, logr.Trace:
|
||||
err = s.w.Debug(txt)
|
||||
default:
|
||||
// logr.Info plus all custom levels.
|
||||
err = s.w.Info(txt)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
reporter := rec.Logger().Logr().ReportError
|
||||
reporter(fmt.Errorf("syslog write fail: %w", err))
|
||||
// syslog writer will try to reconnect.
|
||||
}
|
||||
return err
|
||||
}
|
||||
40
vendor/github.com/mattermost/logr/target/writer.go
generated
vendored
Normal file
40
vendor/github.com/mattermost/logr/target/writer.go
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
package target
|
||||
|
||||
import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/mattermost/logr"
|
||||
)
|
||||
|
||||
// Writer outputs log records to any `io.Writer`.
|
||||
type Writer struct {
|
||||
logr.Basic
|
||||
out io.Writer
|
||||
}
|
||||
|
||||
// NewWriterTarget creates a target capable of outputting log records to an io.Writer.
|
||||
func NewWriterTarget(filter logr.Filter, formatter logr.Formatter, out io.Writer, maxQueue int) *Writer {
|
||||
if out == nil {
|
||||
out = ioutil.Discard
|
||||
}
|
||||
w := &Writer{out: out}
|
||||
w.Basic.Start(w, w, filter, formatter, maxQueue)
|
||||
return w
|
||||
}
|
||||
|
||||
// Write converts the log record to bytes, via the Formatter,
|
||||
// and outputs to the io.Writer.
|
||||
func (w *Writer) Write(rec *logr.LogRec) error {
|
||||
_, stacktrace := w.IsLevelEnabled(rec.Level())
|
||||
|
||||
buf := rec.Logger().Logr().BorrowBuffer()
|
||||
defer rec.Logger().Logr().ReleaseBuffer(buf)
|
||||
|
||||
buf, err := w.Formatter().Format(rec, stacktrace, buf)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = w.out.Write(buf.Bytes())
|
||||
return err
|
||||
}
|
||||
34
vendor/github.com/mattermost/logr/timeout.go
generated
vendored
Normal file
34
vendor/github.com/mattermost/logr/timeout.go
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
package logr
|
||||
|
||||
import "github.com/wiggin77/merror"
|
||||
|
||||
// timeoutError is returned from functions that can timeout.
|
||||
type timeoutError struct {
|
||||
text string
|
||||
}
|
||||
|
||||
// newTimeoutError returns a TimeoutError.
|
||||
func newTimeoutError(text string) timeoutError {
|
||||
return timeoutError{text: text}
|
||||
}
|
||||
|
||||
// IsTimeoutError returns true if err is a TimeoutError.
|
||||
func IsTimeoutError(err error) bool {
|
||||
if _, ok := err.(timeoutError); ok {
|
||||
return true
|
||||
}
|
||||
// if a multi-error, return true if any of the errors
|
||||
// are TimeoutError
|
||||
if merr, ok := err.(*merror.MError); ok {
|
||||
for _, e := range merr.Errors() {
|
||||
if IsTimeoutError(e) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (err timeoutError) Error() string {
|
||||
return err.text
|
||||
}
|
||||
2
vendor/github.com/mattermost/mattermost-server/v5/LICENSE.txt
generated
vendored
2
vendor/github.com/mattermost/mattermost-server/v5/LICENSE.txt
generated
vendored
@@ -11,7 +11,7 @@ You may be licensed to use source code to create compiled versions not produced
|
||||
1. Under the Free Software Foundation’s GNU AGPL v.3.0, subject to the exceptions outlined in this policy; or
|
||||
2. Under a commercial license available from Mattermost, Inc. by contacting commercial@mattermost.com
|
||||
|
||||
You are licensed to use the source code in Admin Tools and Configuration Files (templates/, config/default.json, model/,
|
||||
You are licensed to use the source code in Admin Tools and Configuration Files (templates/, config/default.json, i18n/, model/,
|
||||
plugin/ and all subdirectories thereof) under the Apache License v2.0.
|
||||
|
||||
We promise that we will not enforce the copyleft provisions in AGPL v3.0 against you if your application (a) does not
|
||||
|
||||
142
vendor/github.com/mattermost/mattermost-server/v5/NOTICE.txt
generated
vendored
142
vendor/github.com/mattermost/mattermost-server/v5/NOTICE.txt
generated
vendored
@@ -4132,3 +4132,145 @@ A caching, resizing image proxy written in Go
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
---
|
||||
|
||||
## oov/psd
|
||||
|
||||
This product contains 'psd' by oov.
|
||||
|
||||
A PSD/PSB file reader for go
|
||||
|
||||
* HOMEPAGE:
|
||||
* https://github.com/oov/psd
|
||||
|
||||
* LICENSE: MIT
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 oov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
## gopherjs
|
||||
|
||||
This product contains 'gopherjs' by Richard Musiol.
|
||||
|
||||
A Go code to javascript code compiler.
|
||||
|
||||
* HOMEPAGE:
|
||||
* https://github.com/gopherjs/gopherjs
|
||||
|
||||
* LICENSE:
|
||||
|
||||
Copyright (c) 2013 Richard Musiol. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* 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.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
---
|
||||
|
||||
## semver
|
||||
|
||||
This product contains 'semver' by Masterminds.
|
||||
|
||||
The semver package provides the ability to work with Semantic Versions in Go.
|
||||
|
||||
* HOMEPAGE:
|
||||
* https://github.com/Masterminds/semver
|
||||
|
||||
* LICENSE:
|
||||
|
||||
Copyright (C) 2014-2019, Matt Butcher and Matt Farina
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
## Date Constraints
|
||||
|
||||
This product contains 'dateconstraints' by Eli Yukelzon.
|
||||
|
||||
Go library to validate a date against constraints
|
||||
|
||||
* HOMEPAGE:
|
||||
* https://github.com/reflog/dateconstraints
|
||||
|
||||
* LICENSE:
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Eli Yukelzon
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
44
vendor/github.com/mattermost/mattermost-server/v5/mlog/default.go
generated
vendored
44
vendor/github.com/mattermost/mattermost-server/v5/mlog/default.go
generated
vendored
@@ -4,9 +4,13 @@
|
||||
package mlog
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/mattermost/logr"
|
||||
)
|
||||
|
||||
// defaultLog manually encodes the log to STDERR, providing a basic, default logging implementation
|
||||
@@ -49,3 +53,43 @@ func defaultCriticalLog(msg string, fields ...Field) {
|
||||
// We map critical to error in zap, so be consistent.
|
||||
defaultLog("error", msg, fields...)
|
||||
}
|
||||
|
||||
func defaultCustomLog(lvl LogLevel, msg string, fields ...Field) {
|
||||
// custom log levels are only output once log targets are configured.
|
||||
}
|
||||
|
||||
func defaultCustomMultiLog(lvl []LogLevel, msg string, fields ...Field) {
|
||||
// custom log levels are only output once log targets are configured.
|
||||
}
|
||||
|
||||
func defaultFlush(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func defaultAdvancedConfig(cfg LogTargetCfg) error {
|
||||
// mlog.ConfigAdvancedConfig should not be called until default
|
||||
// logger is replaced with mlog.Logger instance.
|
||||
return errors.New("cannot config advanced logging on default logger")
|
||||
}
|
||||
|
||||
func defaultAdvancedShutdown(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func defaultAddTarget(targets ...logr.Target) error {
|
||||
// mlog.AddTarget should not be called until default
|
||||
// logger is replaced with mlog.Logger instance.
|
||||
return errors.New("cannot AddTarget on default logger")
|
||||
}
|
||||
|
||||
func defaultRemoveTargets(ctx context.Context, f func(TargetInfo) bool) error {
|
||||
// mlog.RemoveTargets should not be called until default
|
||||
// logger is replaced with mlog.Logger instance.
|
||||
return errors.New("cannot RemoveTargets on default logger")
|
||||
}
|
||||
|
||||
func defaultEnableMetrics(collector logr.MetricsCollector) error {
|
||||
// mlog.EnableMetrics should not be called until default
|
||||
// logger is replaced with mlog.Logger instance.
|
||||
return errors.New("cannot EnableMetrics on default logger")
|
||||
}
|
||||
|
||||
30
vendor/github.com/mattermost/mattermost-server/v5/mlog/errors.go
generated
vendored
Normal file
30
vendor/github.com/mattermost/mattermost-server/v5/mlog/errors.go
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
package mlog
|
||||
|
||||
import "github.com/mattermost/logr"
|
||||
|
||||
// onLoggerError is called when the logging system encounters an error,
|
||||
// such as a target not able to write records. The targets will keep trying
|
||||
// however the error will be logged with a dedicated level that can be output
|
||||
// to a safe/always available target for monitoring or alerting.
|
||||
func onLoggerError(err error) {
|
||||
Log(LvlLogError, "advanced logging error", Err(err))
|
||||
}
|
||||
|
||||
// onQueueFull is called when the main logger queue is full, indicating the
|
||||
// volume and frequency of log record creation is too high for the queue size
|
||||
// and/or the target latencies.
|
||||
func onQueueFull(rec *logr.LogRec, maxQueueSize int) bool {
|
||||
Log(LvlLogError, "main queue full, dropping record", Any("rec", rec))
|
||||
return true // drop record
|
||||
}
|
||||
|
||||
// onTargetQueueFull is called when the main logger queue is full, indicating the
|
||||
// volume and frequency of log record creation is too high for the target's queue size
|
||||
// and/or the target latency.
|
||||
func onTargetQueueFull(target logr.Target, rec *logr.LogRec, maxQueueSize int) bool {
|
||||
Log(LvlLogError, "target queue full, dropping record", String("target", ""), Any("rec", rec))
|
||||
return true // drop record
|
||||
}
|
||||
53
vendor/github.com/mattermost/mattermost-server/v5/mlog/global.go
generated
vendored
53
vendor/github.com/mattermost/mattermost-server/v5/mlog/global.go
generated
vendored
@@ -4,6 +4,11 @@
|
||||
package mlog
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/mattermost/logr"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
)
|
||||
@@ -11,6 +16,10 @@ import (
|
||||
var globalLogger *Logger
|
||||
|
||||
func InitGlobalLogger(logger *Logger) {
|
||||
// Clean up previous instance.
|
||||
if globalLogger != nil && globalLogger.logrLogger != nil {
|
||||
globalLogger.logrLogger.Logr().Shutdown()
|
||||
}
|
||||
glob := *logger
|
||||
glob.zap = glob.zap.WithOptions(zap.AddCallerSkip(1))
|
||||
globalLogger = &glob
|
||||
@@ -19,13 +28,46 @@ func InitGlobalLogger(logger *Logger) {
|
||||
Warn = globalLogger.Warn
|
||||
Error = globalLogger.Error
|
||||
Critical = globalLogger.Critical
|
||||
Log = globalLogger.Log
|
||||
LogM = globalLogger.LogM
|
||||
Flush = globalLogger.Flush
|
||||
ConfigAdvancedLogging = globalLogger.ConfigAdvancedLogging
|
||||
ShutdownAdvancedLogging = globalLogger.ShutdownAdvancedLogging
|
||||
AddTarget = globalLogger.AddTarget
|
||||
RemoveTargets = globalLogger.RemoveTargets
|
||||
EnableMetrics = globalLogger.EnableMetrics
|
||||
}
|
||||
|
||||
// logWriterFunc provides access to mlog via io.Writer, so the standard logger
|
||||
// can be redirected to use mlog and whatever targets are defined.
|
||||
type logWriterFunc func([]byte) (int, error)
|
||||
|
||||
func (lw logWriterFunc) Write(p []byte) (int, error) {
|
||||
return lw(p)
|
||||
}
|
||||
|
||||
func RedirectStdLog(logger *Logger) {
|
||||
zap.RedirectStdLogAt(logger.zap.With(zap.String("source", "stdlog")).WithOptions(zap.AddCallerSkip(-2)), zapcore.ErrorLevel)
|
||||
if atomic.LoadInt32(&disableZap) == 0 {
|
||||
zap.RedirectStdLogAt(logger.zap.With(zap.String("source", "stdlog")).WithOptions(zap.AddCallerSkip(-2)), zapcore.ErrorLevel)
|
||||
return
|
||||
}
|
||||
|
||||
writer := func(p []byte) (int, error) {
|
||||
Log(LvlStdLog, string(p))
|
||||
return len(p), nil
|
||||
}
|
||||
log.SetOutput(logWriterFunc(writer))
|
||||
}
|
||||
|
||||
type LogFunc func(string, ...Field)
|
||||
type LogFuncCustom func(LogLevel, string, ...Field)
|
||||
type LogFuncCustomMulti func([]LogLevel, string, ...Field)
|
||||
type FlushFunc func(context.Context) error
|
||||
type ConfigFunc func(cfg LogTargetCfg) error
|
||||
type ShutdownFunc func(context.Context) error
|
||||
type AddTargetFunc func(...logr.Target) error
|
||||
type RemoveTargetsFunc func(context.Context, func(TargetInfo) bool) error
|
||||
type EnableMetricsFunc func(logr.MetricsCollector) error
|
||||
|
||||
// DON'T USE THIS Modify the level on the app logger
|
||||
func GloballyDisableDebugLogForTest() {
|
||||
@@ -42,3 +84,12 @@ var Info LogFunc = defaultInfoLog
|
||||
var Warn LogFunc = defaultWarnLog
|
||||
var Error LogFunc = defaultErrorLog
|
||||
var Critical LogFunc = defaultCriticalLog
|
||||
var Log LogFuncCustom = defaultCustomLog
|
||||
var LogM LogFuncCustomMulti = defaultCustomMultiLog
|
||||
var Flush FlushFunc = defaultFlush
|
||||
|
||||
var ConfigAdvancedLogging ConfigFunc = defaultAdvancedConfig
|
||||
var ShutdownAdvancedLogging ShutdownFunc = defaultAdvancedShutdown
|
||||
var AddTarget AddTargetFunc = defaultAddTarget
|
||||
var RemoveTargets RemoveTargetsFunc = defaultRemoveTargets
|
||||
var EnableMetrics EnableMetricsFunc = defaultEnableMetrics
|
||||
|
||||
39
vendor/github.com/mattermost/mattermost-server/v5/mlog/levels.go
generated
vendored
Normal file
39
vendor/github.com/mattermost/mattermost-server/v5/mlog/levels.go
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
package mlog
|
||||
|
||||
// Standard levels
|
||||
var (
|
||||
LvlPanic = LogLevel{ID: 0, Name: "panic", Stacktrace: true}
|
||||
LvlFatal = LogLevel{ID: 1, Name: "fatal", Stacktrace: true}
|
||||
LvlError = LogLevel{ID: 2, Name: "error"}
|
||||
LvlWarn = LogLevel{ID: 3, Name: "warn"}
|
||||
LvlInfo = LogLevel{ID: 4, Name: "info"}
|
||||
LvlDebug = LogLevel{ID: 5, Name: "debug"}
|
||||
LvlTrace = LogLevel{ID: 6, Name: "trace"}
|
||||
// used by redirected standard logger
|
||||
LvlStdLog = LogLevel{ID: 10, Name: "stdlog"}
|
||||
// used only by the logger
|
||||
LvlLogError = LogLevel{ID: 11, Name: "logerror", Stacktrace: true}
|
||||
)
|
||||
|
||||
// Register custom (discrete) levels here.
|
||||
// !!!!! ID's must not exceed 32,768 !!!!!!
|
||||
var (
|
||||
// used by the audit system
|
||||
LvlAuditAPI = LogLevel{ID: 100, Name: "audit-api"}
|
||||
LvlAuditContent = LogLevel{ID: 101, Name: "audit-content"}
|
||||
LvlAuditPerms = LogLevel{ID: 102, Name: "audit-permissions"}
|
||||
LvlAuditCLI = LogLevel{ID: 103, Name: "audit-cli"}
|
||||
|
||||
// used by the TCP log target
|
||||
LvlTcpLogTarget = LogLevel{ID: 120, Name: "TcpLogTarget"}
|
||||
|
||||
// add more here ...
|
||||
)
|
||||
|
||||
// Combinations for LogM (log multi)
|
||||
var (
|
||||
MLvlAuditAll = []LogLevel{LvlAuditAPI, LvlAuditContent, LvlAuditPerms, LvlAuditCLI}
|
||||
)
|
||||
161
vendor/github.com/mattermost/mattermost-server/v5/mlog/log.go
generated
vendored
161
vendor/github.com/mattermost/mattermost-server/v5/mlog/log.go
generated
vendored
@@ -4,10 +4,15 @@
|
||||
package mlog
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/mattermost/logr"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
"gopkg.in/natefinch/lumberjack.v2"
|
||||
@@ -22,6 +27,19 @@ const (
|
||||
LevelWarn = "warn"
|
||||
// Errors are messages about things we know are problems
|
||||
LevelError = "error"
|
||||
|
||||
// DefaultFlushTimeout is the default amount of time mlog.Flush will wait
|
||||
// before timing out.
|
||||
DefaultFlushTimeout = time.Second * 5
|
||||
)
|
||||
|
||||
var (
|
||||
// disableZap is set when Zap should be disabled and Logr used instead.
|
||||
// This is needed for unit testing as Zap has no shutdown capabilities
|
||||
// and holds file handles until process exit. Currently unit test create
|
||||
// many server instances, and thus many Zap log files.
|
||||
// This flag will be removed when Zap is permanently replaced.
|
||||
disableZap int32
|
||||
)
|
||||
|
||||
// Type and function aliases from zap to limit the libraries scope into MM code
|
||||
@@ -38,6 +56,8 @@ var NamedErr = zap.NamedError
|
||||
var Bool = zap.Bool
|
||||
var Duration = zap.Duration
|
||||
|
||||
type TargetInfo logr.TargetInfo
|
||||
|
||||
type LoggerConfiguration struct {
|
||||
EnableConsole bool
|
||||
ConsoleJson bool
|
||||
@@ -52,6 +72,7 @@ type Logger struct {
|
||||
zap *zap.Logger
|
||||
consoleLevel zap.AtomicLevel
|
||||
fileLevel zap.AtomicLevel
|
||||
logrLogger *logr.Logger
|
||||
}
|
||||
|
||||
func getZapLevel(level string) zapcore.Level {
|
||||
@@ -84,6 +105,7 @@ func NewLogger(config *LoggerConfiguration) *Logger {
|
||||
logger := &Logger{
|
||||
consoleLevel: zap.NewAtomicLevelAt(getZapLevel(config.ConsoleLevel)),
|
||||
fileLevel: zap.NewAtomicLevelAt(getZapLevel(config.FileLevel)),
|
||||
logrLogger: newLogr(),
|
||||
}
|
||||
|
||||
if config.EnableConsole {
|
||||
@@ -93,13 +115,33 @@ func NewLogger(config *LoggerConfiguration) *Logger {
|
||||
}
|
||||
|
||||
if config.EnableFile {
|
||||
writer := zapcore.AddSync(&lumberjack.Logger{
|
||||
Filename: config.FileLocation,
|
||||
MaxSize: 100,
|
||||
Compress: true,
|
||||
})
|
||||
core := zapcore.NewCore(makeEncoder(config.FileJson), writer, logger.fileLevel)
|
||||
cores = append(cores, core)
|
||||
if atomic.LoadInt32(&disableZap) != 0 {
|
||||
t := &LogTarget{
|
||||
Type: "file",
|
||||
Format: "json",
|
||||
Levels: mlogLevelToLogrLevels(config.FileLevel),
|
||||
MaxQueueSize: DefaultMaxTargetQueue,
|
||||
Options: []byte(fmt.Sprintf(`{"Filename":"%s", "MaxSizeMB":%d, "Compress":%t}`,
|
||||
config.FileLocation, 100, true)),
|
||||
}
|
||||
if !config.FileJson {
|
||||
t.Format = "plain"
|
||||
}
|
||||
if tgt, err := NewLogrTarget("mlogFile", t); err == nil {
|
||||
logger.logrLogger.Logr().AddTarget(tgt)
|
||||
} else {
|
||||
Error("error creating mlogFile", Err(err))
|
||||
}
|
||||
} else {
|
||||
writer := zapcore.AddSync(&lumberjack.Logger{
|
||||
Filename: config.FileLocation,
|
||||
MaxSize: 100,
|
||||
Compress: true,
|
||||
})
|
||||
|
||||
core := zapcore.NewCore(makeEncoder(config.FileJson), writer, logger.fileLevel)
|
||||
cores = append(cores, core)
|
||||
}
|
||||
}
|
||||
|
||||
combinedCore := zapcore.NewTee(cores...)
|
||||
@@ -107,7 +149,6 @@ func NewLogger(config *LoggerConfiguration) *Logger {
|
||||
logger.zap = zap.New(combinedCore,
|
||||
zap.AddCaller(),
|
||||
)
|
||||
|
||||
return logger
|
||||
}
|
||||
|
||||
@@ -123,6 +164,10 @@ func (l *Logger) SetConsoleLevel(level string) {
|
||||
func (l *Logger) With(fields ...Field) *Logger {
|
||||
newlogger := *l
|
||||
newlogger.zap = newlogger.zap.With(fields...)
|
||||
if newlogger.logrLogger != nil {
|
||||
ll := newlogger.logrLogger.WithFields(zapToLogr(fields))
|
||||
newlogger.logrLogger = &ll
|
||||
}
|
||||
return &newlogger
|
||||
}
|
||||
|
||||
@@ -161,20 +206,120 @@ func (l *Logger) Sugar() *SugarLogger {
|
||||
|
||||
func (l *Logger) Debug(message string, fields ...Field) {
|
||||
l.zap.Debug(message, fields...)
|
||||
if isLevelEnabled(l.logrLogger, logr.Debug) {
|
||||
l.logrLogger.WithFields(zapToLogr(fields)).Debug(message)
|
||||
}
|
||||
}
|
||||
|
||||
func (l *Logger) Info(message string, fields ...Field) {
|
||||
l.zap.Info(message, fields...)
|
||||
if isLevelEnabled(l.logrLogger, logr.Info) {
|
||||
l.logrLogger.WithFields(zapToLogr(fields)).Info(message)
|
||||
}
|
||||
}
|
||||
|
||||
func (l *Logger) Warn(message string, fields ...Field) {
|
||||
l.zap.Warn(message, fields...)
|
||||
if isLevelEnabled(l.logrLogger, logr.Warn) {
|
||||
l.logrLogger.WithFields(zapToLogr(fields)).Warn(message)
|
||||
}
|
||||
}
|
||||
|
||||
func (l *Logger) Error(message string, fields ...Field) {
|
||||
l.zap.Error(message, fields...)
|
||||
if isLevelEnabled(l.logrLogger, logr.Error) {
|
||||
l.logrLogger.WithFields(zapToLogr(fields)).Error(message)
|
||||
}
|
||||
}
|
||||
|
||||
func (l *Logger) Critical(message string, fields ...Field) {
|
||||
l.zap.Error(message, fields...)
|
||||
if isLevelEnabled(l.logrLogger, logr.Error) {
|
||||
l.logrLogger.WithFields(zapToLogr(fields)).Error(message)
|
||||
}
|
||||
}
|
||||
|
||||
func (l *Logger) Log(level LogLevel, message string, fields ...Field) {
|
||||
l.logrLogger.WithFields(zapToLogr(fields)).Log(logr.Level(level), message)
|
||||
}
|
||||
|
||||
func (l *Logger) LogM(levels []LogLevel, message string, fields ...Field) {
|
||||
var logger *logr.Logger
|
||||
for _, lvl := range levels {
|
||||
if isLevelEnabled(l.logrLogger, logr.Level(lvl)) {
|
||||
// don't create logger with fields unless at least one level is active.
|
||||
if logger == nil {
|
||||
l := l.logrLogger.WithFields(zapToLogr(fields))
|
||||
logger = &l
|
||||
}
|
||||
logger.Log(logr.Level(lvl), message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (l *Logger) Flush(cxt context.Context) error {
|
||||
return l.logrLogger.Logr().FlushWithTimeout(cxt)
|
||||
}
|
||||
|
||||
// ShutdownAdvancedLogging stops the logger from accepting new log records and tries to
|
||||
// flush queues within the context timeout. Once complete all targets are shutdown
|
||||
// and any resources released.
|
||||
func (l *Logger) ShutdownAdvancedLogging(cxt context.Context) error {
|
||||
err := l.logrLogger.Logr().ShutdownWithTimeout(cxt)
|
||||
l.logrLogger = newLogr()
|
||||
return err
|
||||
}
|
||||
|
||||
// ConfigAdvancedLoggingConfig (re)configures advanced logging based on the
|
||||
// specified log targets. This is the easiest way to get the advanced logger
|
||||
// configured via a config source such as file.
|
||||
func (l *Logger) ConfigAdvancedLogging(targets LogTargetCfg) error {
|
||||
if err := l.ShutdownAdvancedLogging(context.Background()); err != nil {
|
||||
Error("error shutting down previous logger", Err(err))
|
||||
}
|
||||
|
||||
err := logrAddTargets(l.logrLogger, targets)
|
||||
return err
|
||||
}
|
||||
|
||||
// AddTarget adds one or more logr.Target to the advanced logger. This is the preferred method
|
||||
// to add custom targets or provide configuration that cannot be expressed via a
|
||||
// config source.
|
||||
func (l *Logger) AddTarget(targets ...logr.Target) error {
|
||||
return l.logrLogger.Logr().AddTarget(targets...)
|
||||
}
|
||||
|
||||
// RemoveTargets selectively removes targets that were previously added to this logger instance
|
||||
// using the passed in filter function. The filter function should return true to remove the target
|
||||
// and false to keep it.
|
||||
func (l *Logger) RemoveTargets(ctx context.Context, f func(ti TargetInfo) bool) error {
|
||||
// Use locally defined TargetInfo type so we don't spread Logr dependencies.
|
||||
fc := func(tic logr.TargetInfo) bool {
|
||||
return f(TargetInfo(tic))
|
||||
}
|
||||
return l.logrLogger.Logr().RemoveTargets(ctx, fc)
|
||||
}
|
||||
|
||||
// EnableMetrics enables metrics collection by supplying a MetricsCollector.
|
||||
// The MetricsCollector provides counters and gauges that are updated by log targets.
|
||||
func (l *Logger) EnableMetrics(collector logr.MetricsCollector) error {
|
||||
return l.logrLogger.Logr().SetMetricsCollector(collector)
|
||||
}
|
||||
|
||||
// DisableZap is called to disable Zap, and Logr will be used instead. Any Logger
|
||||
// instances created after this call will only use Logr.
|
||||
//
|
||||
// This is needed for unit testing as Zap has no shutdown capabilities
|
||||
// and holds file handles until process exit. Currently unit tests create
|
||||
// many server instances, and thus many Zap log file handles.
|
||||
//
|
||||
// This method will be removed when Zap is permanently replaced.
|
||||
func DisableZap() {
|
||||
atomic.StoreInt32(&disableZap, 1)
|
||||
}
|
||||
|
||||
// EnableZap re-enables Zap such that any Logger instances created after this
|
||||
// call will allow Zap targets.
|
||||
func EnableZap() {
|
||||
atomic.StoreInt32(&disableZap, 0)
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user