httpstate

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: Apache-2.0 Imports: 46 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// PulumiCloudURL is the Cloud URL used if no environment or explicit cloud is chosen.
	PulumiCloudURL = "https://" + defaultAPIDomainPrefix + "pulumi.com"

	// AccessTokenEnvVar is the environment variable used to bypass a prompt on login.
	AccessTokenEnvVar = "PULUMI_ACCESS_TOKEN"
)

Variables

This section is empty.

Functions

func DefaultURL

func DefaultURL() string

DefaultURL returns the default cloud URL. This may be overridden using the PULUMI_API environment variable. If no override is found, and we are authenticated with a cloud, choose that. Otherwise, we will default to the https://api.pulumi.com/ endpoint.

func IsValidAccessToken

func IsValidAccessToken(ctx context.Context, cloudURL, accessToken string) (bool, string, error)

IsValidAccessToken tries to use the provided Pulumi access token and returns if it is accepted or not. Returns error on any unexpected error.

func ValueOrDefaultURL

func ValueOrDefaultURL(cloudURL string) string

ValueOrDefaultURL returns the value if specified, or the default cloud URL otherwise.

func WelcomeUser

func WelcomeUser(opts display.Options)

WelcomeUser prints a Welcome to Pulumi message.

Types

type Backend

type Backend interface {
	backend.Backend

	CloudURL() string

	CancelCurrentUpdate(ctx context.Context, stackRef backend.StackReference) error
	StackConsoleURL(stackRef backend.StackReference) (string, error)
	Client() *client.Client
}

Backend extends the base backend interface with specific information about cloud backends.

func Login

func Login(ctx context.Context, d diag.Sink, cloudURL string, opts display.Options) (Backend, error)

Login logs into the target cloud URL and returns the cloud backend for it.

func New

func New(d diag.Sink, cloudURL string) (Backend, error)

New creates a new Pulumi backend for the given cloud API URL and token.

type DisplayEventType

type DisplayEventType string
const (
	UpdateEvent   DisplayEventType = "UpdateEvent"
	ShutdownEvent DisplayEventType = "Shutdown"
)

type Stack

type Stack interface {
	backend.Stack
	CloudURL() string                           // the URL to the cloud containing this stack.
	OrgName() string                            // the organization that owns this stack.
	ConsoleURL() (string, error)                // the URL to view the stack's information on Pulumi.com.
	CurrentOperation() *apitype.OperationStatus // in progress operation, if applicable.
	Tags() map[apitype.StackTagName]string      // the stack's tags.
	StackIdentifier() client.StackIdentifier
}

Stack is a cloud stack. This simply adds some cloud-specific properties atop the standard backend stack interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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