MM-16499: Adds ability to retrieve channels with total count f… (#11375)
* MM-16499: Adds ability to retrieve channels with total count for pagination. * MM-16499: Switches to custom package name for squirrel.
Этот коммит содержится в:
коммит произвёл
Eli Yukelzon
родитель
3993cac4ed
Коммит
d1b1b319cf
@@ -60,6 +60,11 @@ type ChannelWithTeamData struct {
|
||||
TeamUpdateAt int64 `json:"team_update_at"`
|
||||
}
|
||||
|
||||
type ChannelsWithCount struct {
|
||||
Channels *ChannelListWithTeamData `json:"channels"`
|
||||
TotalCount int64 `json:"total_count"`
|
||||
}
|
||||
|
||||
type ChannelPatch struct {
|
||||
DisplayName *string `json:"display_name"`
|
||||
Name *string `json:"name"`
|
||||
@@ -111,6 +116,17 @@ func (o *ChannelPatch) ToJson() string {
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (o *ChannelsWithCount) ToJson() []byte {
|
||||
b, _ := json.Marshal(o)
|
||||
return b
|
||||
}
|
||||
|
||||
func ChannelsWithCountFromJson(data io.Reader) *ChannelsWithCount {
|
||||
var o *ChannelsWithCount
|
||||
json.NewDecoder(data).Decode(&o)
|
||||
return o
|
||||
}
|
||||
|
||||
func ChannelFromJson(data io.Reader) *Channel {
|
||||
var o *Channel
|
||||
json.NewDecoder(data).Decode(&o)
|
||||
|
||||
Ссылка в новой задаче
Block a user