focalboard/server/model/sharing.go

21 lines
389 B
Go
Raw Normal View History

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