environmet

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// WatchNamespace is the constant for env variable WATCH_NAMESPACE
	// which specifies the Namespace to watch.
	// An empty value means the operator is running with cluster scope.
	WatchNamespace = "WATCH_NAMESPACE"

	// TykMode defines what environment the operator is running. The values are oss
	// for open source version and pro for pro version
	TykMode = "TYK_MODE"

	// TykURL holds the url to either tyk gateway or tyk dashboard
	TykURL = "TYK_URL"

	// TykAuth holds the authorization token used to make api calls to the
	// gateway/dashboard
	TykAuth = "TYK_AUTH"

	// TykORG holds the org id which perform api tasks with
	TykORG = "TYK_ORG"

	// SkipVerify the client will skip tls verification if this is true
	SkipVerify = "TYK_TLS_INSECURE_SKIP_VERIFY"

	// IngressClass overides the default class to watch for ingress
	IngressClass = "WATCH_INGRESS_CLASS"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	Namespace          string
	Mode               string
	InsecureSkipVerify bool
	URL                string
	Auth               string
	Org                string
	IngressClass       string
}

Env holds values needed to talk to the gateway or the dashboard API

func (*Env) JoinURL

func (e *Env) JoinURL(parts ...string) string

JoinURL returns addition of parts to the base e.URL

func (Env) Merge

func (e Env) Merge(n Env) Env

func (*Env) Parse

func (e *Env) Parse() error

Parse loads env vars into e and validates them, returning an error if validation fails.

Jump to

Keyboard shortcuts

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