2017-05-13 18:09:42 -03:00
|
|
|
// Package client contains the client implementations for several providers.
|
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
|
|
|
"bytes"
|
|
|
|
"os"
|
|
|
|
|
2018-02-09 13:35:51 +00:00
|
|
|
"github.com/goreleaser/goreleaser/config"
|
2017-05-13 18:09:42 -03:00
|
|
|
"github.com/goreleaser/goreleaser/context"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Info of the repository
|
|
|
|
type Info struct {
|
|
|
|
Description string
|
|
|
|
Homepage string
|
|
|
|
URL string
|
|
|
|
}
|
|
|
|
|
|
|
|
// Client interface
|
|
|
|
type Client interface {
|
2018-01-26 09:36:55 -02:00
|
|
|
CreateRelease(ctx *context.Context, body string) (releaseID int64, err error)
|
2018-02-09 13:35:51 +00:00
|
|
|
CreateFile(ctx *context.Context, commitAuthor config.CommitAuthor, repo config.Repo, content bytes.Buffer, path string) (err error)
|
2018-01-26 09:36:55 -02:00
|
|
|
Upload(ctx *context.Context, releaseID int64, name string, file *os.File) (err error)
|
2017-05-13 18:09:42 -03:00
|
|
|
}
|