gitjacker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Unlicense Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoPackInfo = fmt.Errorf("pack information (.git/objects/info/packs) is missing")
View Source
var ErrNotVulnerable = fmt.Errorf("no .git directory is available at this URL")

Functions

func New

func New(target *url.URL, outputDir string) *retriever

Types

type Branch

type Branch struct {
	Name   string
	Remote string
}

type Commit

type Commit struct {
	Tree    string
	Parents []string
}

type Config

type Config struct {
	RepositoryName string
	Remotes        []Remote
	Branches       []Branch
	User           User
	GithubToken    GithubToken
}

type GitFileType

type GitFileType string
const (
	GitUnknownFile GitFileType = ""
	GitCommitFile  GitFileType = "commit"
	GitTreeFile    GitFileType = "tree"
	GitBlobFile    GitFileType = "blob"
)

type GithubToken

type GithubToken struct {
	Username string
	Token    string
}

type Remote

type Remote struct {
	Name string
	URL  string
}

type Status

type Status uint
const (
	StatusUnknown Status = iota
	StatusFailure
	StatusPartialSuccess
	StatusSuccess
)

type Summary

type Summary struct {
	PackInformationAvailable bool
	FoundObjects             []string
	MissingObjects           []string
	Status                   Status
	OutputDirectory          string
	Config                   Config
}

type Tree

type Tree struct {
	Objects []string
}

type User

type User struct {
	Name     string
	Email    string
	Username string
}

Jump to

Keyboard shortcuts

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