distros

package
v0.0.0-...-8fd8d89 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Debian

type Debian struct {
	Versions []models.Image
}

func (*Debian) BaseURL

func (deb *Debian) BaseURL() string

func (*Debian) Fetch

func (deb *Debian) Fetch()

func (*Debian) FetchJsonFile

func (deb *Debian) FetchJsonFile(path string, rawUrl string) map[string]interface{}

func (*Debian) FetchSub

func (deb *Debian) FetchSub(path string, rawUrl string) []string

func (*Debian) GetVersions

func (deb *Debian) GetVersions() []models.Image

func (*Debian) Name

func (deb *Debian) Name() string

func (*Debian) SetVersions

func (deb *Debian) SetVersions(versions []models.Image)

type DistroConfig

type DistroConfig struct {
	DownloadProcessFunction func(float64, int64, int64)
	DoneFunction            func(string, int64, time.Duration)
	ErrorFunction           func(string, error)
	DownloadFolder          string
	MakePath                bool
	CacheFolder             string
	CacheDuration           time.Duration
}

type Distros

type Distros struct {
	List   map[string]models.Distro
	Config *DistroConfig
}

func NewDistros

func NewDistros(config *DistroConfig) *Distros

func (*Distros) Find

func (d *Distros) Find(os string, arch archtypes.Arch, version string, fileType string) []*File

func (*Distros) GetDistro

func (d *Distros) GetDistro(name string) *models.Distro

func (*Distros) Load

func (d *Distros) Load(name string) error

type File

type File struct {
	models.ImageFile
	models.Image
	// contains filtered or unexported fields
}

func (*File) ControlChechsum

func (fl *File) ControlChechsum(path string, size int64, duration time.Duration)

func (*File) Download

func (fl *File) Download() error

func (*File) GetFileChechSum

func (fl *File) GetFileChechSum(path string, sumType string) string

func (*File) Wait

func (fl *File) Wait()

type RockyLinux

type RockyLinux struct {
	Versions []models.Image
}

func (*RockyLinux) BaseURL

func (rck *RockyLinux) BaseURL() string

func (*RockyLinux) Fetch

func (rck *RockyLinux) Fetch()

func (*RockyLinux) FetchFolder

func (rck *RockyLinux) FetchFolder(uri string, folder bool) []string

func (*RockyLinux) FindImages

func (rck *RockyLinux) FindImages(release string, releaseTitle string, version string, arch string, images []models.Image) *models.Image

func (*RockyLinux) GetVersions

func (rck *RockyLinux) GetVersions() []models.Image

func (*RockyLinux) Name

func (rck *RockyLinux) Name() string

func (*RockyLinux) SetVersions

func (rck *RockyLinux) SetVersions(versions []models.Image)

type Ubuntu

type Ubuntu struct {
	Versions []models.Image
}

func (*Ubuntu) BaseURL

func (ub *Ubuntu) BaseURL() string

func (*Ubuntu) Fetch

func (ub *Ubuntu) Fetch()

func (*Ubuntu) GetVersions

func (ub *Ubuntu) GetVersions() []models.Image

func (*Ubuntu) Name

func (ub *Ubuntu) Name() string

func (*Ubuntu) SetVersions

func (ub *Ubuntu) SetVersions(versions []models.Image)

Jump to

Keyboard shortcuts

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