github

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: Apache-2.0 Imports: 17 Imported by: ? 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

func NewClient

func NewClient(ctx context.Context, opts ...Option) (*client, error)

NewClient creates new Github client

Types

type LatestRelease

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

LatestRelease describes the latest gapps release

type Option

type Option func(*client) error

Option serves as the client configuration

func WithConfig

func WithConfig(cfg *viper.Viper) Option

WithConfig provides viper config to the client

func WithStorage

func WithStorage(storage Storage) Option

WithStorage provides Storage to the client

type ReleaseAsset

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

ReleaseAsset describes the gapps release for API and its available variants

type Storage

type Storage interface {
	Close(delete bool) error
	Keys() ([]string, error)
	Get(key string) ([]byte, error)
	GetMultipleBySuffix(suffix string) ([]string, [][]byte, error)
	Put(key string, val []byte) error
	Delete(key string) error
	Purge() error
}

Storage describes the storage

Jump to

Keyboard shortcuts

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