subscription.go 710 B

123456789101112131415161718192021
  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. }
  11. // Equals compare two subscriptions.
  12. func (s Subcription) Equals(subscription *Subcription) bool {
  13. return s.Title == subscription.Title && s.SiteURL == subscription.SiteURL &&
  14. s.FeedURL == subscription.FeedURL && s.CategoryName == subscription.CategoryName
  15. }
  16. // SubcriptionList is a list of subscriptions.
  17. type SubcriptionList []*Subcription