github

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultEndpoint is the default GitHub API endpoint.
	DefaultEndpoint          = "https://api.github.com"
	DefaultAPIRequestTimeout = 5 * time.Second
)

Variables

View Source
var (
	ErrGettingLatestRelease = errors.New("error getting latest release")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) GetLastVersionFromGithub

func (s *Client) GetLastVersionFromGithub(repository string) (string, error)

GetLastVersionFromGithub gets the last version from github.

func (*Client) SetEndpoint

func (s *Client) SetEndpoint(endpoint string)

func (*Client) SetHTTPClient

func (s *Client) SetHTTPClient(client *http.Client)

type ResponseLatestRelease

type ResponseLatestRelease struct {
	TagName string `json:"tag_name"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL