misc

package
v0.4.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ResourceKey     = "rid"
	RegionHeaderKey = "X-Region"
)
View Source
const (
	FullUpdateType        = "full"
	IncrementalUpdateType = "incremental"

	ResourcePrefix = "res"

	ZipSuffix         = ".zip"
	TarGzSuffix       = ".tar.gz"
	SpecificSeparator = "$#@"

	DispensePrefix = "dispense"
)

Variables

View Source
var (
	StorageInfoNotFound = errors.New("storage info not found")

	ResourceLimitError = errors.New("your cdkey has reached the most downloads today")
)
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{

		"": "",

		"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",
	}
	AllChannel = []string{"stable", "beta", "alpha"}
)
View Source
var LIT = &sync.Map{}

Functions

func CompareIfAbsent

func CompareIfAbsent(m *sync.Map, key string) *atomic.Int32

Types

type RemoteError

type RemoteError string

func (RemoteError) Error

func (r RemoteError) Error() string

Jump to

Keyboard shortcuts

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