Documentation ¶
Index ¶
- Constants
- func GetLatestReleaseDate(ctx context.Context, ghClient *github.Client, repo string) (string, error)
- type GlobalStorage
- func (gs *GlobalStorage) Add(date string, s *Storage)
- func (gs *GlobalStorage) AddLatestStorage(ctx context.Context, ghClient *github.Client, dq *net.DownloadQueue, ...) error
- func (gs *GlobalStorage) Get(date string) (*Storage, bool)
- func (gs *GlobalStorage) Load() error
- func (gs *GlobalStorage) Save()
- type Package
- type Storage
Constants ¶
View Source
const CurrentStorageKey = "current"
CurrentStorageKey is used as GlobalStorage key for the current package
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GlobalStorage ¶
type GlobalStorage struct {
// contains filtered or unexported fields
}
GlobalStorage stores all the available storages
func NewGlobalStorage ¶
func NewGlobalStorage(cache *db.DB) *GlobalStorage
NewGlobalStorage creates a new GlobalStorage instance
func (*GlobalStorage) Add ¶
func (gs *GlobalStorage) Add(date string, s *Storage)
Add safely adds a new Storage to the storages
func (*GlobalStorage) AddLatestStorage ¶
func (gs *GlobalStorage) AddLatestStorage(ctx context.Context, ghClient *github.Client, dq *net.DownloadQueue, cfg *viper.Viper) error
AddLatestStorage adds the latest Storage to the storages
func (*GlobalStorage) Get ¶
func (gs *GlobalStorage) Get(date string) (*Storage, bool)
Get safely gets a Storage from the storages
func (*GlobalStorage) Load ¶
func (gs *GlobalStorage) Load() error
Load loads the GlobalStorage from the cache
func (*GlobalStorage) Save ¶
func (gs *GlobalStorage) Save()
Save saves the GlobalStorage to the cache
type Package ¶
type Package struct { Name string `json:"name"` Date string `json:"date"` OriginURL string `json:"origin_url"` LocalURL string `json:"local_url"` RemoteURL string `json:"remote_url"` MD5 string `json:"md5"` Size int `json:"size"` Platform gapps.Platform `json:"platform"` Android gapps.Android `json:"android"` Variant gapps.Variant `json:"variant"` }
Package describes the OpenGApps package
func (*Package) CreateMirror ¶
CreateMirror creates a new mirror for the package
type Storage ¶
type Storage struct { Date string `json:"date"` Count int `json:"count"` Packages map[gapps.Platform]map[gapps.Android]map[gapps.Variant]*Package `json:"packages"` // contains filtered or unexported fields }
Storage describes a package storage
func GetPackageStorage ¶
func GetPackageStorage(ctx context.Context, ghClient *github.Client, dq *net.DownloadQueue, cfg *viper.Viper, releaseTag string) (*Storage, error)
GetPackageStorage creates and fills a new Storage
Click to show internal directories.
Click to hide internal directories.