forge

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Name        string
	DownloadURL string
	Version     string // Release.Name
}

func LatestRelease

func LatestRelease(f Forger, override string) (Asset, error)

func TagRelease

func TagRelease(f Forger, tag, override string) (Asset, error)

type Forger

type Forger interface {
	Name() string
	// contains filtered or unexported methods
}

type GitHub

type GitHub struct {
	Owner string
	Repo  string
}

func NewGitHub

func NewGitHub(uri string) (GitHub, error)

func (GitHub) Name

func (g GitHub) Name() string

type GitHubRelease

type GitHubRelease struct {
	TagName string `json:"tag_name"`
	Assets  []struct {
		Name               string `json:"name"`
		BrowserDownloadURL string `json:"browser_download_url"`
	} `json:"assets"`
}

type Gitea

type Gitea struct {
	BaseURL string
	Owner   string
	Repo    string
}

func NewGitea

func NewGitea(uri string) (Gitea, error)

func (Gitea) Name

func (g Gitea) Name() string

type GiteaRelease

type GiteaRelease struct {
	TagName string `json:"tag_name"`
	Assets  []struct {
		Name               string `json:"name"`
		BrowserDownloadURL string `json:"browser_download_url"`
	} `json:"assets"`
}

type Release

type Release struct {
	Name   string
	Assets []Asset
}

Jump to

Keyboard shortcuts

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