collector

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReleaseUrl  string = "https://download.blender.org/release/"
	DownloadUrl string = "https://builder.blender.org/download"
)
View Source
const (
	WindowsPlatformRegex string = "(blender-.+win.+64.+zip)"
	LinuxPlatformRegex   string = "(blender-.+lin.+64.+tar)"
	MacPlatformRegex     string = "(blender-.+(macos|darwin).+dmg)"
	ArmMacPlatformRegex  string = "(arm64)"
	VersionNumberRegex   string = "[0-9]+([.][0-9]+)"
)

Variables

View Source
var Platforms = [4]string{"windows", "linux", "macos arm", "macos intel"}

Functions

func FindVerisonNumberStr

func FindVerisonNumberStr(input string) string

func GenerateHash added in v0.2.0

func GenerateHash(text string) string

func ParseMajorMinorVersionNumber

func ParseMajorMinorVersionNumber(input string) (float32, error)

func ParsePlatform

func ParsePlatform(name string) string

Types

type Build

type Build struct {
	Platform    string
	Name        string
	Version     string
	Tag         string
	Hash        string
	DownloadUrl string
	CrawledAt   time.Time
}

type Collector added in v0.2.0

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

func New added in v0.2.0

func New(config *Config) *Collector

func (*Collector) GetStableBuilds added in v0.2.0

func (c *Collector) GetStableBuilds() []Build

type Config added in v0.2.0

type Config struct {
	Proxy           string
	UserAgent       string
	Parallelism     int
	RandomDelay     time.Duration
	OldestSupported float32
}

func DefaultConfig added in v0.2.0

func DefaultConfig() *Config

Jump to

Keyboard shortcuts

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