1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-18 09:35:25 +02:00
focalboard/server/model/sharing.go

21 lines
389 B
Go
Raw Normal View History

2021-01-13 01:35:30 +02:00
package model
2021-01-13 02:44:50 +02:00
import (
"encoding/json"
"io"
)
2021-01-13 01:35:30 +02:00
type Sharing struct {
ID string `json:"id"`
Enabled bool `json:"enabled"`
2021-01-13 02:52:25 +02:00
Token string `json:"token"`
2021-01-13 01:35:30 +02:00
ModifiedBy string `json:"modifiedBy"`
UpdateAt int64 `json:"update_at,omitempty"`
}
2021-01-13 02:44:50 +02:00
func SharingFromJSON(data io.Reader) Sharing {
var sharing Sharing
json.NewDecoder(data).Decode(&sharing)
return sharing
}