gite

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTreeFileOid

func GetTreeFileOid(repo *git.Repository, path string) (oid *git.Oid, err error)

GetTreeFileOid returns the OID of the Tree File

func WriteTarArchiveFromRepository

func WriteTarArchiveFromRepository(repo *git.Repository, archivePath string) (err error)

WriteTarArchiveFromRepository because yes

func WriteZipArchiveFromRepository

func WriteZipArchiveFromRepository(repo *git.Repository, archivePath string) (err error)

WriteZipArchiveFromRepository as said

Types

type TreeEntry

type TreeEntry struct {
	Path     string
	IsDir    bool
	IsParent bool
	Oid      *git.Oid
}

A TreeEntry represents a file of a git repository.

type TreeFiles

type TreeFiles struct {
	ID           string
	Path         string
	Content      string
	ContentB     []byte
	ContentH     gotemplate.HTML
	Size         int64 // bytes
	OverSize     bool
	IsBinary     bool
	OverPageSize bool
	MimeType     string
	LineNos      gotemplate.HTML
}

TreeFiles struct to get root tree without depth and contents

func GetTreeFileNoLimit

func GetTreeFileNoLimit(repo *git.Repository, path string) (treeFile TreeFiles, err error)

GetTreeFileNoLimit yeah

func GetWalkTreeWithContent

func GetWalkTreeWithContent(repo *git.Repository, path string) (finalEntries []TreeFiles, err error)

GetWalkTreeWithContent TreeFiles.Content will be nil if size is too big

Jump to

Keyboard shortcuts

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