github

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareForGetJCLIAsset

func PrepareForGetJCLIAsset(ver string) (client *github.Client, teardown func())

PrepareForGetJCLIAsset only for test

func PrepareForGetLatestJCLIAsset

func PrepareForGetLatestJCLIAsset() (client *github.Client, teardown func())

PrepareForGetLatestJCLIAsset only for test

func PrepareForGetLatestReleaseAsset

func PrepareForGetLatestReleaseAsset() (client *github.Client, teardown func())

PrepareForGetLatestReleaseAsset only for test

func PrepareForGetReleaseAssetByTagName

func PrepareForGetReleaseAssetByTagName() (client *github.Client, teardown func())

PrepareForGetReleaseAssetByTagName only for test

Types

type Release added in v0.0.14

type Release struct {
	TagName string
	ID      int64
}

Release represents a GitHub release

type ReleaseAsset

type ReleaseAsset struct {
	TagName string
	Body    string
}

ReleaseAsset is the asset from GitHub release

type ReleaseClient

type ReleaseClient struct {
	Client *github.Client
	Org    string
	Repo   string
}

ReleaseClient is the client of GitHub

func (*ReleaseClient) GetJCLIAsset

func (g *ReleaseClient) GetJCLIAsset(tagName string) (*ReleaseAsset, error)

GetJCLIAsset returns the asset from a tag name

func (*ReleaseClient) GetLatestReleaseAsset

func (g *ReleaseClient) GetLatestReleaseAsset(owner, repo string) (ra *ReleaseAsset, err error)

GetLatestReleaseAsset returns the latest release asset

func (*ReleaseClient) GetReleaseAssetByTagName

func (g *ReleaseClient) GetReleaseAssetByTagName(owner, repo, tagName string) (ra *ReleaseAsset, err error)

GetReleaseAssetByTagName returns the release asset by tag name

func (*ReleaseClient) GetReleaseList added in v0.0.14

func (g *ReleaseClient) GetReleaseList(owner, repo string, count int) (list []Release, err error)

GetReleaseList returns a list of release

func (*ReleaseClient) GetTagList added in v0.0.14

func (g *ReleaseClient) GetTagList(owner, repo string, count int) (list []Tag, err error)

GetTagList returns a list of tag

func (*ReleaseClient) Init

func (g *ReleaseClient) Init()

Init inits the GitHub client

type Tag added in v0.0.14

type Tag struct {
	Name string
}

Tag represents a tag of a git repository

Jump to

Keyboard shortcuts

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