api

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitHubAPIName      = "GitHub"
	GitHubAPIProto     = "https"
	GitHubAPIHost      = "api.github.com"
	GitHubAPIReposPath = "repos"
	GitHubAPITagsPath  = "tags"
)
View Source
const (
	ErrOwner = "owner's name contains forbidden symbols"
	ErrPath  = "repository's path contains forbidden symbols"
)
View Source
const (
	ForbiddenChars = `/\`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func GitHubAPI

func GitHubAPI() *API

type Commit

type Commit struct {
	SHA string `json:"sha"`
	URL string `json:"url"`
}

type Repository

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

Repository object.

func NewRepository

func NewRepository(owner string, repository string) (r *Repository, err error)

NewRepository creates an object of Repository type. Supported APIs can be found in the GitHub's file.

func (*Repository) ListCleanVersions

func (r *Repository) ListCleanVersions() (versions []*ver.Version, err error)

func (*Repository) ListTags

func (r *Repository) ListTags() (tags []*Tag, err error)

func (*Repository) ListVersions

func (r *Repository) ListVersions() (versions []*ver.Version, err error)

type Tag

type Tag struct {
	Name       string  `json:"name"`
	Commit     *Commit `json:"commit"`
	ZipBallURL string  `json:"zipball_url"`
	TarBallURL string  `json:"tarball_url"`
	NodeId     string  `json:"node_id"`

	Version    *ver.Version `json:"-"`
	HasVersion bool         `json:"-"`
}

func ParseTags

func ParseTags(data []byte) (tags []*Tag, err error)

Jump to

Keyboard shortcuts

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