constant

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ARCH_X86 = "x86"

	ARCH_AMD64 = "amd64"

	ARCH_ARM64 = "arm64"

	ARCH_ARM_V5 = "armv5"
	ARCH_ARM_V6 = "armv6"
	ARCH_ARM_V7 = "armv7"

	ARCH_MIPS       = "mips"
	ARCH_MIPS_SF    = "mipssf"
	ARCH_MIPS_LE    = "mipsle"
	ARCH_MIPS_LE_SF = "mipslesf"

	ARCH_MIPS64       = "mips64"
	ARCH_MIPS64_SF    = "mips64sf"
	ARCH_MIPS64_LE    = "mips64le"
	ARCH_MIPS64_LE_SF = "mips64lesf"

	ARCH_PPC       = "ppc"
	ARCH_PPC_SF    = "ppcsf"
	ARCH_PPC_LE    = "ppcle"
	ARCH_PPC_LE_SF = "ppclesf"

	ARCH_PPC64    = "ppc64"
	ARCH_PPC64_LE = "ppc64le"

	ARCH_RISCV_64 = "riscv64"

	ARCH_S390X = "s390x"

	ARCH_IA64 = "ia64"
)

Arch values for matrix nolint:revive

View Source
const (
	ArchiveFormat_Zip = "zip"
	ArchiveFormat_Tar = "tar"
)

nolint:revive

View Source
const (
	CompressionMethod_Gzip    = "gzip"
	CompressionMethod_Bzip2   = "bzip2"
	CompressionMethod_XZ      = "xz"
	CompressionMethod_LZMA    = "lzma"
	CompressionMethod_ZSTD    = "zstd"
	CompressionMethod_DEFLATE = "deflate"
)

nolint:revive

View Source
const (
	ENV_DUKKHA_CACHE_DIR   = "DUKKHA_CACHE_DIR"
	ENV_DUKKHA_WORKING_DIR = "DUKKHA_WORKING_DIR"

	ENV_GIT_BRANCH         = "GIT_BRANCH"
	ENV_GIT_COMMIT         = "GIT_COMMIT"
	ENV_GIT_TAG            = "GIT_TAG"
	ENV_GIT_WORKTREE_CLEAN = "GIT_WORKTREE_CLEAN"
	ENV_GIT_DEFAULT_BRANCH = "GIT_DEFAULT_BRANCH"

	ENV_TIME_ZONE        = "TIME_ZONE"
	ENV_TIME_ZONE_OFFSET = "TIME_ZONE_OFFSET"
	ENV_TIME_YEAR        = "TIME_YEAR"
	ENV_TIME_MONTH       = "TIME_MONTH"
	ENV_TIME_DAY         = "TIME_DAY"
	ENV_TIME_HOUR        = "TIME_HOUR"
	ENV_TIME_MINUTE      = "TIME_MINUTE"
	ENV_TIME_SECOND      = "TIME_SECOND"

	// for linux: ID value in /etc/os-release
	ENV_HOST_OS = "HOST_OS"

	// for linux: VERSION_ID value in /etc/os-release
	ENV_HOST_OS_VERSION = "HOST_OS_VERSION"

	// value of runtime.GOOS
	ENV_HOST_KERNEL = "HOST_KERNEL"

	// value of uname -r syscall
	ENV_HOST_KERNEL_VERSION = "HOST_KERNEL_VERSION"

	// arch value
	ENV_HOST_ARCH = "HOST_ARCH"

	// triple name parts
	ENV_MATRIX_KERNEL = "MATRIX_KERNEL"
	ENV_MATRIX_ARCH   = "MATRIX_ARCH"
	ENV_MATRIX_LIBC   = "MATRIX_LIBC"
)

Environment variables for all tasks nolint:revive

View Source
const (
	KERNEL_WINDOWS    = "windows"
	KERNEL_LINUX      = "linux"
	KERNEL_DARWIN     = "darwin"
	KERNEL_FREEBSD    = "freebsd"
	KERNEL_NETBSD     = "netbsd"
	KERNEL_OPENBSD    = "openbsd"
	KERNEL_SOLARIS    = "solaris"
	KERNEL_ILLUMOS    = "illumos"
	KERNEL_JAVASCRIPT = "js"
	KERNEL_AIX        = "aix"
	KERNEL_ANDROID    = "android"
	KERNEL_IOS        = "ios"
	KERNEL_PLAN9      = "plan9"
)

