Documentation ¶
Index ¶
- func NoRedirect(req *http.Request, via []*http.Request) error
- type Client
- func (c *Client) Cookies() []*http.Cookie
- func (c *Client) GetAsset(path ...string) Result
- func (c *Client) Login(creds UserLogin) (result Result)
- func (c *Client) LoginGuard(req SendRequestHandler) Result
- func (c *Client) PostAsset(payload Payload, path ...string) (result Result)
- func (c *Client) ReadCookies(filename string) error
- func (c *Client) WriteCookies(filename string) error
- type GeneralResponse
- type GetCredentialsHandler
- type NoRedirectError
- type Payload
- type Result
- type SendRequestHandler
- type UserLogin
- type WriteCookiesHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { *http.Client GetCredentials GetCredentialsHandler CookieFilename string // contains filtered or unexported fields }
func NewClientWithCookies ¶
func (*Client) LoginGuard ¶
func (c *Client) LoginGuard(req SendRequestHandler) Result
func (*Client) ReadCookies ¶
func (*Client) WriteCookies ¶
type GeneralResponse ¶
func NewGeneralResponse ¶
func NewGeneralResponse(r io.Reader) (GeneralResponse, error)
func (*GeneralResponse) FromReader ¶
func (g *GeneralResponse) FromReader(r io.Reader) error
type GetCredentialsHandler ¶
type NoRedirectError ¶
type NoRedirectError struct{}
func (NoRedirectError) Error ¶
func (NoRedirectError) Error() string
type SendRequestHandler ¶
type SendRequestHandler func() Result
type UserLogin ¶
func DefaultGetCredentials ¶
type WriteCookiesHandler ¶
type WriteCookiesHandler func() error
Click to show internal directories.
Click to hide internal directories.