storager

package
v0.0.0-...-0014ac3 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PKG_LIST = "index.plist"
)

Variables

View Source
var (
	RepoClient = &http.Client{
		Transport: &http.Transport{
			MaxIdleConns:    10,
			IdleConnTimeout: 30 * time.Second,
		},
	}
)

Functions

func Config

func Config(c *config.Config, lc logging.Config)

func GetFileSha256AndLen

func GetFileSha256AndLen(repo, file string) ([]byte, uint64)

func GetRepoData

func GetRepoData(repo, file string) ([]byte, bool, error)

func GetRepoPath

func GetRepoPath(repo string) string

func ReloadRepo

func ReloadRepo(repo string, arch string)

func StartUpdServer

func StartUpdServer()

Types

type Pkg

type Pkg struct {
	Sha [32]byte
	Len uint64
}

type RepoFile

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

func GetFile

func GetFile(repo string, file string, expSum []byte, expLen int64) (*RepoFile,
	bool, error)

func (*RepoFile) Close

func (rf *RepoFile) Close() error

func (*RepoFile) Read

func (rf *RepoFile) Read(p []byte) (n int, err error)

type Repository

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

func (*Repository) LoadDB

func (r *Repository) LoadDB() error

Jump to

Keyboard shortcuts

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