github.com/adacta-ru/mattermost-server/v6@v6.0.0/model/users_stats.go (about) 1 // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. 2 // See LICENSE.txt for license information. 3 4 package model 5 6 import ( 7 "encoding/json" 8 "io" 9 ) 10 11 type UsersStats struct { 12 TotalUsersCount int64 `json:"total_users_count"` 13 } 14 15 func (o *UsersStats) ToJson() string { 16 b, _ := json.Marshal(o) 17 return string(b) 18 } 19 20 func UsersStatsFromJson(data io.Reader) *UsersStats { 21 var o *UsersStats 22 json.NewDecoder(data).Decode(&o) 23 return o 24 }