common

package
v0.16.0-dev Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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")
)
View Source
var (
	// IsContextAwareDiscoveryEnabled defines default to use when the user has not configured a value
	// This variable is configured at the build time of the CLI
	IsContextAwareDiscoveryEnabled = ""
)

Functions

func ContextAwareDiscoveryEnabled added in v0.11.0

func ContextAwareDiscoveryEnabled() bool

ContextAwareDiscoveryEnabled returns true if the IsContextAwareDiscoveryEnabled is set to true during build time

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