diff options
author | Wim <wim@42.be> | 2023-08-05 20:43:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-05 20:43:19 +0200 |
commit | 56e7bd01ca09ad52b0c4f48f146a20a4f1b78696 (patch) | |
tree | b1355645342667209263cbd355dc0b4254f1e8fe /vendor/github.com/mattermost/mattermost-server/v5/model/analytics_row.go | |
parent | 9459495484d6e06a3d46de64fccd8d06f7ccc72c (diff) | |
download | matterbridge-msglm-56e7bd01ca09ad52b0c4f48f146a20a4f1b78696.tar.gz matterbridge-msglm-56e7bd01ca09ad52b0c4f48f146a20a4f1b78696.tar.bz2 matterbridge-msglm-56e7bd01ca09ad52b0c4f48f146a20a4f1b78696.zip |
Diffstat (limited to 'vendor/github.com/mattermost/mattermost-server/v5/model/analytics_row.go')
-rw-r--r-- | vendor/github.com/mattermost/mattermost-server/v5/model/analytics_row.go | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/vendor/github.com/mattermost/mattermost-server/v5/model/analytics_row.go b/vendor/github.com/mattermost/mattermost-server/v5/model/analytics_row.go deleted file mode 100644 index d1216664..00000000 --- a/vendor/github.com/mattermost/mattermost-server/v5/model/analytics_row.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -package model - -import ( - "encoding/json" - "io" -) - -type AnalyticsRow struct { - Name string `json:"name"` - Value float64 `json:"value"` -} - -type AnalyticsRows []*AnalyticsRow - -func (ar *AnalyticsRow) ToJson() string { - b, _ := json.Marshal(ar) - return string(b) -} - -func AnalyticsRowFromJson(data io.Reader) *AnalyticsRow { - var ar *AnalyticsRow - json.NewDecoder(data).Decode(&ar) - return ar -} - -func (ar AnalyticsRows) ToJson() string { - b, err := json.Marshal(ar) - if err != nil { - return "[]" - } - return string(b) -} - -func AnalyticsRowsFromJson(data io.Reader) AnalyticsRows { - var ar AnalyticsRows - json.NewDecoder(data).Decode(&ar) - return ar -} |