Documentation
¶
Index ¶
- Variables
- func FeedToText(f *feeds.Feed) string
- func GetFileTypeFromUrl(url string) string
- func GetGuid(ss []string) string
- func GetLatestDate(dates []time.Time) time.Time
- func GetRemoteFileLastModified(url string) (time.Time, error)
- func HttpGet(url string, options map[string]any) (*http.Response, error)
- func HttpGetUtls(url string, options map[string]any) (*http.Response, error)
- func IsBotChallenge(resp *http.Response) bool
- func IsImageType(t string) bool
- func Route(g *gin.Engine, p Parser, o *Options) gin.IRoutes
- func ServeFeed(c *gin.Context, f *feeds.Feed)
- func SortFeedEntries(f *feeds.Feed)
- func ValidateURLHost(rawURL string, allowedHosts []string) error
- type InternalError
- type NotFoundError
- type Option
- type Options
- func (o Options) AddFlags(f *flag.FlagSet)
- func (o *Options) GeWithDefaultFlag(key string) (interface{}, bool)
- func (o *Options) Get(key string) interface{}
- func (o *Options) GetBool(key string) bool
- func (o Options) GetHelp() string
- func (o Options) GetOptionsCopy() OptionsList
- func (o *Options) Set(key string, value string)
- type OptionsList
- type Parser
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUpstreamBlocked = errors.New("request blocked by upstream bot protection")
Functions ¶
func FeedToText ¶
func GetFileTypeFromUrl ¶
func IsBotChallenge ¶
func IsImageType ¶
func SortFeedEntries ¶
func ValidateURLHost ¶
Types ¶
type InternalError ¶
type InternalError struct {
// contains filtered or unexported fields
}
func NewInternalError ¶
func NewInternalError(message string) *InternalError
func WrapInternalError ¶
func WrapInternalError(err error, message string) *InternalError
func (*InternalError) Error ¶
func (e *InternalError) Error() string
func (*InternalError) Unwrap ¶
func (e *InternalError) Unwrap() error
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
func NewNotFoundError ¶
func NewNotFoundError(message string) *NotFoundError
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
type Option ¶
type Option struct {
Flag string `json:"flag"`
Value interface{} `json:"-"`
Required bool `json:"required"`
Default string `json:"default"`
Help string `json:"help"`
ShortFlag string `json:"shortFlag"`
Type string `json:"type"`
IsPath bool `json:"isPath"`
IsStatic bool `json:"isStatic"` // static options are exposed through the API
}
type Options ¶
type Options struct {
OptionsList OptionsList
Parser Parser
}
func GetFullOptions ¶
func (*Options) GeWithDefaultFlag ¶
func (Options) GetOptionsCopy ¶
func (o Options) GetOptionsCopy() OptionsList
type OptionsList ¶
type OptionsList []*Option
Click to show internal directories.
Click to hide internal directories.