Documentation
¶
Index ¶
Constants ¶
View Source
const ( SignupURL = "https://github.com/github-copilot/signup?editor=crush" FreeURL = "https://docs.github.com/en/copilot/how-tos/manage-your-account/get-free-access-to-copilot-pro" )
Variables ¶
View Source
var ErrNotAvailable = errors.New("github copilot not available")
Functions ¶
func PollForToken ¶
PollForToken polls GitHub for the access token after user authorization.
func RefreshToken ¶
RefreshToken refreshes the Copilot token using the GitHub token.
func RefreshTokenFromDisk ¶
Types ¶
type DeviceCode ¶
type DeviceCode struct {
DeviceCode string `json:"device_code"`
UserCode string `json:"user_code"`
VerificationURI string `json:"verification_uri"`
ExpiresIn int `json:"expires_in"`
Interval int `json:"interval"`
}
func RequestDeviceCode ¶
func RequestDeviceCode(ctx context.Context) (*DeviceCode, error)
RequestDeviceCode initiates the device code flow with GitHub.
Click to show internal directories.
Click to hide internal directories.