* Creating empty Channels shell

This is the first step in moving to a product-based
isolated architecture.

For now, Channels is empty and does not contain anything.

Next step is to change App to contain Channels instead
of Server. Some of the initialization code in NewServer
would need to be moved inside NewChannels.

This would complete the full pass-through mode of accessing
everything.

The last step would be to gradually move Channels related
fields from Server into Channels, keeping Server to be
just the global level struct.

```release-note
NONE
```

* fix vet failure

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2021-10-11 19:24:50 +05:30
коммит произвёл GitHub
родитель 55ea07677d
Коммит 561bc968c8
4 изменённых файлов: 78 добавлений и 0 удалений

29
app/channels.go Обычный файл
Просмотреть файл

@@ -0,0 +1,29 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
package app
// Channels contains all channels related state.
type Channels struct {
s *Server
}
func init() {
RegisterProduct("channels", func(s *Server) (Product, error) {
return NewChannels(s)
})
}
func NewChannels(s *Server) (*Channels, error) {
return &Channels{
s: s,
}, nil
}
func (c *Channels) Start() error {
return nil
}
func (c *Channels) Stop() error {
return nil
}