Documentation ¶
Index ¶
- Constants
- Variables
- func RateLimit(host string)
- type Client
- func (c *Client) Get(url string) (http.Header, []byte, error)
- func (c *Client) GetJson(url string, result interface{}) error
- func (c *Client) GetJsonWith(headers map[string]string, url string, result interface{}) error
- func (c *Client) GetPLS(urlString string) (pls.Playlist, error)
- func (c *Client) GetWith(headers map[string]string, url string) (http.Header, []byte, error)
- func (c *Client) GetXML(urlString string, result interface{}) error
- func (c *Client) UseOnlyIfCached(enabled bool)
Constants ¶
View Source
const ( DirectiveMaxAge = "max-age" DirectiveOnlyIfCached = "only-if-cached" )
Variables ¶
View Source
var ( HeaderUserAgent = http.CanonicalHeaderKey("User-Agent") HeaderCacheControl = http.CanonicalHeaderKey("Cache-Control") ErrCacheMiss = errors.New("cache miss") )
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(config *config.ClientConfig) *Client
func (*Client) GetJsonWith ¶
func (*Client) UseOnlyIfCached ¶
Click to show internal directories.
Click to hide internal directories.