github.com/rajatvaryani/mattermost-server@v5.11.1+incompatible/model/users_stats.go (about)

     1  // Copyright (c) 2016-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  }