releases

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateChecksumLines

func CreateChecksumLines(w *workers.Workforce, filenames ...string) ([]string, error)

CreateChecksumLines writes the SHA256 checksums as lowercase hex digits followed by two spaces and then the base of filename and returns a sorted slice.

func UploadAssetsFileWithRetries

func UploadAssetsFileWithRetries(ctx context.Context, client Client, info ReleaseInfo, releaseID int64, openFile func() (*os.File, error)) error

UploadAssetsFileWithRetries is a wrapper around UploadAssetsFile that retries on temporary errors.

func Validate added in v0.8.0

func Validate(typ releasetypes.Type) error

Validate validates the release type.

Types

type Client

type Client interface {
	Release(ctx context.Context, info ReleaseInfo) (int64, error)
	UploadAssetsFile(ctx context.Context, info ReleaseInfo, f *os.File, releaseID int64) error
}

func NewClient

func NewClient(ctx context.Context, typ releasetypes.Type) (Client, error)

type FakeClient

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

Fake client is only used in tests.

func (*FakeClient) Release

func (c *FakeClient) Release(ctx context.Context, info ReleaseInfo) (int64, error)

func (*FakeClient) UploadAssetsFile

func (c *FakeClient) UploadAssetsFile(ctx context.Context, info ReleaseInfo, f *os.File, releaseID int64) error

type GitHubClient

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

func (*GitHubClient) Release

func (c *GitHubClient) Release(ctx context.Context, info ReleaseInfo) (int64, error)

func (*GitHubClient) ResolveUsername added in v0.9.0

func (c *GitHubClient) ResolveUsername(ctx context.Context, sha, author string, info ReleaseInfo) (string, error)

func (*GitHubClient) UploadAssetsFile

func (c *GitHubClient) UploadAssetsFile(ctx context.Context, info ReleaseInfo, f *os.File, releaseID int64) error

type ReleaseInfo

type ReleaseInfo struct {
	Project   string
	Tag       string
	Commitish string
	Settings  config.ReleaseSettings
}

type TemporaryError

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

type UsernameResolver added in v0.9.0

type UsernameResolver interface {
	ResolveUsername(ctx context.Context, sha, author string, info ReleaseInfo) (string, error)
}

UsernameResolver is an interface that allows to resolve the username of a commit.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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