release

package
v1.50.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package release contains methods that interact with releases from VCS providers that do not exist natively in git. For example, Github Releases.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(ctx context.Context, token cfg.SecretData, opts *FetchOptions) (io.ReadCloser, string, int64, error)

Fetch fetches a release from a VCS provider and returns an asset from it as an io.ReadCloser. This must be closed to close the underlying HTTP request.

func GetReleaseNotes

func GetReleaseNotes(ctx context.Context, token cfg.SecretData, opts *GetReleaseNoteOptions) (string, error)

GetReleaseNotes fetches the release notes of a release from a VCS provider.

Types

type FetchOptions

type FetchOptions struct {
	// RepoURL is the repository URL, it should be a valid
	// URL.
	RepoURL string

	// Tag is the tag of the release
	Tag string

	// AssetName is the name of the asset to fetch
	AssetName string

	// AssetNames is a list of asset names to fetch, the first
	// asset that matches will be returned.
	AssetNames []string
}

FetchOptions is a set of options for Fetch

type GetReleaseNoteOptions

type GetReleaseNoteOptions struct {
	// RepoURL is the repository URL, it should be a valid
	// URL.
	RepoURL string

	// Tag is the tag of the release
	Tag string
}

GetReleaseNoteOptions is a set of options for GetReleaseNotes

Jump to

Keyboard shortcuts

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