shared

package
v0.0.0-...-dcd54df Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: Apache-2.0 Imports: 6 Imported by: 35

Documentation

Index

Constants

View Source
const (
	// DefaultManagementBase is the default management API URL for Apigee
	DefaultManagementBase = "https://api.enterprise.apigee.com"

	// HybridManagementBase is the default management API URL for Apigee Hybrid
	HybridManagementBase = "https://apigee.googleapis.com"

	// DefaultRouterBase is the default (fake format) for base of the organization router URL
	DefaultRouterBase = "https://{org}-{env}.apigee.net"

	// RouterBaseFormat is the real format for base of the organization router URL
	RouterBaseFormat = "https://%s-%s.apigee.net"
)

Variables

This section is empty.

Functions

func Errorf

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

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

func Fatalf

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

Fatalf is a FormatFn that prints the formatted string to os.Stderr and then calls os.Exit().

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 RootArgs

type RootArgs struct {
	RouterBase     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
	IsHybrid       bool

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

RootArgs is the base struct to hold all command arguments

func (*RootArgs) Resolve

func (r *RootArgs) Resolve(skipAuth 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