Kernel names are GOOS values nolint:revive

View Source
const (
	LIBC_GNU  = "gnu"
	LIBC_MSVC = "msvc"
	LIBC_MUSL = "musl"
)

nolint:revive

View Source
const (
	OS_DEBIAN = "debian"
	OS_UBUNTU = "ubuntu"

	OS_ALPINE = "alpine"

	OS_WINDOWS = "windows"

	OS_MACOS = "macos"
)

nolint:revive

View Source
const (
	// debian apt
	PM_APT = "apt"

	// alpine apk
	PM_APK = "apk"

	// centos yum
	PM_YUM = "yum"

	// fedora dnf
	PM_DNF = "dnf"

	// nix
	PM_NIX = "nix"

	// homebrew
	PM_BREW = "brew"
)

nolint:revive

View Source
const (
	// Placeholder for current tool cmd (string slice)
	DUKKHA_TOOL_CMD = "DUKKHA_TOOL_CMD"
)

nolint:revive

View Source
const (
	DefaultCacheDir = ".dukkha/cache"
)

nolint:revive

Variables

This section is empty.

Functions

func GetAlpineArch

func GetAlpineArch(mArch string) (string, bool)

func GetAlpineTripleName

func GetAlpineTripleName(mArch string) (string, bool)

GetAlpineTripleName of matrix arch reference: https://more.musl.cc/10/x86_64-linux-musl/

func GetAppleArch

func GetAppleArch(mArch string) (string, bool)

TODO: determine apple arch

func GetAppleTripleName

func GetAppleTripleName(mArch, darwinVersion string) (string, bool)

func GetArch added in v0.2.0

func GetArch(platform, mArch string) (string, bool)

func GetDebianArch

func GetDebianArch(mArch string) (string, bool)

func GetDebianTripleName

func GetDebianTripleName(mArch, targetKernel, targetLibc string) (string, bool)

func GetDockerArch

func GetDockerArch(mArch string) (string, bool)

func GetDockerArchVariant

func GetDockerArchVariant(mArch string) (string, bool)

func GetDockerHubArch

func GetDockerHubArch(mArch, mKernel string) (string, bool)

func GetDockerOS

func GetDockerOS(mKernel string) (string, bool)

func GetGNUArch added in v0.2.0

func GetGNUArch(mArch string) (string, bool)

func GetGolangArch

func GetGolangArch(mArch string) (string, bool)

func GetGolangOS

func GetGolangOS(mKernel string) (string, bool)

func GetLLVMArch added in v0.2.0

func GetLLVMArch(mArch string) (string, bool)

func GetLLVMTripleName added in v0.4.0

func GetLLVMTripleName(mArch, targetKernel, targetLibc string) (string, bool)

ref: https://llvm.org/doxygen/Triple_8h_source.html

func GetOciArch

func GetOciArch(mArch string) (string, bool)

func GetOciArchVariant

func GetOciArchVariant(mArch string) (string, bool)

func GetOciOS

func GetOciOS(mKernel string) (string, bool)

func GetQemuArch

func GetQemuArch(mArch string) (string, bool)

func GetRustArch added in v0.2.0

func GetRustArch(mArch string) (string, bool)

func GetZigArch added in v0.2.0

func GetZigArch(mArch string) (string, bool)

Types

type ArchMappingValues added in v0.2.0

type ArchMappingValues struct {
	Alpine string
	Debian string
	GNU    string

	Golang string
	Docker string
	OCI    string

	DockerHub string

	Qemu string

	// TODO
	LLVM string
	Zig  string
	Rust string
}

type ZipCompressionMethod added in v0.5.1

type ZipCompressionMethod uint16

https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT#4.4.5

const (
	ZipCompressionMethod_Store   ZipCompressionMethod = 0
	ZipCompressionMethod_Deflate ZipCompressionMethod = 8
	ZipCompressionMethod_BZIP2   ZipCompressionMethod = 12
	ZipCompressionMethod_LZMA    ZipCompressionMethod = 14
	ZipCompressionMethod_ZSTD    ZipCompressionMethod = 93
	ZipCompressionMethod_XZ      ZipCompressionMethod = 95
)

nolint:revive

func (ZipCompressionMethod) String added in v0.5.1

func (m ZipCompressionMethod) String() string

Jump to

Keyboard shortcuts

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