repo

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2016 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRepoNameFromUrl

func GetRepoNameFromUrl(url string) string

Types

type FileEntry

type FileEntry struct {
	Blob string
	Path string
	Size int64
}

type GitRepo

type GitRepo struct {
	Organization string
	Project      string
	Repository   string
	Path         string

	Debug bool
	// contains filtered or unexported fields
}

func NewGitRepo

func NewGitRepo(organization string, projectName string, repoName string, repoPath string, debug bool) (*GitRepo, error)

func (*GitRepo) DetectBlobContentType

func (r *GitRepo) DetectBlobContentType(blob string) (string, []byte, error)

func (*GitRepo) FetchAll

func (r *GitRepo) FetchAll() error

func (*GitRepo) FilterBlob

func (r *GitRepo) FilterBlob(blobId string, filter func(line string) bool, before int, after int) []util.TextPreview

func (*GitRepo) GetBlobContent

func (r *GitRepo) GetBlobContent(blob string) ([]byte, error)

func (*GitRepo) GetBlobSize

func (r *GitRepo) GetBlobSize(blob string) (int64, error)

func (*GitRepo) GetBranchCommitID

func (r *GitRepo) GetBranchCommitID(name string) (string, error)

func (*GitRepo) GetBranches

func (r *GitRepo) GetBranches() ([]string, error)

func (*GitRepo) GetDiffEntriesIterator

func (r *GitRepo) GetDiffEntriesIterator(from string, to string, callback func(fileEntry FileEntry, status string)) error

func (*GitRepo) GetDiffList

func (r *GitRepo) GetDiffList(from string, to string) ([]FileEntry, []FileEntry, error)

func (*GitRepo) GetFileEntries

func (r *GitRepo) GetFileEntries(commitId string) ([]FileEntry, error)

func (*GitRepo) GetFileEntriesIterator

func (r *GitRepo) GetFileEntriesIterator(commitId string, callback func(fileEntry FileEntry)) error

type GitRepoReader

type GitRepoReader struct {
	GitDataDir string
	Debug      bool
}

func NewGitRepoReader

func NewGitRepoReader(config config.Config) *GitRepoReader

func (*GitRepoReader) CloneGitRepo

func (r *GitRepoReader) CloneGitRepo(organization string, project string, url string) (*GitRepo, error)

func (*GitRepoReader) GetGitRepo

func (r *GitRepoReader) GetGitRepo(organization string, project string, repoName string) (*GitRepo, error)

type Source

type Source struct {
	Offset  int    `json:"offset"`
	Preview string `json:"preview"`
	Hits    []int  `json:"hits"`
}

Jump to

Keyboard shortcuts

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