Documentation ¶
Overview ¶
Package client contains the client implementations for several providers.
Index ¶
- Constants
- Variables
- func IsNotImplementedErr(err error) bool
- type Client
- func New(ctx *context.Context) (Client, error)
- func NewGitHub(ctx *context.Context, token string) (Client, error)
- func NewGitLab(ctx *context.Context, token string) (Client, error)
- func NewGitea(ctx *context.Context, token string) (Client, error)
- func NewWithToken(ctx *context.Context, token string) (Client, error)
- type ErrNoMilestoneFound
- type Info
- type NotImplementedError
- type Repo
- type RetriableError
Constants ¶
View Source
const DefaultGitHubDownloadURL = "https://github.com"
View Source
const DefaultGitLabDownloadURL = "https://gitlab.com"
Variables ¶
View Source
var ErrExtractHashFromFileUploadURL = errors.New("could not extract hash from gitlab file upload url")
ErrExtractHashFromFileUploadURL indicates the file upload hash could not ne extracted from the url.
Functions ¶
func IsNotImplementedErr ¶ added in v0.139.0
IsNotImplementedErr returns true if given error is a NotImplementedError.
Types ¶
type Client ¶
type Client interface { CloseMilestone(ctx *context.Context, repo Repo, title string) (err error) CreateRelease(ctx *context.Context, body string) (releaseID string, err error) ReleaseURLTemplate(ctx *context.Context) (string, error) CreateFile(ctx *context.Context, commitAuthor config.CommitAuthor, repo Repo, content []byte, path, message string) (err error) Upload(ctx *context.Context, releaseID string, artifact *artifact.Artifact, file *os.File) (err error) }
Client interface.
type ErrNoMilestoneFound ¶ added in v0.140.0
type ErrNoMilestoneFound struct {
Title string
}
ErrNoMilestoneFound is an error when no milestone is found.
func (ErrNoMilestoneFound) Error ¶ added in v0.140.0
func (e ErrNoMilestoneFound) Error() string
type NotImplementedError ¶ added in v0.139.0
NotImplementedError happens when trying to use something a client does not implement.
func (NotImplementedError) Error ¶ added in v0.139.0
func (e NotImplementedError) Error() string
type Repo ¶ added in v0.139.0
func RepoFromRef ¶ added in v0.139.0
type RetriableError ¶ added in v0.130.0
type RetriableError struct {
Err error
}
RetriableError is an error that will cause the action to be retried.
func (RetriableError) Error ¶ added in v0.130.0
func (e RetriableError) Error() string
Click to show internal directories.
Click to hide internal directories.