Documentation ¶
Index ¶
- func BuildEaURI(resource string) string
- func CookieFromRawCookie(rawCookie string) *http.Cookie
- func Find(slice []string, val string) (int, bool)
- func GetPageContentAsGoQuery(client *http.Client, resource string) (*goquery.Document, error)
- func IsMaintenanceMode(client EaClient) bool
- func SetStructValues(structType reflect.Type, structValue reflect.Value, data map[string]string)
- func ShiftJISBytesToUTF8Bytes(text []byte) []byte
- func ShiftJISStringToUTF8String(text string) string
- func TableThTd(selection *goquery.Selection) (map[string]string, error)
- type ClientRateLimiter
- type EaClient
- func (client *EaClient) GetEaCookie() *http.Cookie
- func (client *EaClient) GetUsername() string
- func (client *EaClient) LoginState() bool
- func (client *EaClient) SetEaCookie(cookie *http.Cookie)
- func (client *EaClient) SetTestClient(testServer *httptest.Server, responseMap map[string]string)
- func (client *EaClient) SetUsername(un string)
- type EaJar
- type TestClientProxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildEaURI ¶
func CookieFromRawCookie ¶
func Find ¶
Find will locate the existence of a given value in a slice. Returns the index of the value and whether the value was found.
func GetPageContentAsGoQuery ¶
func IsMaintenanceMode ¶
func SetStructValues ¶
SetStructValues will set the values of a struct based on a "tag" using data provided in the map.
func ShiftJISBytesToUTF8Bytes ¶
ShiftJISBytesToUTF8Bytes will convert a SHIFT-JIS encoded string into a UTF-8 encoded string.
func ShiftJISStringToUTF8String ¶
ShiftJISStringToUTF8String will convert a SHIFT-JIS encoded string into a UTF-8 encoded string.
Types ¶
type ClientRateLimiter ¶
type ClientRateLimiter struct { Proxy http.RoundTripper WeightedSemaphore *semaphore.Weighted }
type EaClient ¶
type EaClient struct { Client *http.Client ActiveCookie string // contains filtered or unexported fields }
func GenerateClient ¶
func GenerateClient() EaClient
GenerateClient will generate a http.client that is used by this library.
func (*EaClient) GetEaCookie ¶
func (*EaClient) GetUsername ¶
func (*EaClient) LoginState ¶
func (*EaClient) SetEaCookie ¶
func (*EaClient) SetTestClient ¶
setClient is in place to replace the internal client with a test client
func (*EaClient) SetUsername ¶
type EaJar ¶
type EaJar struct {
// contains filtered or unexported fields
}
type TestClientProxy ¶
type TestClientProxy struct { Proxy http.RoundTripper ResponseMap map[string]string }
Click to show internal directories.
Click to hide internal directories.