lib

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigPath added in v0.2.0

func ConfigPath(args []string)

ConfigPath sets the download path in the configuration and logs the action.

func ConfigToken added in v0.2.0

func ConfigToken(args []string)

ConfigToken sets the GitHub token in the configuration and logs the action.

func DownloadFile

func DownloadFile(filePath string, url string) error

DownloadFile downloads a file from a given URL and saves it to the specified filepath.

func DumpOrganizationRepositories

func DumpOrganizationRepositories(args []string) error

DumpOrganizationRepositories downloads the zipballs of all repositories in an organization.

func DumpPrivateRepositories

func DumpPrivateRepositories(args []string) error

DumpPrivateRepositories downloads the zipballs of all private repositories for the authenticated user.

func DumpPublicRepositories

func DumpPublicRepositories(args []string)

DumpPublicRepositories downloads the zipballs of all public repositories for a GitHub user.

func GetOrganizationRepository

func GetOrganizationRepository(args []string) error

GetOrganizationRepository downloads the zipball of a specific repository in an organization.

func GetPrivateRepository

func GetPrivateRepository(args []string) error

GetPrivateRepository downloads the zipball of a specific private repository.

func GetPublicRepository

func GetPublicRepository(args []string)

GetPublicRepository downloads the zipball of a specific public repository for a GitHub user.

func GitLogin

func GitLogin() (context.Context, *github.Client)

GitLogin authenticates with GitHub using the provided token. It returns a context and a GitHub client.

func ListOrganizationRepositories

func ListOrganizationRepositories(args []string) error

ListOrganizationRepositories fetches and logs a list of repositories for a GitHub organization.

func ListOrganizations

func ListOrganizations(args []string) error

ListOrganizations fetches and logs a list of GitHub organizations.

func ListPrivateRepositories

func ListPrivateRepositories() error

ListPrivateRepositories fetches and logs a list of private repositories for the authenticated user.

func ListPublicRepositories

func ListPublicRepositories(args []string)

ListPublicRepositories fetches and logs a list of public repositories for a GitHub user.

func MakeDir

func MakeDir(entity string) (string, error)

MakeDir creates a directory with the specified entity name and today's date as the subdirectory.

Types

type ApiResult

type ApiResult struct {
	Name string `json:"name"`
	Url  string `json:"svn_url"`
}

ApiResult represents the structure of the API response.

Jump to

Keyboard shortcuts

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