subscription.go 778 B

1234567891011121314151617181920212223
  1. // SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
  2. // SPDX-License-Identifier: Apache-2.0
  3. package opml // import "miniflux.app/v2/internal/reader/opml"
  4. // Subcription represents a feed that will be imported or exported.
  5. type Subcription struct {
  6. Title string
  7. SiteURL string
  8. FeedURL string
  9. CategoryName string
  10. Description string
  11. }
  12. // Equals compare two subscriptions.
  13. func (s Subcription) Equals(subscription *Subcription) bool {
  14. return s.Title == subscription.Title && s.SiteURL == subscription.SiteURL &&
  15. s.FeedURL == subscription.FeedURL && s.CategoryName == subscription.CategoryName &&
  16. s.Description == subscription.Description
  17. }
  18. // SubcriptionList is a list of subscriptions.
  19. type SubcriptionList []*Subcription