githubclient

package
v2.0.0-beta.16 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSizeFormat

func GetSizeFormat(size int) string

Types

type Asset

type Asset struct {
	Name, Filename, OS, Arch, URL, Type string
	Size                                int
	CreatedAt                           time.Time
	ChecksumFile                        bool
}

func (Asset) Is32Bit

func (a Asset) Is32Bit() bool

func (Asset) IsArchive

func (a Asset) IsArchive() bool

IsArchive 根据文件扩展名判断是否为归档文件

func (Asset) IsChecksumFile

func (a Asset) IsChecksumFile() bool

func (Asset) IsLinux

func (a Asset) IsLinux() bool

func (Asset) IsMac

func (a Asset) IsMac() bool

func (Asset) IsMacM1

func (a Asset) IsMacM1() bool

func (Asset) IsWindows

func (a Asset) IsWindows() bool

func (Asset) Key

func (a Asset) Key() string

type Assets

type Assets []Asset

func GetAssetList

func GetAssetList(repositoryReleases []*github.RepositoryRelease) Assets

func GetAssets

func GetAssets(repositoryRelease *github.RepositoryRelease) Assets

func (Assets) HasM1

func (as Assets) HasM1() bool

type PublicRelease

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

func NewPublicRelease

func NewPublicRelease(owner, repo string) *PublicRelease

func (PublicRelease) Latest

func (PublicRelease) List

func (g PublicRelease) List(ctx context.Context, pageSize ...int) ([]*github.RepositoryRelease, error)

Jump to

Keyboard shortcuts

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