common

package
v0.0.0-...-b25b198 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package common defines generic constants and structs

Package common defines generic constants and structs

Index

Constants

View Source
const (
	PluginStatusInstalled       = "installed"
	PluginStatusNotInstalled    = "not installed"
	PluginStatusUpdateAvailable = "update available"
	PluginScopeStandalone       = "Standalone"
	PluginScopeContext          = "Context"
)

Plugin status and scope constants

View Source
const (
	DiscoveryTypeOCI        = "oci"
	DiscoveryTypeLocal      = "local"
	DiscoveryTypeGCP        = "gcp"
	DiscoveryTypeKubernetes = "kubernetes"
	DiscoveryTypeREST       = "rest"
)

DiscoveryType constants

View Source
const (
	DistributionTypeOCI   = "oci"
	DistributionTypeLocal = "local"
)

DistributionType constants

View Source
const (
	// DefaultOSArch defines default OS/ARCH
	DefaultOSArch = "darwin-amd64 linux-amd64 windows-amd64"
)

Variables

View Source
var (
	// DefaultCacheDir is the default cache directory
	DefaultCacheDir = filepath.Join(xdg.Home, ".cache", "tanzu")

	// DefaultPluginRoot is the default plugin root.
	DefaultPluginRoot = filepath.Join(xdg.DataHome, "tanzu-cli")

	// DefaultLocalPluginDistroDir is the default Local plugin distribution root directory
	// This directory will be used for local discovery and local distribute of plugins
	DefaultLocalPluginDistroDir = filepath.Join(xdg.Home, ".config", "tanzu-plugins")
)

Functions

func GetGCPBucket

func GetGCPBucket(ctx context.Context, bucketName string) (*storage.BucketHandle, error)

GetGCPBucket returns gcp storage bucket handle

Types

type Arch

type Arch string

Arch represents a system architecture.

const (
	// Linux386 arch.
	Linux386 Arch = "linux_386"
	// LinuxAMD64 arch.
	LinuxAMD64 Arch = "linux_amd64"
	// LinuxARM64 arch.
	LinuxARM64 Arch = "linux_arm64"
	// DarwinAMD64 arch.
	DarwinAMD64 Arch = "darwin_amd64"
	// DarwinARM64 arch.
	DarwinARM64 Arch = "darwin_arm64"
	// Win386 arch.
	Win386 Arch = "windows_386"
	// WinAMD64 arch.
	WinAMD64 Arch = "windows_amd64"
)

func BuildArch

func BuildArch() Arch

BuildArch returns compile time build arch or locates it.

func (Arch) IsWindows

func (a Arch) IsWindows() bool

IsWindows tells if an arch is windows.

Jump to

Keyboard shortcuts

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