Documentation
¶
Index ¶
- type Client
- func (c Client) DeviceCodeLogin(clientId string, clientSecret string, deviceCode string) (credentials UserCredentials, err error)
- func (c Client) ExchangeCodeLogin(clientId string, clientSecret string, code string) (credentials UserCredentials, err error)
- func (c Client) GetClientCredentials(clientId string, clientSecret string) (credentials ClientCredentials, err error)
- func (c Client) GetDeviceCode(credentials ClientCredentials) (deviceAuth DeviceAuthorization, err error)
- func (c Client) GetExchangeCode(credentials UserCredentials) (exchange Exchange, err error)
- func (c Client) Request(method string, url string, headers http.Header, body string) (*http.Response, error)
- func (c Client) WaitForDeviceCodeAccept(clientId string, clientSecret string, deviceCode string) (credentials UserCredentials, err error)
- type ClientCredentials
- type DeviceAuthorization
- type EpicErrorResponse
- type Exchange
- type UserCredentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (Client) DeviceCodeLogin ¶
func (Client) ExchangeCodeLogin ¶
func (Client) GetClientCredentials ¶
func (c Client) GetClientCredentials(clientId string, clientSecret string) (credentials ClientCredentials, err error)
func (Client) GetDeviceCode ¶
func (c Client) GetDeviceCode(credentials ClientCredentials) (deviceAuth DeviceAuthorization, err error)
func (Client) GetExchangeCode ¶
func (c Client) GetExchangeCode(credentials UserCredentials) (exchange Exchange, err error)
func (Client) WaitForDeviceCodeAccept ¶
type ClientCredentials ¶
type DeviceAuthorization ¶
type DeviceAuthorization struct {
ClientId string `json:"client_id"`
DeviceCode string `json:"device_code"`
ExpiresIn int `json:"expires_in"`
Interval int `json:"interval"`
Prompt string `json:"prompt"`
UserCode string `json:"user_code"`
VerificationUri string `json:"verification_uri"`
VerificationUriComplete string `json:"verification_uri_complete"`
}
type EpicErrorResponse ¶
type UserCredentials ¶
type UserCredentials struct {
AccessToken string `json:"access_token"`
AccountID string `json:"account_id"`
ApplicationId string `json:"application_id"`
ClientId string `json:"client_id"`
ExpiresAt time.Time `json:"expires_at"`
ExpiresIn int `json:"expires_in"`
RefreshExpiresAt time.Time `json:"refresh_expires_at"`
RefreshExpiresIn int `json:"refresh_expires_in"`
RefreshToken string `json:"refresh_token"`
Scope string `json:"scope"`
TokenType string `json:"token_type"`
}
Click to show internal directories.
Click to hide internal directories.