Documentation
¶
Index ¶
- Variables
- func ApplyCookiesFromFile(cfg *EssentialsConfig, path string) error
- func ApplyCookiesFromFileAndPersist(cfg *EssentialsConfig, cookiePath, essentialsPath string) error
- func SaveEssentials(cfg *EssentialsConfig, path string) error
- type AuthCookies
- type AuthSection
- type BrowserCookie
- type EssentialsConfig
- func (c *EssentialsConfig) BuildRequestHeaders(req *http.Request, ref string)
- func (c *EssentialsConfig) FeatureJSONFor(key string) (string, error)
- func (c *EssentialsConfig) GraphQLURL(key string) (string, error)
- func (c *EssentialsConfig) HTTPTimeout() time.Duration
- func (c *EssentialsConfig) ValidateRequiredCookies(cookiePath string) error
- type FeaturesSection
- type GraphQLOperation
- type GraphQLSection
- type PathsSection
- type RuntimeSection
- type XSection
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCookieFileMissing = errors.New("cookie file missing")
Functions ¶
func ApplyCookiesFromFile ¶
func ApplyCookiesFromFile(cfg *EssentialsConfig, path string) error
func ApplyCookiesFromFileAndPersist ¶
func ApplyCookiesFromFileAndPersist(cfg *EssentialsConfig, cookiePath, essentialsPath string) error
func SaveEssentials ¶
func SaveEssentials(cfg *EssentialsConfig, path string) error
Types ¶
type AuthCookies ¶
type AuthSection ¶
type AuthSection struct {
Bearer string `json:"bearer"`
Cookies AuthCookies `json:"cookies"`
}
type BrowserCookie ¶
type EssentialsConfig ¶
type EssentialsConfig struct {
X XSection `json:"x,omitempty"`
GraphQL GraphQLSection `json:"graphql"`
Auth AuthSection `json:"auth"`
Headers map[string]string `json:"headers"`
Features FeaturesSection `json:"features"`
Paths PathsSection `json:"paths"`
Runtime RuntimeSection `json:"runtime"`
}
func LoadEssentialsWithFallback ¶
func LoadEssentialsWithFallback(paths []string) (*EssentialsConfig, error)
func (*EssentialsConfig) BuildRequestHeaders ¶
func (c *EssentialsConfig) BuildRequestHeaders(req *http.Request, ref string)
func (*EssentialsConfig) FeatureJSONFor ¶
func (c *EssentialsConfig) FeatureJSONFor(key string) (string, error)
func (*EssentialsConfig) GraphQLURL ¶
func (c *EssentialsConfig) GraphQLURL(key string) (string, error)
func (*EssentialsConfig) HTTPTimeout ¶
func (c *EssentialsConfig) HTTPTimeout() time.Duration
func (*EssentialsConfig) ValidateRequiredCookies ¶
func (c *EssentialsConfig) ValidateRequiredCookies(cookiePath string) error
type FeaturesSection ¶
type GraphQLOperation ¶
type GraphQLSection ¶
type GraphQLSection struct {
Operations map[string]GraphQLOperation `json:"operations"`
}
type PathsSection ¶
type RuntimeSection ¶
Click to show internal directories.
Click to hide internal directories.