sources

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrGitLogOutOfBounds = errors.New("Requested out-of-bounds git log")

Functions

func BinariesArchivePath

func BinariesArchivePath(
	commitHash string,
	profilingOrDebugging bool,
) (string, error)

Types

type GitLogPerson

type GitLogPerson struct {
	Name  string `json:"name"`
	Email string `json:"email"`
}

type GitLogRecord

type GitLogRecord struct {
	CommitHash       string       `json:"commit"`
	ParentCommitHash string       `json:"parent"`
	Subject          string       `json:"subject"`
	Author           GitLogPerson `json:"author"`
	AuthoredString   string       `json:"authored_date,omitempty"`
	Authored         time.Time    `json:"authored"`
	Committer        GitLogPerson `json:"committer"`
	CommittedString  string       `json:"committed_date,omitempty"`
	Committed        time.Time    `json:"committed"`
}

type PRData

type PRData struct {
	Subject        string `json:"subject"`
	AuthoredString string `json:"authored_date"`
}

type SourcesManager

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

func NewSourcesManager

func NewSourcesManager() *SourcesManager

func (*SourcesManager) CommitExists

func (s *SourcesManager) CommitExists(hash string) bool

func (*SourcesManager) Compile

func (s *SourcesManager) Compile(
	hash string,
	profilingOrDebugging bool,
	progress chan float64,
) error

func (*SourcesManager) CompileIfNeeded

func (s *SourcesManager) CompileIfNeeded(
	hash string,
	profilingOrDebugging bool,
	progress chan float64,
) error

func (*SourcesManager) EnsureSourcesUpdated

func (s *SourcesManager) EnsureSourcesUpdated() error

func (*SourcesManager) FindMostRecentCommitChangingSeeder

func (s *SourcesManager) FindMostRecentCommitChangingSeeder(
	commitHash string,
) (string, error)

FindMostRecentCommitChangingSeeder finds the most recent commit of or before the given commit hash that changes the seeder logic. Used to not have to re- seed the shards with every commit if the seeder logic hasn't changed.

func (*SourcesManager) GetGitLog

func (s *SourcesManager) GetGitLog(
	offset, limit int,
	alwaysIncludeInitial bool,
) ([]GitLogRecord, error)

func (*SourcesManager) MakeCommitArchive

func (s *SourcesManager) MakeCommitArchive(hash string) error

func (*SourcesManager) ReadCommitArchive

func (s *SourcesManager) ReadCommitArchive(hash string) ([]byte, error)

Jump to

Keyboard shortcuts

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