git

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MPL-2.0 Imports: 13 Imported by: 1

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 func(int32, int32)) 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 func(int32, int32)) 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

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 func(int32, int32)) 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

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

type WriteCounter struct {
	Total    int32
	Current  int32
	Progress func(int32, int32)
}

func (*WriteCounter) Write

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