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: 0

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