gcse: github.com/daviddengcn/gcse/store Index | Files

package store

import "github.com/daviddengcn/gcse/store"

Package store handlings all the storage in GCSE backend.

Index

Package Files

history.go repo.go store.go

func AppendPackageEvent Uses

func AppendPackageEvent(site, path, foundWay string, t time.Time, a gpb.HistoryEvent_Action_Enum) error

func DeletePackage Uses

func DeletePackage(site, path string) error

func DeletePackageHistory Uses

func DeletePackageHistory(site, path string) error

func DeletePerson Uses

func DeletePerson(site, id string) error

func DeletePersonHistory Uses

func DeletePersonHistory(site, path string) error

func DeleteRepository Uses

func DeleteRepository(site, user, repo string) error

func ForEachPackageOfSite Uses

func ForEachPackageOfSite(site string, f func(string, *gpb.PackageInfo) error) error

func ForEachPackageSite Uses

func ForEachPackageSite(f func(string) error) error

Returns all the sites one by one by calling the provided func.

func ForEachRepositoryOfSite Uses

func ForEachRepositoryOfSite(site string, f func(user, name string, doc *gpb.Repository) error) error

func ForEachRepositorySite Uses

func ForEachRepositorySite(f func(string) error) error

func ReadPackage Uses

func ReadPackage(site, path string) (*gpb.PackageInfo, error)

Returns an empty (non-nil) PackageInfo if not found.

func ReadPackageHistory Uses

func ReadPackageHistory(site, path string) (*gpb.HistoryInfo, error)

func ReadPackageHistoryOf Uses

func ReadPackageHistoryOf(box *bh.RefCountBox, site, path string) (*gpb.HistoryInfo, error)

func ReadPerson Uses

func ReadPerson(site, id string) (*gpb.PersonInfo, error)

func ReadPersonHistory Uses

func ReadPersonHistory(site, path string) (*gpb.HistoryInfo, error)

func ReadRepository Uses

func ReadRepository(site, user, repo string) (*gpb.Repository, error)

Returns an empty (non-nil) PackageInfo if not found.

func RepoInfoAge Uses

func RepoInfoAge(r *gpb.RepoInfo) time.Duration

func SaveSnapshot Uses

func SaveSnapshot(path string) error

func UpdatePackage Uses

func UpdatePackage(site, path string, f func(*gpb.PackageInfo) error) error

func UpdatePackageHistory Uses

func UpdatePackageHistory(site, path string, f func(*gpb.HistoryInfo) error) error

func UpdatePerson Uses

func UpdatePerson(site, id string, f func(*gpb.PersonInfo) error) error

func UpdatePersonHistory Uses

func UpdatePersonHistory(site, path string, f func(*gpb.HistoryInfo) error) error

func UpdateRepository Uses

func UpdateRepository(site, user, repo string, f func(doc *gpb.Repository) error) error

Package store imports 9 packages (graph) and is imported by 3 packages. Updated 2018-05-30. Refresh now. Tools for package owners.