common

package
v0.0.0-...-2ad2f98 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActualWindowLengthKey = SearchContextKey("actualWindowLengthKey")
	CommitToIdxKey        = SearchContextKey("commitToIdxKey")
	FirstCommitIDKey      = SearchContextKey("firstCommitIDKey")
	FirstTileIDKey        = SearchContextKey("firstTileIDKey")
	LastTileIDKey         = SearchContextKey("lastTileIDKey")
	QualifiedCLIDKey      = SearchContextKey("qualifiedCLIDKey")
	QualifiedPSIDKey      = SearchContextKey("qualifiedPSIDKey")
	QueryKey              = SearchContextKey("queryKey")
)

Variables

This section is empty.

Functions

func AddCommitsData

func AddCommitsData(ctx context.Context, db *pgxpool.Pool, windowLength int) (context.Context, error)

addCommitsData finds the current sliding window of data (The last N commits) and adds the derived data to the given context and returns it.

func GetActualWindowLength

func GetActualWindowLength(ctx context.Context) int

func GetCommitToIdxMap

func GetCommitToIdxMap(ctx context.Context) map[schema.CommitID]int

func GetFirstCommitID

func GetFirstCommitID(ctx context.Context) schema.CommitID

func GetFirstTileID

func GetFirstTileID(ctx context.Context) schema.TileID

func GetLastTileID

func GetLastTileID(ctx context.Context) schema.TileID

func GetQualifiedCL

func GetQualifiedCL(ctx context.Context) string

func GetQualifiedPS

func GetQualifiedPS(ctx context.Context) string

func GetQuery

func GetQuery(ctx context.Context) query.Search

Types

type SearchContextKey

type SearchContextKey string

To avoid piping a lot of info about the commits in the most recent window through all the functions in the search pipeline, we attach them as values to the context.

Jump to

Keyboard shortcuts

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