api

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commit

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

func (*Commit) GetSHA

func (c *Commit) GetSHA() string

type GitHubAPI

type GitHubAPI interface {
	FetchAllTags(ctx context.Context, owner, repo string) ([]Tag, error)
	FetchRepository(ctx context.Context, owner, repo string) (*Repository, error)
}

GitHubAPI defines the interface for GitHub API operations.

type RealGitHubAPI

type RealGitHubAPI struct{}

RealGitHubAPI implements GitHubAPI using the actual GitHub API.

func NewRealGitHubAPI

func NewRealGitHubAPI() *RealGitHubAPI

NewRealGitHubAPI creates a new instance of RealGitHubAPI.

func (*RealGitHubAPI) FetchAllTags

func (r *RealGitHubAPI) FetchAllTags(ctx context.Context, owner, repo string) ([]Tag, error)

func (*RealGitHubAPI) FetchRepository added in v1.5.0

func (r *RealGitHubAPI) FetchRepository(ctx context.Context, owner, repo string) (*Repository, error)

type Repository added in v1.5.0

type Repository struct {
	Name          string `json:"name"`
	FullName      string `json:"full_name"`
	DefaultBranch string `json:"default_branch"`
	Private       bool   `json:"private"`
}

Repository represents basic repository information from GitHub API.

func FetchRepository added in v1.5.0

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

type Tag

type Tag struct {
	Name       string `json:"name"`
	ZipballURL string `json:"zipball_url"`
	TarballURL string `json:"tarball_url"`
	Commit     Commit `json:"commit"`
	NodeID     string `json:"node_id"`
}

func FetchAllTags

func FetchAllTags(ctx context.Context, owner, repo string) ([]Tag, error)

func (*Tag) GetName

func (t *Tag) GetName() string

Jump to

Keyboard shortcuts

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