[MM-14720] Add Posts Per Day Analytics and Number Posts Previous Day Functionality (#11402)

* Add ability to get bot counts per day

Modify tests using AnalyticsPostCountsByDay to include extra input
(botsOnly)

Correctly generate the mock file with 'make store-mocks' target.  Didn't
see these comments earlier

* Initial commit for calculating total posts previous day and total posts
from bots previous day

* - Refactor to use asserts instead of if statements in tests
- Capture inputs to AnalyticsPostCountsByDay() function into an
  options struct
- Remove bot creation from diagnostics_test.go.

* Remove utils library

* create AnalyticsPostCountsOptions struct which is accepted as an input
to AnalyticsPostCountsByDay method

* Go vet fixes
Этот коммит содержится в:
jfrerich
2019-07-02 16:10:22 -05:00
коммит произвёл Christopher Speller
родитель c8fb1b6265
Коммит 95652da0b8
7 изменённых файлов: 123 добавлений и 27 удалений

Просмотреть файл

@@ -108,6 +108,12 @@ type SearchParameter struct {
IncludeDeletedChannels *bool `json:"include_deleted_channels"`
}
type AnalyticsPostCountsOptions struct {
TeamId string
BotsOnly bool
YesterdayOnly bool
}
func (o *PostPatch) WithRewrittenImageURLs(f func(string) string) *PostPatch {
copy := *o
if copy.Message != nil {