Documentation
¶
Index ¶
- Constants
- func ApplyUmask(perm os.FileMode) os.FileMode
- func StoreUmask(mask int)
- func ValidateHTTPBaseURL(path, raw string) error
- func ValidateRequestDelay(path string, delay int) error
- type UserAgentString
- func (u UserAgentString) MarshalJSON() ([]byte, error)
- func (u UserAgentString) MarshalYAML() (interface{}, error)
- func (u *UserAgentString) Scan(value interface{}) error
- func (u *UserAgentString) UnmarshalJSON(data []byte) error
- func (u *UserAgentString) UnmarshalYAML(unmarshal func(interface{}) error) error
Constants ¶
View Source
const ( DirPerm = 0777 DirPermTemp = 0700 FilePerm = 0666 )
View Source
const ( // DefaultUserAgent is the true/identifying UA for Javinizer. DefaultUserAgent = "Javinizer (+https://github.com/javinizer/Javinizer)" // DefaultScraperUserAgent is a browser-like UA used as the default for scrapers // when no scraper-specific or global user_agent is configured. DefaultScraperUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36" )
Variables ¶
This section is empty.
Functions ¶
func StoreUmask ¶
func StoreUmask(mask int)
func ValidateHTTPBaseURL ¶
func ValidateRequestDelay ¶
Types ¶
type UserAgentString ¶
type UserAgentString struct {
Value string
}
UserAgentString is a custom User-Agent string type that marshals/unmarshals as a plain string.
func (UserAgentString) MarshalJSON ¶
func (u UserAgentString) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler so UserAgentString marshals as a plain string.
func (UserAgentString) MarshalYAML ¶
func (u UserAgentString) MarshalYAML() (interface{}, error)
MarshalYAML implements custom marshaling so the field serializes as a plain string.
func (*UserAgentString) Scan ¶
func (u *UserAgentString) Scan(value interface{}) error
Scan implements sql.Scanner for database compatibility.
func (*UserAgentString) UnmarshalJSON ¶
func (u *UserAgentString) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler so UserAgentString unmarshals from a plain string or an object with a "value" field.
func (*UserAgentString) UnmarshalYAML ¶
func (u *UserAgentString) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements custom unmarshaling so the field accepts a plain string.
Click to show internal directories.
Click to hide internal directories.