misc

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZipSuffix = ".zip"
	TgzSuffix = ".tar.gz"

	DefaultResourceName = "resource"

	DispensePrefix = "dispense"
)
View Source
const (
	ContentTypeZip   = "application/zip"
	ContentTypeTarGz = "application/x-gtar"
)
View Source
const (
	GenerateTagKey           = "generate"
	LoadStoreNewVersionKey   = "LoadStoreNewVersionTx"
	ProcessStoragePendingKey = "ProcessStoragePending"
)

used by diff

View Source
const (
	ProcessStorageTask = "storage"
	DiffTask           = "diff"
	PurgeTask          = "purge"
)

used by task

View Source
const (
	ProcessFlag = "1"
)
View Source
const ResourceKey = "rid"
View Source
const SniffLen = 4
View Source
const StatusPollingPrefix = "status:polling"

StatusPollingPrefix status polling

View Source
const (
	VersionPrefix = "ver"
)

Variables

View Source
var (
	ZipMagicHeader = []byte("PK\x03\x04")
	TgzMagicHeader = []byte("\x1F\x8B\x08")
)
View Source
var (
	StorageInfoNotFoundError = errs.NewUnchecked("storage info not found")

	NotAllowedFileTypeError = errs.NewUnchecked("not allowed file type")

	ResourceLimitError = errs.NewUnchecked("your cdkey has reached the most downloads today").WithHttpCode(fiber.StatusForbidden)
)
View Source
var (
	OsMap = map[string]string{

		"": "",

		"windows": "windows",
		"win":     "windows",
		"win32":   "windows",

		"linux": "linux",

		"darwin": "darwin",
		"macos":  "darwin",
		"mac":    "darwin",
		"osx":    "darwin",

		"android": "android",
	}

	ArchMap = map[string]string{

		"":    "",
		"any": "",

		"386":    "386",
		"x86":    "386",
		"x86_32": "386",
		"i386":   "386",

		"amd64":   "amd64",
		"x64":     "amd64",
		"x86_64":  "amd64",
		"intel64": "amd64",

		"arm": "arm",

		"arm64":   "arm64",
		"aarch64": "arm64",
	}

	ChannelMap = map[string]string{

		"":       "stable",
		"stable": "stable",

		"beta": "beta",

		"alpha": "alpha",
	}

	TotalChannel = []string{"stable", "beta", "alpha"}
	TotalOs      = []string{"", "windows", "linux", "darwin", "android"}
	TotalArch    = []string{"", "386", "arm64", "amd64", "arm"}
)

Functions

func StatusPollingKey added in v1.3.1

func StatusPollingKey(id string) string

Types

type PollingStatus added in v1.3.1

type PollingStatus int
const (
	StatusPending PollingStatus = iota + 1
	StatusCompleted
	StatusFailed
	StatusNotFound
)

func ParsePollingStatus added in v1.3.1

func ParsePollingStatus(s string) (PollingStatus, bool)

Jump to

Keyboard shortcuts

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