cache

package
v0.0.0-...-b6e965f Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func New

func New() *Cache

func (Cache) GetCompletedEntry

func (c Cache) GetCompletedEntry(repoKey string, index int64) (ItemCacheEntry, bool)

func (Cache) GetCompletedReleaseEntry

func (c Cache) GetCompletedReleaseEntry(repoKey string, index int64) (ReleaseCacheEntry, bool)

func (Cache) GetGiteaPullReviews

func (c Cache) GetGiteaPullReviews(key string) []*gitea.PullReview

func (Cache) GetGiteaUser

func (c Cache) GetGiteaUser(username string) *gitea.User

func (Cache) GetGithubPullRequest

func (c Cache) GetGithubPullRequest(query string) *github.PullRequest

func (Cache) GetGithubSearchResults

func (c Cache) GetGithubSearchResults(query string) *github.IssuesSearchResult

func (Cache) GetGithubUser

func (c Cache) GetGithubUser(username string) *github.User

func (Cache) IsCompleted

func (c Cache) IsCompleted(repoKey string, index int64) bool

func (Cache) IsFailed

func (c Cache) IsFailed(repoKey string, index int64) bool

func (Cache) IsKnownRepo

func (c Cache) IsKnownRepo(repoKey string) bool

func (Cache) IsReleaseCompleted

func (c Cache) IsReleaseCompleted(repoKey string, index int64) bool

func (Cache) IsReleaseFailed

func (c Cache) IsReleaseFailed(repoKey string, index int64) bool

func (Cache) LoadFromFile

func (c Cache) LoadFromFile(path string) error

func (Cache) MarkCompleted

func (c Cache) MarkCompleted(repoKey string, index int64, entry ItemCacheEntry)

func (Cache) MarkFailed

func (c Cache) MarkFailed(repoKey string, index int64)

func (Cache) MarkReleaseCompleted

func (c Cache) MarkReleaseCompleted(repoKey string, index int64, entry ReleaseCacheEntry)

func (Cache) MarkReleaseFailed

func (c Cache) MarkReleaseFailed(repoKey string, index int64)

func (Cache) MarkRepoKnown

func (c Cache) MarkRepoKnown(repoKey string)

func (Cache) PurgeRepo

func (c Cache) PurgeRepo(repoKey string)

func (Cache) SaveToFile

func (c Cache) SaveToFile(path string) error

func (Cache) SetGiteaPullReviews

func (c Cache) SetGiteaPullReviews(key string, reviews []*gitea.PullReview)

func (Cache) SetGiteaUser

func (c Cache) SetGiteaUser(username string, user gitea.User)

func (Cache) SetGithubPullRequest

func (c Cache) SetGithubPullRequest(query string, result github.PullRequest)

func (Cache) SetGithubSearchResults

func (c Cache) SetGithubSearchResults(query string, result github.IssuesSearchResult)

func (Cache) SetGithubUser

func (c Cache) SetGithubUser(username string, user github.User)

type CommentCacheEntry

type CommentCacheEntry struct {
	GiteaHash       string
	GitHubHash      string
	GitHubCommentID int64
}

type ItemCacheEntry

type ItemCacheEntry struct {
	ContentHash    string
	GitHubItemID   int64
	CommentEntries map[int64]CommentCacheEntry
	ReviewEntries  map[int64]ReviewCacheEntry
}

type ReleaseCacheEntry

type ReleaseCacheEntry struct {
	ContentHash     string
	GitHubReleaseID int64
}

type ReviewCacheEntry

type ReviewCacheEntry struct {
	ContentHash     string
	GitHubCommentID int64
}

Jump to

Keyboard shortcuts

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