shared

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GCPExperienceBase is the default management API URL for GCP Experience
	GCPExperienceBase = "https://apigee.googleapis.com"

	// LegacySaaSManagementBase is the default base for legacy SaaS management operations
	LegacySaaSManagementBase = "https://api.enterprise.apigee.com"

	// DefaultManagementBase is the base URL for GCE Experience management operations
	DefaultManagementBase = GCPExperienceBase

	// RuntimeBaseFormat is a format for base of the organization runtime URL (legacy SaaS and OPDK)
	RuntimeBaseFormat = "https://%s-%s.apigee.net"

	// LegacySaaSInternalBase is the internal API used for auth and analytics
	LegacySaaSInternalBase = "https://istioservices.apigee.net/edgemicro"
)

Variables

This section is empty.

Functions

func AddCommandWithFlags

func AddCommandWithFlags(c *cobra.Command, rootArgs *RootArgs, cmds ...*cobra.Command)

AddCommandWithFlags adds to the root command with standard flags

func Errorf

func Errorf(format string, args ...interface{})

Errorf is a FormatFn that prints the formatted string to os.Stderr.

func FormatFnWriter

func FormatFnWriter(fn FormatFn) io.Writer

FormatFnWriter bridges io.Writer to FormatFn

func NoPrintf

func NoPrintf(format string, args ...interface{})

NoPrintf is a FormatFn that does nothing

func Printf

func Printf(format string, args ...interface{})

Printf is a FormatFn that prints the formatted string to os.Stdout.

Types

type BuildInfoType

type BuildInfoType struct {
	Version string
	Commit  string
	Date    string
}

BuildInfoType holds version information

var BuildInfo BuildInfoType

BuildInfo is populated by main init()

type FormatFn

type FormatFn func(format string, args ...interface{})

FormatFn formats the supplied arguments according to the format string provided and executes some set of operations with the result.

type KubernetesCRD

type KubernetesCRD struct {
	APIVersion string            `yaml:"apiVersion"`
	Kind       string            `yaml:"kind"`
	Metadata   Metadata          `yaml:"metadata"`
	Type       string            `yaml:"type,omitempty"`
	Data       map[string]string `yaml:"data"`
}

KubernetesCRD has generic Kubernetes headers for CRD generation

type Metadata

type Metadata struct {
	Name      string `yaml:"name"`
	Namespace string `yaml:"namespace"`
}

Metadata is for Kubernetes CRD generation

type OverrideEnv

type OverrideEnv struct {
	Name      string `yaml:"name"`
	HostAlias string `yaml:"hostAlias"`
}

OverrideEnv is subconfig of overrideConfig

type RootArgs

type RootArgs struct {
	RuntimeBase        string // "https://org-env.apigee.net"
	ManagementBase     string // "https://api.enterprise.apigee.com"
	Verbose            bool
	Org                string
	Env                string
	Username           string
	Password           string
	Token              string
	NetrcPath          string
	IsOPDK             bool
	IsLegacySaaS       bool
	IsGCPManaged       bool
	ConfigPath         string
	InsecureSkipVerify bool

	ServerConfig *server.Config // config loaded from ConfigPath

	// the following is derived in Resolve()
	InternalProxyURL      string
	RemoteServiceProxyURL string
	Client                *apigee.EdgeClient
	ClientOpts            *apigee.EdgeClientOptions
}

RootArgs is the base struct to hold all command arguments

func (*RootArgs) PrintMissingFlags

func (r *RootArgs) PrintMissingFlags(missingFlagNames []string) error

PrintMissingFlags will aggregate and print an error for the passed set of flags

func (*RootArgs) Resolve

func (r *RootArgs) Resolve(skipAuth, requireRuntime bool) error

Resolve is used to populate shared args, it's automatically called prior when creating the root command

Jump to

Keyboard shortcuts

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