github

package
v0.0.0-...-ed8688b Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 License: GPL-3.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const RepoMaxSize int = 1024 * 1024 // unit: KB

Variables

View Source
var CurrentRepo string = "1"

Functions

This section is empty.

Types

type GitHubClient

type GitHubClient struct {
	// contains filtered or unexported fields
}

func NewGithubClient

func NewGithubClient(config GithubConfig) *GitHubClient

func (*GitHubClient) ClearRepo

func (g *GitHubClient) ClearRepo(repo *github.Repository) error

func (*GitHubClient) DeleteFile

func (g *GitHubClient) DeleteFile(repo *github.Repository, fileName string) error

func (*GitHubClient) GetAvaliabelRepo

func (g *GitHubClient) GetAvaliabelRepo(config GithubConfig) *github.Repository

func (*GitHubClient) GetRepoBranchSize

func (g *GitHubClient) GetRepoBranchSize(repo *github.Repository, branch string) int

返回分支大小,如果分支不存在,则创建分支

func (*GitHubClient) GetRepoFileList

func (g *GitHubClient) GetRepoFileList(repo *github.Repository) []*github.RepositoryContent

func (*GitHubClient) SaveToRepo

func (g *GitHubClient) SaveToRepo(config GithubConfig, filepath string, repo *github.Repository) string

type GithubConfig

type GithubConfig struct {
	Token       string
	DataGroup   string
	DataBranch  string
	CommitEmail string
	CommitName  string
}

Jump to

Keyboard shortcuts

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