urlresolver

package
v0.0.0-...-ff5ca92 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIRecord

type APIRecord struct {
	VariantList []string `json:"variants"`
}

APIRecord holds all of the gapps Variants

type Application

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

Application holds all the services and config

func New

func New(cfg *viper.Viper, cache *cache.Cache) (*Application, error)

New creates new instance of Application

func (*Application) Close

func (a *Application) Close() error

Close stops the Application

func (*Application) Run

func (a *Application) Run() error

Run launches the Application

type ArchRecord

type ArchRecord struct {
	APIList map[string]APIRecord `json:"apis"`
	Date    string               `json:"date"`
}

ArchRecord holds the list of gapps Variants per API and its date

type DownloadResponse

type DownloadResponse struct {
	ZIP          string `json:"zip,omitempty"`
	ZIPMirrors   string `json:"zip_mirrors,omitempty"`
	MD5          string `json:"md5,omitempty"`
	VersionInfo  string `json:"version_info,omitempty"`
	SourceReport string `json:"source_report,omitempty"`
	Error        string `json:"error,omitempty"`
	// contains filtered or unexported fields
}

DownloadResponse is used for the /download endpoint

func (*DownloadResponse) HasCriticalError

func (r *DownloadResponse) HasCriticalError() bool

HasCriticalError reports if we had an error which lead to the missing link

func (*DownloadResponse) SetField

func (r *DownloadResponse) SetField(field, value string)

SetField safely sets the field value

func (*DownloadResponse) ToJSON

func (r *DownloadResponse) ToJSON() []byte

ToJSON forms JSON body from a struct, ignoring Marshal error

type LatestRelease

type LatestRelease struct {
	Arch   string         `json:"arch"`
	Date   string         `json:"date"`
	Assets []ReleaseAsset `json:"assets"`
}

LatestRelease describes the latest gapps release

type ListResponse

type ListResponse struct {
	ArchList map[string]ArchRecord `json:"archs,omitempty"`
	Error    string                `json:"error,omitempty"`
	// contains filtered or unexported fields
}

ListResponse is used for the /list endpoint

func (*ListResponse) AddPackage

func (r *ListResponse) AddPackage(date string, p gapps.Platform, a gapps.Android, v gapps.Variant)

AddPackage safely adds the package to the ListResponse

func (*ListResponse) ToJSON

func (r *ListResponse) ToJSON() []byte

ToJSON forms JSON body from a struct, ignoring Marshal error

type ReleaseAsset

type ReleaseAsset struct {
	API      string   `json:"api"`
	Variants []string `json:"variants"`
}

ReleaseAsset describes the gapps release for API and its available variants

Jump to

Keyboard shortcuts

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