client

package
v0.119.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package client contains the client implementations for several providers.

Index

Constants

This section is empty.

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

This section is empty.

Types

type Client

type Client interface {
	CreateRelease(ctx *context.Context, body string) (releaseID string, err error)
	CreateFile(ctx *context.Context, commitAuthor config.CommitAuthor, repo config.Repo, content []byte, path, message string) (err error)
	Upload(ctx *context.Context, releaseID string, artifact *artifact.Artifact, file *os.File) (err error)
}

Client interface

func New added in v0.112.0

func New(ctx *context.Context) (Client, error)

New creates a new client depending on the token type

func NewGitHub

func NewGitHub(ctx *context.Context) (Client, error)

NewGitHub returns a github client implementation

func NewGitLab added in v0.112.0

func NewGitLab(ctx *context.Context) (Client, error)

NewGitLab returns a gitlab client implementation

func NewGitea added in v0.117.0

func NewGitea(ctx *context.Context) (Client, error)

NewGitea returns a gitea client implementation

type Info

type Info struct {
	Description string
	Homepage    string
	URL         string
}

Info of the repository

Jump to

Keyboard shortcuts

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