github

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assets

type Assets struct {
	DownloadURL string `json:"browser_download_url"`
	Name        string `json:"name"`
}

type Client

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

Client GitHub API 客户端

func NewGitHubClient

func NewGitHubClient(token string) *Client

NewGitHubClient 创建新的 GitHub 客户端

func (*Client) GetAllReleases

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

type Github

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

func NewGithub

func NewGithub(name, dsn string) (*Github, error)

func (*Github) GetDefaultVersion

func (g *Github) GetDefaultVersion(ctx context.Context) *core.InstalledVersion

func (*Github) Install

func (g *Github) Install(ctx context.Context, remoteVersion *core.RemoteVersion) error

func (*Github) ListInstalledVersions

func (g *Github) ListInstalledVersions(ctx context.Context) ([]*core.InstalledVersion, error)

func (*Github) ListRemoteVersions

func (g *Github) ListRemoteVersions(ctx context.Context) ([]*core.RemoteVersion, error)

func (*Github) Name

func (g *Github) Name() string

func (*Github) SetDefaultVersion

func (g *Github) SetDefaultVersion(ctx context.Context, version string) error

func (*Github) Uninstall

func (g *Github) Uninstall(ctx context.Context, version string) error

type Release

type Release struct {
	Name       string    `json:"name"`
	Prerelease bool      `json:"prerelease"`
	Assets     *[]Assets `json:"assets"`
}

Source Files

  • client.go
  • github.go

Jump to

Keyboard shortcuts

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