cache

package
v1.4.310 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: MIT Imports: 8 Imported by: 0

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(dbPath string) (*Cache, error)

func (*Cache) Clear

func (c *Cache) Clear() error

func (*Cache) Close

func (c *Cache) Close() error

func (*Cache) CommitExists added in v1.4.264

func (c *Cache) CommitExists(hash string) (bool, error)

CommitExists checks if a commit already exists in the cache

func (*Cache) GetAllPRs

func (c *Cache) GetAllPRs() (map[int]*github.PR, error)

GetAllPRs returns all cached PRs

func (*Cache) GetCommitSHAsForPR

func (c *Cache) GetCommitSHAsForPR(prNumber int) ([]string, error)

GetCommitSHAsForPR returns all commit SHAs for a given PR number

func (*Cache) GetLastPRSync

func (c *Cache) GetLastPRSync() (time.Time, error)

GetLastPRSync returns the timestamp of the last PR sync

func (*Cache) GetLastProcessedTag

func (c *Cache) GetLastProcessedTag() (string, error)

func (*Cache) GetPR

func (c *Cache) GetPR(number int) (*github.PR, error)

func (*Cache) GetPRNumberBySHA

func (c *Cache) GetPRNumberBySHA(sha string) (int, bool)

GetPRNumberBySHA returns the PR number for a given commit SHA

func (*Cache) GetUnreleasedContentHash

func (c *Cache) GetUnreleasedContentHash() (string, error)

GetUnreleasedContentHash returns the cached content hash for Unreleased

func (*Cache) GetVersions

func (c *Cache) GetVersions() (map[string]*git.Version, error)

func (*Cache) IsPRMarkedAsNonExistent

func (c *Cache) IsPRMarkedAsNonExistent(prNumber int) bool

IsPRMarkedAsNonExistent checks if a PR is marked as non-existent

func (*Cache) MarkPRAsNonExistent

func (c *Cache) MarkPRAsNonExistent(prNumber int) error

MarkPRAsNonExistent marks a PR number as non-existent to avoid future fetches

func (*Cache) SaveCommit

func (c *Cache) SaveCommit(commit *git.Commit, version string) error

func (*Cache) SaveCommitPRMappings

func (c *Cache) SaveCommitPRMappings(prs []*github.PR) error

SaveCommitPRMappings saves SHA→PR mappings for all commits in PRs

func (*Cache) SavePR

func (c *Cache) SavePR(pr *github.PR) error

func (*Cache) SavePRBatch

func (c *Cache) SavePRBatch(prs []*github.PR) error

SavePRBatch saves multiple PRs in a single transaction for better performance

func (*Cache) SaveVersion

func (c *Cache) SaveVersion(v *git.Version) error

func (*Cache) SetLastPRSync

func (c *Cache) SetLastPRSync(timestamp time.Time) error

SetLastPRSync updates the timestamp of the last PR sync

func (*Cache) SetLastProcessedTag

func (c *Cache) SetLastProcessedTag(tag string) error

func (*Cache) SetUnreleasedContentHash

func (c *Cache) SetUnreleasedContentHash(hash string) error

SetUnreleasedContentHash stores the content hash for Unreleased

func (*Cache) UpdateVersionAISummary

func (c *Cache) UpdateVersionAISummary(versionName, aiSummary string) error

UpdateVersionAISummary updates only the AI summary for a specific version

func (*Cache) VersionExists added in v1.4.264

func (c *Cache) VersionExists(version string) (bool, error)

VersionExists checks if a version already exists in the cache

Jump to

Keyboard shortcuts

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