You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
540 B
Go
30 lines
540 B
Go
7 years ago
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||
4 years ago
|
// See LICENSE.txt for license information.
|
||
7 years ago
|
|
||
|
package model
|
||
|
|
||
|
import (
|
||
|
"encoding/json"
|
||
|
"io"
|
||
|
)
|
||
|
|
||
|
type PluginInfo struct {
|
||
|
Manifest
|
||
|
}
|
||
|
|
||
|
type PluginsResponse struct {
|
||
|
Active []*PluginInfo `json:"active"`
|
||
|
Inactive []*PluginInfo `json:"inactive"`
|
||
|
}
|
||
|
|
||
|
func (m *PluginsResponse) ToJson() string {
|
||
6 years ago
|
b, _ := json.Marshal(m)
|
||
|
return string(b)
|
||
7 years ago
|
}
|
||
|
|
||
|
func PluginsResponseFromJson(data io.Reader) *PluginsResponse {
|
||
6 years ago
|
var m *PluginsResponse
|
||
|
json.NewDecoder(data).Decode(&m)
|
||
|
return m
|
||
7 years ago
|
}
|