git

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Request(method, url string) (string, error)
	GetContentFile(branch, file string) (string, error)
	GetRelease(release string) (string, string, error)
	GetTag(tag string) (string, string, error)
	GetBranch(branch string) (string, string, error)
	DownloadFile(file, url string, progress api.Progress) error
	Termination()
}

func GithubClient

func GithubClient(token, repo string) Client

func GitlabClient

func GitlabClient(token, repo string) Client

type Github

type Github struct {
	Token      string
	Repository string
	// contains filtered or unexported fields
}

func (*Github) DownloadFile

func (g *Github) DownloadFile(file, url string, progress api.Progress) error

func (*Github) GetBranch

func (g *Github) GetBranch(branch string) (string, string, error)

func (*Github) GetContentFile

func (g *Github) GetContentFile(branch, file string) (string, error)

func (*Github) GetRelease

func (g *Github) GetRelease(release string) (string, string, error)

func (*Github) GetTag added in v0.0.15

func (g *Github) GetTag(tag string) (string, string, error)

func (*Github) Request

func (g *Github) Request(method, url string) (string, error)

func (*Github) Termination

func (g *Github) Termination()

type Gitlab

type Gitlab struct {
	Token      string
	Repository string
	// contains filtered or unexported fields
}

func (*Gitlab) DownloadFile

func (g *Gitlab) DownloadFile(file, url string, progress api.Progress) error

func (*Gitlab) GetBranch

func (g *Gitlab) GetBranch(branch string) (string, string, error)

func (*Gitlab) GetContentFile

func (g *Gitlab) GetContentFile(branch, file string) (string, error)

func (*Gitlab) GetRelease

func (g *Gitlab) GetRelease(release string) (string, string, error)

func (*Gitlab) GetTag added in v0.0.15

func (g *Gitlab) GetTag(tag string) (string, string, error)

func (*Gitlab) Request

func (g *Gitlab) Request(method, url string) (string, error)

func (*Gitlab) Termination

func (g *Gitlab) Termination()

type WriteCounter added in v0.0.9

type WriteCounter struct {
	Total    int32
	Current  int32
	Progress api.Progress
}

func (*WriteCounter) Write added in v0.0.9

func (wc *WriteCounter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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