gcp

package
v0.0.0-...-0c68bc3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Provider provides header for GCP Cloud Info
	Provider = "table {{.Project}}\t{{.VpcType}}" +
		"\t{{.FirewallTags}}"

	// Region provides header for GCP Region Cloud Info
	Region = "table {{.InstanceTemplate}}"

	// EAR1 for EAR listing
	EAR1 = "table {{.LocationID}}\t{{.ProtectionLevel}}"

	// EAR2 for EAR listing
	EAR2 = "table {{.GCPConfig}}"

	// EAR3 for EAR listing
	EAR3 = "table {{.GcpKmsEndpoint}}\t{{.KeyRingID}}\t{{.CryptoKeyID}}"
)

Variables

This section is empty.

Functions

func NewEARFormat

func NewEARFormat(source string) formatter.Format

NewEARFormat for formatting output

func NewProviderFormat

func NewProviderFormat(source string) formatter.Format

NewProviderFormat for formatting output

func NewRegionFormat

func NewRegionFormat(source string) formatter.Format

NewRegionFormat for formatting output

Types

type EARContext

EARContext for kms outputs

func NewEARContext

func NewEARContext() *EARContext

NewEARContext creates a new context for rendering ear

func (*EARContext) CryptoKeyID

func (c *EARContext) CryptoKeyID() string

CryptoKeyID fetches the crypto key ID

func (*EARContext) GCPConfig

func (c *EARContext) GCPConfig() string

GCPConfig fetches the GCP config

func (*EARContext) GcpKmsEndpoint

func (c *EARContext) GcpKmsEndpoint() string

GcpKmsEndpoint fetches the GCP KMS endpoint

func (*EARContext) KeyRingID

func (c *EARContext) KeyRingID() string

KeyRingID fetches the key ring ID

func (*EARContext) LocationID

func (c *EARContext) LocationID() string

LocationID fetches the location ID

func (*EARContext) MarshalJSON

func (c *EARContext) MarshalJSON() ([]byte, error)

MarshalJSON function

func (*EARContext) ProtectionLevel

func (c *EARContext) ProtectionLevel() string

ProtectionLevel fetches the protection level

type ProviderContext

type ProviderContext struct {
	formatter.HeaderContext
	formatter.Context
	Gcp ybaclient.GCPCloudInfo
}

ProviderContext for provider outputs

func NewProviderContext

func NewProviderContext() *ProviderContext

NewProviderContext creates a new context for rendering provider

func (*ProviderContext) FirewallTags

func (c *ProviderContext) FirewallTags() string

FirewallTags fetches the YB firewall tags

func (*ProviderContext) MarshalJSON

func (c *ProviderContext) MarshalJSON() ([]byte, error)

MarshalJSON function

func (*ProviderContext) Project

func (c *ProviderContext) Project() string

Project fetches the GCE project

func (*ProviderContext) VpcType

func (c *ProviderContext) VpcType() string

VpcType fetches the VPC type

type RegionContext

type RegionContext struct {
	formatter.HeaderContext
	formatter.Context
	Region ybaclient.GCPRegionCloudInfo
}

RegionContext for provider outputs

func NewRegionContext

func NewRegionContext() *RegionContext

NewRegionContext creates a new context for rendering provider

func (*RegionContext) InstanceTemplate

func (c *RegionContext) InstanceTemplate() string

InstanceTemplate fetches the instance template

func (*RegionContext) MarshalJSON

func (c *RegionContext) MarshalJSON() ([]byte, error)

MarshalJSON function

Jump to

Keyboard shortcuts

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