Documentation ¶
Index ¶
- func CreateChecksumLines(w *workers.Workforce, filenames ...string) ([]string, error)
- func UploadAssetsFileWithRetries(ctx context.Context, client Client, info ReleaseInfo, releaseID int64, ...) error
- func Validate(typ releasetypes.Type) error
- type Client
- type FakeClient
- type GitHubClient
- func (c *GitHubClient) Release(ctx context.Context, info ReleaseInfo) (int64, error)
- func (c *GitHubClient) ResolveUsername(ctx context.Context, sha, author string, info ReleaseInfo) (string, error)
- func (c *GitHubClient) UploadAssetsFile(ctx context.Context, info ReleaseInfo, f *os.File, releaseID int64) error
- type ReleaseInfo
- type TemporaryError
- type UsernameResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateChecksumLines ¶
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 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.
Click to show internal directories.
Click to hide internal directories.