v1

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: Apache-2.0 Imports: 12 Imported by: 2 modules, 1 package

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

This section is empty.

Variables

This section is empty.

Functions

func IsHostGitHub

func IsHostGitHub(host string) bool

Types

type GitHubURL

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

func NewGitHubParser

func NewGitHubParser() *GitHubURL

NewGitHubParser empty instance of a github parser

func NewGitHubParserWithURL

func NewGitHubParserWithURL(fullURL string) (*GitHubURL, error)

NewGitHubParserWithURL parsed instance of a github parser

func (*GitHubURL) DownloadAllFiles

func (gh *GitHubURL) DownloadAllFiles() (map[string][]byte, map[string]error)

DownloadAllFiles download files from git repo tree return map of (url:file, url:error)

func (*GitHubURL) DownloadFilesWithExtension

func (gh *GitHubURL) DownloadFilesWithExtension(filesExtensions []string) (map[string][]byte, map[string]error)

DownloadFilesWithExtension download files from git repo tree based on file extension return map of (url:file, url:error)

func (*GitHubURL) GetBranchName

func (gh *GitHubURL) GetBranchName() string

func (*GitHubURL) GetHostName

func (gh *GitHubURL) GetHostName() string

func (*GitHubURL) GetHttpCloneURL

func (gh *GitHubURL) GetHttpCloneURL() string

func (*GitHubURL) GetLatestCommit

func (gh *GitHubURL) GetLatestCommit() (*apis.Commit, error)

ListAll list all directories and files in url tree

func (*GitHubURL) GetOwnerName

func (gh *GitHubURL) GetOwnerName() string

func (*GitHubURL) GetPath

func (gh *GitHubURL) GetPath() string

func (*GitHubURL) GetProvider

func (gh *GitHubURL) GetProvider() string

func (*GitHubURL) GetRepoName

func (gh *GitHubURL) GetRepoName() string

func (*GitHubURL) GetToken

func (gh *GitHubURL) GetToken() string

func (*GitHubURL) GetTree

func (gh *GitHubURL) GetTree() (*githubapi.Tree, error)

ListAll list all directories and files in url tree

func (*GitHubURL) GetURL

func (gh *GitHubURL) GetURL() *url.URL

func (*GitHubURL) ListAllNames

func (gh *GitHubURL) ListAllNames() ([]string, error)

ListAllNames list all directories and files in url tree

func (*GitHubURL) ListDirsNames

func (gh *GitHubURL) ListDirsNames() ([]string, error)

ListDirsNames list all directories in url tree

func (*GitHubURL) ListFilesNames

func (gh *GitHubURL) ListFilesNames() ([]string, error)

ListAll list all files in url tree

func (*GitHubURL) ListFilesNamesWithExtension

func (gh *GitHubURL) ListFilesNamesWithExtension(filesExtensions []string) ([]string, error)

ListFilesNamesWithExtension list all files in path with the desired extension

func (*GitHubURL) Parse

func (gh *GitHubURL) Parse(fullURL string) error

Parse URL

func (*GitHubURL) SetBranchName

func (gh *GitHubURL) SetBranchName(branch string)

func (*GitHubURL) SetDefaultBranchName

func (gh *GitHubURL) SetDefaultBranchName() error

Set the default brach of the repo

func (*GitHubURL) SetOwnerName

func (gh *GitHubURL) SetOwnerName(o string)

func (*GitHubURL) SetPath

func (gh *GitHubURL) SetPath(p string)

func (*GitHubURL) SetRepoName

func (gh *GitHubURL) SetRepoName(r string)

func (*GitHubURL) SetToken

func (gh *GitHubURL) SetToken(token string)

Jump to

Keyboard shortcuts

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