Documentation
¶
Overview ¶
Package github provides functionality for interacting with GitHub releases and checking for updates to the ephemeral files CLI.
Index ¶
Constants ¶
View Source
const ( // DefaultEndpoint is the default GitHub API endpoint. DefaultEndpoint = "https://api.github.com" // DefaultAPIRequestTimeout is the default timeout for GitHub API requests. DefaultAPIRequestTimeout = 5 * time.Second )
Variables ¶
View Source
var ( // ErrGettingLatestRelease is returned when failing to fetch the latest release from GitHub. ErrGettingLatestRelease = errors.New("error getting latest release") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a GitHub API client for fetching release information.
func NewClient ¶
func NewClient() *Client
NewClient creates a new GitHub API client with default settings.
func (*Client) GetLastVersionFromGithub ¶
GetLastVersionFromGithub gets the last version from github.
func (*Client) SetEndpoint ¶
SetEndpoint sets the GitHub API endpoint for the client.
func (*Client) SetHTTPClient ¶
SetHTTPClient sets the HTTP client for the GitHub client.
type ResponseLatestRelease ¶
type ResponseLatestRelease struct {
TagName string `json:"tag_name"`
}
ResponseLatestRelease represents the response from GitHub's latest release API.
Click to show internal directories.
Click to hide internal directories.