github

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildReleaseAssetURL

func BuildReleaseAssetURL(owner, repo, version, fileName string) string

func IsNotFound

func IsNotFound(err error) bool

Types

type APIError

type APIError struct {
	StatusCode int
	Message    string
}

func (APIError) Error

func (e APIError) Error() string

type Client

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

func NewClient

func NewClient() *Client

func (*Client) AssetExistByUrl

func (c *Client) AssetExistByUrl(ctx context.Context, assetURL string) (bool, error)

func (*Client) LatestRelease

func (c *Client) LatestRelease(ctx context.Context, owner, repo string) (Release, error)

func (*Client) ReleaseByTag

func (c *Client) ReleaseByTag(ctx context.Context, owner, repo, tag string) (Release, error)

func (*Client) Repository

func (c *Client) Repository(ctx context.Context, owner, repo string) (Repository, error)

type License

type License struct {
	SPDXID string `json:"spdx_id"`
	Name   string `json:"name"`
}

type ReleasAssets

type ReleasAssets struct {
	Name string `json:"name"`
	URL  string `json:"browser_download_url"`
}

type Release

type Release struct {
	TagName string         `json:"tag_name"`
	Assets  []ReleasAssets `json:"assets"`
}

type RepoOwner

type RepoOwner struct {
	Login string `json:"login"`
}

type Repository

type Repository struct {
	Name        string    `json:"name"`
	Description string    `json:"description"`
	License     License   `json:"license"`
	Owner       RepoOwner `json:"owner"`
}

Jump to

Keyboard shortcuts

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