Documentation
¶
Index ¶
- Constants
- type Feed
- type Label
- type LabelFilter
- type LabelFilters
- type Labels
- func (ls Labels) EnsureSorted()
- func (ls *Labels) FromMap(m map[string]string)
- func (ls Labels) Get(key string) string
- func (ls Labels) Map() map[string]string
- func (ls Labels) MarshalJSON() ([]byte, error)
- func (ls *Labels) Put(key, value string, sort bool)
- func (ls Labels) String() string
- func (ls *Labels) UnmarshalJSON(data []byte) error
Constants ¶
View Source
const ( AppName = "zenfeed" Module = "github.com/glidea/zenfeed" )
View Source
const ( LabelType = "type" LabelSource = "source" LabelTitle = "title" LabelLink = "link" LabelPubTime = "pub_time" LabelContent = "content" )
LabelXXX is the metadata label for the feed.
View Source
const ( LabelFilterEqual = "=" LabelFilterNotEqual = "!=" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Feed ¶
type Feed struct {
ID uint64 `json:"-"`
Labels Labels `json:"labels"`
Time time.Time `json:"time"`
}
Feed is core data model for a feed.
E.g. {
"labels": {
"title": "The most awesome feed management software of 2025 has been born",
"content": "....",
"link": "....",
},
"time": "2025-01-01T00:00:00Z",
}
type LabelFilter ¶ added in v0.3.0
func NewLabelFilter ¶ added in v0.3.0
func NewLabelFilter(filter string) (LabelFilter, error)
func (LabelFilter) Match ¶ added in v0.3.0
func (f LabelFilter) Match(labels Labels) bool
type LabelFilters ¶ added in v0.3.0
type LabelFilters []LabelFilter
func NewLabelFilters ¶ added in v0.3.0
func NewLabelFilters(filters []string) (LabelFilters, error)
func (LabelFilters) Match ¶ added in v0.3.0
func (ls LabelFilters) Match(labels Labels) bool
type Labels ¶
type Labels []Label
func (Labels) EnsureSorted ¶
func (ls Labels) EnsureSorted()
func (Labels) MarshalJSON ¶
func (*Labels) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.