Help us shape the future of Go! Take the 2026 Go Developer Survey

gitea

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package gitea provides a release.Provider implementation for Gitea and Forgejo instances, including Codeberg (codeberg.org).

Index

Constants

View Source
const (

	// CodebergHost is the base URL for Codeberg, the public Forgejo instance.
	CodebergHost = "https://codeberg.org"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GiteaReleaseProvider

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

GiteaReleaseProvider implements release.Provider for Gitea/Forgejo/Codeberg.

func NewReleaseProvider

func NewReleaseProvider(src release.ReleaseSourceConfig, cfg config.Containable, tokenFallbackEnv string) (*GiteaReleaseProvider, error)

NewReleaseProvider constructs a GiteaReleaseProvider.

The host is resolved in order:

  1. cfg key "url.api" (allows runtime override)
  2. src.Host

tokenFallbackEnv is the well-known environment variable for this instance type (e.g. GITEA_TOKEN or CODEBERG_TOKEN).

func (*GiteaReleaseProvider) DownloadReleaseAsset

func (p *GiteaReleaseProvider) DownloadReleaseAsset(ctx context.Context, _, _ string, asset release.ReleaseAsset) (io.ReadCloser, string, error)

func (*GiteaReleaseProvider) GetLatestRelease

func (p *GiteaReleaseProvider) GetLatestRelease(ctx context.Context, owner, repo string) (release.Release, error)

func (*GiteaReleaseProvider) GetReleaseByTag

func (p *GiteaReleaseProvider) GetReleaseByTag(ctx context.Context, owner, repo, tag string) (release.Release, error)

func (*GiteaReleaseProvider) ListReleases

func (p *GiteaReleaseProvider) ListReleases(ctx context.Context, owner, repo string, limit int) ([]release.Release, error)

Jump to

Keyboard shortcuts

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