Documentation
¶
Overview ¶
Package copilot provides a client for GitHub Copilot's API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct {
Token string `json:"token"`
ExpiresAt int64 `json:"expires_at"`
Endpoints struct {
API string `json:"api"` // Can change in Github Enterprise instances
OriginTracker string `json:"origin-tracker"`
Proxy string `json:"proxy"`
Telemetry string `json:"telemetry"`
} `json:"endpoints"`
ErrorDetails *struct {
URL string `json:"url,omitempty"`
Message string `json:"message,omitempty"`
Title string `json:"title,omitempty"`
NotificationID string `json:"notification_id,omitempty"`
} `json:"error_details,omitempty"`
}
AccessToken response from GitHub Copilot's token endpoint.
type Client ¶
type Client struct {
AccessToken *AccessToken
// contains filtered or unexported fields
}
Client copilot client.
func (*Client) Auth ¶
func (c *Client) Auth() (AccessToken, error)
Auth authenticates the user and retrieves an access token.
Click to show internal directories.
Click to hide internal directories.