Versions in this module Expand all Collapse all v1 v1.0.0 Dec 20, 2022 Changes in this version + func GetParam(r Resource, key string) any + func GetParamToLower(r Resource, key string) any + func IsExpired(d Dated) bool + func IsFuture(d Dated) bool + func IsZeroDates(d Dated) bool + func Param(r ResourceParamsProvider, fallback maps.Params, key any) (any, error) + type Cloner interface + Clone func() Resource + type ContentProvider interface + Content func() (any, error) + type ContentResource interface + MediaType func() media.Type + type Dated interface + Date func() time.Time + ExpiryDate func() time.Time + Lastmod func() time.Time + PublishDate func() time.Time + type Dates struct + FDate time.Time + FExpiryDate time.Time + FLastmod time.Time + FPublishDate time.Time + func (d *Dates) UpdateDateAndLastmodIfAfter(in Dated) + func (p Dates) Date() time.Time + func (p Dates) ExpiryDate() time.Time + func (p Dates) Lastmod() time.Time + func (p Dates) PublishDate() time.Time + type ErrProvider interface + Err func() ResourceError + type Identifier interface + Key func() string + type LanguageProvider interface + Language func() *langs.Language + func NewLanguageProvider(lang *langs.Language) LanguageProvider + type LengthProvider interface + Len func() int + type MediaTypeProvider interface + MediaType func() media.Type + type OpenReadSeekCloser func() (hugio.ReadSeekCloser, error) + type OriginProvider interface + GetFieldString func(pattern string) (string, bool) + Origin func() Resource + type ReadSeekCloserResource interface + MediaType func() media.Type + type Resource interface + type ResourceDataProvider interface + Data func() any + type ResourceError interface + func NewResourceError(err error, data any) ResourceError + type ResourceFinder interface + ByType func(typ any) Resources + Get func(name any) Resource + GetMatch func(pattern any) Resource + Match func(pattern any) Resources + type ResourceLinksProvider interface + Permalink func() string + RelPermalink func() string + type ResourceMetaProvider interface + Name func() string + Title func() string + type ResourceParamsProvider interface + Params func() maps.Params + type ResourceTypeProvider interface + ResourceType func() string + type ResourceTypesProvider interface + func NewResourceTypesProvider(mediaType media.Type, resourceType string) ResourceTypesProvider + type Resources []Resource + func (r Resources) ByType(typ any) Resources + func (r Resources) Get(name any) Resource + func (r Resources) GetMatch(pattern any) Resource + func (r Resources) Match(pattern any) Resources + func (r Resources) MergeByLanguage(r2 Resources) Resources + func (r Resources) MergeByLanguageInterface(in any) (any, error) + type ResourcesConverter interface + ToResources func() Resources + type ResourcesLanguageMerger interface + MergeByLanguage func(other Resources) Resources + MergeByLanguageInterface func(other any) (any, error) + type Source interface + Publish func() error + type TranslationKeyProvider interface + TranslationKey func() string + type UnmarshableResource interface