controller.go 598 B

123456789101112131415161718192021
  1. // Copyright 2017 Frédéric Guillot. All rights reserved.
  2. // Use of this source code is governed by the Apache 2.0
  3. // license that can be found in the LICENSE file.
  4. package api
  5. import (
  6. "github.com/miniflux/miniflux2/reader/feed"
  7. "github.com/miniflux/miniflux2/storage"
  8. )
  9. // Controller holds all handlers for the API.
  10. type Controller struct {
  11. store *storage.Storage
  12. feedHandler *feed.Handler
  13. }
  14. // NewController creates a new controller.
  15. func NewController(store *storage.Storage, feedHandler *feed.Handler) *Controller {
  16. return &Controller{store: store, feedHandler: feedHandler}
  17. }